@_linked/shape-ui 2.0.0 → 2.2.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/lib/esm/columns.d.ts +58 -0
- package/lib/esm/columns.js +173 -0
- package/lib/esm/columns.js.map +1 -0
- package/lib/esm/components/AddInstanceForms.d.ts +38 -0
- package/lib/esm/components/AddInstanceForms.js +143 -0
- package/lib/esm/components/AddInstanceForms.js.map +1 -0
- package/lib/esm/components/AddInstanceForms.module.css +12 -0
- package/lib/esm/components/BatchEditDrawer.d.ts +13 -0
- package/lib/esm/components/BatchEditDrawer.js +122 -0
- package/lib/esm/components/BatchEditDrawer.js.map +1 -0
- package/lib/esm/components/BatchEditDrawer.module.css +193 -0
- package/lib/esm/components/CustomMultiSelect.d.ts +26 -0
- package/lib/esm/components/CustomMultiSelect.js +344 -0
- package/lib/esm/components/CustomMultiSelect.js.map +1 -0
- package/lib/esm/components/CustomMultiSelect.module.css +291 -0
- package/lib/esm/components/DynamicFormField.d.ts +21 -0
- package/lib/esm/components/DynamicFormField.js +149 -0
- package/lib/esm/components/DynamicFormField.js.map +1 -0
- package/lib/esm/components/DynamicFormField.module.css +169 -0
- package/lib/esm/components/EditInstanceForms.d.ts +15 -0
- package/lib/esm/components/EditInstanceForms.js +118 -0
- package/lib/esm/components/EditInstanceForms.js.map +1 -0
- package/lib/esm/components/FilterBadge.d.ts +20 -0
- package/lib/esm/components/FilterBadge.js +26 -0
- package/lib/esm/components/FilterBadge.js.map +1 -0
- package/lib/esm/components/FilterBadge.module.css +25 -0
- package/lib/esm/components/FormField.d.ts +18 -0
- package/lib/esm/components/FormField.js +9 -0
- package/lib/esm/components/FormField.js.map +1 -0
- package/lib/esm/components/FormField.module.css +57 -0
- package/lib/esm/components/InstanceDeletionDialog.d.ts +17 -0
- package/lib/esm/components/InstanceDeletionDialog.js +83 -0
- package/lib/esm/components/InstanceDeletionDialog.js.map +1 -0
- package/lib/esm/components/InstanceDeletionDialog.module.css +59 -0
- package/lib/esm/components/InstanceOverview.d.ts +37 -0
- package/lib/esm/components/InstanceOverview.js +233 -0
- package/lib/esm/components/InstanceOverview.js.map +1 -0
- package/lib/esm/components/InstanceOverview.module.css +35 -0
- package/lib/esm/components/InstanceView.d.ts +29 -0
- package/lib/esm/components/InstanceView.js +97 -0
- package/lib/esm/components/InstanceView.js.map +1 -0
- package/lib/esm/components/InstanceView.module.css +157 -0
- package/lib/esm/components/NodeBadge.d.ts +25 -0
- package/lib/esm/components/NodeBadge.js +29 -0
- package/lib/esm/components/NodeBadge.js.map +1 -0
- package/lib/esm/components/NodeValuesEditor.d.ts +15 -0
- package/lib/esm/components/NodeValuesEditor.js +29 -0
- package/lib/esm/components/NodeValuesEditor.js.map +1 -0
- package/lib/esm/components/NodeValuesEditor.module.css +4 -0
- package/lib/esm/components/ReactTable.d.ts +50 -0
- package/lib/esm/components/ReactTable.js +370 -0
- package/lib/esm/components/ReactTable.js.map +1 -0
- package/lib/esm/components/ReactTable.module.css +950 -0
- package/lib/esm/components/TextfieldEditor.d.ts +1 -2
- package/lib/esm/components/TextfieldEditor.js +2 -2
- package/lib/esm/components/TextfieldEditor.js.map +1 -1
- package/lib/esm/components/forms.module.css +96 -0
- package/lib/esm/host.d.ts +196 -0
- package/lib/esm/host.js +25 -0
- package/lib/esm/host.js.map +1 -0
- package/lib/esm/hostContext.d.ts +34 -0
- package/lib/esm/hostContext.js +95 -0
- package/lib/esm/hostContext.js.map +1 -0
- package/lib/esm/index.d.ts +64 -10
- package/lib/esm/index.js +63 -14
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/read.d.ts +48 -0
- package/lib/esm/read.js +96 -0
- package/lib/esm/read.js.map +1 -0
- package/lib/esm/search.d.ts +32 -0
- package/lib/esm/search.js +87 -0
- package/lib/esm/search.js.map +1 -0
- package/lib/esm/shape/contracts.d.ts +58 -0
- package/lib/esm/shape/contracts.js +15 -0
- package/lib/esm/shape/contracts.js.map +1 -0
- package/lib/esm/shape/naming.d.ts +30 -0
- package/lib/esm/shape/naming.js +52 -0
- package/lib/esm/shape/naming.js.map +1 -0
- package/lib/esm/shape/nodeDisplay.d.ts +36 -0
- package/lib/esm/shape/nodeDisplay.js +117 -0
- package/lib/esm/shape/nodeDisplay.js.map +1 -0
- package/lib/esm/shape/propertyTypes.d.ts +12 -0
- package/lib/esm/shape/propertyTypes.js +60 -0
- package/lib/esm/shape/propertyTypes.js.map +1 -0
- package/lib/esm/shape/propertyVisibility.d.ts +56 -0
- package/lib/esm/shape/propertyVisibility.js +112 -0
- package/lib/esm/shape/propertyVisibility.js.map +1 -0
- package/lib/esm/shape/shapeDependencies.d.ts +41 -0
- package/lib/esm/shape/shapeDependencies.js +141 -0
- package/lib/esm/shape/shapeDependencies.js.map +1 -0
- package/lib/esm/shape/tableFilters.d.ts +35 -0
- package/lib/esm/shape/tableFilters.js +171 -0
- package/lib/esm/shape/tableFilters.js.map +1 -0
- package/lib/esm/shape/useFormDependencies.d.ts +38 -0
- package/lib/esm/shape/useFormDependencies.js +178 -0
- package/lib/esm/shape/useFormDependencies.js.map +1 -0
- package/lib/esm/shape/validation.d.ts +15 -0
- package/lib/esm/shape/validation.js +106 -0
- package/lib/esm/shape/validation.js.map +1 -0
- package/lib/esm/tokens.css +25 -0
- package/lib/esm/types.d.ts +22 -0
- package/lib/esm/types.js +1 -0
- package/lib/esm/types.js.map +1 -0
- package/lib/esm/write.d.ts +51 -0
- package/lib/esm/write.js +99 -0
- package/lib/esm/write.js.map +1 -0
- package/package.json +44 -18
- package/src/backend.ts +1 -0
- package/src/columns.regression.test.ts +143 -0
- package/src/columns.test.ts +200 -0
- package/src/columns.ts +228 -0
- package/src/components/AddInstanceForms.module.css +12 -0
- package/src/components/AddInstanceForms.tsx +321 -0
- package/src/components/AvatarEditor.tsx +34 -0
- package/src/components/BatchEditDrawer.module.css +193 -0
- package/src/components/BatchEditDrawer.tsx +295 -0
- package/src/components/CheckboxEditor.module.css +6 -0
- package/src/components/CheckboxEditor.tsx +86 -0
- package/src/components/CustomMultiSelect.module.css +291 -0
- package/src/components/CustomMultiSelect.tsx +527 -0
- package/src/components/DateEditor.tsx +50 -0
- package/src/components/DynamicFormField.module.css +169 -0
- package/src/components/DynamicFormField.tsx +357 -0
- package/src/components/EditInstanceForms.tsx +260 -0
- package/src/components/FilterBadge.module.css +25 -0
- package/src/components/FilterBadge.tsx +70 -0
- package/src/components/FormField.module.css +57 -0
- package/src/components/FormField.tsx +59 -0
- package/src/components/ImageValueEditor.module.css +3 -0
- package/src/components/ImageValueEditor.tsx +82 -0
- package/src/components/InstanceDeletionDialog.module.css +59 -0
- package/src/components/InstanceDeletionDialog.tsx +175 -0
- package/src/components/InstanceOverview.module.css +35 -0
- package/src/components/InstanceOverview.tsx +374 -0
- package/src/components/InstanceView.module.css +157 -0
- package/src/components/InstanceView.tsx +212 -0
- package/src/components/NodeBadge.tsx +60 -0
- package/src/components/NodeValuesEditor.module.css +4 -0
- package/src/components/NodeValuesEditor.tsx +64 -0
- package/src/components/RadioButtonEditor.module.css +22 -0
- package/src/components/RadioButtonEditor.tsx +96 -0
- package/src/components/ReactTable.module.css +950 -0
- package/src/components/ReactTable.tsx +991 -0
- package/src/components/SelectEditor.tsx +85 -0
- package/src/components/ShapeTable.module.css +394 -0
- package/src/components/SwitchEditor.tsx +60 -0
- package/src/components/TextareaEditor.tsx +55 -0
- package/src/components/TextfieldEditor.tsx +67 -0
- package/src/components/ToggleEditor.tsx +63 -0
- package/src/components/forms.module.css +96 -0
- package/src/host.ts +226 -0
- package/src/hostContext.tsx +114 -0
- package/src/index.ts +99 -0
- package/src/package.ts +21 -0
- package/src/read.ts +148 -0
- package/src/search.test.ts +174 -0
- package/src/search.ts +108 -0
- package/src/shape/contracts.ts +66 -0
- package/src/shape/naming.ts +52 -0
- package/src/shape/nodeDisplay.ts +114 -0
- package/src/shape/propertyTypes.ts +86 -0
- package/src/shape/propertyVisibility.ts +180 -0
- package/src/shape/shapeDependencies.ts +183 -0
- package/src/shape/tableFilters.ts +223 -0
- package/src/shape/types.ts +1158 -0
- package/src/shape/useFormDependencies.ts +257 -0
- package/src/shape/validation.ts +121 -0
- package/src/tokens.css +25 -0
- package/src/types.ts +20 -0
- package/src/utils/helper.ts +35 -0
- package/src/write.test.ts +174 -0
- package/src/write.ts +114 -0
- package/.changeset/README.md +0 -20
- package/.changeset/config.json +0 -14
- package/.github/workflows/changeset-check.yml +0 -44
- package/.github/workflows/ci.yml +0 -43
- package/.github/workflows/publish.yml +0 -158
- package/CHANGELOG.md +0 -30
- package/lib/esm/components/AvatarEditor.d.ts +0 -20
- package/lib/esm/components/AvatarEditor.js +0 -7
- package/lib/esm/components/AvatarEditor.js.map +0 -1
- package/lib/esm/components/CheckboxEditor.d.ts +0 -21
- package/lib/esm/components/CheckboxEditor.js +0 -44
- package/lib/esm/components/CheckboxEditor.js.map +0 -1
- package/lib/esm/components/DateEditor.d.ts +0 -20
- package/lib/esm/components/DateEditor.js +0 -22
- package/lib/esm/components/DateEditor.js.map +0 -1
- package/lib/esm/components/RadioButtonEditor.d.ts +0 -23
- package/lib/esm/components/RadioButtonEditor.js +0 -41
- package/lib/esm/components/RadioButtonEditor.js.map +0 -1
- package/lib/esm/components/SelectEditor.d.ts +0 -21
- package/lib/esm/components/SelectEditor.js +0 -30
- package/lib/esm/components/SelectEditor.js.map +0 -1
- package/lib/esm/components/SwitchEditor.d.ts +0 -21
- package/lib/esm/components/SwitchEditor.js +0 -23
- package/lib/esm/components/SwitchEditor.js.map +0 -1
- package/lib/esm/components/TextareaEditor.d.ts +0 -23
- package/lib/esm/components/TextareaEditor.js +0 -15
- package/lib/esm/components/TextareaEditor.js.map +0 -1
- package/lib/esm/components/ToggleEditor.d.ts +0 -22
- package/lib/esm/components/ToggleEditor.js +0 -23
- package/lib/esm/components/ToggleEditor.js.map +0 -1
- package/lib/esm/ontologies/lincd-ui.d.ts +0 -6
- package/lib/esm/ontologies/lincd-ui.js +0 -18
- package/lib/esm/ontologies/lincd-ui.js.map +0 -1
- package/lib/esm/package.d.ts +0 -3
- package/lib/esm/package.js +0 -4
- package/lib/esm/package.js.map +0 -1
- package/tsconfig-cjs.json +0 -8
- package/tsconfig-esm.json +0 -9
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Shape } from '@_linked/core/shapes/Shape';
|
|
3
|
-
import { PropertyShape } from '@_linked/core/shapes/SHACL';
|
|
4
|
-
export interface SelectEditorProps {
|
|
5
|
-
onValueChange?: (e: any) => void;
|
|
6
|
-
of?: Shape;
|
|
7
|
-
property?: PropertyShape;
|
|
8
|
-
/**
|
|
9
|
-
* Converts the value returned by the shape, to the input string for the select
|
|
10
|
-
* @param shapePropertyValue
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
preConvertValueFn?: (shapePropertyValue: any) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Converts the value of the select to a value that can be provided to the set method of the shape
|
|
16
|
-
* @param inputValue
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
postConvertValueFn?: (inputValue: string) => any;
|
|
20
|
-
}
|
|
21
|
-
export declare const SelectEditor: ({ onValueChange, of, property, preConvertValueFn, postConvertValueFn, ...restProps }: SelectEditorProps) => React.JSX.Element;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Root, } from '@_linked/primitives/components/Select';
|
|
3
|
-
// interface RootSelectProps extend {
|
|
4
|
-
// of?: Shape;
|
|
5
|
-
// property?: PropertyShape;
|
|
6
|
-
// }
|
|
7
|
-
// const RootSelect = () => {
|
|
8
|
-
// return <Root></Root>;
|
|
9
|
-
// };
|
|
10
|
-
export const SelectEditor = ({ onValueChange, of, property, preConvertValueFn, postConvertValueFn, ...restProps }) => {
|
|
11
|
-
const onChangeHandler = (value) => {
|
|
12
|
-
console.log(value, 'value select');
|
|
13
|
-
if (!of)
|
|
14
|
-
return;
|
|
15
|
-
if (postConvertValueFn) {
|
|
16
|
-
value = postConvertValueFn(value);
|
|
17
|
-
}
|
|
18
|
-
of[property.label] = value;
|
|
19
|
-
console.log(of[property.label], 'of[property.label] switch');
|
|
20
|
-
if (onValueChange) {
|
|
21
|
-
onValueChange(value);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return (React.createElement(Root, { value: of[property.label], onValueChange: onChangeHandler, defaultValue: of
|
|
25
|
-
? preConvertValueFn
|
|
26
|
-
? preConvertValueFn(of[property.label])
|
|
27
|
-
: of[property.label]
|
|
28
|
-
: '', ...restProps }));
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=SelectEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectEditor.js","sourceRoot":"","sources":["../../../src/components/SelectEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EACL,IAAI,GAUL,MAAM,uCAAuC,CAAC;AAqB/C,sCAAsC;AACtC,gBAAgB;AAChB,8BAA8B;AAC9B,IAAI;AACJ,6BAA6B;AAC7B,0BAA0B;AAC1B,KAAK;AAEL,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,aAAa,EACb,EAAE,EACF,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,GAAG,SAAS,EACM,EAAE,EAAE;IACtB,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,IAAI,kBAAkB,EAAE,CAAC;YACvB,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QACD,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA2B,CAAC,CAAC;QAE7D,IAAI,aAAa,EAAE,CAAC;YAClB,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,IAAI,IACH,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzB,aAAa,EAAE,eAAe,EAC9B,YAAY,EACV,EAAE;YACA,CAAC,CAAC,iBAAiB;gBACjB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACvC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YACtB,CAAC,CAAC,EAAE,KAEJ,SAAS,GAQR,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Shape } from '@_linked/core/shapes/Shape';
|
|
3
|
-
import { PropertyDetails } from '@_linked/server/utils/Shapes';
|
|
4
|
-
export interface SwitchEditorProps {
|
|
5
|
-
onCheckedChange?: (e: any) => void;
|
|
6
|
-
of?: Shape;
|
|
7
|
-
property?: PropertyDetails;
|
|
8
|
-
/**
|
|
9
|
-
* Converts the value returned by the shape, to the input string for the switch
|
|
10
|
-
* @param shapePropertyValue
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
preConvertValueFn?: (shapePropertyValue: any) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Converts the value of the switch to a value that can be provided to the set method of the shape
|
|
16
|
-
* @param inputValue
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
postConvertValueFn?: (inputValue: string) => any;
|
|
20
|
-
}
|
|
21
|
-
export declare const SwitchEditor: ({ onCheckedChange, of, property, preConvertValueFn, postConvertValueFn, ...restProps }: SwitchEditorProps) => React.JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Switch } from '@_linked/primitives/components/Switch';
|
|
3
|
-
export const SwitchEditor = ({ onCheckedChange, of, property, preConvertValueFn, postConvertValueFn, ...restProps }) => {
|
|
4
|
-
const onChangeHandler = (value) => {
|
|
5
|
-
console.log(value, 'value switch');
|
|
6
|
-
if (!of)
|
|
7
|
-
return;
|
|
8
|
-
if (postConvertValueFn) {
|
|
9
|
-
value = postConvertValueFn(value);
|
|
10
|
-
}
|
|
11
|
-
of[property.label] = value;
|
|
12
|
-
console.log(of[property.label], 'of[property.label] switch');
|
|
13
|
-
if (onCheckedChange) {
|
|
14
|
-
onCheckedChange(value);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return (React.createElement(Switch, { value: of[property.label], onCheckedChange: onChangeHandler, defaultChecked: of
|
|
18
|
-
? preConvertValueFn
|
|
19
|
-
? preConvertValueFn(of[property.label])
|
|
20
|
-
: of[property.label]
|
|
21
|
-
: '', ...restProps }));
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=SwitchEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchEditor.js","sourceRoot":"","sources":["../../../src/components/SwitchEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAsB/D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,eAAe,EACf,EAAE,EACF,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,GAAG,SAAS,EACM,EAAE,EAAE;IACtB,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,IAAI,kBAAkB,EAAE,CAAC;YACvB,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QACD,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA2B,CAAC,CAAC;QAE7D,IAAI,eAAe,EAAE,CAAC;YACpB,eAAe,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzB,eAAe,EAAE,eAAe,EAChC,cAAc,EACZ,EAAE;YACA,CAAC,CAAC,iBAAiB;gBACjB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACvC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YACtB,CAAC,CAAC,EAAE,KAEJ,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Shape } from '@_linked/core/shapes/Shape';
|
|
3
|
-
export interface TextareaEditorProps {
|
|
4
|
-
onChange?: (e: any) => void;
|
|
5
|
-
value?: string[];
|
|
6
|
-
of?: Shape;
|
|
7
|
-
property?: string;
|
|
8
|
-
children?: any;
|
|
9
|
-
className?: any;
|
|
10
|
-
/**
|
|
11
|
-
* Converts the value returned by the shape, to the text area string for the text area
|
|
12
|
-
* @param shapePropertyValue
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
preConvertValueFn?: (shapePropertyValue: any) => string;
|
|
16
|
-
/**
|
|
17
|
-
* Converts the value of the text area to a value that can be provided to the set method of the shape
|
|
18
|
-
* @param textAreaValue
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
postConvertValueFn?: (textAreaValue: string) => any;
|
|
22
|
-
}
|
|
23
|
-
export declare const TextareaEditor: ({ onChange, value, of, property, preConvertValueFn, postConvertValueFn, children, className, ...props }: TextareaEditorProps) => React.JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Textarea } from '@_linked/primitives/components/Textarea';
|
|
3
|
-
export const TextareaEditor = ({ onChange, value, of, property, preConvertValueFn, postConvertValueFn, children, className, ...props }) => {
|
|
4
|
-
const onChangeHandler = (e) => {
|
|
5
|
-
if (onChange) {
|
|
6
|
-
onChange(e);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
return (React.createElement(Textarea, { onChange: onChangeHandler, defaultValue: of
|
|
10
|
-
? preConvertValueFn
|
|
11
|
-
? preConvertValueFn(of[property])
|
|
12
|
-
: of[property]
|
|
13
|
-
: '', value: value, ...props }));
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=TextareaEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaEditor.js","sourceRoot":"","sources":["../../../src/components/TextareaEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAsBnE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,EAAE,EACF,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,EAAE;QAC5B,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,QAAQ,IACP,QAAQ,EAAE,eAAe,EACzB,YAAY,EACV,EAAE;YACA,CAAC,CAAC,iBAAiB;gBACjB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;gBACjC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC;YAChB,CAAC,CAAC,EAAE,EAER,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Shape } from '@_linked/core/shapes/Shape';
|
|
3
|
-
import { PropertyShape } from '@_linked/core/shapes/SHACL';
|
|
4
|
-
export interface ToggleEditorProps {
|
|
5
|
-
onPressedChange?: (e: any) => void;
|
|
6
|
-
of?: Shape;
|
|
7
|
-
property?: PropertyShape;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Converts the value returned by the shape, to the input string for the toggle
|
|
11
|
-
* @param shapePropertyValue
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
preConvertValueFn?: (shapePropertyValue: any) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Converts the value of the toggle to a value that can be provided to the set method of the shape
|
|
17
|
-
* @param inputValue
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
postConvertValueFn?: (inputValue: string) => any;
|
|
21
|
-
}
|
|
22
|
-
export declare const ToggleEditor: ({ onPressedChange, of, property, children, preConvertValueFn, postConvertValueFn, ...restProps }: ToggleEditorProps) => React.JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Root as Toggle } from '@_linked/primitives/components/Toggle';
|
|
3
|
-
export const ToggleEditor = ({ onPressedChange, of, property, children, preConvertValueFn, postConvertValueFn, ...restProps }) => {
|
|
4
|
-
const onChangeHandler = (value) => {
|
|
5
|
-
console.log(value, 'value toggle');
|
|
6
|
-
if (!of)
|
|
7
|
-
return;
|
|
8
|
-
if (postConvertValueFn) {
|
|
9
|
-
value = postConvertValueFn(value);
|
|
10
|
-
}
|
|
11
|
-
of[property.label] = value;
|
|
12
|
-
console.log(of[property.label], 'of[property.label] toggle');
|
|
13
|
-
if (onPressedChange) {
|
|
14
|
-
onPressedChange(value);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return (React.createElement(Toggle, { pressed: of[property.label], onPressedChange: onChangeHandler, defaultPressed: of
|
|
18
|
-
? preConvertValueFn
|
|
19
|
-
? preConvertValueFn(of[property.label])
|
|
20
|
-
: of[property.label]
|
|
21
|
-
: '', ...restProps }, children));
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=ToggleEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleEditor.js","sourceRoot":"","sources":["../../../src/components/ToggleEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAsBvE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,eAAe,EACf,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,GAAG,SAAS,EACM,EAAE,EAAE;IACtB,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,IAAI,kBAAkB,EAAE,CAAC;YACvB,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QACD,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA2B,CAAC,CAAC;QAE7D,IAAI,eAAe,EAAE,CAAC;YACpB,eAAe,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC3B,eAAe,EAAE,eAAe,EAChC,cAAc,EACZ,EAAE;YACA,CAAC,CAAC,iBAAiB;gBACjB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACvC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YACtB,CAAC,CAAC,EAAE,KAEJ,SAAS,IAEZ,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const loadData: () => Promise<any>;
|
|
2
|
-
export declare const ns: (term: string) => import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
|
|
3
|
-
export declare const _self: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
|
|
4
|
-
export declare const lincdUi: {
|
|
5
|
-
_self: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
|
|
6
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Prefix } from '@_linked/core/utils/Prefix';
|
|
2
|
-
import { createNameSpace } from '@_linked/core/utils/NameSpace';
|
|
3
|
-
import { linkedOntology } from '../package.js';
|
|
4
|
-
import * as _this from './lincd-ui.js';
|
|
5
|
-
const dataFile = '../data/lincd-ui.json';
|
|
6
|
-
const base = 'http://lincd.org/ont/lincd-ui/';
|
|
7
|
-
Prefix.add('lincd-ui', base);
|
|
8
|
-
export const loadData = () => {
|
|
9
|
-
//@ts-ignore
|
|
10
|
-
return import(dataFile, { with: { type: 'json' } }).then((data) => data.default);
|
|
11
|
-
};
|
|
12
|
-
export const ns = createNameSpace(base);
|
|
13
|
-
export const _self = ns('');
|
|
14
|
-
export const lincdUi = {
|
|
15
|
-
_self,
|
|
16
|
-
};
|
|
17
|
-
linkedOntology(_this, ns, 'lincd-ui', loadData, dataFile);
|
|
18
|
-
//# sourceMappingURL=lincd-ui.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lincd-ui.js","sourceRoot":"","sources":["../../../src/ontologies/lincd-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,MAAM,QAAQ,GAAG,uBAAuB,CAAC;AACzC,MAAM,IAAI,GAAG,gCAAgC,CAAC;AAE9C,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,YAAY;IACZ,OAAO,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CACtD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAE5B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK;CACN,CAAC;AAEF,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
|
package/lib/esm/package.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { getPackageShape, linkedOntology, linkedShape, linkedUtil, packageExports, registerPackageExport, registerPackageModule } from '@_linked/core/package';
|
|
2
|
-
export declare const packageName: string;
|
|
3
|
-
export { getPackageShape, linkedOntology, linkedShape, linkedUtil, packageExports, registerPackageExport, registerPackageModule, };
|
package/lib/esm/package.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { getPackageShape, linkedOntology, linkedShape, linkedUtil, packageExports, registerPackageExport, registerPackageModule, } from '@_linked/core/package';
|
|
2
|
-
export const { packageName } = { packageName: '@_linked/ui' };
|
|
3
|
-
export { getPackageShape, linkedOntology, linkedShape, linkedUtil, packageExports, registerPackageExport, registerPackageModule, };
|
|
4
|
-
//# sourceMappingURL=package.js.map
|
package/lib/esm/package.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,CAAC"}
|
package/tsconfig-cjs.json
DELETED