@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.
@@ -335,7 +335,7 @@ export default TypeComponent.register('multiselect', {
335
335
  }
336
336
  },
337
337
 
338
- focus() {
338
+ focusElement() {
339
339
  this.$refs.element.activate()
340
340
  },
341
341
 
@@ -2,7 +2,7 @@
2
2
  .dito-section(
3
3
  :class="{ 'dito-section-labelled' : !!schema.label }"
4
4
  )
5
- dito-components.dito-section-components(
5
+ dito-pane.dito-section-pane(
6
6
  :schema="getItemFormSchema(schema, item, context)"
7
7
  :dataPath="dataPath"
8
8
  :data="item"
@@ -52,9 +52,7 @@ export default TypeComponent.register([
52
52
  mixins: [SourceMixin],
53
53
 
54
54
  provide() {
55
- return {
56
- container: this
57
- }
55
+ return { container: this }
58
56
  },
59
57
 
60
58
  getSourceType(type) {
@@ -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(schema, appendDataPath(dataPath, key))
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(schema, dataPath, schemaComponent = null) {
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>