@limetech/lime-elements 36.2.0-next.2 → 36.2.0-next.4
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/dist/cjs/limel-form.cjs.entry.js +15 -1
- package/dist/cjs/limel-select.cjs.entry.js +3 -2
- package/dist/collection/components/form/fields/schema-field.js +15 -1
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/select/select.template.js +3 -2
- package/dist/esm/limel-form.entry.js +15 -1
- package/dist/esm/limel-select.entry.js +3 -2
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-f33cfcb8.entry.js → p-0db5c143.entry.js} +1 -1
- package/dist/lime-elements/{p-f1ed857b.entry.js → p-c342aa63.entry.js} +1 -1
- package/dist/types/components/form/fields/schema-field.d.ts +11 -0
- package/dist/types/components/form/form.types.d.ts +4 -0
- package/dist/types/components/picker/picker.d.ts +3 -0
- package/dist/types/components/picker/searcher.types.d.ts +8 -0
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
|
@@ -29041,7 +29041,7 @@ class SchemaField extends react.Component {
|
|
|
29041
29041
|
this.props.onChange(newData);
|
|
29042
29042
|
}
|
|
29043
29043
|
buildCustomComponentProps() {
|
|
29044
|
-
const { disabled, readonly, name, registry, schema, errorSchema } = this.props;
|
|
29044
|
+
const { disabled, readonly, name, registry, schema, errorSchema, idSchema, } = this.props;
|
|
29045
29045
|
const factoryProps = getFactoryProps(registry.formContext, schema);
|
|
29046
29046
|
return Object.assign(Object.assign({}, factoryProps), { value: this.getValue(), required: this.isRequired(), readonly: readonly || schema.readOnly, disabled: disabled, invalid: this.isInvalid(), label: this.getLabel(), helperText: this.getHelperText(), formInfo: {
|
|
29047
29047
|
schema: schema,
|
|
@@ -29049,6 +29049,7 @@ class SchemaField extends react.Component {
|
|
|
29049
29049
|
errorSchema: errorSchema,
|
|
29050
29050
|
rootValue: registry.formContext.rootValue,
|
|
29051
29051
|
name: name,
|
|
29052
|
+
schemaPath: this.getSchemaPath(idSchema.$id),
|
|
29052
29053
|
} });
|
|
29053
29054
|
}
|
|
29054
29055
|
renderCustomComponent(props) {
|
|
@@ -29070,6 +29071,19 @@ class SchemaField extends react.Component {
|
|
|
29070
29071
|
const fieldProps = Object.assign(Object.assign({}, this.props), { onChange: this.handleChange });
|
|
29071
29072
|
return react.createElement(SchemaField$1, fieldProps);
|
|
29072
29073
|
}
|
|
29074
|
+
/**
|
|
29075
|
+
* Gets the path to the current property within the schema
|
|
29076
|
+
*
|
|
29077
|
+
* @param {string} schemaId the id of the schema
|
|
29078
|
+
* @returns {string[]} an array with the schema path for the current property
|
|
29079
|
+
* @example
|
|
29080
|
+
* const schemaId = 'root_sections_0_controls_0_name';
|
|
29081
|
+
* const schemaPath = getSchemaPath(schemaId);
|
|
29082
|
+
* // => ['sections', '0', 'controls', '0', 'name']
|
|
29083
|
+
*/
|
|
29084
|
+
getSchemaPath(schemaId) {
|
|
29085
|
+
return schemaId.replace('root_', '').split('_');
|
|
29086
|
+
}
|
|
29073
29087
|
}
|
|
29074
29088
|
|
|
29075
29089
|
/**
|
|
@@ -338,9 +338,10 @@ const SelectValue = (props) => {
|
|
|
338
338
|
};
|
|
339
339
|
const labelClassList = {
|
|
340
340
|
'mdc-floating-label': true,
|
|
341
|
-
'mdc-floating-label--float-above':
|
|
341
|
+
'mdc-floating-label--float-above': !props.hasEmptyText ||
|
|
342
342
|
props.isOpen ||
|
|
343
|
-
props.readonly
|
|
343
|
+
props.readonly ||
|
|
344
|
+
props.hasValue,
|
|
344
345
|
'mdc-floating-label--active': props.isOpen,
|
|
345
346
|
};
|
|
346
347
|
return (index.h("button", { class: anchorClassList, onClick: props.open, onKeyPress: props.onTriggerPress, "aria-haspopup": "listbox", "aria-expanded": props.isOpen, "aria-controls": props.id, "aria-labelledby": "s-label s-selected-text", "aria-required": props.required, disabled: props.disabled || props.readonly },
|
|
@@ -146,7 +146,7 @@ export class SchemaField extends React.Component {
|
|
|
146
146
|
this.props.onChange(newData);
|
|
147
147
|
}
|
|
148
148
|
buildCustomComponentProps() {
|
|
149
|
-
const { disabled, readonly, name, registry, schema, errorSchema } = this.props;
|
|
149
|
+
const { disabled, readonly, name, registry, schema, errorSchema, idSchema, } = this.props;
|
|
150
150
|
const factoryProps = getFactoryProps(registry.formContext, schema);
|
|
151
151
|
return Object.assign(Object.assign({}, factoryProps), { value: this.getValue(), required: this.isRequired(), readonly: readonly || schema.readOnly, disabled: disabled, invalid: this.isInvalid(), label: this.getLabel(), helperText: this.getHelperText(), formInfo: {
|
|
152
152
|
schema: schema,
|
|
@@ -154,6 +154,7 @@ export class SchemaField extends React.Component {
|
|
|
154
154
|
errorSchema: errorSchema,
|
|
155
155
|
rootValue: registry.formContext.rootValue,
|
|
156
156
|
name: name,
|
|
157
|
+
schemaPath: this.getSchemaPath(idSchema.$id),
|
|
157
158
|
} });
|
|
158
159
|
}
|
|
159
160
|
renderCustomComponent(props) {
|
|
@@ -175,4 +176,17 @@ export class SchemaField extends React.Component {
|
|
|
175
176
|
const fieldProps = Object.assign(Object.assign({}, this.props), { onChange: this.handleChange });
|
|
176
177
|
return React.createElement(JSONSchemaField, fieldProps);
|
|
177
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Gets the path to the current property within the schema
|
|
181
|
+
*
|
|
182
|
+
* @param {string} schemaId the id of the schema
|
|
183
|
+
* @returns {string[]} an array with the schema path for the current property
|
|
184
|
+
* @example
|
|
185
|
+
* const schemaId = 'root_sections_0_controls_0_name';
|
|
186
|
+
* const schemaPath = getSchemaPath(schemaId);
|
|
187
|
+
* // => ['sections', '0', 'controls', '0', 'name']
|
|
188
|
+
*/
|
|
189
|
+
getSchemaPath(schemaId) {
|
|
190
|
+
return schemaId.replace('root_', '').split('_');
|
|
191
|
+
}
|
|
178
192
|
}
|
|
@@ -585,7 +585,7 @@ export class Picker {
|
|
|
585
585
|
"optional": false,
|
|
586
586
|
"docs": {
|
|
587
587
|
"tags": [],
|
|
588
|
-
"text": "A search function that takes a search-string as an argument,\nand returns a promise that will eventually be resolved with\nan array of `ListItem`:s."
|
|
588
|
+
"text": "A search function that takes a search-string as an argument,\nand returns a promise that will eventually be resolved with\nan array of `ListItem`:s.\n\nSee the docs for the type `Searcher` for type information on\nthe searcher function itself."
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"multiple": {
|
|
@@ -36,9 +36,10 @@ const SelectValue = (props) => {
|
|
|
36
36
|
};
|
|
37
37
|
const labelClassList = {
|
|
38
38
|
'mdc-floating-label': true,
|
|
39
|
-
'mdc-floating-label--float-above':
|
|
39
|
+
'mdc-floating-label--float-above': !props.hasEmptyText ||
|
|
40
40
|
props.isOpen ||
|
|
41
|
-
props.readonly
|
|
41
|
+
props.readonly ||
|
|
42
|
+
props.hasValue,
|
|
42
43
|
'mdc-floating-label--active': props.isOpen,
|
|
43
44
|
};
|
|
44
45
|
return (h("button", { class: anchorClassList, onClick: props.open, onKeyPress: props.onTriggerPress, "aria-haspopup": "listbox", "aria-expanded": props.isOpen, "aria-controls": props.id, "aria-labelledby": "s-label s-selected-text", "aria-required": props.required, disabled: props.disabled || props.readonly }, h("span", { id: "s-label", class: labelClassList }, props.label), h("span", { class: "mdc-select__selected-text-container limel-select__selected-option" }, getSelectedIcon(props.value), h("span", { id: "s-selected-text", class: "mdc-select__selected-text limel-select__selected-option__text" }, getSelectedText(props.value, props.readonly))), h(ShowIcon, Object.assign({}, props, { isValid: props.isValid })), h("span", { class: "mdc-select__dropdown-icon" }, h("svg", { class: "mdc-select__dropdown-icon-graphic", viewBox: "7 10 10 5", focusable: "false" }, h("polygon", { stroke: "none", "fill-rule": "evenodd", points: "7 10 12 15 17 10" })))));
|
|
@@ -29037,7 +29037,7 @@ class SchemaField extends react.Component {
|
|
|
29037
29037
|
this.props.onChange(newData);
|
|
29038
29038
|
}
|
|
29039
29039
|
buildCustomComponentProps() {
|
|
29040
|
-
const { disabled, readonly, name, registry, schema, errorSchema } = this.props;
|
|
29040
|
+
const { disabled, readonly, name, registry, schema, errorSchema, idSchema, } = this.props;
|
|
29041
29041
|
const factoryProps = getFactoryProps(registry.formContext, schema);
|
|
29042
29042
|
return Object.assign(Object.assign({}, factoryProps), { value: this.getValue(), required: this.isRequired(), readonly: readonly || schema.readOnly, disabled: disabled, invalid: this.isInvalid(), label: this.getLabel(), helperText: this.getHelperText(), formInfo: {
|
|
29043
29043
|
schema: schema,
|
|
@@ -29045,6 +29045,7 @@ class SchemaField extends react.Component {
|
|
|
29045
29045
|
errorSchema: errorSchema,
|
|
29046
29046
|
rootValue: registry.formContext.rootValue,
|
|
29047
29047
|
name: name,
|
|
29048
|
+
schemaPath: this.getSchemaPath(idSchema.$id),
|
|
29048
29049
|
} });
|
|
29049
29050
|
}
|
|
29050
29051
|
renderCustomComponent(props) {
|
|
@@ -29066,6 +29067,19 @@ class SchemaField extends react.Component {
|
|
|
29066
29067
|
const fieldProps = Object.assign(Object.assign({}, this.props), { onChange: this.handleChange });
|
|
29067
29068
|
return react.createElement(SchemaField$1, fieldProps);
|
|
29068
29069
|
}
|
|
29070
|
+
/**
|
|
29071
|
+
* Gets the path to the current property within the schema
|
|
29072
|
+
*
|
|
29073
|
+
* @param {string} schemaId the id of the schema
|
|
29074
|
+
* @returns {string[]} an array with the schema path for the current property
|
|
29075
|
+
* @example
|
|
29076
|
+
* const schemaId = 'root_sections_0_controls_0_name';
|
|
29077
|
+
* const schemaPath = getSchemaPath(schemaId);
|
|
29078
|
+
* // => ['sections', '0', 'controls', '0', 'name']
|
|
29079
|
+
*/
|
|
29080
|
+
getSchemaPath(schemaId) {
|
|
29081
|
+
return schemaId.replace('root_', '').split('_');
|
|
29082
|
+
}
|
|
29069
29083
|
}
|
|
29070
29084
|
|
|
29071
29085
|
/**
|
|
@@ -334,9 +334,10 @@ const SelectValue = (props) => {
|
|
|
334
334
|
};
|
|
335
335
|
const labelClassList = {
|
|
336
336
|
'mdc-floating-label': true,
|
|
337
|
-
'mdc-floating-label--float-above':
|
|
337
|
+
'mdc-floating-label--float-above': !props.hasEmptyText ||
|
|
338
338
|
props.isOpen ||
|
|
339
|
-
props.readonly
|
|
339
|
+
props.readonly ||
|
|
340
|
+
props.hasValue,
|
|
340
341
|
'mdc-floating-label--active': props.isOpen,
|
|
341
342
|
};
|
|
342
343
|
return (h("button", { class: anchorClassList, onClick: props.open, onKeyPress: props.onTriggerPress, "aria-haspopup": "listbox", "aria-expanded": props.isOpen, "aria-controls": props.id, "aria-labelledby": "s-label s-selected-text", "aria-required": props.required, disabled: props.disabled || props.readonly },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-d4e788e1.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-9984b31c",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-e4bca82b",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-cad7cda1",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-4fc38050",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-d512656b",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-84a137a7",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-9ea8dd5c",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[16],progress:[16]}]]],["p-
|
|
1
|
+
import{p as e,b as l}from"./p-d4e788e1.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-9984b31c",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-e4bca82b",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-cad7cda1",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-4fc38050",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-d512656b",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-84a137a7",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-9ea8dd5c",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[16],progress:[16]}]]],["p-c342aa63",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[16],options:[16],multiple:[4],menuOpen:[32]}]]],["p-06f2f6b4",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-d1187867",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-15c2eb16",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-8ab597a8",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-35a6ab13",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-e6f84d68",[[1,"limel-shortcut",{icon:[513],label:[513],disabled:[516],badge:[520],link:[16]}]]],["p-e7bb664f",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-de161bb5",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-6534e16a",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-6c38b505",[[1,"limel-config",{config:[16]}]]],["p-5338663b",[[1,"limel-flex-container",{direction:[513],justify:[513],align:[513],reverse:[516]}]]],["p-0db5c143",[[1,"limel-form",{schema:[16],value:[16],disabled:[4],propsFactory:[16],transformErrors:[16],errors:[16]}]]],["p-82cd7bb6",[[1,"limel-grid"]]],["p-15ca0d70",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-9bd76629",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-4eda8b67",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],value:[516],fieldId:[32]}]]],["p-75d01713",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]],["p-768b7cbb",[[0,"limel-dock-button",{item:[16],expanded:[516],useMobileLayout:[516,"use-mobile-layout"],isOpen:[32]}]]],["p-d8e5a9ee",[[1,"limel-color-picker-palette",{value:[513],label:[513],helperText:[513,"helper-text"],required:[516]}]]],["p-059e0a64",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516]}]]],["p-8fb83e83",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-5f13035a",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"]}]]],["p-cfaa685f",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4]}]]],["p-12a7453b",[[1,"limel-checkbox",{disabled:[516],readonly:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-5f29f099",[[1,"limel-flatpickr-adapter",{value:[16],type:[1],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[1]}]]],["p-36a3b897",[[1,"limel-menu",{items:[16],disabled:[516],openDirection:[513,"open-direction"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"]}],[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516],loadingFailed:[516,"loading-failed"],justLoaded:[32]}]]],["p-5ce60a32",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],helperText:[513,"helper-text"],disabled:[516],readonly:[516],inputType:[513,"input-type"],maxItems:[514,"max-items"],required:[516],searchLabel:[513,"search-label"],emptyInputOnBlur:[516,"empty-input-on-blur"],clearAllButton:[4,"clear-all-button"],leadingIcon:[513,"leading-icon"],delimiter:[513],language:[1],editMode:[32],textValue:[32],blurred:[32],inputChipIndexSelected:[32],getEditMode:[64],setFocus:[64],emptyInput:[64]}]]],["p-21058db5",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],prefix:[513],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}],[1,"limel-linear-progress",{value:[2],indeterminate:[4]}]]],["p-c90fc327",[[1,"limel-menu-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}]]],["p-90961075",[[1,"limel-portal",{openDirection:[1,"open-direction"],position:[1],containerId:[1,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[4,"inherit-parent-width"],visible:[4]}]]],["p-e88f7922",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],prefix:[513],suffix:[513],required:[516],value:[513],trailingIcon:[513,"trailing-icon"],leadingIcon:[513,"leading-icon"],pattern:[513],type:[513],formatNumber:[516,"format-number"],step:[520],max:[514],min:[514],maxlength:[514],minlength:[514],completions:[16],showLink:[516,"show-link"],isFocused:[32],isModified:[32],showCompletions:[32]}]]],["p-16eb9071",[[1,"limel-spinner",{size:[513],limeBranded:[4,"lime-branded"]}]]],["p-600464a9",[[1,"limel-badge",{label:[520]}]]],["p-dc030055",[[1,"limel-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{open:[4],allowClicksElement:[16]}]]],["p-6a4a5ddd",[[1,"limel-popover",{open:[4],openDirection:[513,"open-direction"]}],[1,"limel-tooltip",{elementId:[513,"element-id"],label:[513],helperLabel:[513,"helper-label"],maxlength:[514],open:[32]}],[1,"limel-popover-surface",{contentCollection:[16]}],[1,"limel-tooltip-content",{label:[513],helperLabel:[513,"helper-label"],maxlength:[514]}]]]],e)));
|