@jsonforms/examples 3.9.0-alpha.1 → 3.9.0-alpha.2

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.
@@ -1,5 +1,6 @@
1
1
  import { convertDateToString, createTranslator, ArrayTranslationEnum, updateErrors, NOT_APPLICABLE } from '@jsonforms/core';
2
2
  import get from 'lodash/get';
3
+ import cloneDeep from 'lodash/cloneDeep';
3
4
  import localize from 'ajv-i18n/localize';
4
5
 
5
6
  const knownExamples = {};
@@ -1995,6 +1996,62 @@ const uischema_1713 = {
1995
1996
  },
1996
1997
  ],
1997
1998
  };
1999
+ const schema_2343 = {
2000
+ type: 'object',
2001
+ properties: {
2002
+ parc: {
2003
+ type: 'array',
2004
+ items: {
2005
+ type: 'object',
2006
+ properties: {
2007
+ id: {
2008
+ type: 'string',
2009
+ },
2010
+ },
2011
+ },
2012
+ },
2013
+ },
2014
+ };
2015
+ const arrayControl_2343 = {
2016
+ type: 'Control',
2017
+ scope: '#/properties/parc',
2018
+ options: {
2019
+ detail: {
2020
+ type: 'VerticalLayout',
2021
+ elements: [
2022
+ {
2023
+ type: 'HorizontalLayout',
2024
+ elements: [
2025
+ {
2026
+ type: 'Control',
2027
+ scope: '#/properties/id',
2028
+ },
2029
+ ],
2030
+ },
2031
+ ],
2032
+ },
2033
+ },
2034
+ };
2035
+ const uischema_2343 = {
2036
+ type: 'VerticalLayout',
2037
+ elements: [
2038
+ {
2039
+ type: 'Categorization',
2040
+ elements: [
2041
+ {
2042
+ type: 'Category',
2043
+ label: 'A1',
2044
+ elements: [cloneDeep(arrayControl_2343)],
2045
+ },
2046
+ {
2047
+ type: 'Category',
2048
+ label: 'A2',
2049
+ elements: [cloneDeep(arrayControl_2343)],
2050
+ },
2051
+ ],
2052
+ },
2053
+ ],
2054
+ };
1998
2055
  const translations$2 = {
1999
2056
  categoryLabelKey: 'Basic',
2000
2057
  address: {
@@ -2020,6 +2077,13 @@ registerExamples([
2020
2077
  schema: schema_1713,
2021
2078
  uischema: uischema_1713,
2022
2079
  },
2080
+ {
2081
+ name: 'categorization_2343',
2082
+ label: 'Categorization - Issue 2343',
2083
+ data: {},
2084
+ schema: schema_2343,
2085
+ uischema: uischema_2343,
2086
+ },
2023
2087
  ]);
2024
2088
 
2025
2089
  var categorization = /*#__PURE__*/Object.freeze({
@@ -2863,6 +2927,15 @@ const schema$y = {
2863
2927
  enum: ['foo', 'bar', 'foobar'],
2864
2928
  },
2865
2929
  },
2930
+ multiSelect: {
2931
+ type: 'array',
2932
+ title: 'Select Fruits',
2933
+ uniqueItems: true,
2934
+ items: {
2935
+ type: 'string',
2936
+ enum: ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry'],
2937
+ },
2938
+ },
2866
2939
  },
2867
2940
  };
2868
2941
  const uischema$y = {
@@ -2876,9 +2949,20 @@ const uischema$y = {
2876
2949
  type: 'Control',
2877
2950
  scope: '#/properties/multiEnum',
2878
2951
  },
2952
+ {
2953
+ type: 'Control',
2954
+ scope: '#/properties/multiSelect',
2955
+ options: {
2956
+ format: 'multiselect',
2957
+ },
2958
+ },
2879
2959
  ],
2880
2960
  };
2881
- const data$A = { oneOfMultiEnum: ['foo'], multiEnum: ['bar'] };
2961
+ const data$A = {
2962
+ oneOfMultiEnum: ['foo'],
2963
+ multiEnum: ['bar'],
2964
+ multiSelect: ['Banana', 'Cherry'],
2965
+ };
2882
2966
  registerExamples([
2883
2967
  {
2884
2968
  name: 'multi-enum',