@limetech/lime-elements 40.13.1 → 40.14.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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/limel-file-viewer.cjs.entry.js +731 -278
- package/dist/cjs/limel-form.cjs.entry.js +387 -70
- package/dist/collection/components/form/form.test-schemas.js +34 -0
- package/dist/collection/components/form/templates/array-field.js +2 -1
- package/dist/esm/limel-file-viewer.entry.js +731 -278
- package/dist/esm/limel-form.entry.js +387 -70
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-0de00849.entry.js +16 -0
- package/dist/lime-elements/{p-1066a057.entry.js → p-e6be5819.entry.js} +1 -1
- package/dist/types/components/form/form.test-schemas.d.ts +2 -0
- package/dist/types/components/form/form.types.d.ts +7 -0
- package/package.json +4 -4
- package/dist/lime-elements/p-c8cb4912.entry.js +0 -16
|
@@ -205,6 +205,40 @@ export const helpSchema = {
|
|
|
205
205
|
},
|
|
206
206
|
},
|
|
207
207
|
};
|
|
208
|
+
export const arrayHelpSchema = {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
tags: {
|
|
212
|
+
type: 'array',
|
|
213
|
+
title: 'Tags',
|
|
214
|
+
items: { type: 'string' },
|
|
215
|
+
lime: {
|
|
216
|
+
help: {
|
|
217
|
+
value: 'Words that describe the post',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
export const arrayOfObjectsHelpSchema = {
|
|
224
|
+
type: 'object',
|
|
225
|
+
properties: {
|
|
226
|
+
heroes: {
|
|
227
|
+
type: 'array',
|
|
228
|
+
title: 'Heroes',
|
|
229
|
+
items: {
|
|
230
|
+
type: 'object',
|
|
231
|
+
title: 'Hero',
|
|
232
|
+
properties: {
|
|
233
|
+
name: { type: 'string', title: 'Name' },
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
lime: {
|
|
237
|
+
help: 'The heroes of the team',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
};
|
|
208
242
|
export const gridLayoutSchema = {
|
|
209
243
|
type: 'object',
|
|
210
244
|
properties: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { renderDescription, renderTitle } from "./common";
|
|
3
3
|
import { toSchemaPath } from "./object-field";
|
|
4
|
+
import { getHelpComponent } from "../help";
|
|
4
5
|
import { DragToReorder } from "../../../util/drag-to-reorder";
|
|
5
6
|
import { ArrayFieldContext } from "./array-context";
|
|
6
7
|
export const ARRAY_REORDER_EVENT = 'arrayReorder';
|
|
@@ -65,7 +66,7 @@ export class ArrayFieldTemplate extends React.Component {
|
|
|
65
66
|
render() {
|
|
66
67
|
const orderedItems = this.getOrderedItems();
|
|
67
68
|
const contextValue = this.getContextValue();
|
|
68
|
-
return React.createElement(ArrayFieldContext.Provider, { value: contextValue }, React.createElement('div', {}, renderTitle(this.props.title), renderDescription(this.props.schema.description), React.createElement('div', {
|
|
69
|
+
return React.createElement(ArrayFieldContext.Provider, { value: contextValue }, React.createElement('div', {}, renderTitle(this.props.title), getHelpComponent(this.props.schema), renderDescription(this.props.schema.description), React.createElement('div', {
|
|
69
70
|
className: 'array-items',
|
|
70
71
|
ref: this.setContainer,
|
|
71
72
|
}, orderedItems), this.renderAddButton()));
|