@persona/design-system 0.8.2 → 0.9.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 +22 -0
- package/dist/Accordion.d.mts +1 -1
- package/dist/AccordionItem.d.mts +1 -1
- package/dist/{Action-C6yvIekn.d.mts → Action-DcK0fRrq.d.mts} +3 -3
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +2 -2
- package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
- package/dist/ArrayValueControl.d.mts +1 -1
- package/dist/Attribute.d.mts +3 -3
- package/dist/{Badge-uY8l1p1R.mjs → Badge-DLuyKRCQ.mjs} +2 -2
- package/dist/{Badge-uY8l1p1R.mjs.map → Badge-DLuyKRCQ.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-Tjk9FyiF.d.mts → Breadcrumb-CEHEUe8l.d.mts} +1 -1
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-EQm5iiRA.mjs → Breadcrumbs-B8aXFPdV.mjs} +4 -4
- package/dist/{Breadcrumbs-EQm5iiRA.mjs.map → Breadcrumbs-B8aXFPdV.mjs.map} +1 -1
- package/dist/{Breadcrumbs-DSCbZmAx.d.mts → Breadcrumbs-BQ-Gj6UV.d.mts} +2 -2
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-22DkIpYp.d.mts → Button-DKUomFPj.d.mts} +4 -4
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-DANGQNlH.d.mts → Calendar-BvsTQ3e1.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-DQE1J3gk.d.mts → Card-DMXDx1W7.d.mts} +3 -3
- package/dist/Card.d.mts +1 -1
- package/dist/CardGrouping.d.mts +38 -0
- package/dist/{CardV2-Ds6e577k.mjs → CardV2-JPGFAqui.mjs} +6 -6
- package/dist/{CardV2-Ds6e577k.mjs.map → CardV2-JPGFAqui.mjs.map} +1 -1
- package/dist/{Checkbox-CsJlWz-r.d.mts → Checkbox-CVa8WOf2.d.mts} +1 -1
- package/dist/{Checkbox-BQC_SmBt.mjs → Checkbox-iSBIpu0l.mjs} +2 -2
- package/dist/{Checkbox-BQC_SmBt.mjs.map → Checkbox-iSBIpu0l.mjs.map} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/{CheckboxGroupField-DjKp63Dr.d.mts → CheckboxGroupField-BMJwuTpJ.d.mts} +3 -3
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-MCaDc7h6.mjs → Combobox-BkpRqaxB.mjs} +70 -26
- package/dist/Combobox-BkpRqaxB.mjs.map +1 -0
- package/dist/{Combobox-D1iXiYGV.d.mts → Combobox-C2R9eTPr.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-DXhu2YSh.d.mts → ComboboxBase-BghIk4Vk.d.mts} +6 -6
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-BSyJc46m.d.mts → ComboboxMultiSelect-CIOHnhrv.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-Dg_6h4iB.d.mts → ComboboxSingleSelect-C1JZxli3.d.mts} +5 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-CVGNq7Zu.d.mts → CompactBar-DPJAY1NB.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-CidT_cE9.mjs → ConfigFormGroup-BBIJsQgy.mjs} +2 -2
- package/dist/{ConfigFormGroup-CidT_cE9.mjs.map → ConfigFormGroup-BBIJsQgy.mjs.map} +1 -1
- package/dist/{ControlBar-K43YI-LU.d.mts → ControlBar-Cg36sjz3.d.mts} +2 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable.d.mts +3 -3
- package/dist/{DateField-DY3xCygL.d.mts → DateField-BXUuqbnb.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-CKk6Hnj2.mjs → DatePicker-CjuR6ORz.mjs} +6 -6
- package/dist/{DatePicker-CKk6Hnj2.mjs.map → DatePicker-CjuR6ORz.mjs.map} +1 -1
- package/dist/{DatePicker-C56kJLiX.d.mts → DatePicker-Cmn1vViU.d.mts} +2 -2
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-C96NKOon.d.mts → DateRangePicker-CKhp9Obv.d.mts} +3 -3
- package/dist/DateRangePicker.d.mts +1 -1
- package/dist/DateRangeValueControl.d.mts +2 -2
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-B-cYK2oi.mjs → DropdownButton-CRJDAGjJ.mjs} +3 -3
- package/dist/{DropdownButton-B-cYK2oi.mjs.map → DropdownButton-CRJDAGjJ.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-CedsmO5h.mjs → DropdownMenu-C2BHv8Lc.mjs} +2 -2
- package/dist/{DropdownMenu-CedsmO5h.mjs.map → DropdownMenu-C2BHv8Lc.mjs.map} +1 -1
- package/dist/{DropdownMenu-BwPtzVWg.d.mts → DropdownMenu-CNkQDiJr.d.mts} +2 -2
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-C-sfKFxK.d.mts → ErrorProps-oCHtJzEB.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-C2eIbP1X.d.mts → FieldRegistry-B7P4wC7y.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-BNbMjWDC.d.mts → FilterBar-clWmrKkT.d.mts} +4 -4
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPickerMenu.d.mts +2 -2
- package/dist/FilterPill.d.mts +1 -1
- package/dist/FilterPopover.d.mts +3 -1
- package/dist/FloatValueControl.d.mts +2 -2
- package/dist/{FormControl-DICrNHcc.d.mts → FormControl-C44o35FL.d.mts} +2 -2
- package/dist/{FormControl-C4CiA0H-.mjs → FormControl-jfjKwUfK.mjs} +3 -3
- package/dist/{FormControl-C4CiA0H-.mjs.map → FormControl-jfjKwUfK.mjs.map} +1 -1
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +1 -1
- package/dist/{FormField-CB0yCMro.mjs → FormField-C3nUzhGT.mjs} +15 -15
- package/dist/{FormField-CB0yCMro.mjs.map → FormField-C3nUzhGT.mjs.map} +1 -1
- package/dist/{FormField-D97xQCxF.d.mts → FormField-CXznMtuS.d.mts} +2 -2
- package/dist/FormField.d.mts +1 -1
- package/dist/{Header-Ca554S1F.d.mts → Header-DvpIsOUN.d.mts} +1 -1
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-Dk2eqeC_.d.mts → HelperTooltip-C4tgbLYw.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +2 -2
- package/dist/{HoverCopyableField-CewUtxZl.mjs → HoverCopyableField-1_LHm80n.mjs} +3 -3
- package/dist/{HoverCopyableField-CewUtxZl.mjs.map → HoverCopyableField-1_LHm80n.mjs.map} +1 -1
- package/dist/{I18nContext-DXcImEuM.d.mts → I18nContext-DlvagRAO.d.mts} +2 -2
- package/dist/I18nContext.d.mts +1 -1
- package/dist/{IconButton-Vq0MUaNj.d.mts → IconButton-Bt3WyiGq.d.mts} +2 -2
- package/dist/{IconButton-H5vDZOdo.mjs → IconButton-Cqxfmrea.mjs} +1 -1
- package/dist/{IconButton-H5vDZOdo.mjs.map → IconButton-Cqxfmrea.mjs.map} +1 -1
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-BRe0qyUe.d.mts → Input-CAsOWM0S.d.mts} +3 -3
- package/dist/{Input-CY14-YeD.mjs → Input-Cg2HxteL.mjs} +3 -3
- package/dist/{Input-CY14-YeD.mjs.map → Input-Cg2HxteL.mjs.map} +1 -1
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-B2ngFfvF.d.mts → InputProps-BU9iiBBz.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +2 -2
- package/dist/{Link-BSuXrvTu.mjs → Link-Cf__H8gD.mjs} +1 -1
- package/dist/{Link-BSuXrvTu.mjs.map → Link-Cf__H8gD.mjs.map} +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/{ListBox-DzZY7IFz.d.mts → ListBox--IH6uofo.d.mts} +3 -3
- package/dist/{ListBox-2aYWNlO_.mjs → ListBox-CjNokYs6.mjs} +8 -8
- package/dist/{ListBox-2aYWNlO_.mjs.map → ListBox-CjNokYs6.mjs.map} +1 -1
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-DT_-4_Ct.d.mts → ListBoxField-BUKop1Ca.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LoadingShimmer-Bqjdut7i.mjs → LoadingShimmer-C73hJqaW.mjs} +1 -1
- package/dist/{LoadingShimmer-Bqjdut7i.mjs.map → LoadingShimmer-C73hJqaW.mjs.map} +1 -1
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-l66qss7_.d.mts → LogicRow-C8Hdl8xB.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +1 -1
- package/dist/{Menu-DQXbnpDB.d.mts → Menu-BSHJpKyL.d.mts} +3 -3
- package/dist/{Menu-Dw6Rcpk6.mjs → Menu-CwKmfxKI.mjs} +1 -1
- package/dist/{Menu-Dw6Rcpk6.mjs.map → Menu-CwKmfxKI.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/{Modal-dpBu2MKp.mjs → Modal-BBIJVhv2.mjs} +3 -3
- package/dist/{Modal-dpBu2MKp.mjs.map → Modal-BBIJVhv2.mjs.map} +1 -1
- package/dist/{Modal-Bz5Rer1b.d.mts → Modal-CoUHxtgN.d.mts} +2 -2
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-CLO8SMXV.mjs → PageHeader-5GyfuGLe.mjs} +2 -2
- package/dist/{PageHeader-CLO8SMXV.mjs.map → PageHeader-5GyfuGLe.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +1 -1
- package/dist/PageLayout-C7ZC7GBA.mjs +132 -0
- package/dist/PageLayout-C7ZC7GBA.mjs.map +1 -0
- package/dist/PageLayout-C7hDmoy_.d.mts +16 -0
- package/dist/PageLayout.d.mts +2 -16
- package/dist/PageLayoutFrame--HlvI4Pp.d.mts +28 -0
- package/dist/PageLayoutFrame.d.mts +2 -28
- package/dist/{PageSelector--kFA7Xt6.d.mts → PageSelector-CrUb586l.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-CglxJr3f.d.mts → Pagination-C67fsrxl.d.mts} +2 -2
- package/dist/{Pagination-BEddsarh.mjs → Pagination-c4YBCy5d.mjs} +5 -5
- package/dist/{Pagination-BEddsarh.mjs.map → Pagination-c4YBCy5d.mjs.map} +1 -1
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-Ct7yDY7d.mjs → Pii-oW_2TUUc.mjs} +2 -2
- package/dist/{Pii-Ct7yDY7d.mjs.map → Pii-oW_2TUUc.mjs.map} +1 -1
- package/dist/{PillShell-CvJzkRFh.d.mts → PillShell-BkYHghx0.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-532iYFek.mjs → Popover-BcII7usF.mjs} +1 -1
- package/dist/{Popover-532iYFek.mjs.map → Popover-BcII7usF.mjs.map} +1 -1
- package/dist/{ProgressIndicator-Cleq0Tfb.d.mts → ProgressIndicator-CdhC2LVI.d.mts} +1 -1
- package/dist/ProgressIndicator.d.mts +1 -1
- package/dist/{PseudoClassProps-B2R2dyr3.d.mts → PseudoClassProps-CverE9Ni.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-BtomkCkL.mjs → Radio-CHme6WTz.mjs} +2 -2
- package/dist/{Radio-BtomkCkL.mjs.map → Radio-CHme6WTz.mjs.map} +1 -1
- package/dist/{RadioGroup-B3B4PCz6.d.mts → RadioGroup-CDEfCg-b.d.mts} +1 -1
- package/dist/{RadioGroup-B6UaoJRd.mjs → RadioGroup-DOLRqHIZ.mjs} +2 -2
- package/dist/{RadioGroup-B6UaoJRd.mjs.map → RadioGroup-DOLRqHIZ.mjs.map} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/{RangeCalendar-C24q-nvR.d.mts → RangeCalendar-BOt59kTG.d.mts} +2 -2
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/{RouterContext-BhPPG7d3.d.mts → RouterContext-D7HBESqO.d.mts} +2 -2
- package/dist/RouterContext.d.mts +1 -1
- package/dist/{RouterLink-IDO10cDE.d.mts → RouterLink-dppNWLgP.d.mts} +2 -2
- package/dist/RouterLink.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/{SearchInput-7pBMxhuN.d.mts → SearchInput-B7JYHJZI.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-B9yo9yMy.d.mts → SegmentedControl-C_7mTcuL.d.mts} +1 -1
- package/dist/{SegmentedControl-BNVwf7nL.mjs → SegmentedControl-d9tHqWce.mjs} +2 -2
- package/dist/{SegmentedControl-BNVwf7nL.mjs.map → SegmentedControl-d9tHqWce.mjs.map} +1 -1
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-DD7mFvR8.mjs → Select-Da6UZicF.mjs} +5 -5
- package/dist/{Select-DD7mFvR8.mjs.map → Select-Da6UZicF.mjs.map} +1 -1
- package/dist/{Select-D7_npfZr.d.mts → Select-Ek-A2Cpo.d.mts} +3 -3
- package/dist/Select.d.mts +1 -1
- package/dist/SingleColumnLayout-ByWxiD7d.d.mts +16 -0
- package/dist/SingleColumnLayout.d.mts +2 -16
- package/dist/SmartTextInput.d.mts +6 -6
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/SmartTextInputFunctionDialog.d.mts +4 -4
- package/dist/SmartTextInputListbox.d.mts +2 -2
- package/dist/SmartTextInputPopover.d.mts +1 -1
- package/dist/{Spinner-uVZyOh1T.mjs → Spinner-C4UyK9If.mjs} +1 -1
- package/dist/{Spinner-uVZyOh1T.mjs.map → Spinner-C4UyK9If.mjs.map} +1 -1
- package/dist/SplitColumnLayout-DYyJabQ3.d.mts +19 -0
- package/dist/SplitColumnLayout.d.mts +2 -19
- package/dist/{Stack-opuYfQvc.d.mts → Stack-D0Dt776K.d.mts} +1 -1
- package/dist/Stack.d.mts +1 -1
- package/dist/{Sticker-rxBNVYlX.d.mts → Sticker-Cit5EKiU.d.mts} +4 -4
- package/dist/{Sticker-DdhSpTcV.mjs → Sticker-_vmpUMfk.mjs} +2 -2
- package/dist/{Sticker-DdhSpTcV.mjs.map → Sticker-_vmpUMfk.mjs.map} +1 -1
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +1 -1
- package/dist/{TabBar-DBOPWUUa.mjs → TabBar-CmYqreN0.mjs} +3 -3
- package/dist/{TabBar-DBOPWUUa.mjs.map → TabBar-CmYqreN0.mjs.map} +1 -1
- package/dist/{Table-Bt7zAlgQ.d.mts → Table-BtNYI6QX.d.mts} +1 -1
- package/dist/{Table--o4ZLRbb.mjs → Table-CV8nogHu.mjs} +2 -2
- package/dist/{Table--o4ZLRbb.mjs.map → Table-CV8nogHu.mjs.map} +1 -1
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-9AYpXi2y.d.mts → TableBody-DQ7pivxP.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-BGabyY7E.mjs → TableBox-vCTkOPlC.mjs} +8 -8
- package/dist/{TableBox-BGabyY7E.mjs.map → TableBox-vCTkOPlC.mjs.map} +1 -1
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-6ovTrboM.d.mts → TableBoxCell-BkJ587Lf.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-mGTYb-Bz.d.mts → TableBoxField-Dj9Cx9NP.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-56QatuNm.d.mts → TableBoxRow-CpR9Cti1.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-9rR-k_4H.d.mts → TableBoxRowActions-Bj-LZaI7.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-WD0ultKh.d.mts → TableCell-DOjW6ADs.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-B5UGCoO-.mjs → TableControls-BtKBTGYR.mjs} +305 -127
- package/dist/TableControls-BtKBTGYR.mjs.map +1 -0
- package/dist/{TableControls-DVO-obFo.d.mts → TableControls-Cw7LDHWj.d.mts} +3 -3
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-BDl9k4o4.d.mts → TableControlsContext-DgoZhMpQ.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-DqcFsWpz.d.mts → TableHead-BGUg_aXc.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-C1PJHhXZ.d.mts → TableHeaderCell-DcZcMQyR.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-B4qzMWXH.d.mts → TableLayout-CwYQaZlA.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-B1yeAiVf.d.mts → TableRow-Dad6_CoD.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-DBdUHK__.d.mts → TableViewConfigurationDropdown-BGuWAarQ.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-CALVwnrT.mjs → TechnicalSticker-BhUxOU-L.mjs} +1 -1
- package/dist/{TechnicalSticker-CALVwnrT.mjs.map → TechnicalSticker-BhUxOU-L.mjs.map} +1 -1
- package/dist/{Text-D4GzsXFA.d.mts → Text-CUhW_agW.d.mts} +3 -3
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-BL8BTgwk.d.mts → TextArea-Djd1uT3B.d.mts} +2 -2
- package/dist/{TextArea-kOkhZxNR.mjs → TextArea-J_EscGvm.mjs} +2 -2
- package/dist/{TextArea-kOkhZxNR.mjs.map → TextArea-J_EscGvm.mjs.map} +1 -1
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-Sdxqsr6y.d.mts → TextUnderlineTooltip-DCVONTD0.d.mts} +2 -2
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/Toast.d.mts +1 -1
- package/dist/{Toggle-CZF6iBql.mjs → Toggle-BEOoATjS.mjs} +2 -2
- package/dist/{Toggle-CZF6iBql.mjs.map → Toggle-BEOoATjS.mjs.map} +1 -1
- package/dist/{Toggle-cUtrUIIO.d.mts → Toggle-EYpW34LO.d.mts} +1 -1
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-CSM977L6.d.mts → Tooltip-DLK9Q2Rg.d.mts} +2 -2
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-CCUrvW2a.d.mts → TruncatedText-B_u70y6w.d.mts} +1 -1
- package/dist/VersionHistory.d.mts +1 -1
- package/dist/{VersionHistoryItem-DBjL9S5_.d.mts → VersionHistoryItem-iUabmk_y.d.mts} +1 -1
- package/dist/VersionHistoryItem.d.mts +1 -1
- package/dist/WizardModal.d.mts +2 -2
- package/dist/{accordionTitleTypography--GAczLo7.d.mts → accordionTitleTypography-C7VVJvlx.d.mts} +2 -2
- package/dist/accordionTitleTypography.d.mts +1 -1
- package/dist/{chainTypes-dY6jc22J.d.mts → chainTypes-DT-9j_sG.d.mts} +4 -4
- package/dist/{codec-D2uE0_oJ.d.mts → codec-CGj8cwcj.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/{color-DuKiTH5t.d.mts → color-BOm5A1Si.d.mts} +2 -2
- package/dist/components/Accordion/index.d.mts +1 -1
- package/dist/components/Attribute/index.mjs +2 -2
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +1 -1
- package/dist/components/BottomPanel/index.mjs +3 -3
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +2 -2
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.d.mts +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.d.mts +20 -20
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.mjs +11 -11
- package/dist/components/DataTable/types.d.mts +2 -2
- package/dist/components/DatePicker/index.d.mts +5 -5
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +1 -1
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +4 -4
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/LoadingShimmer/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressIndicator/index.d.mts +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RightPanel/index.mjs +2 -2
- package/dist/components/SegmentedControl/index.d.mts +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/SmartTextInput/index.d.mts +2 -2
- package/dist/components/SmartTextInput/index.mjs +4 -4
- package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +1 -1
- package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +2 -2
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -8
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +2 -2
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/TextArea/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +1 -1
- package/dist/components/Toast/index.mjs +1 -1
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/VersionHistory/index.d.mts +1 -1
- package/dist/components/VersionHistory/index.mjs +5 -5
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-BiOvZGO5.d.mts → constants-CwzbyAdc.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{createPath-B8EZDtSz.d.mts → createPath-C4jIHe68.d.mts} +2 -2
- package/dist/createPath.d.mts +1 -1
- package/dist/{date-filter-CWgCXz85.mjs → date-filter-B8PKh5vg.mjs} +1 -1
- package/dist/{date-filter-CWgCXz85.mjs.map → date-filter-B8PKh5vg.mjs.map} +1 -1
- package/dist/{date-range-rule-value-DObVM8xO.d.mts → date-range-rule-value-BTlHwhVf.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-DhMMe_wq.d.mts → date-rule-intent-zdKP-tW_.d.mts} +3 -3
- package/dist/date-rule-intent.d.mts +1 -1
- package/dist/display.d.mts +2 -2
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-DaBdvJHf.d.mts → filter-size-context-D3ZSzFKe.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/{formatDateTime-mPH4DsDC.d.mts → formatDateTime-zyRMjfH8.d.mts} +1 -1
- package/dist/formatDateTime.d.mts +1 -1
- package/dist/helpers.d.mts +2 -2
- package/dist/{i18n-UiE7OC4k.mjs → i18n-DeJa-arS.mjs} +8 -2
- package/dist/i18n-DeJa-arS.mjs.map +1 -0
- package/dist/{index-CeUb5INA.d.mts → index-B13LwAGD.d.mts} +2 -2
- package/dist/{index-Blo6W_k0.d.mts → index-B7KIL3U6.d.mts} +2 -2
- package/dist/{index-CTcM_LlP.d.mts → index-DHmZDtDG.d.mts} +3 -3
- package/dist/index-xAZnxq0d2.d.mts +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index2.d.mts +1 -1
- package/dist/index3.d.mts +3 -3
- package/dist/index4.d.mts +1 -1
- package/dist/index5.d.mts +15 -15
- package/dist/{input-D9rsMlzl.d.mts → input-DMPo8gRT.d.mts} +3 -3
- package/dist/{inputFields-CXelxYhd.d.mts → inputFields-DHdFgzS2.d.mts} +11 -11
- package/dist/inputFields.d.mts +1 -1
- package/dist/{intersperse-ObkRVOag.mjs → intersperse-DWUGtKug.mjs} +1 -1
- package/dist/{intersperse-ObkRVOag.mjs.map → intersperse-DWUGtKug.mjs.map} +1 -1
- package/dist/{jsonSchema-BMPLdT4p.d.mts → jsonSchema-6mcLrVG3.d.mts} +1 -1
- package/dist/lib/PDSProvider.d.mts +3 -3
- package/dist/lib/PDSProvider.mjs +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/chainTypes.d.mts +1 -1
- package/dist/lib/color.d.mts +1 -1
- package/dist/lib/customFunctionSchema.d.mts +1 -1
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/date-filter/index.mjs +1 -1
- package/dist/lib/i18n/index.d.mts +3 -3
- package/dist/lib/i18n/index.mjs +1 -1
- package/dist/lib/jsonSchema.d.mts +1 -1
- package/dist/lib/jsonSchemaType.d.mts +1 -1
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +2 -2
- package/dist/lib/methodChainNormalize.d.mts +2 -2
- package/dist/lib/methodChainTypes.d.mts +1 -1
- package/dist/lib/objectSchemaTypes.d.mts +1 -1
- package/dist/lib/platformObject.d.mts +1 -1
- package/dist/lib/pseudoClass.d.mts +1 -1
- package/dist/lib/router/adapters/reactRouter.d.mts +1 -1
- package/dist/lib/router/adapters/tanstack.d.mts +1 -1
- package/dist/lib/router/index.d.mts +5 -5
- package/dist/lib/schemaOptions.d.mts +1 -1
- package/dist/lib/semanticColor.d.mts +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/{listbox-options-BFaMbK-g.d.mts → listbox-options-yLjqZp4H.d.mts} +3 -3
- package/dist/listbox-options.d.mts +1 -1
- package/dist/{message-BOzjC5yA.d.mts → message-C5n7wFiN.d.mts} +1 -1
- package/dist/{methodChain-CGTIWafl.d.mts → methodChain-BNDytoaD.d.mts} +4 -4
- package/dist/{methodChainTypes-BtSMV5OZ.d.mts → methodChainTypes-BuwpPC73.d.mts} +2 -2
- package/dist/mixins/focus.d.mts +1 -1
- package/dist/mixins/hoverable.d.mts +2 -2
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/scrollbar.d.mts +1 -1
- package/dist/mixins/text.d.mts +1 -1
- package/dist/{operators-DfvW8Kmr.d.mts → operators-B12UYEsV.d.mts} +14 -12
- package/dist/operators.d.mts +2 -2
- package/dist/{palette-CBOBcVu3.d.mts → palette-BCszfY7I.d.mts} +3 -3
- package/dist/palette.d.mts +1 -1
- package/dist/patterns/CardGrouping/index.d.mts +2 -0
- package/dist/patterns/CardGrouping/index.mjs +280 -0
- package/dist/patterns/CardGrouping/index.mjs.map +1 -0
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
- package/dist/patterns/PageLayout/index.d.mts +5 -5
- package/dist/patterns/PageLayout/index.mjs +1 -131
- package/dist/patterns/WizardModal/index.mjs +2 -2
- package/dist/reactRouterFallback.d.mts +1 -1
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/safe-parse.d.mts +1 -1
- package/dist/{schemaOptions-DTeNBwir.d.mts → schemaOptions-DBOUChxi.d.mts} +3 -3
- package/dist/{semantic-CfiNA4Yy.d.mts → semantic-Duoh2Pxp.d.mts} +1 -1
- package/dist/{semanticColor-BCPOKF9L.d.mts → semanticColor-BuG977_M.d.mts} +3 -3
- package/dist/{strings-BaQZhOjo.d.mts → strings-DQ3vxBj8.d.mts} +7 -1
- package/dist/strings.d.mts +1 -1
- package/dist/{text-ucZmPNyH.d.mts → text-B7hx6G99.d.mts} +1 -1
- package/dist/{theme-CAPmp1it.d.mts → theme-BKg55Zk1.d.mts} +3 -3
- package/dist/theme.d.mts +1 -1
- package/dist/tone.d.mts +3 -3
- package/dist/tree.d.mts +1 -1
- package/dist/{types-l-arEBLb.d.mts → types-4wnr5R9P.d.mts} +1 -1
- package/dist/{types-CBfgdnuB.d.mts → types-6QeQmbFm.d.mts} +1 -1
- package/dist/{types-CoTzVfFl.d.mts → types-BjMJFNYH.d.mts} +1 -1
- package/dist/{types-CptsgFbu.d.mts → types-CEQWndtF.d.mts} +4 -4
- package/dist/{types-Rj-C3LGL.d.mts → types-CM8L7-ij.d.mts} +31 -9
- package/dist/{types-ClbV4wNp.d.mts → types-CgKSEQyB.d.mts} +1 -1
- package/dist/{types-B1KzKgBp.d.mts → types-CwzwClJx.d.mts} +1 -1
- package/dist/{types-BB5WwerD.d.mts → types-VgGkS4JB.d.mts} +2 -2
- package/dist/{types-BfrEduGv.d.mts → types-eemD0jxb.d.mts} +2 -2
- package/dist/types.d.mts +1 -1
- package/dist/types2.d.mts +1 -1
- package/dist/types3.d.mts +1 -1
- package/dist/types4.d.mts +2 -2
- package/dist/types5.d.mts +1 -1
- package/dist/types6.d.mts +1 -1
- package/dist/types7.d.mts +1 -1
- package/dist/{url-state-CrnZ3Ocy.d.mts → url-state-BW1mN6WQ.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/{useChain-DQq1UsGZ.d.mts → useChain-BreIP4fW.d.mts} +6 -6
- package/dist/useChainAtCursor.d.mts +6 -6
- package/dist/useCodeChainFunctionPanel.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +5 -2
- package/dist/{useFilterStateV2-CGGABOcq.d.mts → useFilterStateV2-B8VebPBe.d.mts} +5 -4
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-4w9TNFgD.d.mts → useFormField-DAwApAKK.d.mts} +2 -2
- package/dist/{useFormField-CbNYbDdp.mjs → useFormField-J0LiPcpm.mjs} +2 -2
- package/dist/{useFormField-CbNYbDdp.mjs.map → useFormField-J0LiPcpm.mjs.map} +1 -1
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-CsKC93Pt.mjs → useFormGroup-CALbrUkl.mjs} +1 -1
- package/dist/{useFormGroup-CsKC93Pt.mjs.map → useFormGroup-CALbrUkl.mjs.map} +1 -1
- package/dist/{useLocationPathname-CZwH8h5n.d.mts → useLocationPathname-BHL0pgiu.d.mts} +1 -1
- package/dist/useLocationPathname.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-Bw93rNFH.d.mts → useTableBoxDragAndDrop-Dq30b6yY.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-B8PzMOza.d.mts → utilities-B2ry7_20.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/testing.d.mts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils4.d.mts +5 -5
- package/dist/{validation-DP8f6tgh.d.mts → validation-ZHnFPRP6.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/validation2.d.mts +4 -4
- package/dist/{value-control-resolver-CwjOaVAn.d.mts → value-control-resolver-D3qzy8Kk.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/effect.d.mts +1 -1
- package/dist/variables/semantic.d.mts +1 -1
- package/llms.txt +1 -0
- package/package.json +5 -3
- package/skills/ui-authoring/COMPONENTS.md +1 -0
- package/skills/ui-authoring/PATTERNS.md +7 -2
- package/dist/Combobox-MCaDc7h6.mjs.map +0 -1
- package/dist/TableControls-B5UGCoO-.mjs.map +0 -1
- package/dist/i18n-UiE7OC4k.mjs.map +0 -1
- package/dist/patterns/PageLayout/index.mjs.map +0 -1
- /package/dist/{index-1-AkepUA.d.mts → index-7in8TPrM.d.mts} +0 -0
- /package/dist/{index-B-Y-ZG2x.d.mts → index-8SLBz2NH.d.mts} +0 -0
- /package/dist/{index-BO_854F2.d.mts → index-B24gUwOx.d.mts} +0 -0
- /package/dist/{index-BSVhZrWN.d.mts → index-B8M0Grl_2.d.mts} +0 -0
- /package/dist/{index-BYARwRq7.d.mts → index-BFnNtGdX.d.mts} +0 -0
- /package/dist/{index-B_BBnMou.d.mts → index-BTviwbFV.d.mts} +0 -0
- /package/dist/{index-BbPybiOV.d.mts → index-BjgW3E7y.d.mts} +0 -0
- /package/dist/{index-BcsXXrHq.d.mts → index-BwFl_eS0.d.mts} +0 -0
- /package/dist/{index-Bt4QNofW.d.mts → index-C3kE54DD.d.mts} +0 -0
- /package/dist/{index-C9achTF6.d.mts → index-C3usUse7.d.mts} +0 -0
- /package/dist/{index-CCt0lwyI.d.mts → index-C6HcjJiY.d.mts} +0 -0
- /package/dist/{index-CFuHCx9T.d.mts → index-CP2eJYlK.d.mts} +0 -0
- /package/dist/{index-CIABef8t.d.mts → index-CSf15oCd.d.mts} +0 -0
- /package/dist/{index-CTHojwxd.d.mts → index-CX869wwk.d.mts} +0 -0
- /package/dist/{index-CliqZ9rj.d.mts → index-CXaDbCtw.d.mts} +0 -0
- /package/dist/{index-Cm-1i165.d.mts → index-D4DUvwPf.d.mts} +0 -0
- /package/dist/{index-CryTAIZM.d.mts → index-DB7t8whN.d.mts} +0 -0
- /package/dist/{index-CzItj62a.d.mts → index-Deol7ZWO.d.mts} +0 -0
- /package/dist/{index-CzUpNo0e.d.mts → index-DhiymMxa.d.mts} +0 -0
- /package/dist/{index-D-giXKyu.d.mts → index-DjOaHFU3.d.mts} +0 -0
- /package/dist/{index-DGsJdI5l.d.mts → index-DkrC-i1D.d.mts} +0 -0
- /package/dist/{index-DMRtRo7y.d.mts → index-DvwPIy8X.d.mts} +0 -0
- /package/dist/{index-DUF59i3Q2.d.mts → index-Oio5ygqN.d.mts} +0 -0
- /package/dist/{index-DgJfEygr.d.mts → index-Wc1llEvP.d.mts} +0 -0
- /package/dist/{index-Es5nKSSL.d.mts → index-dzI_9J-Z.d.mts} +0 -0
- /package/dist/{index-NKYLt_R9.d.mts → index-gpCH5158.d.mts} +0 -0
- /package/dist/{index-Qwqzz3XM.d.mts → index-lIMqGGJz.d.mts} +0 -0
- /package/dist/{index-T2S0_qsg.d.mts → index-luywJTzJ.d.mts} +0 -0
- /package/dist/{index-kxcPLmUx2.d.mts → index-sViox9YW.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as styled, n as createGlobalStyle, r as css } from "./styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
-
import { c as usePDSLocale, i as formatDateTime, l as usePDSStrings, u as DEFAULT_COMMON_STRINGS } from "./i18n-
|
|
2
|
+
import { c as usePDSLocale, i as formatDateTime, l as usePDSStrings, u as DEFAULT_COMMON_STRINGS } from "./i18n-DeJa-arS.mjs";
|
|
3
3
|
import { TruncatedText } from "./lib/TruncatedText.mjs";
|
|
4
4
|
import { semanticColor, semanticOnly, semanticTokens } from "./lib/semanticColor.mjs";
|
|
5
5
|
import { paragraphMixins } from "./mixins/text.mjs";
|
|
@@ -17,20 +17,20 @@ import { Z_INDICES } from "./lib/zindex.mjs";
|
|
|
17
17
|
import { focusOutline, focusWithinOutline } from "./mixins/focus.mjs";
|
|
18
18
|
import { semanticScrollbar } from "./mixins/scrollbar.mjs";
|
|
19
19
|
import { n as Stack, t as HStack } from "./Stack-BkC7FCdF.mjs";
|
|
20
|
-
import { n as
|
|
21
|
-
import {
|
|
22
|
-
import { r as
|
|
20
|
+
import { i as selectedPresetFor, n as parseDateFilterValue, r as resolveDateFilterValue, t as formatDateFilterValue } from "./date-filter-B8PKh5vg.mjs";
|
|
21
|
+
import { n as Button, t as IconButton } from "./IconButton-Cqxfmrea.mjs";
|
|
22
|
+
import { i as TabBar, n as StyledTab, r as Tab } from "./TabBar-CmYqreN0.mjs";
|
|
23
|
+
import { r as InputGroup } from "./Input-Cg2HxteL.mjs";
|
|
23
24
|
import Input_default from "./components/Input/index.mjs";
|
|
24
|
-
import { c as MenuList, s as MenuItem } from "./Menu-
|
|
25
|
-
import { n as DropdownMenu_default } from "./DropdownMenu-
|
|
26
|
-
import { t as Combobox } from "./Combobox-
|
|
27
|
-
import { s as Popover_default } from "./Popover-
|
|
28
|
-
import { i as Modal_default } from "./Modal-
|
|
29
|
-
import { t as Toggle } from "./Toggle-
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { r as DatePicker, t as DateRangePicker } from "./DatePicker-CKk6Hnj2.mjs";
|
|
25
|
+
import { c as MenuList, s as MenuItem } from "./Menu-CwKmfxKI.mjs";
|
|
26
|
+
import { n as DropdownMenu_default } from "./DropdownMenu-C2BHv8Lc.mjs";
|
|
27
|
+
import { t as Combobox } from "./Combobox-BkpRqaxB.mjs";
|
|
28
|
+
import { s as Popover_default } from "./Popover-BcII7usF.mjs";
|
|
29
|
+
import { i as Modal_default } from "./Modal-BBIJVhv2.mjs";
|
|
30
|
+
import { t as Toggle } from "./Toggle-BEOoATjS.mjs";
|
|
31
|
+
import { t as ListBox } from "./ListBox-CjNokYs6.mjs";
|
|
32
|
+
import { m as FormField, o as ComboboxField } from "./FormField-C3nUzhGT.mjs";
|
|
33
|
+
import { r as DatePicker, t as DateRangePicker } from "./DatePicker-CjuR6ORz.mjs";
|
|
34
34
|
import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
|
|
35
35
|
import { Fragment, createContext, createElement, forwardRef, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
36
36
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -39,10 +39,11 @@ import { CaretDownIcon, CheckIcon, CircleInfoIcon, CirclePlusIcon, CopyIcon, Eye
|
|
|
39
39
|
import { CaretDownIcon as CaretDownIcon$1, CircleInfoIcon as CircleInfoIcon$1, LockedIcon as LockedIcon$1, MoreIcon as MoreIcon$1, PlusIcon as PlusIcon$1, SearchIcon as SearchIcon$1, XIcon as XIcon$1 } from "@persona/icons/12px";
|
|
40
40
|
import { debounce, isEqual, noop, partition, startCase, union, uniqueId } from "lodash-es";
|
|
41
41
|
import { useId } from "react-aria";
|
|
42
|
+
import { mergeRefs } from "@react-aria/utils";
|
|
42
43
|
import Fuse from "fuse.js";
|
|
43
44
|
import { DragIcon as DragIcon$1 } from "@persona/icons/24px";
|
|
44
45
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
45
|
-
import { DndContext, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
46
|
+
import { DndContext, PointerSensor, closestCenter, pointerWithin, useSensor, useSensors } from "@dnd-kit/core";
|
|
46
47
|
import { SortableContext, horizontalListSortingStrategy, useSortable } from "@dnd-kit/sortable";
|
|
47
48
|
import { DragDropContext, Draggable, Droppable } from "@hello-pangea/dnd";
|
|
48
49
|
import { parseAbsolute, parseDate, toCalendarDate, toZoned } from "@internationalized/date";
|
|
@@ -332,6 +333,7 @@ const ViewNameInput = styled(Input_default)`
|
|
|
332
333
|
const AddViewButton = styled(IconButton)`
|
|
333
334
|
color: ${({ theme }) => semanticColor(theme, "FgSecondary", theme.color.text.secondary)};
|
|
334
335
|
`;
|
|
336
|
+
const MIN_TAB_WIDTH_FOR_HIDE_BUTTON = 32;
|
|
335
337
|
const HideViewButton = styled(IconButton)`
|
|
336
338
|
position: absolute;
|
|
337
339
|
top: 50%;
|
|
@@ -527,15 +529,28 @@ const SavedViewTab = ({ view, selected, tabIdPrefix = TAB_ID_PREFIX, canEditView
|
|
|
527
529
|
});
|
|
528
530
|
return tab;
|
|
529
531
|
};
|
|
530
|
-
const SavedViewTabSlot = ({ slotRef, slotStyle, ...props }) => {
|
|
532
|
+
const SavedViewTabSlot = ({ slotRef, slotStyle, slotListeners, ...props }) => {
|
|
531
533
|
const { view, selected, onViewHiddenChange, onHideView } = props;
|
|
532
534
|
const strings = usePDSStrings();
|
|
535
|
+
const [slotElement, setSlotElement] = useState(null);
|
|
536
|
+
const mergedSlotRef = useMemo(() => mergeRefs(slotRef, setSlotElement), [slotRef]);
|
|
537
|
+
const [isTooNarrowForHideButton, setIsTooNarrowForHideButton] = useState(false);
|
|
538
|
+
useLayoutEffect(() => {
|
|
539
|
+
const tab = slotElement?.querySelector("[role=\"tab\"]");
|
|
540
|
+
if (!tab) return;
|
|
541
|
+
const measure = () => setIsTooNarrowForHideButton(tab.offsetWidth > 0 && tab.offsetWidth < MIN_TAB_WIDTH_FOR_HIDE_BUTTON);
|
|
542
|
+
measure();
|
|
543
|
+
const resizeObserver = new ResizeObserver(measure);
|
|
544
|
+
resizeObserver.observe(tab);
|
|
545
|
+
return () => resizeObserver.disconnect();
|
|
546
|
+
}, [slotElement, selected]);
|
|
533
547
|
return /* @__PURE__ */ jsxs(TabSlot, {
|
|
534
|
-
ref:
|
|
548
|
+
ref: mergedSlotRef,
|
|
535
549
|
"data-tab-view": true,
|
|
536
550
|
"data-tab-slot": true,
|
|
537
551
|
style: slotStyle,
|
|
538
|
-
|
|
552
|
+
...slotListeners,
|
|
553
|
+
children: [/* @__PURE__ */ jsx(SavedViewTab, { ...props }), !selected && onViewHiddenChange && !isTooNarrowForHideButton && /* @__PURE__ */ jsx(HideViewButton, {
|
|
539
554
|
id: `table-controls__view-tab-hide_${view.id}`,
|
|
540
555
|
"aria-label": strings.hideViewNamed(view.name),
|
|
541
556
|
title: strings.hideViewTitle,
|
|
@@ -546,9 +561,12 @@ const SavedViewTabSlot = ({ slotRef, slotStyle, ...props }) => {
|
|
|
546
561
|
};
|
|
547
562
|
const SortableSavedViewTab = (props) => {
|
|
548
563
|
const { setNodeRef, listeners, transform, transition, isDragging } = useSortable({ id: props.view.id });
|
|
564
|
+
const slotListeners = useMemo(() => listeners && Object.fromEntries(Object.entries(listeners).map(([eventName, handler]) => [eventName, (event) => {
|
|
565
|
+
if (event.currentTarget.contains(event.target)) handler(event);
|
|
566
|
+
}])), [listeners]);
|
|
549
567
|
return /* @__PURE__ */ jsx(SavedViewTabSlot, {
|
|
550
568
|
...props,
|
|
551
|
-
|
|
569
|
+
slotListeners,
|
|
552
570
|
slotRef: setNodeRef,
|
|
553
571
|
slotStyle: {
|
|
554
572
|
transform: transform ? `translate3d(${transform.x}px, 0, 0)` : void 0,
|
|
@@ -667,7 +685,7 @@ const ControlBar = ({ presetViews, currentView, onSelectView, views, hiddenViewI
|
|
|
667
685
|
const [isAddViewOverflowing, setIsAddViewOverflowing] = useState(false);
|
|
668
686
|
useEffect(() => {
|
|
669
687
|
const previousPendingDeleteView = previousPendingDeleteViewRef.current;
|
|
670
|
-
if (!pendingDeleteView && previousPendingDeleteView) (document.getElementById(`${OVERFLOW_TAB_ID_PREFIX}${previousPendingDeleteView.id}`) ?? document.getElementById(`${TAB_ID_PREFIX}${previousPendingDeleteView.id}`))?.focus();
|
|
688
|
+
if (!pendingDeleteView && previousPendingDeleteView) (document.getElementById(`${OVERFLOW_TAB_ID_PREFIX}${previousPendingDeleteView.id}`) ?? document.getElementById(`${TAB_ID_PREFIX}${previousPendingDeleteView.id}`))?.focus({ preventScroll: true });
|
|
671
689
|
previousPendingDeleteViewRef.current = pendingDeleteView;
|
|
672
690
|
}, [pendingDeleteView]);
|
|
673
691
|
const [shownViews, hiddenViews] = useMemo(() => {
|
|
@@ -734,15 +752,17 @@ const ControlBar = ({ presetViews, currentView, onSelectView, views, hiddenViewI
|
|
|
734
752
|
bottom: tabListRect.bottom
|
|
735
753
|
} : null;
|
|
736
754
|
};
|
|
737
|
-
const
|
|
755
|
+
const visibleTabCollision = useCallback((args) => {
|
|
738
756
|
const bounds = dragBoundsRef.current;
|
|
739
|
-
|
|
757
|
+
const visibleArgs = {
|
|
740
758
|
...args,
|
|
741
759
|
droppableContainers: args.droppableContainers.filter((container) => {
|
|
742
760
|
const rect = args.droppableRects.get(container.id);
|
|
743
761
|
return bounds == null || rect != null && rect.bottom <= bounds.bottom + 1;
|
|
744
762
|
})
|
|
745
|
-
}
|
|
763
|
+
};
|
|
764
|
+
const pointerCollisions = pointerWithin(visibleArgs);
|
|
765
|
+
return pointerCollisions.length > 0 ? pointerCollisions : closestCenter(visibleArgs);
|
|
746
766
|
}, []);
|
|
747
767
|
const restrictToVisibleSavedTabs = useCallback(({ transform, draggingNodeRect }) => {
|
|
748
768
|
const bounds = dragBoundsRef.current;
|
|
@@ -774,12 +794,14 @@ const ControlBar = ({ presetViews, currentView, onSelectView, views, hiddenViewI
|
|
|
774
794
|
if (over) moveView(String(active.id), indexOfView(String(over.id)));
|
|
775
795
|
};
|
|
776
796
|
const hideView = (viewId) => {
|
|
777
|
-
const
|
|
797
|
+
const overflowIds = new Set(overflowViews.map((view) => view.id));
|
|
798
|
+
const visibleViews = shownViews.filter((view) => !overflowIds.has(view.id));
|
|
799
|
+
const index = visibleViews.findIndex((view) => view.id === viewId);
|
|
778
800
|
const isCurrent = viewId === currentView;
|
|
779
|
-
const focusTarget = isCurrent ? void 0 :
|
|
801
|
+
const focusTarget = isCurrent || index === -1 ? void 0 : visibleViews[index + 1] ?? visibleViews[index - 1];
|
|
780
802
|
onViewHiddenChange?.(viewId, true);
|
|
781
803
|
if (isCurrent) onSelectView?.(null);
|
|
782
|
-
document.getElementById(`${TAB_ID_PREFIX}${focusTarget ? focusTarget.id : "default"}`)?.focus();
|
|
804
|
+
document.getElementById(`${TAB_ID_PREFIX}${focusTarget ? focusTarget.id : "default"}`)?.focus({ preventScroll: true });
|
|
783
805
|
};
|
|
784
806
|
const moveViewWithKeyboard = (viewId, direction) => {
|
|
785
807
|
const neighbor = shownViews[shownViews.findIndex((view) => view.id === viewId) + direction];
|
|
@@ -960,7 +982,7 @@ const ControlBar = ({ presetViews, currentView, onSelectView, views, hiddenViewI
|
|
|
960
982
|
/* @__PURE__ */ jsx(ProductTourStyles, {}),
|
|
961
983
|
showViewsBar && (onReorderViews ? /* @__PURE__ */ jsx(DndContext, {
|
|
962
984
|
sensors,
|
|
963
|
-
collisionDetection:
|
|
985
|
+
collisionDetection: visibleTabCollision,
|
|
964
986
|
modifiers: [restrictToVisibleSavedTabs],
|
|
965
987
|
onDragStart: handleDragStart,
|
|
966
988
|
onDragEnd: handleDragEnd,
|
|
@@ -1532,6 +1554,7 @@ function getOperatorsForType(type) {
|
|
|
1532
1554
|
* field can never surface an operator the host application can't serialize.
|
|
1533
1555
|
*/
|
|
1534
1556
|
function getOperatorsForField(field) {
|
|
1557
|
+
if (field.condition != null) return field.condition.operators.map(({ operator }) => operator);
|
|
1535
1558
|
const { allowedOperators } = field;
|
|
1536
1559
|
if (allowedOperators == null || allowedOperators.length === 0) return getOperatorsForType(field.type);
|
|
1537
1560
|
return allowedOperators;
|
|
@@ -1541,8 +1564,26 @@ function getDefaultOperatorForType(type) {
|
|
|
1541
1564
|
if (list.length === 0) throw new Error(`No operators defined for field type "${type}"`);
|
|
1542
1565
|
return list[0];
|
|
1543
1566
|
}
|
|
1544
|
-
function
|
|
1545
|
-
return
|
|
1567
|
+
function getConditionOperator(field, operator) {
|
|
1568
|
+
return field?.condition?.operators.find((config) => config.operator === operator);
|
|
1569
|
+
}
|
|
1570
|
+
function isValuelessOperator(operator, field) {
|
|
1571
|
+
const config = getConditionOperator(field, operator);
|
|
1572
|
+
return config != null ? config.valueType === "none" : VALUELESS_OPERATORS.has(operator);
|
|
1573
|
+
}
|
|
1574
|
+
function hasCompleteConditionValue(rule, field) {
|
|
1575
|
+
const config = getConditionOperator(field, rule.operator);
|
|
1576
|
+
if (config == null) return false;
|
|
1577
|
+
const { value } = rule;
|
|
1578
|
+
if (config.isComplete != null && !config.isComplete(value)) return false;
|
|
1579
|
+
switch (config.valueType) {
|
|
1580
|
+
case "none": return value === null;
|
|
1581
|
+
case "boolean": return typeof value === "boolean";
|
|
1582
|
+
case "number": return typeof value === "number" && Number.isFinite(value);
|
|
1583
|
+
case "integer": return typeof value === "number" && Number.isSafeInteger(value);
|
|
1584
|
+
case "string": return typeof value === "string" && value.length > 0;
|
|
1585
|
+
case "string_array": return Array.isArray(value) && value.length > 0 && value.every((entry) => typeof entry === "string");
|
|
1586
|
+
}
|
|
1546
1587
|
}
|
|
1547
1588
|
/**
|
|
1548
1589
|
* Whether a rule's value is a date range: a range operator, or a field that is
|
|
@@ -1587,6 +1628,10 @@ function fieldHasMultipleOperators(field) {
|
|
|
1587
1628
|
* translatable `CommonStrings` table (English defaults: "is", "is not", "contains", ...).
|
|
1588
1629
|
*/
|
|
1589
1630
|
const OPERATOR_LABEL_KEYS = {
|
|
1631
|
+
gt: "operatorGreaterThan",
|
|
1632
|
+
gte: "operatorGreaterThanOrEqual",
|
|
1633
|
+
lt: "operatorLessThan",
|
|
1634
|
+
lte: "operatorLessThanOrEqual",
|
|
1590
1635
|
is: "operatorIs",
|
|
1591
1636
|
is_not: "operatorIsNot",
|
|
1592
1637
|
contains: "operatorContains",
|
|
@@ -1615,8 +1660,11 @@ const OPERATOR_LABEL_KEYS_BY_TYPE = { multi_choices: {
|
|
|
1615
1660
|
* The label for `operator`, specialized for `fieldType` where the generic label is ambiguous.
|
|
1616
1661
|
* Pass `strings` from `usePDSStrings()` to translate it; English when omitted.
|
|
1617
1662
|
*/
|
|
1618
|
-
function getOperatorLabel(operator, fieldType, strings = DEFAULT_COMMON_STRINGS) {
|
|
1619
|
-
|
|
1663
|
+
function getOperatorLabel(operator, fieldType, strings = DEFAULT_COMMON_STRINGS, field) {
|
|
1664
|
+
const config = getConditionOperator(field, operator);
|
|
1665
|
+
if (config != null) return config.label;
|
|
1666
|
+
const key = fieldType && OPERATOR_LABEL_KEYS_BY_TYPE[fieldType]?.[operator] || OPERATOR_LABEL_KEYS[operator];
|
|
1667
|
+
return key != null ? strings[key] : operator;
|
|
1620
1668
|
}
|
|
1621
1669
|
/**
|
|
1622
1670
|
* Empty-but-present value seeded when a rule switches from a valueless operator
|
|
@@ -1650,7 +1698,16 @@ function emptyDateRange() {
|
|
|
1650
1698
|
* `between`.
|
|
1651
1699
|
*/
|
|
1652
1700
|
function emptyValueForRule(field, operator) {
|
|
1653
|
-
if (isValuelessOperator(operator)) return null;
|
|
1701
|
+
if (isValuelessOperator(operator, field)) return null;
|
|
1702
|
+
const config = getConditionOperator(field, operator);
|
|
1703
|
+
if (config != null) {
|
|
1704
|
+
if (config.defaultValue != null) return config.defaultValue;
|
|
1705
|
+
switch (config.valueType) {
|
|
1706
|
+
case "string_array": return [];
|
|
1707
|
+
case "boolean": return true;
|
|
1708
|
+
default: return "";
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1654
1711
|
if (isRangeOperator(operator) || field.type === "date_range") return emptyDateRange();
|
|
1655
1712
|
return emptyValueForFieldType(field.type);
|
|
1656
1713
|
}
|
|
@@ -1661,7 +1718,8 @@ function emptyValueForRule(field, operator) {
|
|
|
1661
1718
|
* the range control can't read it and the wire format would reject it.
|
|
1662
1719
|
*/
|
|
1663
1720
|
function reconcileValueForOperator(field, nextOperator, previousOperator, value) {
|
|
1664
|
-
if (isValuelessOperator(nextOperator)) return null;
|
|
1721
|
+
if (isValuelessOperator(nextOperator, field)) return null;
|
|
1722
|
+
if (field.condition != null) return getConditionOperator(field, nextOperator)?.valueType === getConditionOperator(field, previousOperator)?.valueType ? value ?? emptyValueForRule(field, nextOperator) : emptyValueForRule(field, nextOperator);
|
|
1665
1723
|
if (isRangeOperator(nextOperator) !== isRangeOperator(previousOperator)) return emptyValueForRule(field, nextOperator);
|
|
1666
1724
|
if (field.type === "date" && nextOperator === "is" && typeof value === "string" && TIME_COMPONENT$1.test(value)) return DateTime.fromISO(value).setZone(Settings.defaultZone).toISODate();
|
|
1667
1725
|
if (field.type === "date" && (previousOperator === "before" || previousOperator === "after") && (nextOperator === "before" || nextOperator === "after") && previousOperator !== nextOperator && typeof value === "string" && TIME_COMPONENT$1.test(value)) {
|
|
@@ -1748,6 +1806,7 @@ function valueDisplayString(value, optionLabels, relativeDate, fieldType, { loca
|
|
|
1748
1806
|
}
|
|
1749
1807
|
}
|
|
1750
1808
|
function draftValueFor(field, operator) {
|
|
1809
|
+
if (field.condition != null) return emptyValueForRule(field, operator);
|
|
1751
1810
|
if (isValuelessOperator(operator)) return null;
|
|
1752
1811
|
if (field.type === "boolean") return true;
|
|
1753
1812
|
if (isRangeOperator(operator)) return emptyValueForRule(field, operator);
|
|
@@ -1833,29 +1892,50 @@ function nodeToOptions(node) {
|
|
|
1833
1892
|
* `fieldsLabel` names the custom-field submenu; pass `usePDSStrings().fields` to translate it.
|
|
1834
1893
|
*/
|
|
1835
1894
|
function buildFieldPickerOptions(registry, visibleCustomFieldParents, excludeFieldIds, fieldsLabel = FIELDS_SUBMENU_LABEL) {
|
|
1836
|
-
const systemFields = registry.
|
|
1895
|
+
const systemFields = registry.all().filter((field) => field.source === "system" || field.pickerGroup != null);
|
|
1837
1896
|
const customGroups = registry.customFieldGroups();
|
|
1838
1897
|
const excluded = excludeFieldIds == null ? null : new Set(excludeFieldIds);
|
|
1839
|
-
const tree =
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1898
|
+
const tree = [];
|
|
1899
|
+
const pickerGroups = /* @__PURE__ */ new Map();
|
|
1900
|
+
for (const field of systemFields) {
|
|
1901
|
+
if (excluded?.has(field.id)) continue;
|
|
1902
|
+
const option = {
|
|
1903
|
+
label: field.label,
|
|
1904
|
+
value: field.id
|
|
1905
|
+
};
|
|
1906
|
+
if (field.pickerGroup == null) {
|
|
1907
|
+
tree.push(option);
|
|
1908
|
+
continue;
|
|
1909
|
+
}
|
|
1910
|
+
const options = pickerGroups.get(field.pickerGroup) ?? [];
|
|
1911
|
+
options.push(option);
|
|
1912
|
+
pickerGroups.set(field.pickerGroup, options);
|
|
1913
|
+
}
|
|
1914
|
+
for (const [label, options] of pickerGroups) tree.push({
|
|
1915
|
+
label,
|
|
1916
|
+
nested: true,
|
|
1917
|
+
options
|
|
1918
|
+
});
|
|
1843
1919
|
const allowedParents = visibleCustomFieldParents == null ? null : new Set(visibleCustomFieldParents);
|
|
1844
1920
|
const customRoot = newNode();
|
|
1845
1921
|
for (const group of customGroups) {
|
|
1846
1922
|
if (allowedParents != null && !allowedParents.has(group.parent)) continue;
|
|
1847
1923
|
const description = group.parent !== "" ? group.parent : void 0;
|
|
1848
1924
|
for (const field of group.fields) {
|
|
1849
|
-
if (
|
|
1925
|
+
if (field.pickerGroup != null || excluded?.has(field.id)) continue;
|
|
1850
1926
|
insertField(customRoot, field, description);
|
|
1851
1927
|
}
|
|
1852
1928
|
}
|
|
1853
1929
|
const customOptions = nodeToOptions(customRoot);
|
|
1854
|
-
if (customOptions.length > 0)
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1930
|
+
if (customOptions.length > 0) {
|
|
1931
|
+
const existingGroup = pickerGroups.get(fieldsLabel);
|
|
1932
|
+
if (existingGroup != null) existingGroup.push(...customOptions);
|
|
1933
|
+
else tree.push({
|
|
1934
|
+
label: fieldsLabel,
|
|
1935
|
+
nested: true,
|
|
1936
|
+
options: customOptions
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1859
1939
|
return tree;
|
|
1860
1940
|
}
|
|
1861
1941
|
//#endregion
|
|
@@ -1876,17 +1956,45 @@ function RuleEditorFields({ registry, dateTimesEnabled, field, groupIndex, ruleI
|
|
|
1876
1956
|
const strings = usePDSStrings();
|
|
1877
1957
|
const minutePrecisionValue = field != null && isMinutePrecisionDate(field, rule.operator, dateTimesEnabled);
|
|
1878
1958
|
const fieldOptions = useMemo(() => buildFieldPickerOptions(registry, void 0, void 0, strings.fields), [registry, strings.fields]);
|
|
1959
|
+
const optionDisabledReason = useCallback((option) => registry.get(option.value)?.disabledReason, [registry]);
|
|
1960
|
+
const operatorOptions = useMemo(() => operators.map((operator) => ({
|
|
1961
|
+
label: getOperatorLabel(operator, field?.type, strings, field),
|
|
1962
|
+
value: operator
|
|
1963
|
+
})), [
|
|
1964
|
+
operators,
|
|
1965
|
+
field,
|
|
1966
|
+
strings
|
|
1967
|
+
]);
|
|
1968
|
+
const handleFieldChange = useCallback((next) => {
|
|
1969
|
+
if (next != null && registry.get(next)?.disabledReason == null) onFieldChange(groupIndex, ruleIndex, next);
|
|
1970
|
+
}, [
|
|
1971
|
+
registry,
|
|
1972
|
+
onFieldChange,
|
|
1973
|
+
groupIndex,
|
|
1974
|
+
ruleIndex
|
|
1975
|
+
]);
|
|
1976
|
+
const handleOperatorChange = useCallback((next) => {
|
|
1977
|
+
if (next != null) onOperatorChange(groupIndex, ruleIndex, next);
|
|
1978
|
+
}, [
|
|
1979
|
+
onOperatorChange,
|
|
1980
|
+
groupIndex,
|
|
1981
|
+
ruleIndex
|
|
1982
|
+
]);
|
|
1983
|
+
const handleValueChange = useCallback((next, relativeDate) => onValueChange(groupIndex, ruleIndex, next, relativeDate), [
|
|
1984
|
+
onValueChange,
|
|
1985
|
+
groupIndex,
|
|
1986
|
+
ruleIndex
|
|
1987
|
+
]);
|
|
1879
1988
|
return /* @__PURE__ */ jsxs(StatementFields, { children: [
|
|
1880
1989
|
/* @__PURE__ */ jsx(ComboboxField, {
|
|
1881
|
-
label: strings.
|
|
1990
|
+
label: strings.field,
|
|
1882
1991
|
labelProps: { size },
|
|
1883
1992
|
"aria-label": strings.fieldForRule(ruleIndex + 1, groupIndex + 1),
|
|
1884
1993
|
size,
|
|
1885
1994
|
options: fieldOptions,
|
|
1995
|
+
optionDisabledReason,
|
|
1886
1996
|
value: rule.fieldId,
|
|
1887
|
-
onChange:
|
|
1888
|
-
if (typeof next === "string") onFieldChange(groupIndex, ruleIndex, next);
|
|
1889
|
-
},
|
|
1997
|
+
onChange: handleFieldChange,
|
|
1890
1998
|
placeholder: strings.selectField,
|
|
1891
1999
|
portal: false
|
|
1892
2000
|
}),
|
|
@@ -1895,14 +2003,9 @@ function RuleEditorFields({ registry, dateTimesEnabled, field, groupIndex, ruleI
|
|
|
1895
2003
|
labelProps: { size },
|
|
1896
2004
|
"aria-label": strings.operatorForRule(ruleIndex + 1, groupIndex + 1),
|
|
1897
2005
|
size,
|
|
1898
|
-
options:
|
|
1899
|
-
label: getOperatorLabel(op, field?.type, strings),
|
|
1900
|
-
value: op
|
|
1901
|
-
})),
|
|
2006
|
+
options: operatorOptions,
|
|
1902
2007
|
value: rule.operator,
|
|
1903
|
-
onChange:
|
|
1904
|
-
if (typeof next === "string") onOperatorChange(groupIndex, ruleIndex, next);
|
|
1905
|
-
},
|
|
2008
|
+
onChange: handleOperatorChange,
|
|
1906
2009
|
portal: false
|
|
1907
2010
|
}) : /* @__PURE__ */ jsx(FormField, {
|
|
1908
2011
|
label: strings.operator,
|
|
@@ -1910,16 +2013,16 @@ function RuleEditorFields({ registry, dateTimesEnabled, field, groupIndex, ruleI
|
|
|
1910
2013
|
children: /* @__PURE__ */ jsx(Input_default, {
|
|
1911
2014
|
size,
|
|
1912
2015
|
"aria-label": strings.operatorForRule(ruleIndex + 1, groupIndex + 1),
|
|
1913
|
-
value: getOperatorLabel(rule.operator, field?.type, strings),
|
|
2016
|
+
value: getOperatorLabel(rule.operator, field?.type, strings, field),
|
|
1914
2017
|
disabled: true,
|
|
1915
2018
|
readOnly: true
|
|
1916
2019
|
})
|
|
1917
2020
|
}),
|
|
1918
|
-
field && !isValuelessOperator(rule.operator) ? /* @__PURE__ */ jsx(FormField, {
|
|
2021
|
+
field && !isValuelessOperator(rule.operator, field) ? /* @__PURE__ */ jsx(FormField, {
|
|
1919
2022
|
label: strings.value,
|
|
1920
2023
|
labelProps: { size },
|
|
1921
2024
|
configField: minutePrecisionValue ? false : void 0,
|
|
1922
|
-
children: /* @__PURE__ */ jsx(Fragment$1, { children: renderValueControl(field, rule.operator, rule.value,
|
|
2025
|
+
children: /* @__PURE__ */ jsx(Fragment$1, { children: renderValueControl(field, rule.operator, rule.value, handleValueChange, rule.relativeDate) })
|
|
1923
2026
|
}) : null
|
|
1924
2027
|
] });
|
|
1925
2028
|
}
|
|
@@ -1933,14 +2036,14 @@ function AdvancedFilterRuleRow({ registry, dateTimesEnabled, groupIndex, ruleInd
|
|
|
1933
2036
|
const operatorConfigurable = field ? fieldHasMultipleOperators(field) : true;
|
|
1934
2037
|
const condition = ruleIndex === 0 ? strings.conditionIf : strings.conditionAnd;
|
|
1935
2038
|
const rowId = `${groupIndex}-${ruleIndex}`;
|
|
1936
|
-
const valueDisplay = isValuelessOperator(rule.operator) ? void 0 : valueDisplayString(rule.value, registry.optionLabelsFor(rule.fieldId), carriesDateRange(rule.operator, field?.type) ? rule.relativeDate : void 0, field?.type, {
|
|
2039
|
+
const valueDisplay = isValuelessOperator(rule.operator, field) ? void 0 : valueDisplayString(rule.value, registry.optionLabelsFor(rule.fieldId), carriesDateRange(rule.operator, field?.type) ? rule.relativeDate : void 0, field?.type, {
|
|
1937
2040
|
locale,
|
|
1938
2041
|
strings
|
|
1939
2042
|
});
|
|
1940
2043
|
const textValue = [
|
|
1941
2044
|
condition,
|
|
1942
2045
|
field?.label ?? rule.fieldId,
|
|
1943
|
-
getOperatorLabel(rule.operator, field?.type, strings),
|
|
2046
|
+
getOperatorLabel(rule.operator, field?.type, strings, field),
|
|
1944
2047
|
valueDisplay
|
|
1945
2048
|
].filter(Boolean).join(" ");
|
|
1946
2049
|
return /* @__PURE__ */ jsx(ListBox.LogicRow, {
|
|
@@ -1948,7 +2051,7 @@ function AdvancedFilterRuleRow({ registry, dateTimesEnabled, groupIndex, ruleInd
|
|
|
1948
2051
|
condition,
|
|
1949
2052
|
hideCondition: true,
|
|
1950
2053
|
attributeName: field?.label ?? rule.fieldId,
|
|
1951
|
-
operator: getOperatorLabel(rule.operator, field?.type, strings),
|
|
2054
|
+
operator: getOperatorLabel(rule.operator, field?.type, strings, field),
|
|
1952
2055
|
matchLevelName: valueDisplay,
|
|
1953
2056
|
textValue,
|
|
1954
2057
|
size,
|
|
@@ -2200,11 +2303,11 @@ const AdvancedFilterRulesPopover = ({ registry, compound, onChange, trigger, ope
|
|
|
2200
2303
|
onOpenChange?.(next);
|
|
2201
2304
|
}, [isControlled, onOpenChange]);
|
|
2202
2305
|
const baseId = useMemo(() => uniqueId("advanced-filter-rules__"), []);
|
|
2203
|
-
const fields = registry.all();
|
|
2306
|
+
const fields = useMemo(() => registry.all().filter((field) => field.disabledReason == null), [registry]);
|
|
2204
2307
|
const handleAddOrGroup = useCallback(() => {
|
|
2205
2308
|
const firstField = fields[0];
|
|
2206
2309
|
if (!firstField) return;
|
|
2207
|
-
const operator = registry.reconcileOperator(firstField.id, "is");
|
|
2310
|
+
const operator = firstField.condition != null ? registry.defaultOperatorFor(firstField.id) : registry.reconcileOperator(firstField.id, "is");
|
|
2208
2311
|
const groupIndex = compound.groups.length;
|
|
2209
2312
|
onChange(addRuleToGroup(compound, groupIndex, {
|
|
2210
2313
|
fieldId: firstField.id,
|
|
@@ -2221,7 +2324,7 @@ const AdvancedFilterRulesPopover = ({ registry, compound, onChange, trigger, ope
|
|
|
2221
2324
|
const handleAddRuleToGroup = useCallback((groupIndex) => {
|
|
2222
2325
|
const firstField = fields[0];
|
|
2223
2326
|
if (!firstField) return;
|
|
2224
|
-
const operator = registry.reconcileOperator(firstField.id, "is");
|
|
2327
|
+
const operator = firstField.condition != null ? registry.defaultOperatorFor(firstField.id) : registry.reconcileOperator(firstField.id, "is");
|
|
2225
2328
|
const newRowId = `${groupIndex}-${compound.groups[groupIndex]?.rules.length ?? 0}`;
|
|
2226
2329
|
onChange(addRuleToGroup(compound, groupIndex, {
|
|
2227
2330
|
fieldId: firstField.id,
|
|
@@ -2243,7 +2346,7 @@ const AdvancedFilterRulesPopover = ({ registry, compound, onChange, trigger, ope
|
|
|
2243
2346
|
}, [compound, applyCompoundChange]);
|
|
2244
2347
|
const handleFieldChange = useCallback((groupIndex, ruleIndex, nextFieldId) => {
|
|
2245
2348
|
const field = registry.get(nextFieldId);
|
|
2246
|
-
if (!field) return;
|
|
2349
|
+
if (!field || field.disabledReason != null) return;
|
|
2247
2350
|
const prev = compound.groups[groupIndex]?.rules[ruleIndex];
|
|
2248
2351
|
if (!prev) return;
|
|
2249
2352
|
const operator = registry.reconcileOperator(field.id, prev.operator);
|
|
@@ -2301,9 +2404,11 @@ const AdvancedFilterRulesPopover = ({ registry, compound, onChange, trigger, ope
|
|
|
2301
2404
|
if (event.key !== "Enter") return;
|
|
2302
2405
|
if (selectedRowKey != null) {
|
|
2303
2406
|
event.preventDefault();
|
|
2304
|
-
closeSelectedRow();
|
|
2305
2407
|
requestAnimationFrame(() => {
|
|
2306
|
-
|
|
2408
|
+
closeSelectedRow();
|
|
2409
|
+
requestAnimationFrame(() => {
|
|
2410
|
+
popoverContentRef.current?.focus();
|
|
2411
|
+
});
|
|
2307
2412
|
});
|
|
2308
2413
|
return;
|
|
2309
2414
|
}
|
|
@@ -2356,6 +2461,7 @@ const AdvancedFilterRulesPopover = ({ registry, compound, onChange, trigger, ope
|
|
|
2356
2461
|
})
|
|
2357
2462
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
2358
2463
|
size: subtleIconSize,
|
|
2464
|
+
disabled: fields.length === 0,
|
|
2359
2465
|
onClick: () => handleAddRuleToGroup(groupIndex),
|
|
2360
2466
|
"aria-label": strings.addRuleToFilterGroup(groupIndex + 1),
|
|
2361
2467
|
"data-test": `advanced-filter-rules__add-rule-${groupIndex}`,
|
|
@@ -2398,6 +2504,7 @@ const AdvancedFilterRulesPopover = ({ registry, compound, onChange, trigger, ope
|
|
|
2398
2504
|
width: "auto",
|
|
2399
2505
|
prefixIcon: /* @__PURE__ */ jsx(PlusIcon, {}),
|
|
2400
2506
|
onClick: handleAddOrGroup,
|
|
2507
|
+
disabled: fields.length === 0,
|
|
2401
2508
|
"data-test": "advanced-filter-rules__add-or-group",
|
|
2402
2509
|
children: strings.orGroup
|
|
2403
2510
|
}) })] })]
|
|
@@ -2844,7 +2951,7 @@ function numericDisplayValue(value) {
|
|
|
2844
2951
|
* rule actually carries when focus leaves.
|
|
2845
2952
|
*
|
|
2846
2953
|
* `onChange` is debounced (300ms) to avoid committing on every keystroke;
|
|
2847
|
-
* the debounce flushes on blur and on unmount
|
|
2954
|
+
* the debounce flushes on blur or Enter and cancels on unmount.
|
|
2848
2955
|
*/
|
|
2849
2956
|
const FloatValueControl = ({ field, operator, value, onChange, ariaLabel }) => {
|
|
2850
2957
|
const strings = usePDSStrings();
|
|
@@ -2872,6 +2979,9 @@ const FloatValueControl = ({ field, operator, value, onChange, ariaLabel }) => {
|
|
|
2872
2979
|
if (!Number.isFinite(parsed)) return;
|
|
2873
2980
|
debouncedOnChange(parsed);
|
|
2874
2981
|
}, [debouncedOnChange]);
|
|
2982
|
+
const handleKeyDown = useCallback((event) => {
|
|
2983
|
+
if (event.key === "Enter" && !event.defaultPrevented && !event.nativeEvent.isComposing) debouncedOnChange.flush();
|
|
2984
|
+
}, [debouncedOnChange]);
|
|
2875
2985
|
if (isValuelessOperator(operator)) return null;
|
|
2876
2986
|
return /* @__PURE__ */ jsx(Input_default, {
|
|
2877
2987
|
type: "number",
|
|
@@ -2882,6 +2992,7 @@ const FloatValueControl = ({ field, operator, value, onChange, ariaLabel }) => {
|
|
|
2882
2992
|
"aria-label": ariaLabel ?? strings.fieldValue(field.label),
|
|
2883
2993
|
value: localValue,
|
|
2884
2994
|
onChange: (e) => handleChange(e.target.value),
|
|
2995
|
+
onKeyDown: handleKeyDown,
|
|
2885
2996
|
onFocus: () => {
|
|
2886
2997
|
isFocusedRef.current = true;
|
|
2887
2998
|
},
|
|
@@ -2916,7 +3027,7 @@ const FloatValueControl = ({ field, operator, value, onChange, ariaLabel }) => {
|
|
|
2916
3027
|
* the user's next keystroke.
|
|
2917
3028
|
*
|
|
2918
3029
|
* `onChange` is debounced (300ms) to avoid committing on every keystroke;
|
|
2919
|
-
* the debounce flushes on blur and on unmount
|
|
3030
|
+
* the debounce flushes on blur or Enter and cancels on unmount.
|
|
2920
3031
|
*/
|
|
2921
3032
|
const IntegerValueControl = ({ field, operator, value, onChange, ariaLabel }) => {
|
|
2922
3033
|
const strings = usePDSStrings();
|
|
@@ -2944,6 +3055,9 @@ const IntegerValueControl = ({ field, operator, value, onChange, ariaLabel }) =>
|
|
|
2944
3055
|
if (!Number.isFinite(parsed)) return;
|
|
2945
3056
|
debouncedOnChange(Math.trunc(parsed));
|
|
2946
3057
|
}, [debouncedOnChange]);
|
|
3058
|
+
const handleKeyDown = useCallback((event) => {
|
|
3059
|
+
if (event.key === "Enter" && !event.defaultPrevented && !event.nativeEvent.isComposing) debouncedOnChange.flush();
|
|
3060
|
+
}, [debouncedOnChange]);
|
|
2947
3061
|
if (isValuelessOperator(operator)) return null;
|
|
2948
3062
|
return /* @__PURE__ */ jsx(Input_default, {
|
|
2949
3063
|
type: "number",
|
|
@@ -2954,6 +3068,7 @@ const IntegerValueControl = ({ field, operator, value, onChange, ariaLabel }) =>
|
|
|
2954
3068
|
"aria-label": ariaLabel ?? strings.fieldValue(field.label),
|
|
2955
3069
|
value: localValue,
|
|
2956
3070
|
onChange: (e) => handleChange(e.target.value),
|
|
3071
|
+
onKeyDown: handleKeyDown,
|
|
2957
3072
|
onFocus: () => {
|
|
2958
3073
|
isFocusedRef.current = true;
|
|
2959
3074
|
},
|
|
@@ -2996,7 +3111,7 @@ function StringValueControl({ field, operator, value, onChange, ariaLabel, input
|
|
|
2996
3111
|
debouncedOnChange.flush();
|
|
2997
3112
|
},
|
|
2998
3113
|
onKeyDown: (event) => {
|
|
2999
|
-
if (event.key === "Enter") debouncedOnChange.flush();
|
|
3114
|
+
if (event.key === "Enter" && !event.defaultPrevented && !event.nativeEvent.isComposing) debouncedOnChange.flush();
|
|
3000
3115
|
}
|
|
3001
3116
|
});
|
|
3002
3117
|
}
|
|
@@ -3018,8 +3133,27 @@ const RESOLVERS = {
|
|
|
3018
3133
|
array: (opts) => /* @__PURE__ */ jsx(ArrayValueControl, { ...opts })
|
|
3019
3134
|
};
|
|
3020
3135
|
function resolveValueControl(opts, hostResolver) {
|
|
3136
|
+
if (opts.field.condition != null && isValuelessOperator(opts.operator, opts.field)) return null;
|
|
3021
3137
|
const hostControl = hostResolver?.(opts);
|
|
3022
3138
|
if (hostControl != null) return hostControl;
|
|
3139
|
+
const config = getConditionOperator(opts.field, opts.operator);
|
|
3140
|
+
if (config != null) {
|
|
3141
|
+
if (config.valueType === "string_array") return opts.field.options != null ? /* @__PURE__ */ jsx(ChoicesValueControl, {
|
|
3142
|
+
multiple: true,
|
|
3143
|
+
...opts,
|
|
3144
|
+
operator: "is"
|
|
3145
|
+
}) : null;
|
|
3146
|
+
const type = config.valueType === "number" ? "float" : config.valueType;
|
|
3147
|
+
if (type === "none") return null;
|
|
3148
|
+
return RESOLVERS[type]?.({
|
|
3149
|
+
...opts,
|
|
3150
|
+
operator: "is",
|
|
3151
|
+
field: {
|
|
3152
|
+
...opts.field,
|
|
3153
|
+
type
|
|
3154
|
+
}
|
|
3155
|
+
}) ?? null;
|
|
3156
|
+
}
|
|
3023
3157
|
const renderer = RESOLVERS[opts.field.type];
|
|
3024
3158
|
if (!renderer) return null;
|
|
3025
3159
|
return renderer(opts);
|
|
@@ -3063,10 +3197,11 @@ const FilterPickerMenu = ({ registry, onPickField, triggerLabel, compact = false
|
|
|
3063
3197
|
unfilteredOptions,
|
|
3064
3198
|
strings.fields
|
|
3065
3199
|
]);
|
|
3200
|
+
const optionDisabledReason = useCallback((option) => registry.get(option.value)?.disabledReason, [registry]);
|
|
3066
3201
|
const handleChange = useCallback((value) => {
|
|
3067
3202
|
if (value == null) return;
|
|
3068
3203
|
const field = registry.get(value);
|
|
3069
|
-
if (!field) return;
|
|
3204
|
+
if (!field || field.disabledReason != null) return;
|
|
3070
3205
|
onPickField(field);
|
|
3071
3206
|
}, [registry, onPickField]);
|
|
3072
3207
|
if (options.length === 0 && unfilteredOptions.length > 0) return null;
|
|
@@ -3088,6 +3223,7 @@ const FilterPickerMenu = ({ registry, onPickField, triggerLabel, compact = false
|
|
|
3088
3223
|
$isOpen: false,
|
|
3089
3224
|
children: /* @__PURE__ */ jsx(Combobox, {
|
|
3090
3225
|
options,
|
|
3226
|
+
optionDisabledReason,
|
|
3091
3227
|
value: null,
|
|
3092
3228
|
onChange: handleChange,
|
|
3093
3229
|
size: resolvedSize,
|
|
@@ -3347,9 +3483,10 @@ function normalizeValueToDisplay(value, optionLabels, relativeDate, fieldType, s
|
|
|
3347
3483
|
*/
|
|
3348
3484
|
function buildAccessibleName(field, rule, displayedValues, strings = DEFAULT_COMMON_STRINGS) {
|
|
3349
3485
|
if (rule == null) return field.label;
|
|
3350
|
-
if (
|
|
3351
|
-
|
|
3352
|
-
|
|
3486
|
+
if (field.condition != null && !hasCompleteConditionValue(rule, field)) return field.label;
|
|
3487
|
+
if (!isValuelessOperator(rule.operator, field) && displayedValues.length === 0) return field.label;
|
|
3488
|
+
const operatorLabel = getOperatorLabel(rule.operator, field.type, strings, field);
|
|
3489
|
+
if (isValuelessOperator(rule.operator, field)) return `${field.label} ${operatorLabel}`;
|
|
3353
3490
|
return `${field.label} ${operatorLabel} ${displayedValues.join(", ")}`;
|
|
3354
3491
|
}
|
|
3355
3492
|
const FilterPill = forwardRef(function FilterPill({ field, rule, onClick, onDismiss, variant = "default", optionLabels, size, ...rest }, ref) {
|
|
@@ -3357,16 +3494,16 @@ const FilterPill = forwardRef(function FilterPill({ field, rule, onClick, onDism
|
|
|
3357
3494
|
const resolvedSize = useFilterBarSize(size);
|
|
3358
3495
|
const strings = usePDSStrings();
|
|
3359
3496
|
const locale = usePDSLocale();
|
|
3360
|
-
const displayedValues = useMemo(() => rule && !isValuelessOperator(rule.operator) ? normalizeValueToDisplay(rule.value, optionLabels, carriesDateRange(rule.operator, field?.type) ? rule.relativeDate : void 0, field?.type, strings, locale) : [], [
|
|
3497
|
+
const displayedValues = useMemo(() => rule && !isValuelessOperator(rule.operator, field) ? normalizeValueToDisplay(rule.value, optionLabels, carriesDateRange(rule.operator, field?.type) ? rule.relativeDate : void 0, field?.type, strings, locale) : [], [
|
|
3361
3498
|
rule,
|
|
3362
3499
|
optionLabels,
|
|
3363
|
-
field
|
|
3500
|
+
field,
|
|
3364
3501
|
strings,
|
|
3365
3502
|
locale
|
|
3366
3503
|
]);
|
|
3367
3504
|
const accessibleName = buildAccessibleName(field, rule, displayedValues, strings);
|
|
3368
3505
|
const hasRule = rule != null;
|
|
3369
|
-
const isComplete = hasRule && (isValuelessOperator(rule.operator) || displayedValues.length > 0);
|
|
3506
|
+
const isComplete = hasRule && (field.condition != null ? hasCompleteConditionValue(rule, field) : isValuelessOperator(rule.operator, field) || displayedValues.length > 0);
|
|
3370
3507
|
const firstValue = displayedValues[0];
|
|
3371
3508
|
const overflowValues = displayedValues.slice(1);
|
|
3372
3509
|
const overflowTooltipId = `${reactId}-overflow`;
|
|
@@ -3381,8 +3518,8 @@ const FilterPill = forwardRef(function FilterPill({ field, rule, onClick, onDism
|
|
|
3381
3518
|
...rest,
|
|
3382
3519
|
children: [
|
|
3383
3520
|
/* @__PURE__ */ jsx(FieldLabel, { children: /* @__PURE__ */ jsx(TruncatedText, { children: field.label }) }),
|
|
3384
|
-
isComplete && hasRule && /* @__PURE__ */ jsx(OperatorLabel, { children: getOperatorLabel(rule.operator, field.type, strings) }),
|
|
3385
|
-
isComplete && hasRule && !isValuelessOperator(rule.operator) && firstValue != null && /* @__PURE__ */ jsxs(ValueChipGroup, { children: [/* @__PURE__ */ jsx(ValueChip, {
|
|
3521
|
+
isComplete && hasRule && /* @__PURE__ */ jsx(OperatorLabel, { children: getOperatorLabel(rule.operator, field.type, strings, field) }),
|
|
3522
|
+
isComplete && hasRule && !isValuelessOperator(rule.operator, field) && firstValue != null && /* @__PURE__ */ jsxs(ValueChipGroup, { children: [/* @__PURE__ */ jsx(ValueChip, {
|
|
3386
3523
|
$variant: variant,
|
|
3387
3524
|
$size: resolvedSize,
|
|
3388
3525
|
children: /* @__PURE__ */ jsx(TruncatedText, { children: firstValue })
|
|
@@ -3519,10 +3656,10 @@ const Footer = styled(HStack).attrs({
|
|
|
3519
3656
|
* back through `onChangeOperator` and forwards open/close transitions
|
|
3520
3657
|
* through Radix's controlled props.
|
|
3521
3658
|
*/
|
|
3522
|
-
const FilterPopover = ({ field, operator, onChangeOperator, valueControlSlot, onClose, trigger, open, onOpenChange, size, wide = false }) => {
|
|
3659
|
+
const FilterPopover = ({ field, operator, onChangeOperator, valueControlSlot, onClose, onApply, trigger, open, onOpenChange, size, wide = false }) => {
|
|
3523
3660
|
const strings = usePDSStrings();
|
|
3524
3661
|
const resolvedSize = useFilterBarSize(size);
|
|
3525
|
-
const valueless = isValuelessOperator(operator);
|
|
3662
|
+
const valueless = isValuelessOperator(operator, field);
|
|
3526
3663
|
const CaretIcon = resolvedSize === "sm" ? CaretDownIcon$1 : CaretDownIcon;
|
|
3527
3664
|
const InfoIcon = resolvedSize === "sm" ? CircleInfoIcon$1 : CircleInfoIcon;
|
|
3528
3665
|
const showOperatorSelector = fieldHasMultipleOperators(field);
|
|
@@ -3532,6 +3669,7 @@ const FilterPopover = ({ field, operator, onChangeOperator, valueControlSlot, on
|
|
|
3532
3669
|
if (!next) onClose();
|
|
3533
3670
|
}, [onOpenChange, onClose]);
|
|
3534
3671
|
const valueSlotRef = useRef(null);
|
|
3672
|
+
const applyButtonRef = useRef(null);
|
|
3535
3673
|
useEffect(() => {
|
|
3536
3674
|
if (open !== true || valueless) return;
|
|
3537
3675
|
const handle = requestAnimationFrame(() => {
|
|
@@ -3545,16 +3683,19 @@ const FilterPopover = ({ field, operator, onChangeOperator, valueControlSlot, on
|
|
|
3545
3683
|
field.id,
|
|
3546
3684
|
valueless
|
|
3547
3685
|
]);
|
|
3548
|
-
const handleKeyDown = (event) => {
|
|
3549
|
-
if (event.key !== "Enter") return;
|
|
3686
|
+
const handleKeyDown = useCallback((event) => {
|
|
3687
|
+
if (event.key !== "Enter" || event.defaultPrevented || event.nativeEvent.isComposing) return;
|
|
3550
3688
|
const target = event.target;
|
|
3551
3689
|
if (!target || target.tagName !== "INPUT") return;
|
|
3552
3690
|
const input = target;
|
|
3553
|
-
if (input.type === "checkbox" || input.type === "radio") return;
|
|
3554
|
-
if (input.getAttribute("role") === "combobox") return;
|
|
3691
|
+
if (input.type === "checkbox" || input.type === "radio" || input.getAttribute("role") === "combobox") return;
|
|
3555
3692
|
event.preventDefault();
|
|
3693
|
+
if (applyButtonRef.current != null) {
|
|
3694
|
+
applyButtonRef.current.click();
|
|
3695
|
+
return;
|
|
3696
|
+
}
|
|
3556
3697
|
handleOpenChange(false);
|
|
3557
|
-
};
|
|
3698
|
+
}, [handleOpenChange]);
|
|
3558
3699
|
return /* @__PURE__ */ jsxs(Popover_default, {
|
|
3559
3700
|
open,
|
|
3560
3701
|
onOpenChange: handleOpenChange,
|
|
@@ -3578,31 +3719,43 @@ const FilterPopover = ({ field, operator, onChangeOperator, valueControlSlot, on
|
|
|
3578
3719
|
children: [/* @__PURE__ */ jsxs(Main, {
|
|
3579
3720
|
$valueless: valueless,
|
|
3580
3721
|
"data-test": "filter-popover__main",
|
|
3581
|
-
children: [
|
|
3582
|
-
|
|
3583
|
-
children: [/* @__PURE__ */ jsx(FieldTypeLabel, {
|
|
3722
|
+
children: [
|
|
3723
|
+
/* @__PURE__ */ jsxs(HeaderRow, {
|
|
3584
3724
|
$size: resolvedSize,
|
|
3585
|
-
children: /* @__PURE__ */ jsx(
|
|
3586
|
-
}), showOperatorSelector ? /* @__PURE__ */ jsx(OperatorMenu, {
|
|
3587
|
-
trigger: /* @__PURE__ */ jsxs(InlineOperatorTrigger, {
|
|
3588
|
-
type: "button",
|
|
3589
|
-
"aria-label": strings.operator,
|
|
3725
|
+
children: [/* @__PURE__ */ jsx(FieldTypeLabel, {
|
|
3590
3726
|
$size: resolvedSize,
|
|
3591
|
-
children:
|
|
3592
|
-
}),
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3727
|
+
children: /* @__PURE__ */ jsx(TruncatedText, { children: field.label })
|
|
3728
|
+
}), showOperatorSelector ? /* @__PURE__ */ jsx(OperatorMenu, {
|
|
3729
|
+
trigger: /* @__PURE__ */ jsxs(InlineOperatorTrigger, {
|
|
3730
|
+
type: "button",
|
|
3731
|
+
"aria-label": strings.operator,
|
|
3732
|
+
$size: resolvedSize,
|
|
3733
|
+
children: [getOperatorLabel(operator, field.type, strings, field), /* @__PURE__ */ jsx(CaretIcon, { "aria-hidden": "true" })]
|
|
3734
|
+
}),
|
|
3735
|
+
align: "start",
|
|
3736
|
+
portal: true,
|
|
3737
|
+
zIndex: Z_INDICES.layeredDropdown,
|
|
3738
|
+
children: operatorOptions.map((op) => /* @__PURE__ */ jsx(DropdownMenu_default.Item, {
|
|
3739
|
+
size: resolvedSize,
|
|
3740
|
+
onClick: () => onChangeOperator(op),
|
|
3741
|
+
children: getOperatorLabel(op, field.type, strings, field)
|
|
3742
|
+
}, op))
|
|
3743
|
+
}) : /* @__PURE__ */ jsx("span", { children: getOperatorLabel(operator, field.type, strings, field) })]
|
|
3744
|
+
}),
|
|
3745
|
+
!valueless ? /* @__PURE__ */ jsx(ValueSlot, {
|
|
3746
|
+
ref: valueSlotRef,
|
|
3747
|
+
children: valueControlSlot
|
|
3748
|
+
}) : null,
|
|
3749
|
+
onApply != null && /* @__PURE__ */ jsx(PopoverPrimitive.Close, {
|
|
3750
|
+
asChild: true,
|
|
3751
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
3752
|
+
ref: applyButtonRef,
|
|
3597
3753
|
size: resolvedSize,
|
|
3598
|
-
onClick:
|
|
3599
|
-
children:
|
|
3600
|
-
}
|
|
3601
|
-
})
|
|
3602
|
-
|
|
3603
|
-
ref: valueSlotRef,
|
|
3604
|
-
children: valueControlSlot
|
|
3605
|
-
}) : null]
|
|
3754
|
+
onClick: onApply,
|
|
3755
|
+
children: strings.applyFilter
|
|
3756
|
+
})
|
|
3757
|
+
})
|
|
3758
|
+
]
|
|
3606
3759
|
}), field.source === "custom" && field.parentRecordType != null && /* @__PURE__ */ jsxs(Footer, { children: [/* @__PURE__ */ jsx(InfoIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsxs(TruncatedText, { children: [
|
|
3607
3760
|
field.label,
|
|
3608
3761
|
" is a field on ",
|
|
@@ -3720,6 +3873,10 @@ function isEmptyState(state) {
|
|
|
3720
3873
|
const OPERATOR_SET = new Set([
|
|
3721
3874
|
"is",
|
|
3722
3875
|
"is_not",
|
|
3876
|
+
"gt",
|
|
3877
|
+
"gte",
|
|
3878
|
+
"lt",
|
|
3879
|
+
"lte",
|
|
3723
3880
|
"contains",
|
|
3724
3881
|
"does_not_contain",
|
|
3725
3882
|
"is_empty",
|
|
@@ -3758,7 +3915,7 @@ function isFilterRule(value) {
|
|
|
3758
3915
|
if (typeof value !== "object" || value == null) return false;
|
|
3759
3916
|
const v = value;
|
|
3760
3917
|
if (typeof v.fieldId !== "string" || v.fieldId.length === 0) return false;
|
|
3761
|
-
if (typeof v.operator !== "string" || !OPERATOR_SET.has(v.operator)) return false;
|
|
3918
|
+
if (typeof v.operator !== "string" || !OPERATOR_SET.has(v.operator) && !/^custom:.+/.test(v.operator)) return false;
|
|
3762
3919
|
if (!isFilterRuleValue(v.value)) return false;
|
|
3763
3920
|
return true;
|
|
3764
3921
|
}
|
|
@@ -3834,7 +3991,7 @@ function pruneToRegistry(state, registry) {
|
|
|
3834
3991
|
*/
|
|
3835
3992
|
function coerceBooleanRule(rule, registry) {
|
|
3836
3993
|
const field = registry.get(rule.fieldId);
|
|
3837
|
-
if (!field || field.type !== "boolean") return rule;
|
|
3994
|
+
if (!field || field.condition != null || field.type !== "boolean") return rule;
|
|
3838
3995
|
if (rule.operator === "is_true") return {
|
|
3839
3996
|
...rule,
|
|
3840
3997
|
operator: "is",
|
|
@@ -3864,9 +4021,16 @@ function coerceBooleanRules(state, registry) {
|
|
|
3864
4021
|
};
|
|
3865
4022
|
}
|
|
3866
4023
|
function isDraftRuleValue(rule, registry) {
|
|
3867
|
-
if (isValuelessOperator(rule.operator)) return false;
|
|
3868
4024
|
const field = registry.get(rule.fieldId);
|
|
3869
4025
|
if (!field) return false;
|
|
4026
|
+
const config = getConditionOperator(field, rule.operator);
|
|
4027
|
+
if (config != null) switch (config.valueType) {
|
|
4028
|
+
case "none":
|
|
4029
|
+
case "boolean": return false;
|
|
4030
|
+
case "string_array": return Array.isArray(rule.value) && rule.value.length === 0;
|
|
4031
|
+
default: return rule.value === "" || rule.value == null;
|
|
4032
|
+
}
|
|
4033
|
+
if (isValuelessOperator(rule.operator)) return false;
|
|
3870
4034
|
if (isRangeOperator(rule.operator)) return !isCompleteDateRange(rule.value);
|
|
3871
4035
|
switch (field.type) {
|
|
3872
4036
|
case "multi_choices":
|
|
@@ -3879,8 +4043,10 @@ function isDraftRuleValue(rule, registry) {
|
|
|
3879
4043
|
}
|
|
3880
4044
|
}
|
|
3881
4045
|
function isRuleAllowed(rule, registry, options = { allowDraftValues: false }) {
|
|
3882
|
-
|
|
4046
|
+
const field = registry.get(rule.fieldId);
|
|
4047
|
+
if (field == null) return false;
|
|
3883
4048
|
if (!registry.operatorsFor(rule.fieldId).includes(rule.operator)) return false;
|
|
4049
|
+
if (field.condition != null) return hasCompleteConditionValue(rule, field) || options.allowDraftValues && isDraftRuleValue(rule, registry);
|
|
3884
4050
|
if (isValuelessOperator(rule.operator)) return rule.value == null;
|
|
3885
4051
|
if (options.allowDraftValues && isDraftRuleValue(rule, registry)) return true;
|
|
3886
4052
|
if (isRangeOperator(rule.operator)) return isCompleteDateRange(rule.value);
|
|
@@ -3907,6 +4073,8 @@ function isRuleAllowed(rule, registry, options = { allowDraftValues: false }) {
|
|
|
3907
4073
|
* does not gate operator vocabulary or registry membership.
|
|
3908
4074
|
*/
|
|
3909
4075
|
function hasCompleteValue(rule, registry) {
|
|
4076
|
+
const field = registry.get(rule.fieldId);
|
|
4077
|
+
if (field?.condition != null) return hasCompleteConditionValue(rule, field);
|
|
3910
4078
|
if (isValuelessOperator(rule.operator)) return rule.value == null;
|
|
3911
4079
|
const { value } = rule;
|
|
3912
4080
|
if (value == null) return false;
|
|
@@ -4010,20 +4178,22 @@ function useFilterStateV2(options) {
|
|
|
4010
4178
|
...prev.all,
|
|
4011
4179
|
topLevelRules: [...prev.all.topLevelRules, added]
|
|
4012
4180
|
},
|
|
4013
|
-
heldIds: isHeldRule(added) ? withId(prev.heldIds, id) : prev.heldIds
|
|
4181
|
+
heldIds: registry.get(rule.fieldId)?.condition != null || isHeldRule(added, registry) ? withId(prev.heldIds, id) : prev.heldIds
|
|
4014
4182
|
}));
|
|
4015
4183
|
return id;
|
|
4016
|
-
}, []),
|
|
4017
|
-
updateTopLevelRule: useCallback((id,
|
|
4184
|
+
}, [registry]),
|
|
4185
|
+
updateTopLevelRule: useCallback((id, update) => {
|
|
4018
4186
|
setInternal((prev) => {
|
|
4019
4187
|
const idx = prev.all.topLevelRules.findIndex((r) => r.id === id);
|
|
4020
|
-
|
|
4188
|
+
const currentRule = prev.all.topLevelRules[idx];
|
|
4189
|
+
if (currentRule == null) return prev;
|
|
4190
|
+
const rule = typeof update === "function" ? update(currentRule) : update;
|
|
4021
4191
|
const topLevelRules = [...prev.all.topLevelRules];
|
|
4022
4192
|
topLevelRules[idx] = {
|
|
4023
4193
|
...rule,
|
|
4024
4194
|
id
|
|
4025
4195
|
};
|
|
4026
|
-
const heldIds = isHeldRule(rule) ? withId(prev.heldIds, id) : withoutId(prev.heldIds, id);
|
|
4196
|
+
const heldIds = isHeldRule(rule, registry) ? withId(prev.heldIds, id) : withoutId(prev.heldIds, id);
|
|
4027
4197
|
return {
|
|
4028
4198
|
all: {
|
|
4029
4199
|
...prev.all,
|
|
@@ -4032,7 +4202,7 @@ function useFilterStateV2(options) {
|
|
|
4032
4202
|
heldIds
|
|
4033
4203
|
};
|
|
4034
4204
|
});
|
|
4035
|
-
}, []),
|
|
4205
|
+
}, [registry]),
|
|
4036
4206
|
removeTopLevelRule: useCallback((id) => {
|
|
4037
4207
|
setInternal((prev) => {
|
|
4038
4208
|
const topLevelRules = prev.all.topLevelRules.filter((r) => r.id !== id);
|
|
@@ -4053,7 +4223,8 @@ function useFilterStateV2(options) {
|
|
|
4053
4223
|
* `''` and `[]` are values a user can choose, and a filter cleared to one is
|
|
4054
4224
|
* still a filter.
|
|
4055
4225
|
*/
|
|
4056
|
-
function isHeldRule(rule) {
|
|
4226
|
+
function isHeldRule(rule, registry) {
|
|
4227
|
+
if (registry.get(rule.fieldId)?.condition != null) return !hasCompleteValue(rule, registry);
|
|
4057
4228
|
return !isValuelessOperator(rule.operator) && rule.value == null;
|
|
4058
4229
|
}
|
|
4059
4230
|
function heldRulesOf(state) {
|
|
@@ -4247,6 +4418,7 @@ function FilterBar({ registry, initialState, onChange, advancedRulesEnabled = tr
|
|
|
4247
4418
|
onChangeRef.current = onChange;
|
|
4248
4419
|
}, [onChange]);
|
|
4249
4420
|
const { committedState } = filterState;
|
|
4421
|
+
const committedRuleIds = useMemo(() => new Set(committedState.topLevelRules.map((rule) => rule.id)), [committedState.topLevelRules]);
|
|
4250
4422
|
const lastReportedState = useRef(committedState);
|
|
4251
4423
|
useEffect(() => {
|
|
4252
4424
|
if (isEqual(lastReportedState.current, committedState)) return;
|
|
@@ -4255,13 +4427,15 @@ function FilterBar({ registry, initialState, onChange, advancedRulesEnabled = tr
|
|
|
4255
4427
|
}, [committedState]);
|
|
4256
4428
|
const pendingEditRuleIdRef = useRef(null);
|
|
4257
4429
|
const openedViaScrollIntoViewRef = useRef(false);
|
|
4258
|
-
const
|
|
4259
|
-
|
|
4430
|
+
const { addTopLevelRule } = filterState;
|
|
4431
|
+
const handlePickField = useCallback((field) => {
|
|
4432
|
+
const operator = registry.defaultOperatorFor(field.id);
|
|
4433
|
+
pendingEditRuleIdRef.current = addTopLevelRule({
|
|
4260
4434
|
fieldId: field.id,
|
|
4261
|
-
operator
|
|
4262
|
-
value: null
|
|
4435
|
+
operator,
|
|
4436
|
+
value: field.condition != null ? emptyValueForRule(field, operator) : null
|
|
4263
4437
|
});
|
|
4264
|
-
};
|
|
4438
|
+
}, [addTopLevelRule, registry]);
|
|
4265
4439
|
const hasPills = filterState.state.topLevelRules.length > 0;
|
|
4266
4440
|
const excludeFieldIds = useStableFieldIds(singleUseFields ? filterState.state.topLevelRules.map((rule) => rule.fieldId) : void 0);
|
|
4267
4441
|
const pillsScrollRef = useRef(null);
|
|
@@ -4409,6 +4583,7 @@ function FilterBar({ registry, initialState, onChange, advancedRulesEnabled = tr
|
|
|
4409
4583
|
dateTimesEnabled
|
|
4410
4584
|
}, valueControlResolver),
|
|
4411
4585
|
onClose: () => setEditingRuleId(null),
|
|
4586
|
+
onApply: field.condition != null && !committedRuleIds.has(rule.id) && hasCompleteValue(rule, registry) ? () => filterState.updateTopLevelRule(rule.id, (currentRule) => currentRule) : void 0,
|
|
4412
4587
|
open: isOpen,
|
|
4413
4588
|
onOpenChange: (open) => setEditingRuleId(open ? rule.id : null),
|
|
4414
4589
|
trigger: /* @__PURE__ */ jsx(FilterPill, {
|
|
@@ -4417,7 +4592,7 @@ function FilterBar({ registry, initialState, onChange, advancedRulesEnabled = tr
|
|
|
4417
4592
|
else pillNodesRef.current.delete(rule.id);
|
|
4418
4593
|
},
|
|
4419
4594
|
field,
|
|
4420
|
-
rule,
|
|
4595
|
+
rule: field.condition != null && !committedRuleIds.has(rule.id) ? null : rule,
|
|
4421
4596
|
variant: isOpen ? "active" : "default",
|
|
4422
4597
|
optionLabels,
|
|
4423
4598
|
onDismiss: () => filterState.removeTopLevelRule(rule.id)
|
|
@@ -4583,7 +4758,10 @@ var FieldRegistry = class {
|
|
|
4583
4758
|
}
|
|
4584
4759
|
/** Default operator for a registered field. Used when creating a new pill. */
|
|
4585
4760
|
defaultOperatorFor(fieldId) {
|
|
4586
|
-
const
|
|
4761
|
+
const field = this.getOrThrow(fieldId);
|
|
4762
|
+
const operators = getOperatorsForField(field);
|
|
4763
|
+
const defaultOperator = field.condition?.defaultOperator ?? operators[0];
|
|
4764
|
+
if (defaultOperator != null && !operators.includes(defaultOperator)) throw new Error(`FieldRegistry: default operator is not available for field "${fieldId}"`);
|
|
4587
4765
|
if (defaultOperator == null) throw new Error(`FieldRegistry: no operators available for field "${fieldId}"`);
|
|
4588
4766
|
return defaultOperator;
|
|
4589
4767
|
}
|
|
@@ -4754,4 +4932,4 @@ function decodeBase64(input) {
|
|
|
4754
4932
|
//#endregion
|
|
4755
4933
|
export { TableControlsProvider as A, getOperatorsForType as C, reconcileValueForOperator as D, isValuelessOperator as E, ControlBar as F, DataTableCompactBar as I, TableViewConfiguration as M, TableViewConfigurationDropdown as N, dateRuleIntent as O, TableControls as P, getOperatorsForField as S, isRangeOperator as T, FILTER_SIZE_TOKENS as _, encodeFilterStateToUrlParam as a, emptyValueForRule as b, FilterBar_default as c, isFilterStateV2 as d, pruneToRegistry as f, resolveValueControl as g, PillShell as h, decodeFilterStateFromUrl as i, useTableControls as j, TableControlsContext as k, useFilterStateV2 as l, isEmptyState as m, applyFilterStateToSearchParams as n, FieldRegistry as o, EMPTY_FILTER_STATE as p, decodeFilterStateFromString as r, buildFieldRegistry as s, FILTER_STATE_URL_PARAM as t, hasCompleteValue as u, useFilterBarSize as v, isCompleteDateRange as w, getDefaultOperatorForType as x, resolveDateRangeRuleValue as y };
|
|
4756
4934
|
|
|
4757
|
-
//# sourceMappingURL=TableControls-
|
|
4935
|
+
//# sourceMappingURL=TableControls-BtKBTGYR.mjs.map
|