@limetech/lime-elements 38.32.0 → 38.33.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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/limel-form.cjs.entry.js +30 -19
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/collection/components/form/help/help.js +4 -3
- package/dist/collection/components/form/help/help.js.map +1 -1
- package/dist/collection/components/form/templates/object-field.js +13 -2
- package/dist/collection/components/form/templates/object-field.js.map +1 -1
- package/dist/esm/limel-form.entry.js +30 -19
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-a1a32893.entry.js → p-9af45dec.entry.js} +2 -2
- package/dist/lime-elements/p-9af45dec.entry.js.map +1 -0
- package/dist/types/components/form/help/help.d.ts +8 -2
- package/package.json +1 -1
- package/dist/lime-elements/p-a1a32893.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [38.33.0](https://github.com/Lundalogik/lime-elements/compare/v38.32.0...v38.33.0) (2025-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **form:** add `help` to sections ([747f906](https://github.com/Lundalogik/lime-elements/commit/747f906fa81470430543cae2cb3c6da431142eb1))
|
|
8
|
+
|
|
1
9
|
## [38.32.0](https://github.com/Lundalogik/lime-elements/compare/v38.31.2...v38.32.0) (2025-12-04)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -42535,6 +42535,24 @@ class RowLayout extends react.Component {
|
|
|
42535
42535
|
}
|
|
42536
42536
|
}
|
|
42537
42537
|
|
|
42538
|
+
/**
|
|
42539
|
+
*
|
|
42540
|
+
* @param schema
|
|
42541
|
+
* @param extraProps - additional props to pass to the limel-help element
|
|
42542
|
+
*/
|
|
42543
|
+
function getHelpComponent(schema, extraProps) {
|
|
42544
|
+
var _a;
|
|
42545
|
+
const help = (_a = schema.lime) === null || _a === void 0 ? void 0 : _a.help;
|
|
42546
|
+
if (!help) {
|
|
42547
|
+
return;
|
|
42548
|
+
}
|
|
42549
|
+
if (typeof help === 'string') {
|
|
42550
|
+
return react.createElement('limel-help', Object.assign({ value: help }, extraProps));
|
|
42551
|
+
}
|
|
42552
|
+
const helpProps = help;
|
|
42553
|
+
return react.createElement('limel-help', Object.assign(Object.assign({}, helpProps), extraProps));
|
|
42554
|
+
}
|
|
42555
|
+
|
|
42538
42556
|
const ObjectFieldTemplate = (props) => {
|
|
42539
42557
|
const id = props.idSchema.$id;
|
|
42540
42558
|
if (id === 'root' || !isCollapsible(props.schema)) {
|
|
@@ -42546,15 +42564,25 @@ const ObjectFieldTemplate = (props) => {
|
|
|
42546
42564
|
return renderProperties(props.properties, props.schema);
|
|
42547
42565
|
};
|
|
42548
42566
|
function renderFieldWithTitle(props) {
|
|
42549
|
-
return react.createElement(react.Fragment, {},
|
|
42567
|
+
return react.createElement(react.Fragment, {}, renderSectionHeader(props), renderDescription(props.description), renderProperties(props.properties, props.schema));
|
|
42568
|
+
}
|
|
42569
|
+
function renderSectionHeader(props) {
|
|
42570
|
+
const help = getHelpComponent(props.schema);
|
|
42571
|
+
if (!help) {
|
|
42572
|
+
return renderTitle(props.title);
|
|
42573
|
+
}
|
|
42574
|
+
return react.createElement(react.Fragment, {}, renderTitle(props.title), help);
|
|
42550
42575
|
}
|
|
42551
42576
|
function renderCollapsibleField(props) {
|
|
42552
42577
|
const defaultOpen = !isCollapsed(props.schema);
|
|
42578
|
+
const helpElement = getHelpComponent(props.schema, {
|
|
42579
|
+
slot: 'header',
|
|
42580
|
+
});
|
|
42553
42581
|
return react.createElement('limel-collapsible-section', {
|
|
42554
42582
|
header: props.title,
|
|
42555
42583
|
id: getSchemaObjectPropertyPath(props.formContext.schema, props.idSchema),
|
|
42556
42584
|
'is-open': defaultOpen,
|
|
42557
|
-
}, renderDescription(props.description), renderProperties(props.properties, props.schema));
|
|
42585
|
+
}, helpElement, renderDescription(props.description), renderProperties(props.properties, props.schema));
|
|
42558
42586
|
}
|
|
42559
42587
|
function getSchemaObjectPropertyPath(schema, subSchema) {
|
|
42560
42588
|
var _a, _b;
|
|
@@ -47067,23 +47095,6 @@ function isAdditionalProperty(schema) {
|
|
|
47067
47095
|
return schema[ADDITIONAL_PROPERTY_FLAG] === true;
|
|
47068
47096
|
}
|
|
47069
47097
|
|
|
47070
|
-
/**
|
|
47071
|
-
*
|
|
47072
|
-
* @param schema
|
|
47073
|
-
*/
|
|
47074
|
-
function getHelpComponent(schema) {
|
|
47075
|
-
var _a;
|
|
47076
|
-
const help = (_a = schema.lime) === null || _a === void 0 ? void 0 : _a.help;
|
|
47077
|
-
if (!help) {
|
|
47078
|
-
return;
|
|
47079
|
-
}
|
|
47080
|
-
if (typeof help === 'string') {
|
|
47081
|
-
return react.createElement('limel-help', { value: help });
|
|
47082
|
-
}
|
|
47083
|
-
const helpProps = help;
|
|
47084
|
-
return react.createElement('limel-help', helpProps);
|
|
47085
|
-
}
|
|
47086
|
-
|
|
47087
47098
|
/**
|
|
47088
47099
|
* A widget is a concept in react-jsonschema-form (rjsf).
|
|
47089
47100
|
* It represents a HTML tag for the user to enter data, eg. input, select, etc.
|