@vgip/meta-ui 1.4.0 → 1.4.1

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.
@@ -522,6 +522,9 @@ const metaNormalizer = (meta, integration, resourceType) => {
522
522
  if (meta.drafts) {
523
523
  metaV3.drafts = meta.drafts;
524
524
  }
525
+ if (meta.layout.children) {
526
+ metaV3.layout.children = meta.layout.children;
527
+ }
525
528
  const fieldFixesByIntegration = (f) => {
526
529
  if (f.type === 'boolean' && ((typeof (f.default) !== 'boolean') && f.default && !f.default.value)) {
527
530
  delete f.default;
@@ -694,25 +697,29 @@ const metaNormalizer = (meta, integration, resourceType) => {
694
697
  if (integrationCode === 'GOOGLE') {
695
698
  if (resourceType === 'Mail') {
696
699
  metaV3.layout.editable = false;
697
- metaV3.layout.children = [{
698
- label: 'Comments',
699
- name: 'comments',
700
- reference: {
701
- resourceType: 'Comment',
702
- label: 'Comment',
703
- editable: false
704
- }
705
- }];
700
+ if (!metaV3.layout.children) {
701
+ metaV3.layout.children = [{
702
+ label: 'Comments',
703
+ name: 'comments',
704
+ reference: {
705
+ resourceType: 'Comment',
706
+ label: 'Comment',
707
+ editable: false
708
+ }
709
+ }];
710
+ }
706
711
  }
707
712
  else if (resourceType === 'Task') {
708
- metaV3.layout.children = [{
709
- label: 'Subtasks',
710
- name: 'subTasks',
711
- reference: {
712
- resourceType: 'Subtask',
713
- label: 'Subtask'
714
- }
715
- }];
713
+ if (!metaV3.layout.children) {
714
+ metaV3.layout.children = [{
715
+ label: 'Subtasks',
716
+ name: 'subTasks',
717
+ reference: {
718
+ resourceType: 'Subtask',
719
+ label: 'Subtask'
720
+ }
721
+ }];
722
+ }
716
723
  }
717
724
  else if (resourceType === 'Comment') {
718
725
  metaV3.layout.editable = false;
@@ -720,15 +727,17 @@ const metaNormalizer = (meta, integration, resourceType) => {
720
727
  }
721
728
  else if (integrationCode === 'ZENDESK') {
722
729
  if (resourceType === 'Ticket') {
723
- metaV3.layout.children = [{
724
- label: 'Comments',
725
- name: 'comments',
726
- reference: {
727
- resourceType: 'Comment',
728
- label: 'Comment',
729
- editable: false
730
- }
731
- }];
730
+ if (!metaV3.layout.children) {
731
+ metaV3.layout.children = [{
732
+ label: 'Comments',
733
+ name: 'comments',
734
+ reference: {
735
+ resourceType: 'Comment',
736
+ label: 'Comment',
737
+ editable: false
738
+ }
739
+ }];
740
+ }
732
741
  }
733
742
  else if (resourceType === 'Comment') {
734
743
  metaV3.layout.editable = false;