@limetech/lime-elements 39.13.2 → 39.14.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 +14 -0
- package/dist/cjs/{_assignValue-D2D1zedG.js → _assignValue-DpsLUlF4.js} +25 -2
- package/dist/cjs/{_baseForOwn-QM0kHQT5.js → _baseEach-C570gT5Y.js} +43 -1
- package/dist/cjs/{_baseIsEqual-D6hrjmx4.js → _baseIsEqual-aOPReRWl.js} +1 -0
- package/dist/cjs/{_baseIteratee-iGEZ9pZY.js → _baseIteratee-DggA4e7a.js} +3 -1
- package/dist/cjs/_commonjsHelpers-CFO10eej.js +7 -0
- package/dist/cjs/_getAllKeysIn-BQIV8aw7.js +118 -0
- package/dist/cjs/_isIterateeCall-CPWXFS_s.js +72 -0
- package/dist/cjs/cloneDeep-CxFNKF1Y.js +619 -0
- package/dist/cjs/{isArrayLikeObject-CTP6Ak01.js → difference-Bfsq4sXB.js} +93 -5
- package/dist/cjs/{focus-trigger-element-NnpJ5nTp.js → focus-trigger-element-Brw8VubX.js} +1 -1
- package/dist/cjs/{format-D04vDIBj.js → format-D4jZb7Ls.js} +1 -1
- package/dist/cjs/{index-mbfaT7TB.js → index-BgFEL6FF.js} +1 -1
- package/dist/cjs/{isEmpty-DCC_l2Xp.js → isEmpty-EBCFxX1S.js} +1 -1
- package/dist/cjs/{isEqual-BsHLqE-x.js → isEqual-bXyw7kXo.js} +1 -1
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-badge.cjs.entry.js +2 -2
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +2 -3
- package/dist/cjs/limel-chip_2.cjs.entry.js +3 -3
- package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
- package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +5 -44
- package/dist/cjs/limel-file-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +12 -74
- package/dist/cjs/limel-form.cjs.entry.js +38541 -50295
- package/dist/cjs/limel-markdown.cjs.entry.js +3 -3
- package/dist/cjs/limel-picker.cjs.entry.js +1 -0
- package/dist/cjs/limel-popover_2.cjs.entry.js +2 -3
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +13 -478
- package/dist/cjs/limel-tab-bar.cjs.entry.js +4 -83
- package/dist/cjs/limel-table.cjs.entry.js +17 -272
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markdown-parser-DCnW9yak.js → markdown-parser-BIa99LAc.js} +2 -2
- package/dist/cjs/{moment-DCqC7BZP.js → moment-CqRdiK10.js} +1 -1
- package/dist/cjs/pickBy-kLjYLoam.js +201 -0
- package/dist/cjs/{sv-jO-ewmqh.js → sv-BSR4W58y.js} +1 -1
- package/dist/collection/components/form/adapters/widget-adapter.js +23 -30
- package/dist/collection/components/form/fields/array-field.js +39 -6
- package/dist/collection/components/form/fields/field-helpers.js +4 -4
- package/dist/collection/components/form/fields/object-field.js +4 -2
- package/dist/collection/components/form/fields/schema-field.js +33 -70
- package/dist/collection/components/form/form.css +19 -19
- package/dist/collection/components/form/form.js +40 -72
- package/dist/collection/components/form/form.test-schemas.js +308 -0
- package/dist/collection/components/form/row/row-context.js +2 -0
- package/dist/collection/components/form/row/row.js +2 -2
- package/dist/collection/components/form/templates/array-context.js +2 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +4 -4
- package/dist/collection/components/form/templates/array-field-item.js +47 -0
- package/dist/collection/components/form/templates/array-field-simple-item.js +6 -7
- package/dist/collection/components/form/templates/array-field.js +38 -94
- package/dist/collection/components/form/templates/index.js +1 -0
- package/dist/collection/components/form/templates/object-field.js +15 -11
- package/dist/collection/components/form/validation-display.js +75 -0
- package/dist/collection/components/form/validator.js +10 -0
- package/dist/collection/components/form/widgets/code-editor.js +1 -1
- package/dist/collection/components/form/widgets/select.js +2 -1
- package/dist/collection/components/picker/picker.js +1 -0
- package/dist/collection/components/table/table.js +12 -12
- package/dist/esm/{_assignValue-DkGAX8ec.js → _assignValue-DOEO9byf.js} +24 -2
- package/dist/esm/{_baseForOwn-CfpQNnvA.js → _baseEach-CL_-rBMy.js} +42 -2
- package/dist/esm/{_baseIsEqual-BvHnKRmD.js → _baseIsEqual-BfXMsuGh.js} +2 -2
- package/dist/esm/{_baseIteratee-DFBCJcMA.js → _baseIteratee-kS1-0_xD.js} +3 -3
- package/dist/esm/_commonjsHelpers-B85MJLTf.js +5 -0
- package/dist/esm/_getAllKeysIn-BKpeslPJ.js +113 -0
- package/dist/esm/_isIterateeCall-CTcCv8Mb.js +69 -0
- package/dist/esm/cloneDeep-BXAw5H-1.js +609 -0
- package/dist/esm/{isArrayLikeObject-D7yRwRv4.js → difference-DMAjHh-t.js} +91 -7
- package/dist/esm/{focus-trigger-element-6aEStEKM.js → focus-trigger-element-DubROLkE.js} +1 -1
- package/dist/esm/{format-BMPGHLQ8.js → format-hTrthuPP.js} +1 -1
- package/dist/esm/{index-DJJymEnS.js → index-t4DgGbWS.js} +1 -1
- package/dist/esm/{isArrayLike-bWHU4ebg.js → isArrayLike-D1QkaJU2.js} +1 -1
- package/dist/esm/{isEmpty-tfwtR2ai.js → isEmpty-DrFXbHWO.js} +2 -2
- package/dist/esm/{isEqual-BkQ4Z_9r.js → isEqual-CpaoJ_AF.js} +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-badge.entry.js +2 -2
- package/dist/esm/limel-breadcrumbs_7.entry.js +2 -3
- package/dist/esm/limel-chip_2.entry.js +4 -4
- package/dist/esm/limel-circular-progress.entry.js +2 -2
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-date-picker.entry.js +3 -3
- package/dist/esm/limel-dialog.entry.js +3 -3
- package/dist/esm/limel-file-dropzone_2.entry.js +4 -43
- package/dist/esm/limel-file-viewer.entry.js +2 -2
- package/dist/esm/limel-flatpickr-adapter.entry.js +8 -70
- package/dist/esm/limel-form.entry.js +38553 -50307
- package/dist/esm/limel-markdown.entry.js +3 -3
- package/dist/esm/limel-picker.entry.js +1 -0
- package/dist/esm/limel-popover_2.entry.js +2 -3
- package/dist/esm/limel-prosemirror-adapter.entry.js +12 -477
- package/dist/esm/limel-tab-bar.entry.js +4 -83
- package/dist/esm/limel-table.entry.js +14 -269
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{markdown-parser-CXYHPPe2.js → markdown-parser-D7vLKElE.js} +2 -2
- package/dist/esm/{moment-DhvPC9Jt.js → moment-DQRNe8qq.js} +1 -1
- package/dist/esm/pickBy-BEA90LIZ.js +195 -0
- package/dist/esm/{sv-84mf7Xsv.js → sv-CY-6-yEp.js} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-1cb2d781.entry.js +13 -0
- package/dist/lime-elements/{p-bd77c457.entry.js → p-2160ff6e.entry.js} +1 -1
- package/dist/lime-elements/{p-00d6ccd6.entry.js → p-25ae3a55.entry.js} +5 -5
- package/dist/lime-elements/{p-be0cbddb.entry.js → p-374ec191.entry.js} +1 -1
- package/dist/lime-elements/p-3a662d7e.entry.js +1 -0
- package/dist/lime-elements/{p-f0f5eda1.entry.js → p-41be4893.entry.js} +1 -1
- package/dist/lime-elements/{p-c84911e6.entry.js → p-4ad193a2.entry.js} +1 -1
- package/dist/lime-elements/{p-dd7a2361.entry.js → p-4ce682cf.entry.js} +3 -3
- package/dist/lime-elements/{p-eeae0ef6.entry.js → p-5ee484a7.entry.js} +4 -4
- package/dist/lime-elements/{p-b1d6553c.entry.js → p-77abb595.entry.js} +1 -1
- package/dist/lime-elements/p-8065425a.entry.js +1 -0
- package/dist/lime-elements/{p-77ba0f66.entry.js → p-8299af78.entry.js} +1 -1
- package/dist/lime-elements/{p-87c5e951.entry.js → p-8c7a7003.entry.js} +1 -1
- package/dist/lime-elements/{p-ce20d720.entry.js → p-97c401f1.entry.js} +1 -1
- package/dist/lime-elements/p-9a378cf0.entry.js +1 -0
- package/dist/lime-elements/p-B3zCFNAw.js +1 -0
- package/dist/lime-elements/p-B6bNnxRu.js +1 -0
- package/dist/lime-elements/p-B85MJLTf.js +1 -0
- package/dist/lime-elements/p-BCMRfUKp.js +1 -0
- package/dist/lime-elements/p-BbU4FGNT.js +1 -0
- package/dist/lime-elements/p-Bp0tNo1s.js +1 -0
- package/dist/lime-elements/{p-DpyWBa_Z.js → p-Bt64o80S.js} +1 -1
- package/dist/lime-elements/{p-BqiDn_Sf.js → p-BvDmWgCs.js} +1 -1
- package/dist/lime-elements/p-CMjGNANG.js +1 -0
- package/dist/lime-elements/p-DFWcgJ_i.js +1 -0
- package/dist/lime-elements/{p-B4YDb6f3.js → p-DJvGLFul.js} +1 -1
- package/dist/lime-elements/p-DTXIk0fN.js +1 -0
- package/dist/lime-elements/{p-BgPHaiMH.js → p-D_uMnX5g.js} +1 -1
- package/dist/lime-elements/{p-g3InYy9F.js → p-DdYOzHlg.js} +1 -1
- package/dist/lime-elements/{p-ndpPJpml.js → p-DsDkl4Sy.js} +1 -1
- package/dist/lime-elements/p-UGKt6Ywx.js +1 -0
- package/dist/lime-elements/p-afcf580c.entry.js +16 -0
- package/dist/lime-elements/p-b57b08b6.entry.js +1 -0
- package/dist/lime-elements/p-v6b303K5.js +1 -0
- package/dist/lime-elements/p-xQsJdKrq.js +1 -0
- package/dist/lime-elements/{p-BYx8mudw.js → p-zo6O9LC9.js} +2 -2
- package/dist/types/components/form/adapters/widget-adapter.d.ts +3 -2
- package/dist/types/components/form/fields/array-field.d.ts +11 -19
- package/dist/types/components/form/fields/object-field.d.ts +2 -2
- package/dist/types/components/form/fields/schema-field.d.ts +5 -18
- package/dist/types/components/form/form.d.ts +4 -8
- package/dist/types/components/form/form.test-schemas.d.ts +30 -0
- package/dist/types/components/form/row/row-context.d.ts +2 -0
- package/dist/types/components/form/templates/array-context.d.ts +7 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +7 -11
- package/dist/types/components/form/templates/array-field-item.d.ts +6 -0
- package/dist/types/components/form/templates/array-field-simple-item.d.ts +7 -9
- package/dist/types/components/form/templates/array-field.d.ts +7 -8
- package/dist/types/components/form/templates/index.d.ts +1 -0
- package/dist/types/components/form/templates/object-field.d.ts +6 -1
- package/dist/types/components/form/templates/types.d.ts +2 -4
- package/dist/types/components/form/validation-display.d.ts +60 -0
- package/dist/types/components/form/validator.d.ts +6 -0
- package/dist/types/components/form/widgets/code-editor.d.ts +1 -1
- package/dist/types/components/form/widgets/types.d.ts +1 -1
- package/dist/types/components/table/table.d.ts +8 -8
- package/package.json +4 -2
- package/dist/cjs/_baseAssignValue-BJgt6T7z.js +0 -27
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
- package/dist/cjs/_getPrototype-BK9cL-57.js +0 -8
- package/dist/cjs/negate-Bg3SqQh6.js +0 -42
- package/dist/collection/components/form/fields/types.js +0 -1
- package/dist/collection/components/form/schema-cache.js +0 -66
- package/dist/esm/_baseAssignValue-C8Uwn8zr.js +0 -25
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
- package/dist/esm/_getPrototype-jV9gkkJy.js +0 -6
- package/dist/esm/negate-ooVD-6_a.js +0 -40
- package/dist/lime-elements/p-45dfcaf3.entry.js +0 -1
- package/dist/lime-elements/p-5db2d069.entry.js +0 -1
- package/dist/lime-elements/p-9728aa4a.entry.js +0 -1
- package/dist/lime-elements/p-BFTU3MAI.js +0 -1
- package/dist/lime-elements/p-BlJd1RC5.js +0 -1
- package/dist/lime-elements/p-C6SEjICu.js +0 -1
- package/dist/lime-elements/p-CqEHNkif.js +0 -1
- package/dist/lime-elements/p-Cs5T63LB.js +0 -1
- package/dist/lime-elements/p-Cw1B5fXE.js +0 -1
- package/dist/lime-elements/p-DKxusNKT.js +0 -1
- package/dist/lime-elements/p-DrjUjEz3.js +0 -1
- package/dist/lime-elements/p-DzlmgobW.js +0 -1
- package/dist/lime-elements/p-ZcW3uvZL.js +0 -1
- package/dist/lime-elements/p-a4a09ce9.entry.js +0 -7
- package/dist/lime-elements/p-ad9cb573.entry.js +0 -1
- package/dist/lime-elements/p-c4e2885d.entry.js +0 -16
- package/dist/lime-elements/p-ooVD-6_a.js +0 -1
- package/dist/types/components/form/fields/types.d.ts +0 -41
- package/dist/types/components/form/schema-cache.d.ts +0 -17
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface SimpleItemProps {
|
|
4
|
-
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { ArrayFieldItemButtonsTemplateProps } from '@rjsf/utils';
|
|
3
|
+
export interface SimpleItemProps {
|
|
4
|
+
buttonsProps: ArrayFieldItemButtonsTemplateProps;
|
|
5
5
|
index: number;
|
|
6
6
|
allowItemRemoval: boolean;
|
|
7
7
|
allowItemReorder: boolean;
|
|
8
|
-
dataIndex: number;
|
|
9
8
|
}
|
|
10
|
-
export declare class SimpleItemTemplate extends React.Component<SimpleItemProps
|
|
11
|
-
props: SimpleItemProps
|
|
12
|
-
constructor(props: SimpleItemProps);
|
|
9
|
+
export declare class SimpleItemTemplate extends React.Component<PropsWithChildren<SimpleItemProps>> {
|
|
10
|
+
props: PropsWithChildren<SimpleItemProps>;
|
|
11
|
+
constructor(props: PropsWithChildren<SimpleItemProps>);
|
|
13
12
|
private removeButton?;
|
|
14
13
|
componentWillUnmount(): void;
|
|
15
14
|
render(): React.DetailedReactHTMLElement<{
|
|
@@ -22,5 +21,4 @@ export declare class SimpleItemTemplate extends React.Component<SimpleItemProps>
|
|
|
22
21
|
private handleRemove;
|
|
23
22
|
private readonly setRemoveButton;
|
|
24
23
|
}
|
|
25
|
-
export {};
|
|
26
24
|
//# sourceMappingURL=array-field-simple-item.d.ts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArrayFieldTemplateProps } from './types';
|
|
3
|
+
import { ArrayFieldOptions } from './array-context';
|
|
4
|
+
export declare const ARRAY_REORDER_EVENT = "arrayReorder";
|
|
3
5
|
interface ArrayFieldTemplateState {
|
|
4
6
|
order: number[];
|
|
5
7
|
}
|
|
@@ -10,16 +12,16 @@ export declare class ArrayFieldTemplate extends React.Component<ArrayFieldTempla
|
|
|
10
12
|
private draggedItemIndex?;
|
|
11
13
|
private dropElevationTimeout?;
|
|
12
14
|
private dropElevationTarget?;
|
|
13
|
-
private
|
|
15
|
+
private cachedContextValue;
|
|
16
|
+
private cachedSchema?;
|
|
17
|
+
private cachedFormData?;
|
|
14
18
|
constructor(props: ArrayFieldTemplateProps);
|
|
15
19
|
componentWillUnmount(): void;
|
|
16
20
|
componentDidMount(): void;
|
|
17
21
|
componentDidUpdate(previousProps: ArrayFieldTemplateProps): void;
|
|
18
|
-
render(): React.
|
|
22
|
+
render(): React.FunctionComponentElement<React.ProviderProps<ArrayFieldOptions>>;
|
|
19
23
|
private renderAddButton;
|
|
20
|
-
private getItemControls;
|
|
21
24
|
private readonly handleAddClick;
|
|
22
|
-
private renderItem;
|
|
23
25
|
private readonly setContainer;
|
|
24
26
|
private getOrderedItems;
|
|
25
27
|
private readonly handleSortStart;
|
|
@@ -27,10 +29,6 @@ export declare class ArrayFieldTemplate extends React.Component<ArrayFieldTempla
|
|
|
27
29
|
private setupDragController;
|
|
28
30
|
private teardownDragController;
|
|
29
31
|
private canReorderItems;
|
|
30
|
-
private canRemoveItems;
|
|
31
|
-
private isItemReorderable;
|
|
32
|
-
private isIndexReorderable;
|
|
33
|
-
private getReorderableOrder;
|
|
34
32
|
private readOrderFromDom;
|
|
35
33
|
private getReorderId;
|
|
36
34
|
private applyDropElevation;
|
|
@@ -38,6 +36,7 @@ export declare class ArrayFieldTemplate extends React.Component<ArrayFieldTempla
|
|
|
38
36
|
private clearDropElevationTimer;
|
|
39
37
|
private arraysEqual;
|
|
40
38
|
private extractIndices;
|
|
39
|
+
private getContextValue;
|
|
41
40
|
}
|
|
42
41
|
export {};
|
|
43
42
|
//# sourceMappingURL=array-field.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { LimeObjectFieldTemplateProps } from './types';
|
|
2
|
-
export declare const ObjectFieldTemplate: (props: LimeObjectFieldTemplateProps) =>
|
|
3
|
+
export declare const ObjectFieldTemplate: (props: LimeObjectFieldTemplateProps) => React.FunctionComponentElement<React.ProviderProps<import("./array-context").ArrayFieldOptions>> | React.FunctionComponentElement<React.FragmentProps> | React.ReactElement<{
|
|
4
|
+
header: string;
|
|
5
|
+
id: string;
|
|
6
|
+
'is-open': boolean;
|
|
7
|
+
}, string | React.JSXElementConstructor<any>>;
|
|
3
8
|
//# sourceMappingURL=object-field.d.ts.map
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ObjectFieldTemplateProps
|
|
1
|
+
import { ObjectFieldTemplateProps } from '@rjsf/utils';
|
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
|
3
|
-
export {
|
|
4
|
-
export type TemplateProps = ObjectFieldTemplateProps | ArrayFieldTemplateProps;
|
|
3
|
+
export { ArrayFieldTemplateProps } from '@rjsf/utils';
|
|
5
4
|
export type ObjectFieldProperty = ObjectFieldTemplateProps['properties'][0];
|
|
6
|
-
export type ArrayFieldItem = ArrayFieldTemplateProps['items'][0];
|
|
7
5
|
export interface LimeObjectFieldTemplateProps extends ObjectFieldTemplateProps {
|
|
8
6
|
schema: JSONSchema7;
|
|
9
7
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether a form field value is non-empty.
|
|
3
|
+
* Treats `null`, `undefined`, `''`, empty arrays,
|
|
4
|
+
* and empty plain objects as "no value".
|
|
5
|
+
*
|
|
6
|
+
* @param value - the current field value
|
|
7
|
+
* @returns `true` when the field holds meaningful data
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasValue(value: unknown): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Determine whether a field should be displayed as invalid.
|
|
12
|
+
*
|
|
13
|
+
* A field with errors is shown as invalid only when the user has
|
|
14
|
+
* interacted with it, it already contains a value, or it is optional.
|
|
15
|
+
* This avoids showing errors on untouched required fields before the
|
|
16
|
+
* user has had a chance to fill them in.
|
|
17
|
+
*
|
|
18
|
+
* @param field - the current field state
|
|
19
|
+
* @param field.hasErrors - whether the field currently has validation errors
|
|
20
|
+
* @param field.modified - whether the user has interacted with the field
|
|
21
|
+
* @param field.hasValue - whether the field holds a non-empty value
|
|
22
|
+
* @param field.required - whether the field is required
|
|
23
|
+
* @returns `true` when the field should render in an invalid state
|
|
24
|
+
*/
|
|
25
|
+
export declare function isFieldInvalid(field: {
|
|
26
|
+
hasErrors: boolean;
|
|
27
|
+
modified: boolean;
|
|
28
|
+
hasValue: boolean;
|
|
29
|
+
required: boolean;
|
|
30
|
+
}): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Check whether a field should be marked as required.
|
|
33
|
+
*
|
|
34
|
+
* A field is required when the schema marks it as `required` or
|
|
35
|
+
* when it specifies a positive `minItems` constraint.
|
|
36
|
+
*
|
|
37
|
+
* @param field - the current field state
|
|
38
|
+
* @param field.required - the `required` flag from the schema/props
|
|
39
|
+
* @param field.minItems - the `minItems` value from the schema (0 if unset)
|
|
40
|
+
* @returns `true` when the field is required
|
|
41
|
+
*/
|
|
42
|
+
export declare function isFieldRequired(field: {
|
|
43
|
+
required: boolean;
|
|
44
|
+
minItems: number;
|
|
45
|
+
}): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Return the helper text to display beneath a field.
|
|
48
|
+
*
|
|
49
|
+
* When validation errors exist the first error message is returned
|
|
50
|
+
* (capitalized). Otherwise falls back to `fallbackText` if provided,
|
|
51
|
+
* then to `description`.
|
|
52
|
+
*
|
|
53
|
+
* @param errors - array of validation error strings (may be `null`)
|
|
54
|
+
* @param description - the schema description for the field
|
|
55
|
+
* @param fallbackText - optional text that takes priority over `description`
|
|
56
|
+
* when there are no errors (e.g. a custom `helperText` prop)
|
|
57
|
+
* @returns the string to show as helper text
|
|
58
|
+
*/
|
|
59
|
+
export declare function getErrorText(errors: string[], description: string, fallbackText?: string): string;
|
|
60
|
+
//# sourceMappingURL=validation-display.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared RJSF validator configured with custom formats and ajv options.
|
|
3
|
+
* Use this single instance wherever the RJSF v6 API requires a validator.
|
|
4
|
+
*/
|
|
5
|
+
export declare const rjsfValidator: import("@rjsf/validator-ajv8/lib/validator").default<any, import("@rjsf/utils").RJSFSchema, any>;
|
|
6
|
+
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -79,14 +79,6 @@ export declare class Table {
|
|
|
79
79
|
* The page to show
|
|
80
80
|
*/
|
|
81
81
|
page: number;
|
|
82
|
-
/**
|
|
83
|
-
* Emitted when `mode` is `local` the data is sorted
|
|
84
|
-
*/
|
|
85
|
-
sort: EventEmitter<ColumnSorter[]>;
|
|
86
|
-
/**
|
|
87
|
-
* Emitted when a new page has been set
|
|
88
|
-
*/
|
|
89
|
-
changePage: EventEmitter<number>;
|
|
90
82
|
/**
|
|
91
83
|
* A message to display when the table has no data
|
|
92
84
|
*/
|
|
@@ -113,6 +105,14 @@ export declare class Table {
|
|
|
113
105
|
* - `bottom`: Display pagination controls at the bottom of the table (default)
|
|
114
106
|
*/
|
|
115
107
|
paginationLocation: 'top' | 'bottom';
|
|
108
|
+
/**
|
|
109
|
+
* Emitted when `mode` is `local` the data is sorted
|
|
110
|
+
*/
|
|
111
|
+
sort: EventEmitter<ColumnSorter[]>;
|
|
112
|
+
/**
|
|
113
|
+
* Emitted when a new page has been set
|
|
114
|
+
*/
|
|
115
|
+
changePage: EventEmitter<number>;
|
|
116
116
|
/**
|
|
117
117
|
* Emitted when `mode` is `remote` and the table is loading new data. The
|
|
118
118
|
* consumer is responsible for giving the table new data
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "39.
|
|
3
|
+
"version": "39.14.0",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"@limetech/eslint-config": "^4.0.0",
|
|
44
44
|
"@microsoft/api-extractor": "^7.52.11",
|
|
45
45
|
"@popperjs/core": "^2.11.8",
|
|
46
|
-
"@rjsf/core": "^
|
|
46
|
+
"@rjsf/core": "^6.4.2",
|
|
47
|
+
"@rjsf/utils": "^6.4.2",
|
|
48
|
+
"@rjsf/validator-ajv8": "^6.4.2",
|
|
47
49
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
48
50
|
"@stencil/core": "^4.43.1",
|
|
49
51
|
"@stencil/sass": "^3.2.2",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('./_defineProperty-BDFOiqJL.js');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
7
|
-
* value checks.
|
|
8
|
-
*
|
|
9
|
-
* @private
|
|
10
|
-
* @param {Object} object The object to modify.
|
|
11
|
-
* @param {string} key The key of the property to assign.
|
|
12
|
-
* @param {*} value The value to assign.
|
|
13
|
-
*/
|
|
14
|
-
function baseAssignValue(object, key, value) {
|
|
15
|
-
if (key == '__proto__' && _defineProperty.defineProperty) {
|
|
16
|
-
_defineProperty.defineProperty(object, key, {
|
|
17
|
-
'configurable': true,
|
|
18
|
-
'enumerable': true,
|
|
19
|
-
'value': value,
|
|
20
|
-
'writable': true
|
|
21
|
-
});
|
|
22
|
-
} else {
|
|
23
|
-
object[key] = value;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
exports.baseAssignValue = baseAssignValue;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
|
-
|
|
5
|
-
function getDefaultExportFromCjs (x) {
|
|
6
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
exports.commonjsGlobal = commonjsGlobal;
|
|
10
|
-
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/** Error message constants. */
|
|
4
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Creates a function that negates the result of the predicate `func`. The
|
|
8
|
-
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
9
|
-
* created function.
|
|
10
|
-
*
|
|
11
|
-
* @static
|
|
12
|
-
* @memberOf _
|
|
13
|
-
* @since 3.0.0
|
|
14
|
-
* @category Function
|
|
15
|
-
* @param {Function} predicate The predicate to negate.
|
|
16
|
-
* @returns {Function} Returns the new negated function.
|
|
17
|
-
* @example
|
|
18
|
-
*
|
|
19
|
-
* function isEven(n) {
|
|
20
|
-
* return n % 2 == 0;
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
24
|
-
* // => [1, 3, 5]
|
|
25
|
-
*/
|
|
26
|
-
function negate(predicate) {
|
|
27
|
-
if (typeof predicate != 'function') {
|
|
28
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
29
|
-
}
|
|
30
|
-
return function() {
|
|
31
|
-
var args = arguments;
|
|
32
|
-
switch (args.length) {
|
|
33
|
-
case 0: return !predicate.call(this);
|
|
34
|
-
case 1: return !predicate.call(this, args[0]);
|
|
35
|
-
case 2: return !predicate.call(this, args[0], args[1]);
|
|
36
|
-
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
37
|
-
}
|
|
38
|
-
return !predicate.apply(this, args);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
exports.negate = negate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s)
|
|
4
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
import Ajv from "ajv";
|
|
14
|
-
import { isInteger } from "./validators";
|
|
15
|
-
const ajv = new Ajv({
|
|
16
|
-
unknownFormats: 'ignore',
|
|
17
|
-
allErrors: true,
|
|
18
|
-
multipleOfPrecision: 2,
|
|
19
|
-
}).addFormat('integer', isInteger);
|
|
20
|
-
const validators = new Map();
|
|
21
|
-
/**
|
|
22
|
-
* Returns a compiled JSON Schema validator, using a cached version
|
|
23
|
-
* if the same schema content has been seen before.
|
|
24
|
-
*
|
|
25
|
-
* @param schema - the JSON Schema to compile
|
|
26
|
-
*/
|
|
27
|
-
export function getValidator(schema) {
|
|
28
|
-
const key = hashSchema(schema);
|
|
29
|
-
const cached = validators.get(key);
|
|
30
|
-
if (cached) {
|
|
31
|
-
return cached;
|
|
32
|
-
}
|
|
33
|
-
const { $id, id } = schema, schemaWithoutId = __rest(schema, ["$id", "id"]);
|
|
34
|
-
const validator = ajv.compile(schemaWithoutId);
|
|
35
|
-
validators.set(key, validator);
|
|
36
|
-
return validator;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Generates a deterministic ID from schema content, preserving any
|
|
40
|
-
* existing `$id` as a prefix. Used to work around RJSF #1563 where
|
|
41
|
-
* identical schemas need stable IDs to avoid validation cache collisions.
|
|
42
|
-
*
|
|
43
|
-
* @param schema - the JSON Schema to generate an ID for
|
|
44
|
-
*/
|
|
45
|
-
export function getSchemaId(schema) {
|
|
46
|
-
const hash = hashSchema(schema);
|
|
47
|
-
const prefix = schema.$id ? `${schema.$id}-` : '';
|
|
48
|
-
return `${prefix}${hash}`;
|
|
49
|
-
}
|
|
50
|
-
function hashSchema(schema) {
|
|
51
|
-
const { $id, id } = schema, schemaWithoutId = __rest(schema, ["$id", "id"]);
|
|
52
|
-
return djb2Hash(JSON.stringify(schemaWithoutId, sortedReplacer));
|
|
53
|
-
}
|
|
54
|
-
function sortedReplacer(_, value) {
|
|
55
|
-
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
56
|
-
return Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)));
|
|
57
|
-
}
|
|
58
|
-
return value;
|
|
59
|
-
}
|
|
60
|
-
function djb2Hash(str) {
|
|
61
|
-
let hash = 5381;
|
|
62
|
-
for (let i = 0; i < str.length; i++) {
|
|
63
|
-
hash = ((hash << 5) + hash + str.codePointAt(i)) & 4294967295;
|
|
64
|
-
}
|
|
65
|
-
return (hash >>> 0).toString(36);
|
|
66
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { d as defineProperty } from './_defineProperty-yVdnnt__.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
5
|
-
* value checks.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
* @param {Object} object The object to modify.
|
|
9
|
-
* @param {string} key The key of the property to assign.
|
|
10
|
-
* @param {*} value The value to assign.
|
|
11
|
-
*/
|
|
12
|
-
function baseAssignValue(object, key, value) {
|
|
13
|
-
if (key == '__proto__' && defineProperty) {
|
|
14
|
-
defineProperty(object, key, {
|
|
15
|
-
'configurable': true,
|
|
16
|
-
'enumerable': true,
|
|
17
|
-
'value': value,
|
|
18
|
-
'writable': true
|
|
19
|
-
});
|
|
20
|
-
} else {
|
|
21
|
-
object[key] = value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { baseAssignValue as b };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export { commonjsGlobal as c, getDefaultExportFromCjs as g };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** Error message constants. */
|
|
2
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Creates a function that negates the result of the predicate `func`. The
|
|
6
|
-
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
7
|
-
* created function.
|
|
8
|
-
*
|
|
9
|
-
* @static
|
|
10
|
-
* @memberOf _
|
|
11
|
-
* @since 3.0.0
|
|
12
|
-
* @category Function
|
|
13
|
-
* @param {Function} predicate The predicate to negate.
|
|
14
|
-
* @returns {Function} Returns the new negated function.
|
|
15
|
-
* @example
|
|
16
|
-
*
|
|
17
|
-
* function isEven(n) {
|
|
18
|
-
* return n % 2 == 0;
|
|
19
|
-
* }
|
|
20
|
-
*
|
|
21
|
-
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
22
|
-
* // => [1, 3, 5]
|
|
23
|
-
*/
|
|
24
|
-
function negate(predicate) {
|
|
25
|
-
if (typeof predicate != 'function') {
|
|
26
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
27
|
-
}
|
|
28
|
-
return function() {
|
|
29
|
-
var args = arguments;
|
|
30
|
-
switch (args.length) {
|
|
31
|
-
case 0: return !predicate.call(this);
|
|
32
|
-
case 1: return !predicate.call(this, args[0]);
|
|
33
|
-
case 2: return !predicate.call(this, args[0], args[1]);
|
|
34
|
-
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
35
|
-
}
|
|
36
|
-
return !predicate.apply(this, args);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { negate as n };
|