@cratis/scene.primereact 4.15.0 → 4.16.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/dist/cjs/form/PrimeCalendar.js +3 -1
- package/dist/cjs/form/PrimeCalendar.js.map +1 -1
- package/dist/cjs/form/PrimeCheckbox.js +4 -2
- package/dist/cjs/form/PrimeCheckbox.js.map +1 -1
- package/dist/cjs/form/PrimeDropdown.js +3 -1
- package/dist/cjs/form/PrimeDropdown.js.map +1 -1
- package/dist/cjs/form/PrimeInputNumber.js +3 -1
- package/dist/cjs/form/PrimeInputNumber.js.map +1 -1
- package/dist/cjs/form/PrimeInputText.js +3 -1
- package/dist/cjs/form/PrimeInputText.js.map +1 -1
- package/dist/cjs/form/PrimeInputTextarea.js +3 -1
- package/dist/cjs/form/PrimeInputTextarea.js.map +1 -1
- package/dist/cjs/form/PrimeMultiSelect.js +3 -1
- package/dist/cjs/form/PrimeMultiSelect.js.map +1 -1
- package/dist/cjs/form/PrimePassword.js +3 -1
- package/dist/cjs/form/PrimePassword.js.map +1 -1
- package/dist/cjs/form/PrimeRadioButton.js +3 -1
- package/dist/cjs/form/PrimeRadioButton.js.map +1 -1
- package/dist/cjs/form/PrimeToggleSwitch.js +4 -1
- package/dist/cjs/form/PrimeToggleSwitch.js.map +1 -1
- package/dist/cjs/inputDescriptors.js +86 -0
- package/dist/cjs/inputDescriptors.js.map +1 -0
- package/dist/cjs/primeReactDescriptors.js +2 -0
- package/dist/cjs/primeReactDescriptors.js.map +1 -1
- package/dist/esm/form/PrimeCalendar.d.ts +1 -1
- package/dist/esm/form/PrimeCalendar.d.ts.map +1 -1
- package/dist/esm/form/PrimeCalendar.js +3 -1
- package/dist/esm/form/PrimeCalendar.js.map +1 -1
- package/dist/esm/form/PrimeCheckbox.d.ts +1 -1
- package/dist/esm/form/PrimeCheckbox.d.ts.map +1 -1
- package/dist/esm/form/PrimeCheckbox.js +4 -2
- package/dist/esm/form/PrimeCheckbox.js.map +1 -1
- package/dist/esm/form/PrimeDropdown.d.ts +1 -1
- package/dist/esm/form/PrimeDropdown.d.ts.map +1 -1
- package/dist/esm/form/PrimeDropdown.js +3 -1
- package/dist/esm/form/PrimeDropdown.js.map +1 -1
- package/dist/esm/form/PrimeInputNumber.d.ts +1 -1
- package/dist/esm/form/PrimeInputNumber.d.ts.map +1 -1
- package/dist/esm/form/PrimeInputNumber.js +3 -1
- package/dist/esm/form/PrimeInputNumber.js.map +1 -1
- package/dist/esm/form/PrimeInputText.d.ts +1 -1
- package/dist/esm/form/PrimeInputText.d.ts.map +1 -1
- package/dist/esm/form/PrimeInputText.js +3 -1
- package/dist/esm/form/PrimeInputText.js.map +1 -1
- package/dist/esm/form/PrimeInputTextarea.d.ts +1 -1
- package/dist/esm/form/PrimeInputTextarea.d.ts.map +1 -1
- package/dist/esm/form/PrimeInputTextarea.js +3 -1
- package/dist/esm/form/PrimeInputTextarea.js.map +1 -1
- package/dist/esm/form/PrimeMultiSelect.d.ts +1 -1
- package/dist/esm/form/PrimeMultiSelect.d.ts.map +1 -1
- package/dist/esm/form/PrimeMultiSelect.js +3 -1
- package/dist/esm/form/PrimeMultiSelect.js.map +1 -1
- package/dist/esm/form/PrimePassword.d.ts +1 -1
- package/dist/esm/form/PrimePassword.d.ts.map +1 -1
- package/dist/esm/form/PrimePassword.js +3 -1
- package/dist/esm/form/PrimePassword.js.map +1 -1
- package/dist/esm/form/PrimeRadioButton.d.ts +1 -1
- package/dist/esm/form/PrimeRadioButton.d.ts.map +1 -1
- package/dist/esm/form/PrimeRadioButton.js +3 -1
- package/dist/esm/form/PrimeRadioButton.js.map +1 -1
- package/dist/esm/form/PrimeToggleSwitch.d.ts +1 -1
- package/dist/esm/form/PrimeToggleSwitch.d.ts.map +1 -1
- package/dist/esm/form/PrimeToggleSwitch.js +4 -1
- package/dist/esm/form/PrimeToggleSwitch.js.map +1 -1
- package/dist/esm/inputDescriptors.d.ts +3 -0
- package/dist/esm/inputDescriptors.d.ts.map +1 -0
- package/dist/esm/inputDescriptors.js +84 -0
- package/dist/esm/inputDescriptors.js.map +1 -0
- package/dist/esm/primeReactDescriptors.d.ts.map +1 -1
- package/dist/esm/primeReactDescriptors.js +2 -0
- package/dist/esm/primeReactDescriptors.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/form/PrimeCalendar.tsx +3 -2
- package/form/PrimeCheckbox.tsx +4 -3
- package/form/PrimeDropdown.tsx +3 -2
- package/form/PrimeInputNumber.tsx +3 -2
- package/form/PrimeInputText.tsx +3 -2
- package/form/PrimeInputTextarea.tsx +3 -2
- package/form/PrimeMultiSelect.tsx +3 -2
- package/form/PrimePassword.tsx +3 -2
- package/form/PrimeRadioButton.tsx +3 -2
- package/form/PrimeToggleSwitch.tsx +4 -2
- package/inputDescriptors.ts +38 -0
- package/package.json +7 -7
- package/primeReactDescriptors.ts +2 -0
package/form/PrimeCalendar.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { DatePicker } from 'primereact/datepicker';
|
|
6
6
|
import { InputText } from 'primereact/inputtext';
|
|
7
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
7
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
8
8
|
import { booleanProperty, stringProperty } from '../properties';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -21,13 +21,14 @@ import { booleanProperty, stringProperty } from '../properties';
|
|
|
21
21
|
* prop: either inside a `Panel`, which simply renders where it stands, or behind a `Portal` and a
|
|
22
22
|
* `Positioner`, which anchors it to the field and escapes any clipping ancestor.
|
|
23
23
|
*/
|
|
24
|
-
export function PrimeCalendar({ element }: RegisteredComponentProps) {
|
|
24
|
+
export function PrimeCalendar({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
25
25
|
const [value, setValue] = useState<Date | undefined>(() => {
|
|
26
26
|
const seed = stringProperty(element, 'value');
|
|
27
27
|
if (seed === undefined) return undefined;
|
|
28
28
|
const parsed = new Date(seed);
|
|
29
29
|
return Number.isNaN(parsed.getTime()) ? undefined : parsed;
|
|
30
30
|
});
|
|
31
|
+
useValueOutput(bindingOutputs, value);
|
|
31
32
|
|
|
32
33
|
const inline = booleanProperty(element, 'inline', false);
|
|
33
34
|
const showTime = booleanProperty(element, 'showTime', false);
|
package/form/PrimeCheckbox.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { Checkbox } from 'primereact/checkbox';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -17,14 +17,15 @@ import { booleanProperty, stringProperty } from '../properties';
|
|
|
17
17
|
* now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be
|
|
18
18
|
* `undefined`, so the defensive `=== true` the v10 adapter needed is gone.
|
|
19
19
|
*/
|
|
20
|
-
export function PrimeCheckbox({ element }: RegisteredComponentProps) {
|
|
20
|
+
export function PrimeCheckbox({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
21
21
|
const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));
|
|
22
|
+
useValueOutput(bindingOutputs, checked);
|
|
22
23
|
const label = stringProperty(element, 'label');
|
|
23
24
|
return (
|
|
24
25
|
<div data-scene-id={element.id} className='flex items-center gap-2'>
|
|
25
26
|
<Checkbox.Root
|
|
26
27
|
inputId={element.id}
|
|
27
|
-
|
|
28
|
+
ariaLabel={label === undefined ? stringProperty(element, 'ariaLabel') : undefined}
|
|
28
29
|
checked={checked}
|
|
29
30
|
onCheckedChange={(event) => setChecked(event.checked)}
|
|
30
31
|
disabled={booleanProperty(element, 'disabled', false)}>
|
package/form/PrimeDropdown.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { Select } from 'primereact/select';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, optionsProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -19,8 +19,9 @@ import { booleanProperty, optionsProperty, stringProperty } from '../properties'
|
|
|
19
19
|
* and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks
|
|
20
20
|
* correctly on its own.
|
|
21
21
|
*/
|
|
22
|
-
export function PrimeDropdown({ element }: RegisteredComponentProps) {
|
|
22
|
+
export function PrimeDropdown({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
23
23
|
const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));
|
|
24
|
+
useValueOutput(bindingOutputs, value);
|
|
24
25
|
const placeholder = stringProperty(element, 'placeholder', 'Select');
|
|
25
26
|
const filter = booleanProperty(element, 'filter', false);
|
|
26
27
|
const showClear = booleanProperty(element, 'showClear', false);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { InputNumber } from 'primereact/inputnumber';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, numberProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -17,8 +17,9 @@ import { booleanProperty, numberProperty, stringProperty } from '../properties';
|
|
|
17
17
|
* is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`
|
|
18
18
|
* you either render or do not - so the property now decides whether that group exists at all.
|
|
19
19
|
*/
|
|
20
|
-
export function PrimeInputNumber({ element }: RegisteredComponentProps) {
|
|
20
|
+
export function PrimeInputNumber({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
21
21
|
const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));
|
|
22
|
+
useValueOutput(bindingOutputs, value);
|
|
22
23
|
const currency = stringProperty(element, 'currency');
|
|
23
24
|
return (
|
|
24
25
|
<InputNumber.Root
|
package/form/PrimeInputText.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { InputText } from 'primereact/inputtext';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -15,8 +15,9 @@ import { booleanProperty, stringProperty } from '../properties';
|
|
|
15
15
|
* a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered
|
|
16
16
|
* component rather than pushed back into the model.
|
|
17
17
|
*/
|
|
18
|
-
export function PrimeInputText({ element }: RegisteredComponentProps) {
|
|
18
|
+
export function PrimeInputText({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
19
19
|
const [value, setValue] = useState(stringProperty(element, 'value', ''));
|
|
20
|
+
useValueOutput(bindingOutputs, value);
|
|
20
21
|
return (
|
|
21
22
|
<InputText
|
|
22
23
|
data-scene-id={element.id}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { ChangeEvent, useState } from 'react';
|
|
5
5
|
import { Textarea } from 'primereact/textarea';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, numberProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -13,8 +13,9 @@ import { booleanProperty, numberProperty, stringProperty } from '../properties';
|
|
|
13
13
|
* rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`
|
|
14
14
|
* untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.
|
|
15
15
|
*/
|
|
16
|
-
export function PrimeInputTextarea({ element }: RegisteredComponentProps) {
|
|
16
|
+
export function PrimeInputTextarea({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
17
17
|
const [value, setValue] = useState(stringProperty(element, 'value', ''));
|
|
18
|
+
useValueOutput(bindingOutputs, value);
|
|
18
19
|
return (
|
|
19
20
|
<Textarea
|
|
20
21
|
data-scene-id={element.id}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { Select } from 'primereact/select';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, optionsProperty, stringArrayProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -21,8 +21,9 @@ import { booleanProperty, optionsProperty, stringArrayProperty, stringProperty }
|
|
|
21
21
|
* offers no chip mode and no collapse threshold, so honoring either property would mean reimplementing
|
|
22
22
|
* the value slot rather than configuring it.
|
|
23
23
|
*/
|
|
24
|
-
export function PrimeMultiSelect({ element }: RegisteredComponentProps) {
|
|
24
|
+
export function PrimeMultiSelect({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
25
25
|
const [value, setValue] = useState<unknown>(stringArrayProperty(element, 'value'));
|
|
26
|
+
useValueOutput(bindingOutputs, value);
|
|
26
27
|
const placeholder = stringProperty(element, 'placeholder', 'Select');
|
|
27
28
|
const filter = booleanProperty(element, 'filter', false);
|
|
28
29
|
return (
|
package/form/PrimePassword.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { InputPassword } from 'primereact/inputpassword';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -16,8 +16,9 @@ import { booleanProperty, stringProperty } from '../properties';
|
|
|
16
16
|
* knob that survived and the one an authored screen can actually mean: a preview that starts revealed.
|
|
17
17
|
* A screen that needs a reveal button now owns that button, because only the screen knows where it goes.
|
|
18
18
|
*/
|
|
19
|
-
export function PrimePassword({ element }: RegisteredComponentProps) {
|
|
19
|
+
export function PrimePassword({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
20
20
|
const [value, setValue] = useState(stringProperty(element, 'value', ''));
|
|
21
|
+
useValueOutput(bindingOutputs, value);
|
|
21
22
|
return (
|
|
22
23
|
<InputPassword
|
|
23
24
|
data-scene-id={element.id}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { RadioButton } from 'primereact/radiobutton';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, optionsProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -19,8 +19,9 @@ import { booleanProperty, optionsProperty, stringProperty } from '../properties'
|
|
|
19
19
|
* on: the browser also fires the sibling losing its check, and treating that as a selection would clear
|
|
20
20
|
* the value a moment after the user set it.
|
|
21
21
|
*/
|
|
22
|
-
export function PrimeRadioButton({ element }: RegisteredComponentProps) {
|
|
22
|
+
export function PrimeRadioButton({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
23
23
|
const [value, setValue] = useState<string | undefined>(stringProperty(element, 'value'));
|
|
24
|
+
useValueOutput(bindingOutputs, value);
|
|
24
25
|
const options = optionsProperty(element, 'options');
|
|
25
26
|
const choices = options.length > 0 ? options : [{ label: stringProperty(element, 'label', 'Option'), value: element.id }];
|
|
26
27
|
const disabled = booleanProperty(element, 'disabled', false);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { ToggleSwitch } from 'primereact/toggleswitch';
|
|
6
|
-
import { RegisteredComponentProps } from '@cratis/scene.react';
|
|
6
|
+
import { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';
|
|
7
7
|
import { booleanProperty, stringProperty } from '../properties';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -18,14 +18,16 @@ import { booleanProperty, stringProperty } from '../properties';
|
|
|
18
18
|
* switch is `Control` plus the `Handle` that slides inside it. That is why `inputId` and not `id` is what
|
|
19
19
|
* the label points at: the label has to reach the input, not the wrapper.
|
|
20
20
|
*/
|
|
21
|
-
export function PrimeToggleSwitch({ element }: RegisteredComponentProps) {
|
|
21
|
+
export function PrimeToggleSwitch({ element, bindingOutputs }: RegisteredComponentProps) {
|
|
22
22
|
const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));
|
|
23
|
+
useValueOutput(bindingOutputs, checked);
|
|
23
24
|
const label = stringProperty(element, 'label');
|
|
24
25
|
return (
|
|
25
26
|
<div data-scene-id={element.id} className='flex items-center gap-2'>
|
|
26
27
|
<ToggleSwitch.Root
|
|
27
28
|
inputId={element.id}
|
|
28
29
|
checked={checked}
|
|
30
|
+
ariaLabel={stringProperty(element, 'ariaLabel')}
|
|
29
31
|
onCheckedChange={(event) => setChecked(event.checked)}
|
|
30
32
|
disabled={booleanProperty(element, 'disabled', false)}>
|
|
31
33
|
<ToggleSwitch.Control>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ComponentDescriptor, PropertyDescriptor, PropertyValueType } from '@cratis/scene.model';
|
|
5
|
+
import { componentRegistryKey, valueOutputProperty } from '@cratis/scene.react';
|
|
6
|
+
|
|
7
|
+
const key = (name: string) => componentRegistryKey('PrimeReact', name);
|
|
8
|
+
|
|
9
|
+
const common: PropertyDescriptor[] = [
|
|
10
|
+
{ path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },
|
|
11
|
+
{ path: 'disabled', label: 'Disabled', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },
|
|
12
|
+
];
|
|
13
|
+
const placeholder: PropertyDescriptor = { path: 'placeholder', label: 'Placeholder', group: 'Content', valueType: PropertyValueType.String };
|
|
14
|
+
const checked: PropertyDescriptor = { path: 'checked', label: 'Initially checked', group: 'Content', valueType: PropertyValueType.Boolean, default: false };
|
|
15
|
+
|
|
16
|
+
function input(name: string, displayName: string, valueType: PropertyValueType, properties: PropertyDescriptor[] = [placeholder]): ComponentDescriptor {
|
|
17
|
+
const output = valueOutputProperty(valueType);
|
|
18
|
+
// A selection publishes the chosen option values; the item descriptor names them for a binding picker.
|
|
19
|
+
const value = valueType === PropertyValueType.Collection ? { ...output, item: { label: 'option value', properties: [] } } : output;
|
|
20
|
+
return { component: key(name), displayName, properties: [...properties, ...common, value] };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The input widgets that publish what the user entered as their `value` output (Cratis/StudioIssues#156).
|
|
25
|
+
* A designer offers the output as a binding source; a command action maps it as `component.<id>.value`.
|
|
26
|
+
*/
|
|
27
|
+
export const primeReactInputDescriptors: ComponentDescriptor[] = [
|
|
28
|
+
input('inputText', 'Text input', PropertyValueType.String),
|
|
29
|
+
input('inputTextarea', 'Text area', PropertyValueType.String),
|
|
30
|
+
input('password', 'Password', PropertyValueType.String),
|
|
31
|
+
input('inputNumber', 'Number input', PropertyValueType.Number),
|
|
32
|
+
input('calendar', 'Date picker', PropertyValueType.String),
|
|
33
|
+
input('dropdown', 'Dropdown', PropertyValueType.String),
|
|
34
|
+
input('multiSelect', 'Multi-select', PropertyValueType.Collection),
|
|
35
|
+
input('radioButton', 'Radio group', PropertyValueType.String, []),
|
|
36
|
+
input('checkbox', 'Checkbox', PropertyValueType.Boolean, [checked, { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String }]),
|
|
37
|
+
input('toggleSwitch', 'Toggle switch', PropertyValueType.Boolean, [checked]),
|
|
38
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/scene.primereact",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "The PrimeReact component package: maps Scene's abstract component names onto real PrimeReact components, and PrimeReact's free themes onto Scene themes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cratis",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"build-storybook": "storybook build"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cratis/scene.engine": "4.
|
|
63
|
-
"@cratis/scene.model": "4.
|
|
64
|
-
"@cratis/scene.react": "4.
|
|
62
|
+
"@cratis/scene.engine": "4.16.0",
|
|
63
|
+
"@cratis/scene.model": "4.16.0",
|
|
64
|
+
"@cratis/scene.react": "4.16.0",
|
|
65
65
|
"@primeuix/themes": "^3.0.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@cratis/scene.engine": "4.
|
|
69
|
-
"@cratis/scene.model": "4.
|
|
70
|
-
"@cratis/scene.react": "4.
|
|
68
|
+
"@cratis/scene.engine": "4.16.0",
|
|
69
|
+
"@cratis/scene.model": "4.16.0",
|
|
70
|
+
"@cratis/scene.react": "4.16.0",
|
|
71
71
|
"@primereact/core": "11.2.0",
|
|
72
72
|
"@primereact/headless": "11.2.0",
|
|
73
73
|
"@primereact/types": "11.2.0",
|
package/primeReactDescriptors.ts
CHANGED
|
@@ -8,11 +8,13 @@ import { legacyEnumerationChoices } from './legacyEnumerationChoices';
|
|
|
8
8
|
import { ChartType } from './chart';
|
|
9
9
|
import { TreeTableSelectionMode } from './data';
|
|
10
10
|
import { FileUploadMode } from './file';
|
|
11
|
+
import { primeReactInputDescriptors } from './inputDescriptors';
|
|
11
12
|
|
|
12
13
|
const key = (name: string) => componentRegistryKey('PrimeReact', name);
|
|
13
14
|
|
|
14
15
|
/** Design-time descriptors for PrimeReact controls whose authored data has structured configuration. */
|
|
15
16
|
export const primeReactDescriptors: ComponentDescriptor[] = [
|
|
17
|
+
...primeReactInputDescriptors,
|
|
16
18
|
{
|
|
17
19
|
component: key('chart'),
|
|
18
20
|
displayName: 'Chart',
|