@ditojs/admin 0.268.0 → 0.269.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/dito-admin.common.js +819 -686
- package/dist/dito-admin.common.js.map +1 -1
- package/dist/dito-admin.umd.js +819 -686
- package/dist/dito-admin.umd.js.map +1 -1
- package/dist/dito-admin.umd.min.js +2 -2
- package/dist/dito-admin.umd.min.js.map +1 -1
- package/package.json +8 -8
- package/src/DitoAdmin.js +2 -1
- package/src/components/DitoButtons.vue +4 -6
- package/src/components/{DitoComponentContainer.vue → DitoContainer.vue} +4 -8
- package/src/components/DitoForm.vue +0 -1
- package/src/components/DitoLabel.vue +2 -2
- package/src/components/{DitoComponents.vue → DitoPane.vue} +18 -28
- package/src/components/DitoPanel.vue +10 -5
- package/src/components/DitoPanels.vue +4 -2
- package/src/components/DitoSchema.vue +32 -27
- package/src/components/DitoSchemaInlined.vue +1 -1
- package/src/components/index.js +5 -6
- package/src/mixins/DitoMixin.js +7 -2
- package/src/mixins/RouteMixin.js +1 -1
- package/src/mixins/SourceMixin.js +7 -3
- package/src/mixins/TypeMixin.js +13 -12
- package/src/styles/_button.sass +1 -1
- package/src/types/TypeCode.vue +1 -1
- package/src/types/TypeMarkup.vue +1 -1
- package/src/types/TypeMultiselect.vue +1 -1
- package/src/types/TypeSection.vue +1 -1
- package/src/types/TypeTreeList.vue +1 -3
- package/src/utils/schema.js +17 -7
- package/src/components/DitoButtonContainer.vue +0 -22
package/src/utils/schema.js
CHANGED
|
@@ -653,7 +653,7 @@ export function getSourceType(schemaOrType) {
|
|
|
653
653
|
) ?? null
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
-
export function getPanelSchema(schema, dataPath) {
|
|
656
|
+
export function getPanelSchema(schema, dataPath, tabComponent) {
|
|
657
657
|
return schema
|
|
658
658
|
? {
|
|
659
659
|
schema,
|
|
@@ -661,15 +661,20 @@ export function getPanelSchema(schema, dataPath) {
|
|
|
661
661
|
// This is used e.g. for $filters panels.
|
|
662
662
|
dataPath: schema.name
|
|
663
663
|
? appendDataPath(dataPath, schema.name)
|
|
664
|
-
: dataPath
|
|
664
|
+
: dataPath,
|
|
665
|
+
tabComponent
|
|
665
666
|
}
|
|
666
667
|
: null
|
|
667
668
|
}
|
|
668
669
|
|
|
669
|
-
export function getPanelSchemas(schemas, dataPath, panels = []) {
|
|
670
|
+
export function getPanelSchemas(schemas, dataPath, tabComponent, panels = []) {
|
|
670
671
|
if (schemas) {
|
|
671
672
|
for (const [key, schema] of Object.entries(schemas)) {
|
|
672
|
-
const panel = getPanelSchema(
|
|
673
|
+
const panel = getPanelSchema(
|
|
674
|
+
schema,
|
|
675
|
+
appendDataPath(dataPath, key),
|
|
676
|
+
tabComponent
|
|
677
|
+
)
|
|
673
678
|
if (panel) {
|
|
674
679
|
panels.push(panel)
|
|
675
680
|
}
|
|
@@ -678,16 +683,21 @@ export function getPanelSchemas(schemas, dataPath, panels = []) {
|
|
|
678
683
|
return panels
|
|
679
684
|
}
|
|
680
685
|
|
|
681
|
-
export function getAllPanelSchemas(
|
|
686
|
+
export function getAllPanelSchemas(
|
|
687
|
+
schema,
|
|
688
|
+
dataPath,
|
|
689
|
+
schemaComponent = null,
|
|
690
|
+
tabComponent = null
|
|
691
|
+
) {
|
|
682
692
|
const panel = getTypeOptions(schema)?.getPanelSchema?.(
|
|
683
693
|
schema,
|
|
684
694
|
dataPath,
|
|
685
695
|
schemaComponent
|
|
686
696
|
)
|
|
687
|
-
const panels = panel ? [getPanelSchema(panel, dataPath)] : []
|
|
697
|
+
const panels = panel ? [getPanelSchema(panel, dataPath, tabComponent)] : []
|
|
688
698
|
// Allow each component to provide its own set of panels, in
|
|
689
699
|
// addition to the default one (e.g. $filter):
|
|
690
|
-
getPanelSchemas(schema.panels, dataPath, panels)
|
|
700
|
+
getPanelSchemas(schema.panels, dataPath, tabComponent, panels)
|
|
691
701
|
return panels
|
|
692
702
|
}
|
|
693
703
|
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import DitoComponentContainer from './DitoComponentContainer'
|
|
3
|
-
|
|
4
|
-
// NOTE: DitoButtonContainer extends DitoComponentContainer and changes the
|
|
5
|
-
// behavior of computed properties for use with buttons.
|
|
6
|
-
// @vue/component
|
|
7
|
-
export default DitoComponentContainer.component('dito-button-container', {
|
|
8
|
-
computed: {
|
|
9
|
-
width() {
|
|
10
|
-
// Override DitoComponentContainer's width() to never use a default width:
|
|
11
|
-
return this.schema.width
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
containerStyle() {
|
|
15
|
-
// Remove 'flex-grow' from DitoComponentContainer's containerStyle()
|
|
16
|
-
return {
|
|
17
|
-
'flex-basis': this.percentage && `${this.percentage}%`
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
</script>
|