@bpmn-io/form-js-playground 0.9.4 → 0.9.6
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.
|
@@ -79,9 +79,12 @@
|
|
|
79
79
|
width: auto;
|
|
80
80
|
background-color: var(--color-palette-container-background);
|
|
81
81
|
border-right: solid 1px var(--color-palette-container-border);
|
|
82
|
+
overflow-y: scroll;
|
|
83
|
+
flex-shrink: 0;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
.fjs-pgl-palette-container .fjs-palette-container {
|
|
87
|
+
height: 100%;
|
|
85
88
|
border-right: none;
|
|
86
89
|
width: auto;
|
|
87
90
|
}
|
|
@@ -253,4 +256,4 @@
|
|
|
253
256
|
.fjs-pgl-parent {
|
|
254
257
|
width: 100%;
|
|
255
258
|
height: 100%;
|
|
256
|
-
}
|
|
259
|
+
}
|
|
@@ -2425,7 +2425,7 @@
|
|
|
2425
2425
|
}, i;
|
|
2426
2426
|
})(_$1);
|
|
2427
2427
|
|
|
2428
|
-
|
|
2428
|
+
const CLASS_PATTERN = /^class[ {]/;
|
|
2429
2429
|
/**
|
|
2430
2430
|
* @param {function} fn
|
|
2431
2431
|
*
|
|
@@ -2443,7 +2443,7 @@
|
|
|
2443
2443
|
|
|
2444
2444
|
|
|
2445
2445
|
function isArray(obj) {
|
|
2446
|
-
return
|
|
2446
|
+
return Array.isArray(obj);
|
|
2447
2447
|
}
|
|
2448
2448
|
/**
|
|
2449
2449
|
* @param {any} obj
|
|
@@ -2469,14 +2469,13 @@
|
|
|
2469
2469
|
*/
|
|
2470
2470
|
|
|
2471
2471
|
|
|
2472
|
-
function annotate() {
|
|
2473
|
-
var args = Array.prototype.slice.call(arguments);
|
|
2474
|
-
|
|
2472
|
+
function annotate(...args) {
|
|
2475
2473
|
if (args.length === 1 && isArray(args[0])) {
|
|
2476
2474
|
args = args[0];
|
|
2477
2475
|
}
|
|
2478
2476
|
|
|
2479
|
-
|
|
2477
|
+
args = [...args];
|
|
2478
|
+
const fn = args.pop();
|
|
2480
2479
|
fn.$inject = args;
|
|
2481
2480
|
return fn;
|
|
2482
2481
|
} // Current limitations:
|
|
@@ -2493,9 +2492,9 @@
|
|
|
2493
2492
|
// of a nested class, too.
|
|
2494
2493
|
|
|
2495
2494
|
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2495
|
+
const CONSTRUCTOR_ARGS = /constructor\s*[^(]*\(\s*([^)]*)\)/m;
|
|
2496
|
+
const FN_ARGS = /^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m;
|
|
2497
|
+
const FN_ARG = /\/\*([^*]*)\*\//m;
|
|
2499
2498
|
/**
|
|
2500
2499
|
* @param {unknown} fn
|
|
2501
2500
|
*
|
|
@@ -2504,18 +2503,18 @@
|
|
|
2504
2503
|
|
|
2505
2504
|
function parseAnnotations(fn) {
|
|
2506
2505
|
if (typeof fn !== 'function') {
|
|
2507
|
-
throw new Error(
|
|
2506
|
+
throw new Error(`Cannot annotate "${fn}". Expected a function!`);
|
|
2508
2507
|
}
|
|
2509
2508
|
|
|
2510
|
-
|
|
2509
|
+
const match = fn.toString().match(isClass(fn) ? CONSTRUCTOR_ARGS : FN_ARGS); // may parse class without constructor
|
|
2511
2510
|
|
|
2512
2511
|
if (!match) {
|
|
2513
2512
|
return [];
|
|
2514
2513
|
}
|
|
2515
2514
|
|
|
2516
|
-
|
|
2517
|
-
return args && args.split(',').map(
|
|
2518
|
-
|
|
2515
|
+
const args = match[1] || match[2];
|
|
2516
|
+
return args && args.split(',').map(arg => {
|
|
2517
|
+
const argMatch = arg.match(FN_ARG);
|
|
2519
2518
|
return (argMatch && argMatch[1] || arg).trim();
|
|
2520
2519
|
}) || [];
|
|
2521
2520
|
}
|
|
@@ -2541,19 +2540,19 @@
|
|
|
2541
2540
|
if (strict === false) {
|
|
2542
2541
|
return null;
|
|
2543
2542
|
} else {
|
|
2544
|
-
throw error(
|
|
2543
|
+
throw error(`No provider for "${name}"!`);
|
|
2545
2544
|
}
|
|
2546
2545
|
}
|
|
2547
2546
|
};
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2547
|
+
const currentlyResolving = [];
|
|
2548
|
+
const providers = this._providers = Object.create(parent._providers || null);
|
|
2549
|
+
const instances = this._instances = Object.create(null);
|
|
2550
|
+
const self = instances.injector = this;
|
|
2552
2551
|
|
|
2553
|
-
|
|
2554
|
-
|
|
2552
|
+
const error = function (msg) {
|
|
2553
|
+
const stack = currentlyResolving.join(' -> ');
|
|
2555
2554
|
currentlyResolving.length = 0;
|
|
2556
|
-
return new Error(stack ? msg
|
|
2555
|
+
return new Error(stack ? `${msg} (Resolving: ${stack})` : msg);
|
|
2557
2556
|
};
|
|
2558
2557
|
/**
|
|
2559
2558
|
* Return a named service.
|
|
@@ -2567,8 +2566,8 @@
|
|
|
2567
2566
|
|
|
2568
2567
|
function get(name, strict) {
|
|
2569
2568
|
if (!providers[name] && name.indexOf('.') !== -1) {
|
|
2570
|
-
|
|
2571
|
-
|
|
2569
|
+
const parts = name.split('.');
|
|
2570
|
+
let pivot = get(parts.shift());
|
|
2572
2571
|
|
|
2573
2572
|
while (parts.length) {
|
|
2574
2573
|
pivot = pivot[parts.shift()];
|
|
@@ -2605,12 +2604,12 @@
|
|
|
2605
2604
|
if (isArray(fn)) {
|
|
2606
2605
|
fn = annotate(fn.slice());
|
|
2607
2606
|
} else {
|
|
2608
|
-
throw
|
|
2607
|
+
throw error(`Cannot invoke "${fn}". Expected a function!`);
|
|
2609
2608
|
}
|
|
2610
2609
|
}
|
|
2611
2610
|
|
|
2612
|
-
|
|
2613
|
-
|
|
2611
|
+
const inject = fn.$inject || parseAnnotations(fn);
|
|
2612
|
+
const dependencies = inject.map(dep => {
|
|
2614
2613
|
if (hasOwnProp(locals, dep)) {
|
|
2615
2614
|
return locals[dep];
|
|
2616
2615
|
} else {
|
|
@@ -2624,18 +2623,20 @@
|
|
|
2624
2623
|
}
|
|
2625
2624
|
|
|
2626
2625
|
function instantiate(Type) {
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2626
|
+
const {
|
|
2627
|
+
fn,
|
|
2628
|
+
dependencies
|
|
2629
|
+
} = fnDef(Type); // instantiate var args constructor
|
|
2630
2630
|
|
|
2631
|
-
|
|
2631
|
+
const Constructor = Function.prototype.bind.apply(fn, [null].concat(dependencies));
|
|
2632
2632
|
return new Constructor();
|
|
2633
2633
|
}
|
|
2634
2634
|
|
|
2635
2635
|
function invoke(func, context, locals) {
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2636
|
+
const {
|
|
2637
|
+
fn,
|
|
2638
|
+
dependencies
|
|
2639
|
+
} = fnDef(func, locals);
|
|
2639
2640
|
return fn.apply(context, dependencies);
|
|
2640
2641
|
}
|
|
2641
2642
|
/**
|
|
@@ -2646,9 +2647,7 @@
|
|
|
2646
2647
|
|
|
2647
2648
|
|
|
2648
2649
|
function createPrivateInjectorFactory(childInjector) {
|
|
2649
|
-
return annotate(
|
|
2650
|
-
return childInjector.get(key);
|
|
2651
|
-
});
|
|
2650
|
+
return annotate(key => childInjector.get(key));
|
|
2652
2651
|
}
|
|
2653
2652
|
/**
|
|
2654
2653
|
* @param {ModuleDefinition[]} modules
|
|
@@ -2660,17 +2659,17 @@
|
|
|
2660
2659
|
|
|
2661
2660
|
function createChild(modules, forceNewInstances) {
|
|
2662
2661
|
if (forceNewInstances && forceNewInstances.length) {
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
for (
|
|
2662
|
+
const fromParentModule = Object.create(null);
|
|
2663
|
+
const matchedScopes = Object.create(null);
|
|
2664
|
+
const privateInjectorsCache = [];
|
|
2665
|
+
const privateChildInjectors = [];
|
|
2666
|
+
const privateChildFactories = [];
|
|
2667
|
+
let provider;
|
|
2668
|
+
let cacheIdx;
|
|
2669
|
+
let privateChildInjector;
|
|
2670
|
+
let privateChildInjectorFactory;
|
|
2671
|
+
|
|
2672
|
+
for (let name in providers) {
|
|
2674
2673
|
provider = providers[name];
|
|
2675
2674
|
|
|
2676
2675
|
if (forceNewInstances.indexOf(name) !== -1) {
|
|
@@ -2696,7 +2695,7 @@
|
|
|
2696
2695
|
|
|
2697
2696
|
if ((provider[2] === 'factory' || provider[2] === 'type') && provider[1].$scope) {
|
|
2698
2697
|
/* jshint -W083 */
|
|
2699
|
-
forceNewInstances.forEach(
|
|
2698
|
+
forceNewInstances.forEach(scope => {
|
|
2700
2699
|
if (provider[1].$scope.indexOf(scope) !== -1) {
|
|
2701
2700
|
fromParentModule[name] = [provider[2], provider[1]];
|
|
2702
2701
|
matchedScopes[scope] = true;
|
|
@@ -2705,7 +2704,7 @@
|
|
|
2705
2704
|
}
|
|
2706
2705
|
}
|
|
2707
2706
|
|
|
2708
|
-
forceNewInstances.forEach(
|
|
2707
|
+
forceNewInstances.forEach(scope => {
|
|
2709
2708
|
if (!matchedScopes[scope]) {
|
|
2710
2709
|
throw new Error('No provider for "' + scope + '". Cannot use provider from the parent!');
|
|
2711
2710
|
}
|
|
@@ -2716,7 +2715,7 @@
|
|
|
2716
2715
|
return new Injector(modules, self);
|
|
2717
2716
|
}
|
|
2718
2717
|
|
|
2719
|
-
|
|
2718
|
+
const factoryMap = {
|
|
2720
2719
|
factory: invoke,
|
|
2721
2720
|
type: instantiate,
|
|
2722
2721
|
value: function (value) {
|
|
@@ -2729,9 +2728,9 @@
|
|
|
2729
2728
|
*/
|
|
2730
2729
|
|
|
2731
2730
|
function createInitializer(moduleDefinition, injector) {
|
|
2732
|
-
|
|
2731
|
+
const initializers = moduleDefinition.__init__ || [];
|
|
2733
2732
|
return function () {
|
|
2734
|
-
initializers.forEach(
|
|
2733
|
+
initializers.forEach(initializer => {
|
|
2735
2734
|
// eagerly resolve component (fn or string)
|
|
2736
2735
|
if (typeof initializer === 'string') {
|
|
2737
2736
|
injector.get(initializer);
|
|
@@ -2747,27 +2746,27 @@
|
|
|
2747
2746
|
|
|
2748
2747
|
|
|
2749
2748
|
function loadModule(moduleDefinition) {
|
|
2750
|
-
|
|
2749
|
+
const moduleExports = moduleDefinition.__exports__; // private module
|
|
2751
2750
|
|
|
2752
2751
|
if (moduleExports) {
|
|
2753
|
-
|
|
2754
|
-
|
|
2752
|
+
const nestedModules = moduleDefinition.__modules__;
|
|
2753
|
+
const clonedModule = Object.keys(moduleDefinition).reduce((clonedModule, key) => {
|
|
2755
2754
|
if (key !== '__exports__' && key !== '__modules__' && key !== '__init__' && key !== '__depends__') {
|
|
2756
2755
|
clonedModule[key] = moduleDefinition[key];
|
|
2757
2756
|
}
|
|
2758
2757
|
|
|
2759
2758
|
return clonedModule;
|
|
2760
2759
|
}, Object.create(null));
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2760
|
+
const childModules = (nestedModules || []).concat(clonedModule);
|
|
2761
|
+
const privateInjector = createChild(childModules);
|
|
2762
|
+
const getFromPrivateInjector = annotate(function (key) {
|
|
2764
2763
|
return privateInjector.get(key);
|
|
2765
2764
|
});
|
|
2766
2765
|
moduleExports.forEach(function (key) {
|
|
2767
2766
|
providers[key] = [getFromPrivateInjector, key, 'private', privateInjector];
|
|
2768
2767
|
}); // ensure child injector initializes
|
|
2769
2768
|
|
|
2770
|
-
|
|
2769
|
+
const initializers = (moduleDefinition.__init__ || []).slice();
|
|
2771
2770
|
initializers.unshift(function () {
|
|
2772
2771
|
privateInjector.init();
|
|
2773
2772
|
});
|
|
@@ -2788,8 +2787,8 @@
|
|
|
2788
2787
|
return;
|
|
2789
2788
|
}
|
|
2790
2789
|
|
|
2791
|
-
|
|
2792
|
-
|
|
2790
|
+
const type = moduleDefinition[key][0];
|
|
2791
|
+
const value = moduleDefinition[key][1];
|
|
2793
2792
|
providers[key] = [factoryMap[type], arrayUnwrap(type, value), type];
|
|
2794
2793
|
});
|
|
2795
2794
|
return createInitializer(moduleDefinition, self);
|
|
@@ -2823,17 +2822,15 @@
|
|
|
2823
2822
|
|
|
2824
2823
|
|
|
2825
2824
|
function bootstrap(moduleDefinitions) {
|
|
2826
|
-
|
|
2827
|
-
|
|
2825
|
+
const initializers = moduleDefinitions.reduce(resolveDependencies, []).map(loadModule);
|
|
2826
|
+
let initialized = false;
|
|
2828
2827
|
return function () {
|
|
2829
2828
|
if (initialized) {
|
|
2830
2829
|
return;
|
|
2831
2830
|
}
|
|
2832
2831
|
|
|
2833
2832
|
initialized = true;
|
|
2834
|
-
initializers.forEach(
|
|
2835
|
-
return initializer();
|
|
2836
|
-
});
|
|
2833
|
+
initializers.forEach(initializer => initializer());
|
|
2837
2834
|
};
|
|
2838
2835
|
} // public API
|
|
2839
2836
|
|
|
@@ -11252,8 +11249,8 @@ meta: meta$1,/// [Metadata](#highlight.tags.meta) that applies to the entire
|
|
|
11252
11249
|
*
|
|
11253
11250
|
* @returns {Object}
|
|
11254
11251
|
*/function updateKey(properties,oldKey,newKey){return Object.entries(properties).reduce((newProperties,entry)=>{const[key,value]=entry;return {...newProperties,[key===oldKey?newKey:key]:value};},{});}const VALUES_SOURCES={STATIC:'static',INPUT:'input'};const VALUES_SOURCE_DEFAULT=VALUES_SOURCES.STATIC;const VALUES_SOURCES_LABELS={[VALUES_SOURCES.STATIC]:'Static',[VALUES_SOURCES.INPUT]:'Input data'};const VALUES_SOURCES_PATHS={[VALUES_SOURCES.STATIC]:['values'],[VALUES_SOURCES.INPUT]:['valuesKey']};const VALUES_SOURCES_DEFAULTS={[VALUES_SOURCES.STATIC]:[],[VALUES_SOURCES.INPUT]:''};// helpers ///////////////////
|
|
11255
|
-
function getValuesSource(field){for(const source of Object.values(VALUES_SOURCES)){if(get(field,VALUES_SOURCES_PATHS[source])!==undefined){return source;}}return VALUES_SOURCE_DEFAULT;}function ValuesSourceSelectEntry(props){const{editField,field,id}=props;return [{id:id+'-select',component:ValuesSourceSelect,isEdited:isEdited$4,editField,field}];}function ValuesSourceSelect(props){const{editField,field,id}=props;const getValue=getValuesSource;const setValue=value=>{let newField=field;Object.values(VALUES_SOURCES).forEach(source=>{// Clear all values source definitions and default the newly selected one
|
|
11256
|
-
const newValue=value===source?VALUES_SOURCES_DEFAULTS[source]:undefined;
|
|
11252
|
+
function getValuesSource(field){for(const source of Object.values(VALUES_SOURCES)){if(get(field,VALUES_SOURCES_PATHS[source])!==undefined){return source;}}return VALUES_SOURCE_DEFAULT;}function ValuesSourceSelectEntry(props){const{editField,field,id}=props;return [{id:id+'-select',component:ValuesSourceSelect,isEdited:isEdited$4,editField,field}];}function ValuesSourceSelect(props){const{editField,field,id}=props;const getValue=getValuesSource;const setValue=value=>{let newField=field;const newProperties={};Object.values(VALUES_SOURCES).forEach(source=>{// Clear all values source definitions and default the newly selected one
|
|
11253
|
+
const newValue=value===source?VALUES_SOURCES_DEFAULTS[source]:undefined;newProperties[VALUES_SOURCES_PATHS[source]]=newValue;});newField=editField(field,newProperties);return newField;};const getValuesSourceOptions=()=>{return Object.values(VALUES_SOURCES).map(valueSource=>({label:VALUES_SOURCES_LABELS[valueSource],value:valueSource}));};return SelectEntry({label:'Type',element:field,getOptions:getValuesSourceOptions,getValue,id,setValue});}function InputKeyValuesSourceEntry(props){const{editField,field,id}=props;return [{id:id+'-key',component:InputValuesKey,label:'Input values key',description:'Define which input property to populate the values from',isEdited:isEdited$1,editField,field}];}function InputValuesKey(props){const{editField,field,id,label,description}=props;const debounce=useService('debounce');const path=VALUES_SOURCES_PATHS[VALUES_SOURCES.INPUT];const getValue=()=>get(field,path,'');const setValue=value=>editField(field,path,value||'');return TextfieldEntry({debounce,description,element:field,getValue,id,label,setValue});}function StaticValuesSourceEntry(props){const{editField,field,id:idPrefix}=props;const{values}=field;const addEntry=e=>{e.stopPropagation();const index=values.length+1;const entry={label:`Value ${index}`,value:`value${index}`};editField(field,VALUES_SOURCES_PATHS[VALUES_SOURCES.STATIC],arrayAdd(values,values.length,entry));};const removeEntry=entry=>{editField(field,VALUES_SOURCES_PATHS[VALUES_SOURCES.STATIC],without(values,entry));};const validateFactory=key=>{return value=>{if(value===key){return;}if(isUndefined(value)||!value.length){return 'Must not be empty.';}const isValueAssigned=values.find(entry=>entry.value===value);if(isValueAssigned){return 'Must be unique.';}};};const items=values.map((entry,index)=>{const id=idPrefix+'-'+index;return {id,label:entry.label,entries:ValueEntry({editField,field,idPrefix:id,index,validateFactory}),autoFocusEntry:id+'-label',remove:()=>removeEntry(entry)};});return {items,add:addEntry};}function GeneralGroup(field,editField){const entries=[...IdEntry({field,editField}),...LabelEntry({field,editField}),...DescriptionEntry({field,editField}),...KeyEntry({field,editField}),...DefaultOptionEntry({field,editField}),...ActionEntry({field,editField}),...ColumnsEntry({field,editField}),...TextEntry({field,editField}),...DisabledEntry({field,editField})];return {id:'general',label:'General',entries};}function ValidationGroup(field,editField){const{type}=field;if(!(INPUTS.includes(type)&&type!=='checkbox'&&type!=='checklist'&&type!=='taglist')){return null;}const onChange=key=>{return value=>{const validate=get(field,['validate'],{});editField(field,['validate'],set(validate,[key],value));};};const getValue=key=>{return ()=>{return get(field,['validate',key]);};};let entries=[{id:'required',component:Required,getValue,field,isEdited:isEdited$7,onChange}];if(type==='textfield'){entries.push({id:'minLength',component:MinLength,getValue,field,isEdited:isEdited$5,onChange},{id:'maxLength',component:MaxLength,getValue,field,isEdited:isEdited$5,onChange},{id:'pattern',component:Pattern,getValue,field,isEdited:isEdited$1,onChange});}if(type==='number'){entries.push({id:'min',component:Min,getValue,field,isEdited:isEdited$5,onChange},{id:'max',component:Max,getValue,field,isEdited:isEdited$5,onChange});}return {id:'validation',label:'Validation',entries};}function Required(props){const{field,getValue,id,onChange}=props;return CheckboxEntry({element:field,getValue:getValue('required'),id,label:'Required',setValue:onChange('required')});}function MinLength(props){const{field,getValue,id,onChange}=props;const debounce=useService('debounce');return NumberFieldEntry({debounce,element:field,getValue:getValue('minLength'),id,label:'Minimum length',min:0,setValue:onChange('minLength')});}function MaxLength(props){const{field,getValue,id,onChange}=props;const debounce=useService('debounce');return NumberFieldEntry({debounce,element:field,getValue:getValue('maxLength'),id,label:'Maximum length',min:0,setValue:onChange('maxLength')});}function Pattern(props){const{field,getValue,id,onChange}=props;const debounce=useService('debounce');return TextfieldEntry({debounce,element:field,getValue:getValue('pattern'),id,label:'Regular expression pattern',setValue:onChange('pattern')});}function Min(props){const{field,getValue,id,onChange}=props;const debounce=useService('debounce');return NumberFieldEntry({debounce,element:field,getValue:getValue('min'),id,label:'Minimum',min:0,setValue:onChange('min')});}function Max(props){const{field,getValue,id,onChange}=props;const debounce=useService('debounce');return NumberFieldEntry({debounce,element:field,getValue:getValue('max'),id,label:'Maximum',min:0,setValue:onChange('max')});}function ValuesGroups(field,editField){const{type,id:fieldId}=field;if(!VALUES_INPUTS.includes(type)){return [];}const context={editField,field};const valuesSourceId=`${fieldId}-valuesSource`;/**
|
|
11257
11254
|
* @type {Array<Group|ListGroup>}
|
|
11258
11255
|
*/const groups=[{id:valuesSourceId,label:'Options source',component:Group,entries:ValuesSourceSelectEntry({...context,id:valuesSourceId})}];const valuesSource=getValuesSource(field);if(valuesSource===VALUES_SOURCES.INPUT){const dynamicValuesId=`${fieldId}-dynamicValues`;groups.push({id:dynamicValuesId,label:'Dynamic options',component:Group,entries:InputKeyValuesSourceEntry({...context,id:dynamicValuesId})});}else if(valuesSource===VALUES_SOURCES.STATIC){const staticValuesId=`${fieldId}-staticValues`;groups.push({id:staticValuesId,label:'Static options',component:ListGroup,...StaticValuesSourceEntry({...context,id:staticValuesId})});}return groups;}function CustomValuesGroup(field,editField){const{properties={},type}=field;if(type==='default'){return null;}const addEntry=event=>{event.stopPropagation();const index=Object.keys(properties).length+1;const key=`key${index}`,value='value';editField(field,['properties'],{...properties,[key]:value});};const validateFactory=key=>{return value=>{if(value===key){return;}if(isUndefined(value)||!value.length){return 'Must not be empty.';}if(has(properties,value)){return 'Must be unique.';}};};const items=Object.keys(properties).map((key,index)=>{const removeEntry=event=>{event.stopPropagation();return editField(field,['properties'],removeKey(properties,key));};const id=`${field.id}-property-${index}`;return {autoFocusEntry:id+'-key',entries:CustomValueEntry({editField,field,idPrefix:id,index,validateFactory}),id,label:key||'',remove:removeEntry};});return {add:addEntry,component:ListGroup,id:'custom-values',items,label:'Custom properties',shouldSort:false};}// helpers //////////
|
|
11259
11256
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-playground",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "A form-js playground",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "https://github.com/bpmn-io"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@bpmn-io/form-js-editor": "^0.9.
|
|
48
|
-
"@bpmn-io/form-js-viewer": "^0.9.
|
|
47
|
+
"@bpmn-io/form-js-editor": "^0.9.6",
|
|
48
|
+
"@bpmn-io/form-js-viewer": "^0.9.5",
|
|
49
49
|
"@codemirror/lang-json": "^6.0.0",
|
|
50
50
|
"@codemirror/state": "^6.1.1",
|
|
51
51
|
"@codemirror/view": "^6.2.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"rollup-plugin-css-only": "^3.1.0",
|
|
67
67
|
"style-loader": "^3.3.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "1e89b2d67898d6839ddf4312b561c1797c4d161e"
|
|
70
70
|
}
|