primevue 3.32.0 → 3.32.2
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/accordion/Accordion.d.ts +2 -2
- package/accordiontab/AccordionTab.d.ts +4 -3
- package/autocomplete/AutoComplete.d.ts +17 -7
- package/autocomplete/AutoComplete.vue +2 -2
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +2 -2
- package/avatargroup/AvatarGroup.d.ts +2 -2
- package/badge/Badge.d.ts +2 -2
- package/badgedirective/BadgeDirective.d.ts +2 -1
- package/basecomponent/BaseComponent.vue +67 -12
- package/basecomponent/basecomponent.cjs.js +76 -22
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +76 -22
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +76 -22
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +47 -7
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +47 -7
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +47 -7
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +44 -32
- package/baseicon/baseicon.cjs.js +19 -30
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +19 -30
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +20 -32
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +2 -2
- package/breadcrumb/Breadcrumb.d.ts +2 -2
- package/button/Button.d.ts +2 -2
- package/button/Button.vue +2 -2
- package/button/button.cjs.js +2 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +30 -6
- package/calendar/Calendar.vue +9 -8
- package/calendar/calendar.cjs.js +19 -10
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +19 -10
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +19 -10
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +2 -2
- package/carousel/Carousel.d.ts +2 -2
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +4 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +4 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/chart/Chart.d.ts +2 -2
- package/checkbox/Checkbox.d.ts +2 -2
- package/chip/Chip.d.ts +6 -4
- package/chips/Chips.d.ts +13 -4
- package/chips/Chips.vue +1 -1
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +1 -40
- package/colorpicker/colorpicker.cjs.js +8 -47
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +8 -47
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +13 -10
- package/columngroup/ColumnGroup.d.ts +2 -2
- package/config/PrimeVue.d.ts +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +3 -2
- package/confirmpopup/ConfirmPopup.d.ts +3 -2
- package/contextmenu/ContextMenu.d.ts +3 -2
- package/core/core.js +551 -489
- package/core/core.min.js +10 -10
- package/datatable/BodyCell.vue +2 -0
- package/datatable/DataTable.d.ts +4 -2
- package/datatable/DataTable.vue +45 -15
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +119 -74
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +119 -74
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +119 -74
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +4 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -3
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
- package/deferredcontent/DeferredContent.d.ts +2 -2
- package/dialog/Dialog.d.ts +13 -3
- package/dialog/Dialog.vue +10 -7
- package/dialog/dialog.cjs.js +13 -7
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +14 -8
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +13 -7
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +2 -2
- package/dock/Dock.d.ts +2 -2
- package/dropdown/Dropdown.d.ts +21 -10
- package/dropdown/Dropdown.vue +9 -0
- package/dropdown/dropdown.cjs.js +8 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +8 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +8 -0
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +8 -6
- package/editor/Editor.d.ts +2 -2
- package/editor/editor.cjs.js +8 -6
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +8 -6
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -6
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +2 -2
- package/fileupload/FileUpload.d.ts +12 -7
- package/fileupload/FileUpload.vue +4 -0
- package/fileupload/fileupload.cjs.js +4 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +2 -1
- package/galleria/Galleria.d.ts +2 -2
- package/galleria/GalleriaItem.vue +2 -2
- package/galleria/GalleriaThumbnails.vue +5 -1
- package/galleria/galleria.cjs.js +16 -7
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +16 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +16 -7
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +6 -4
- package/image/Image.vue +8 -6
- package/image/image.cjs.js +18 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +19 -6
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inplace/Inplace.d.ts +2 -2
- package/inputmask/InputMask.d.ts +2 -2
- package/inputnumber/InputNumber.d.ts +2 -2
- package/inputnumber/InputNumber.vue +1 -0
- package/inputnumber/inputnumber.cjs.js +1 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +1 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +1 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +2 -2
- package/inputtext/InputText.d.ts +2 -2
- package/knob/Knob.d.ts +2 -2
- package/listbox/Listbox.d.ts +11 -5
- package/megamenu/MegaMenu.d.ts +3 -2
- package/menu/Menu.d.ts +2 -2
- package/menubar/Menubar.d.ts +3 -2
- package/message/BaseMessage.vue +5 -0
- package/message/Message.d.ts +4 -2
- package/message/message.cjs.js +1 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +16 -6
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +1 -0
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -0
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -0
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +2 -2
- package/organizationchart/OrganizationChart.d.ts +2 -2
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/package.json +9 -4
- package/paginator/Paginator.d.ts +2 -2
- package/panel/Panel.d.ts +3 -2
- package/panelmenu/PanelMenu.d.ts +3 -2
- package/passthrough/index.cjs.js +16 -60
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +0 -9
- package/passthrough/index.esm.js +16 -60
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +18 -59
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +365 -359
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.d.ts +1 -2
- package/passthrough/tailwind/index.esm.js +365 -359
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +365 -359
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +6 -4
- package/password/Password.vue +1 -0
- package/password/password.cjs.js +2 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -1
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +2 -2
- package/picklist/PickList.vue +9 -7
- package/picklist/picklist.cjs.js +27 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +27 -9
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +27 -9
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +2 -2
- package/progressspinner/ProgressSpinner.d.ts +2 -2
- package/radiobutton/RadioButton.d.ts +2 -2
- package/rating/Rating.d.ts +3 -2
- package/resources/themes/arya-blue/theme.css +4 -4
- package/resources/themes/arya-green/theme.css +4 -4
- package/resources/themes/arya-orange/theme.css +4 -4
- package/resources/themes/arya-purple/theme.css +4 -4
- package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
- package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
- package/resources/themes/fluent-light/theme.css +4 -4
- package/resources/themes/lara-dark-blue/theme.css +4 -4
- package/resources/themes/lara-dark-indigo/theme.css +4 -4
- package/resources/themes/lara-dark-purple/theme.css +4 -4
- package/resources/themes/lara-dark-teal/theme.css +4 -4
- package/resources/themes/lara-light-blue/theme.css +4 -4
- package/resources/themes/lara-light-indigo/theme.css +4 -4
- package/resources/themes/lara-light-purple/theme.css +4 -4
- package/resources/themes/lara-light-teal/theme.css +4 -4
- package/resources/themes/luna-amber/theme.css +4 -4
- package/resources/themes/luna-blue/theme.css +4 -4
- package/resources/themes/luna-green/theme.css +4 -4
- package/resources/themes/luna-pink/theme.css +4 -4
- package/resources/themes/md-dark-deeppurple/theme.css +4 -4
- package/resources/themes/md-dark-indigo/theme.css +4 -4
- package/resources/themes/md-light-deeppurple/theme.css +4 -4
- package/resources/themes/md-light-indigo/theme.css +4 -4
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-dark-indigo/theme.css +4 -4
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-light-indigo/theme.css +4 -4
- package/resources/themes/mira/theme.css +4 -4
- package/resources/themes/nano/theme.css +4 -4
- package/resources/themes/nova/theme.css +4 -4
- package/resources/themes/nova-accent/theme.css +4 -4
- package/resources/themes/nova-alt/theme.css +4 -4
- package/resources/themes/nova-vue/theme.css +4 -4
- package/resources/themes/rhea/theme.css +4 -4
- package/resources/themes/saga-blue/theme.css +4 -4
- package/resources/themes/saga-green/theme.css +4 -4
- package/resources/themes/saga-orange/theme.css +4 -4
- package/resources/themes/saga-purple/theme.css +4 -4
- package/resources/themes/soho-dark/theme.css +4 -4
- package/resources/themes/soho-light/theme.css +4 -4
- package/resources/themes/tailwind-light/theme.css +4 -4
- package/resources/themes/vela-blue/theme.css +4 -4
- package/resources/themes/vela-green/theme.css +4 -4
- package/resources/themes/vela-orange/theme.css +4 -4
- package/resources/themes/vela-purple/theme.css +4 -4
- package/resources/themes/viva-dark/theme.css +4 -4
- package/resources/themes/viva-light/theme.css +4 -4
- package/ripple/Ripple.d.ts +2 -1
- package/scrollpanel/ScrollPanel.d.ts +2 -2
- package/scrolltop/ScrollTop.d.ts +2 -2
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +2 -1
- package/selectbutton/selectbutton.cjs.js +2 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -1
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +10 -4
- package/sidebar/Sidebar.vue +2 -2
- package/sidebar/sidebar.cjs.js +4 -2
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +5 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -2
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +2 -2
- package/slider/Slider.d.ts +2 -2
- package/speeddial/SpeedDial.d.ts +9 -7
- package/speeddial/SpeedDial.vue +1 -1
- package/speeddial/speeddial.cjs.js +1 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +4 -2
- package/splitter/Splitter.d.ts +2 -2
- package/splitterpanel/SplitterPanel.d.ts +2 -2
- package/steps/Steps.d.ts +2 -2
- package/styleclass/StyleClass.d.ts +2 -1
- package/tabmenu/TabMenu.d.ts +2 -2
- package/tabpanel/TabPanel.d.ts +2 -2
- package/tabview/TabView.d.ts +2 -2
- package/tag/Tag.d.ts +2 -2
- package/terminal/Terminal.d.ts +2 -2
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/TieredMenu.d.ts +3 -2
- package/timeline/Timeline.d.ts +2 -2
- package/toast/BaseToast.vue +2 -0
- package/toast/Toast.d.ts +16 -4
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +3 -2
- package/toolbar/Toolbar.d.ts +2 -2
- package/tooltip/Tooltip.d.ts +2 -1
- package/tree/Tree.d.ts +6 -2
- package/treeselect/TreeSelect.d.ts +3 -2
- package/treetable/TreeTable.d.ts +3 -2
- package/treetable/TreeTable.vue +4 -2
- package/treetable/treetable.cjs.js +6 -5
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +6 -5
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +6 -5
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
- package/ts-helpers.d.ts +2 -0
- package/virtualscroller/VirtualScroller.d.ts +8 -6
- package/web-types.json +1 -1
package/panelmenu/PanelMenu.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { MenuItem } from '../menuitem';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
14
14
|
|
|
15
15
|
export declare type PanelMenuPassThroughOptionType = PanelMenuPassThroughAttributes | ((options: PanelMenuPassThroughMethodOptions) => PanelMenuPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
@@ -217,7 +217,7 @@ export interface PanelMenuProps {
|
|
|
217
217
|
* Used to pass attributes to DOM elements inside the component.
|
|
218
218
|
* @type {PanelMenuPassThroughOptions}
|
|
219
219
|
*/
|
|
220
|
-
pt?: PanelMenuPassThroughOptions
|
|
220
|
+
pt?: PTOptions<PanelMenuPassThroughOptions>;
|
|
221
221
|
/**
|
|
222
222
|
* When enabled, it removes component related styles in the core.
|
|
223
223
|
* @defaultValue false
|
|
@@ -241,6 +241,7 @@ export interface PanelMenuSlots {
|
|
|
241
241
|
}): VNode[];
|
|
242
242
|
/**
|
|
243
243
|
* Custom submenu icon template.
|
|
244
|
+
* @param {Object} scope - submenuicon slot's params.
|
|
244
245
|
*/
|
|
245
246
|
submenuicon(scope: {
|
|
246
247
|
/**
|
package/passthrough/index.cjs.js
CHANGED
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
|
+
/**
|
|
6
|
+
* @todo: Add dynamic params support;
|
|
7
|
+
*
|
|
8
|
+
* Exp;
|
|
9
|
+
* usePassThrough(pt1, pt2, pt3, pt*, { merge: true });
|
|
10
|
+
* usePassThrough(pt1, { merge: true });
|
|
11
|
+
*/
|
|
14
12
|
var usePassThrough = function usePassThrough() {
|
|
15
13
|
var pt1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
14
|
var pt2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -18,57 +16,15 @@ var usePassThrough = function usePassThrough() {
|
|
|
18
16
|
_ref$merge = _ref.merge,
|
|
19
17
|
merge = _ref$merge === void 0 ? true : _ref$merge,
|
|
20
18
|
_ref$useMergeProps = _ref.useMergeProps,
|
|
21
|
-
useMergeProps = _ref$useMergeProps === void 0 ?
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"class": value
|
|
31
|
-
} : value;
|
|
32
|
-
};
|
|
33
|
-
var setOptionValue = function setOptionValue(to, from, nestedKey, ignoredKey) {
|
|
34
|
-
var keys = nestedKey.split('.');
|
|
35
|
-
var key = keys.shift();
|
|
36
|
-
var getValue = function getValue(value) {
|
|
37
|
-
return utils.ObjectUtils.isFunction(customizer) ? customizer({
|
|
38
|
-
key: key,
|
|
39
|
-
to: to,
|
|
40
|
-
from: from,
|
|
41
|
-
value: value
|
|
42
|
-
}) : value;
|
|
43
|
-
};
|
|
44
|
-
if (!!ignoredKey && ignoredKey.endsWith(key)) {
|
|
45
|
-
!!key && (to[key] = getValue(from[key]));
|
|
46
|
-
} else {
|
|
47
|
-
var matched = [Object.keys(to[key] || {}), Object.keys(from[key] || {})].flat().some(function (k) {
|
|
48
|
-
return k.match(/^(class|style|on(.+))/);
|
|
49
|
-
});
|
|
50
|
-
if (matched) {
|
|
51
|
-
to[key] = getValue(useMergeProps ? vue.mergeProps(getPTClassValue(to[key]), getPTClassValue(from[key])) : _objectSpread(_objectSpread({}, getPTClassValue(to[key])), getPTClassValue(from[key])));
|
|
52
|
-
} else if (utils.ObjectUtils.isNotEmpty(from[key])) {
|
|
53
|
-
to[key] = _objectSpread({}, to[key]);
|
|
54
|
-
setOptionValue(to[key], from[key], keys.join('.'), ignoredKey);
|
|
55
|
-
} else if (!!key) {
|
|
56
|
-
to[key] = getValue(from[key]);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var nestedKeys = utils.ObjectUtils.nestedKeys(pt2);
|
|
61
|
-
nestedKeys.forEach(function (nestedKey) {
|
|
62
|
-
setOptionValue(newPT, pt2, nestedKey, ignoredKeysOnMerge.find(function (k) {
|
|
63
|
-
return k.indexOf('.') > 0 ? nestedKey.startsWith(k) : nestedKey.split('.')[0] === k;
|
|
64
|
-
}));
|
|
65
|
-
});
|
|
66
|
-
} else {
|
|
67
|
-
Object.keys(pt2).forEach(function (key) {
|
|
68
|
-
return newPT[key] = pt2[key];
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return newPT;
|
|
19
|
+
useMergeProps = _ref$useMergeProps === void 0 ? true : _ref$useMergeProps;
|
|
20
|
+
return {
|
|
21
|
+
_usept: {
|
|
22
|
+
merge: merge,
|
|
23
|
+
useMergeProps: useMergeProps
|
|
24
|
+
},
|
|
25
|
+
originalValue: pt1,
|
|
26
|
+
value: pt2
|
|
27
|
+
};
|
|
72
28
|
};
|
|
73
29
|
|
|
74
30
|
exports.usePassThrough = usePassThrough;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.usePassThrough=function(){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.merge,o=e.useMergeProps;return{_usept:{merge:void 0===r||r,useMergeProps:void 0===o||o},originalValue:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},value:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}};
|
package/passthrough/index.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
export interface CustomizerOptions {
|
|
2
|
-
key?: string | undefined;
|
|
3
|
-
to?: object | undefined;
|
|
4
|
-
from?: object | undefined;
|
|
5
|
-
value?: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
export interface usePassThroughOptions {
|
|
9
2
|
merge?: boolean | undefined;
|
|
10
3
|
useMergeProps?: boolean | undefined;
|
|
11
|
-
ignoredKeysOnMerge?: string[] | undefined;
|
|
12
|
-
customizer?: ((options?: CustomizerOptions) => any) | undefined;
|
|
13
4
|
}
|
|
14
5
|
|
|
15
6
|
export declare function usePassThrough(pt1: object, pt2: object, options?: usePassThroughOptions): object;
|
package/passthrough/index.esm.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
|
+
/**
|
|
2
|
+
* @todo: Add dynamic params support;
|
|
3
|
+
*
|
|
4
|
+
* Exp;
|
|
5
|
+
* usePassThrough(pt1, pt2, pt3, pt*, { merge: true });
|
|
6
|
+
* usePassThrough(pt1, { merge: true });
|
|
7
|
+
*/
|
|
10
8
|
var usePassThrough = function usePassThrough() {
|
|
11
9
|
var pt1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
10
|
var pt2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -14,57 +12,15 @@ var usePassThrough = function usePassThrough() {
|
|
|
14
12
|
_ref$merge = _ref.merge,
|
|
15
13
|
merge = _ref$merge === void 0 ? true : _ref$merge,
|
|
16
14
|
_ref$useMergeProps = _ref.useMergeProps,
|
|
17
|
-
useMergeProps = _ref$useMergeProps === void 0 ?
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"class": value
|
|
27
|
-
} : value;
|
|
28
|
-
};
|
|
29
|
-
var setOptionValue = function setOptionValue(to, from, nestedKey, ignoredKey) {
|
|
30
|
-
var keys = nestedKey.split('.');
|
|
31
|
-
var key = keys.shift();
|
|
32
|
-
var getValue = function getValue(value) {
|
|
33
|
-
return ObjectUtils.isFunction(customizer) ? customizer({
|
|
34
|
-
key: key,
|
|
35
|
-
to: to,
|
|
36
|
-
from: from,
|
|
37
|
-
value: value
|
|
38
|
-
}) : value;
|
|
39
|
-
};
|
|
40
|
-
if (!!ignoredKey && ignoredKey.endsWith(key)) {
|
|
41
|
-
!!key && (to[key] = getValue(from[key]));
|
|
42
|
-
} else {
|
|
43
|
-
var matched = [Object.keys(to[key] || {}), Object.keys(from[key] || {})].flat().some(function (k) {
|
|
44
|
-
return k.match(/^(class|style|on(.+))/);
|
|
45
|
-
});
|
|
46
|
-
if (matched) {
|
|
47
|
-
to[key] = getValue(useMergeProps ? mergeProps(getPTClassValue(to[key]), getPTClassValue(from[key])) : _objectSpread(_objectSpread({}, getPTClassValue(to[key])), getPTClassValue(from[key])));
|
|
48
|
-
} else if (ObjectUtils.isNotEmpty(from[key])) {
|
|
49
|
-
to[key] = _objectSpread({}, to[key]);
|
|
50
|
-
setOptionValue(to[key], from[key], keys.join('.'), ignoredKey);
|
|
51
|
-
} else if (!!key) {
|
|
52
|
-
to[key] = getValue(from[key]);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
var nestedKeys = ObjectUtils.nestedKeys(pt2);
|
|
57
|
-
nestedKeys.forEach(function (nestedKey) {
|
|
58
|
-
setOptionValue(newPT, pt2, nestedKey, ignoredKeysOnMerge.find(function (k) {
|
|
59
|
-
return k.indexOf('.') > 0 ? nestedKey.startsWith(k) : nestedKey.split('.')[0] === k;
|
|
60
|
-
}));
|
|
61
|
-
});
|
|
62
|
-
} else {
|
|
63
|
-
Object.keys(pt2).forEach(function (key) {
|
|
64
|
-
return newPT[key] = pt2[key];
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return newPT;
|
|
15
|
+
useMergeProps = _ref$useMergeProps === void 0 ? true : _ref$useMergeProps;
|
|
16
|
+
return {
|
|
17
|
+
_usept: {
|
|
18
|
+
merge: merge,
|
|
19
|
+
useMergeProps: useMergeProps
|
|
20
|
+
},
|
|
21
|
+
originalValue: pt1,
|
|
22
|
+
value: pt2
|
|
23
|
+
};
|
|
68
24
|
};
|
|
69
25
|
|
|
70
26
|
export { usePassThrough };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e=function(){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.merge,o=e.useMergeProps;return{_usept:{merge:void 0===r||r,useMergeProps:void 0===o||o},originalValue:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},value:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}};export{e as usePassThrough};
|
package/passthrough/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.passthrough = (function (exports
|
|
2
|
+
this.primevue.passthrough = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @todo: Add dynamic params support;
|
|
7
|
+
*
|
|
8
|
+
* Exp;
|
|
9
|
+
* usePassThrough(pt1, pt2, pt3, pt*, { merge: true });
|
|
10
|
+
* usePassThrough(pt1, { merge: true });
|
|
11
|
+
*/
|
|
11
12
|
var usePassThrough = function usePassThrough() {
|
|
12
13
|
var pt1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13
14
|
var pt2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -15,57 +16,15 @@ this.primevue.passthrough = (function (exports, utils, vue) {
|
|
|
15
16
|
_ref$merge = _ref.merge,
|
|
16
17
|
merge = _ref$merge === void 0 ? true : _ref$merge,
|
|
17
18
|
_ref$useMergeProps = _ref.useMergeProps,
|
|
18
|
-
useMergeProps = _ref$useMergeProps === void 0 ?
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"class": value
|
|
28
|
-
} : value;
|
|
29
|
-
};
|
|
30
|
-
var setOptionValue = function setOptionValue(to, from, nestedKey, ignoredKey) {
|
|
31
|
-
var keys = nestedKey.split('.');
|
|
32
|
-
var key = keys.shift();
|
|
33
|
-
var getValue = function getValue(value) {
|
|
34
|
-
return utils.ObjectUtils.isFunction(customizer) ? customizer({
|
|
35
|
-
key: key,
|
|
36
|
-
to: to,
|
|
37
|
-
from: from,
|
|
38
|
-
value: value
|
|
39
|
-
}) : value;
|
|
40
|
-
};
|
|
41
|
-
if (!!ignoredKey && ignoredKey.endsWith(key)) {
|
|
42
|
-
!!key && (to[key] = getValue(from[key]));
|
|
43
|
-
} else {
|
|
44
|
-
var matched = [Object.keys(to[key] || {}), Object.keys(from[key] || {})].flat().some(function (k) {
|
|
45
|
-
return k.match(/^(class|style|on(.+))/);
|
|
46
|
-
});
|
|
47
|
-
if (matched) {
|
|
48
|
-
to[key] = getValue(useMergeProps ? vue.mergeProps(getPTClassValue(to[key]), getPTClassValue(from[key])) : _objectSpread(_objectSpread({}, getPTClassValue(to[key])), getPTClassValue(from[key])));
|
|
49
|
-
} else if (utils.ObjectUtils.isNotEmpty(from[key])) {
|
|
50
|
-
to[key] = _objectSpread({}, to[key]);
|
|
51
|
-
setOptionValue(to[key], from[key], keys.join('.'), ignoredKey);
|
|
52
|
-
} else if (!!key) {
|
|
53
|
-
to[key] = getValue(from[key]);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
var nestedKeys = utils.ObjectUtils.nestedKeys(pt2);
|
|
58
|
-
nestedKeys.forEach(function (nestedKey) {
|
|
59
|
-
setOptionValue(newPT, pt2, nestedKey, ignoredKeysOnMerge.find(function (k) {
|
|
60
|
-
return k.indexOf('.') > 0 ? nestedKey.startsWith(k) : nestedKey.split('.')[0] === k;
|
|
61
|
-
}));
|
|
62
|
-
});
|
|
63
|
-
} else {
|
|
64
|
-
Object.keys(pt2).forEach(function (key) {
|
|
65
|
-
return newPT[key] = pt2[key];
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return newPT;
|
|
19
|
+
useMergeProps = _ref$useMergeProps === void 0 ? true : _ref$useMergeProps;
|
|
20
|
+
return {
|
|
21
|
+
_usept: {
|
|
22
|
+
merge: merge,
|
|
23
|
+
useMergeProps: useMergeProps
|
|
24
|
+
},
|
|
25
|
+
originalValue: pt1,
|
|
26
|
+
value: pt2
|
|
27
|
+
};
|
|
69
28
|
};
|
|
70
29
|
|
|
71
30
|
exports.usePassThrough = usePassThrough;
|
|
@@ -74,4 +33,4 @@ this.primevue.passthrough = (function (exports, utils, vue) {
|
|
|
74
33
|
|
|
75
34
|
return exports;
|
|
76
35
|
|
|
77
|
-
})({}
|
|
36
|
+
})({});
|
package/passthrough/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.passthrough=function(
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.passthrough=function(e){"use strict";return e.usePassThrough=function(){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.merge,u=e.useMergeProps;return{_usept:{merge:void 0===r||r,useMergeProps:void 0===u||u},originalValue:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},value:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|