From cb659b73efefe9bd8e21fe5d1bc30f981a9ac018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 14 Jun 2021 17:03:46 +0300 Subject: [PATCH] update api-generator --- api-generator/components/accordiontab.js | 6 --- api-generator/components/autocomplete.js | 12 ++++++ api-generator/components/calendar.js | 12 ++++++ api-generator/components/checkbox.js | 40 +++++++++++++++++++- api-generator/components/chips.js | 12 ++++++ api-generator/components/dialog.js | 18 +-------- api-generator/components/inputnumber.js | 12 ++++++ api-generator/components/inputswitch.js | 26 ++++++++++++- api-generator/components/orderlist.js | 16 ++++++++ api-generator/components/password.js | 30 ++++++++++++--- api-generator/components/picklist.js | 16 ++++++++ api-generator/components/radiobutton.js | 40 +++++++++++++++++++- api-generator/components/splitbutton.js | 12 ++++++ api-generator/components/tristatecheckbox.js | 12 ++++++ 14 files changed, 233 insertions(+), 31 deletions(-) diff --git a/api-generator/components/accordiontab.js b/api-generator/components/accordiontab.js index 91f17cf4e..9a2fa4510 100644 --- a/api-generator/components/accordiontab.js +++ b/api-generator/components/accordiontab.js @@ -5,12 +5,6 @@ const AccordionTabProps = [ default: "null", description: "Orientation of tab headers." }, - { - name: "active", - type: "boolean", - default: "null", - description: "Visibility of the content." - }, { name: "disabled", type: "boolean", diff --git a/api-generator/components/autocomplete.js b/api-generator/components/autocomplete.js index a145ac724..ba62f2623 100644 --- a/api-generator/components/autocomplete.js +++ b/api-generator/components/autocomplete.js @@ -95,6 +95,18 @@ const AutoCompleteProps = [ default: "false", description: "When present, autocomplete clears the manual input if it does not match of the suggestions to force only accepting values from the suggestions." }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." + }, { name: "panelClass", type: "string", diff --git a/api-generator/components/calendar.js b/api-generator/components/calendar.js index 72d6f41ee..6db235810 100644 --- a/api-generator/components/calendar.js +++ b/api-generator/components/calendar.js @@ -233,6 +233,18 @@ const CalendarProps = [ type: "string", default: "null", description: "Style class of the input field." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." } ]; diff --git a/api-generator/components/checkbox.js b/api-generator/components/checkbox.js index 1adf599e8..105f9a4ff 100644 --- a/api-generator/components/checkbox.js +++ b/api-generator/components/checkbox.js @@ -16,6 +16,43 @@ const CheckboxProps = [ type: "boolean", default: "false", description: "Allows to select a boolean value instead of multiple values." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." + } +]; + +const CheckboxEvents = [ + { + "name": "click", + "description": "Callback to invoke on value click.", + arguments: [ + { + name: "event", + type: "object", + description: "Browser event" + } + ] + }, + { + "name": "change", + "description": "Callback to invoke on value change.", + arguments: [ + { + name: "event", + type: "object", + description: "Browser event" + } + ] } ]; @@ -23,6 +60,7 @@ module.exports = { checkbox: { name: "Checkbox", description: "Checkbox is an extension to standard checkbox element with theming.", - props: CheckboxProps + props: CheckboxProps, + events: CheckboxEvents } }; diff --git a/api-generator/components/chips.js b/api-generator/components/chips.js index 9e35fb68c..8eba176e7 100644 --- a/api-generator/components/chips.js +++ b/api-generator/components/chips.js @@ -28,6 +28,18 @@ const ChipsProps = [ type: "boolean", default: "false", description: "Whether to allow duplicate values or not." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." } ]; diff --git a/api-generator/components/dialog.js b/api-generator/components/dialog.js index af65a6b68..7180fd02c 100644 --- a/api-generator/components/dialog.js +++ b/api-generator/components/dialog.js @@ -130,25 +130,11 @@ const DialogProps = [ const DialogEvents = [ { name: "hide", - description: "Callback to invoke when dialog is hidden.", - arguments: [ - { - name: "event", - type: "object", - description: "Event Object" - } - ] + description: "Callback to invoke when dialog is hidden." }, { name: "show", - description: "Callback to invoke when dialog is showed.", - arguments: [ - { - name: "event", - type: "object", - description: "Event Object" - } - ] + description: "Callback to invoke when dialog is showed." }, { name: "maximize", diff --git a/api-generator/components/inputnumber.js b/api-generator/components/inputnumber.js index 35ca2a1cb..a05117578 100644 --- a/api-generator/components/inputnumber.js +++ b/api-generator/components/inputnumber.js @@ -136,6 +136,18 @@ const InputNumberProps = [ type: "string", default: "null", description: "Style class of the input field." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." } ]; diff --git a/api-generator/components/inputswitch.js b/api-generator/components/inputswitch.js index 9f155d460..fc5bbed8b 100644 --- a/api-generator/components/inputswitch.js +++ b/api-generator/components/inputswitch.js @@ -4,6 +4,29 @@ const InputSwitchProps = [ type: "boolean", default: "null", description: "Specifies whether a inputswitch should be checked or not." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." + } +]; + +const InputSwitchEvents = [ + { + name: "click", + description: "Callback to invoke on click." + }, + { + name: "change", + description: "Callback to invoke on value change." } ]; @@ -11,6 +34,7 @@ module.exports = { inputswitch: { name: "InputSwitch", description: "InputSwitch is used to select a boolean value.", - props: InputSwitchProps + props: InputSwitchProps, + events: InputSwitchEvents } }; diff --git a/api-generator/components/orderlist.js b/api-generator/components/orderlist.js index bc243a88d..2a8f43139 100644 --- a/api-generator/components/orderlist.js +++ b/api-generator/components/orderlist.js @@ -65,6 +65,22 @@ const OrderListEvents = [ 'Direction of the change; "up", "down", "bottom", "top"' } ] + }, + { + name: "selection-change", + description: "Callback to invoke when selection changes.", + arguments: [ + { + name: "event.originalEvent", + type: "object", + description: "Browser event" + }, + { + name: "event.value", + type: "array", + description: "Ordered list" + } + ] } ]; diff --git a/api-generator/components/password.js b/api-generator/components/password.js index 51e766171..8bfca381a 100644 --- a/api-generator/components/password.js +++ b/api-generator/components/password.js @@ -59,6 +59,18 @@ const PasswordProps = [ default: "body", description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body and "self" for the element itself.' }, + { + name: "hideIcon", + type: "string", + default: "pi pi-eye-slash", + description: "Icon to hide displaying the password as plain text." + }, + { + name: "showIcon", + type: "string", + default: "pi pi-eye", + description: "Icon to show displaying the password as plain text." + }, { name: "inputStyle", type: "any", @@ -72,16 +84,22 @@ const PasswordProps = [ description: "Style class of the input field." }, { - name: "hideIcon", + name: "class", type: "string", - default: "pi pi-eye-slash", - description: "Icon to hide displaying the password as plain text." + default: "null", + description: "Style class of the component." }, { - name: "showIcon", + name: "style", + type: "any", + default: "null", + description: "Inline of the component." + }, + { + name: "panelClass", type: "string", - default: "pi pi-eye", - description: "Icon to show displaying the password as plain text." + default: "null", + description: "Style class of the overlay panel." } ]; diff --git a/api-generator/components/picklist.js b/api-generator/components/picklist.js index 4ee65d720..f79483820 100644 --- a/api-generator/components/picklist.js +++ b/api-generator/components/picklist.js @@ -133,6 +133,22 @@ const PickListEvents = [ description: "Moved items" } ] + }, + { + name: "selection-change", + description: "Callback to invoke when one or more items are moved to the other list.", + arguments: [ + { + name: "event.originalEvent", + type: "object", + description: "Browser event" + }, + { + name: "event.value", + type: "array", + description: "Selected items" + } + ] } ]; diff --git a/api-generator/components/radiobutton.js b/api-generator/components/radiobutton.js index 12610edb0..9a4f2aa7c 100644 --- a/api-generator/components/radiobutton.js +++ b/api-generator/components/radiobutton.js @@ -10,6 +10,43 @@ const RadioButtonProps = [ type: "any", default: "null", description: "Value binding of the checkbox." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." + } +]; + +const RadioButtonEvents = [ + { + name: "click", + description: "Callback to invoke on radio button click.", + arguments: [ + { + name: "event", + type: "object", + description: "Browser event" + } + ] + }, + { + name: "change", + description: "Callback to invoke on radio button value change.", + arguments: [ + { + name: "event", + type: "object", + description: "Browser event" + } + ] } ]; @@ -17,6 +54,7 @@ module.exports = { radiobutton: { name: "RadioButton", description: "RadioButton is an extension to standard radio button element with theming.", - props: RadioButtonProps + props: RadioButtonProps, + events: RadioButtonEvents } }; diff --git a/api-generator/components/splitbutton.js b/api-generator/components/splitbutton.js index 70e153a53..d78f64003 100644 --- a/api-generator/components/splitbutton.js +++ b/api-generator/components/splitbutton.js @@ -34,6 +34,18 @@ const SplitButtonProps = [ type: "string", default: "body", description: "A valid query selector or an HTMLElement to specify where the overlay gets attached." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." } ]; diff --git a/api-generator/components/tristatecheckbox.js b/api-generator/components/tristatecheckbox.js index 31a8b193b..7ad12dc7d 100644 --- a/api-generator/components/tristatecheckbox.js +++ b/api-generator/components/tristatecheckbox.js @@ -4,6 +4,18 @@ const TriStateCheckboxProps = [ type: "boolean", default: "null", description: "Value of the component." + }, + { + name: "class", + type: "string", + default: "null", + description: "Style class of the component." + }, + { + name: "style", + type: "any", + default: "null", + description: "Inline of the component." } ];