@persona/design-system 0.7.2 → 0.8.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 +32 -0
- package/dist/Accordion.d.mts +1 -1
- package/dist/AccordionItem.d.mts +1 -1
- package/dist/{Action-Cyo6KCsS.d.mts → Action-B-AiHknZ.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-BD0Ut46g.mjs → Badge-COqUjFQu.mjs} +2 -2
- package/dist/{Badge-BD0Ut46g.mjs.map → Badge-COqUjFQu.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-CYXkrKXl.d.mts → Breadcrumb-DRFY46ZW.d.mts} +1 -1
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-CP7eUYUy.d.mts → Breadcrumbs-DUSbT1I7.d.mts} +2 -2
- package/dist/{Breadcrumbs-CrXfUK1V.mjs → Breadcrumbs-DXS7rU7_.mjs} +5 -5
- package/dist/{Breadcrumbs-CrXfUK1V.mjs.map → Breadcrumbs-DXS7rU7_.mjs.map} +1 -1
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-Dhiund3f.d.mts → Button-xZ6DC5XC.d.mts} +4 -4
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-CMeIZ0BO.d.mts → Calendar-dPmo2dkj.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-DCYB_mtR.d.mts → Card-CUeM8Lh8.d.mts} +3 -3
- package/dist/Card.d.mts +1 -1
- package/dist/{CardV2-M3o4BELp.mjs → CardV2-D9p7D7jX.mjs} +9 -7
- package/dist/{CardV2-M3o4BELp.mjs.map → CardV2-D9p7D7jX.mjs.map} +1 -1
- package/dist/{Checkbox-AjL7ucoR.mjs → Checkbox-DQynkc_I.mjs} +3 -3
- package/dist/{Checkbox-AjL7ucoR.mjs.map → Checkbox-DQynkc_I.mjs.map} +1 -1
- package/dist/{Checkbox-fWj7GkBl.d.mts → Checkbox-DoJpxPEz.d.mts} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-C2b9u955.mjs → Combobox-C_kCY3P3.mjs} +23 -10
- package/dist/Combobox-C_kCY3P3.mjs.map +1 -0
- package/dist/{Combobox-CC-Osr57.d.mts → Combobox-D7hyf-jA.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-Evo0FRxP.d.mts → ComboboxBase-BMCY6O7Y.d.mts} +8 -5
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-CvAc0FT3.d.mts → ComboboxMultiSelect-L0KYMkmm.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-CBm7x0oh.d.mts → ComboboxSingleSelect-v5oNrJ7M.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-D_2qMK4y.d.mts → CompactBar-DjFaUAsN.d.mts} +4 -4
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-Cz7GeTYd.mjs → ConfigFormGroup-DLOZOuLf.mjs} +2 -2
- package/dist/{ConfigFormGroup-Cz7GeTYd.mjs.map → ConfigFormGroup-DLOZOuLf.mjs.map} +1 -1
- package/dist/{ControlBar-B7j9sOr9.d.mts → ControlBar-Cegjxa6-.d.mts} +7 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable.d.mts +4 -3
- package/dist/{DateField-BamAk9_w.d.mts → DateField-Dk5ykLdr.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-IgiUI3Wj.mjs → DatePicker-C7z1yodK.mjs} +77 -42
- package/dist/DatePicker-C7z1yodK.mjs.map +1 -0
- package/dist/{DatePicker-C3xNSkPG.d.mts → DatePicker-Dtvv0V45.d.mts} +2 -2
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-C4QKMo2a.d.mts → DateRangePicker-HPYsa4wC.d.mts} +3 -3
- package/dist/DateRangePicker.d.mts +1 -1
- package/dist/DateRangeValueControl.d.mts +5 -3
- package/dist/DateValueControl.d.mts +8 -5
- package/dist/{DropdownButton-BWiXLMfD.mjs → DropdownButton-CQrFHOIW.mjs} +3 -3
- package/dist/{DropdownButton-BWiXLMfD.mjs.map → DropdownButton-CQrFHOIW.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-DL5ye-0m.d.mts → DropdownMenu-D1qvgGTZ.d.mts} +2 -2
- package/dist/{DropdownMenu-CuKSNxc9.mjs → DropdownMenu-rm9Nnxn7.mjs} +7 -2
- package/dist/DropdownMenu-rm9Nnxn7.mjs.map +1 -0
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-BA0-m_Wp.d.mts → ErrorProps-B8-Mqf1W.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-bKxrF1gC.d.mts → FieldRegistry-0LmSQ-jc.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-DhlBLWxw.d.mts → FilterBar-BMM4Swbt.d.mts} +11 -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 +1 -1
- package/dist/FloatValueControl.d.mts +1 -1
- package/dist/{FormControl-DnfZTli_.mjs → FormControl-DXrxoJLl.mjs} +3 -3
- package/dist/{FormControl-DnfZTli_.mjs.map → FormControl-DXrxoJLl.mjs.map} +1 -1
- package/dist/{FormControl-D5xyPkST.d.mts → FormControl-Dg8doZq2.d.mts} +2 -2
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +1 -1
- package/dist/{FormField-BJZUj6jg.d.mts → FormField-BeLigf9j.d.mts} +2 -2
- package/dist/{FormField-74TPV8-8.mjs → FormField-Crp3F-hv.mjs} +16 -16
- package/dist/{FormField-74TPV8-8.mjs.map → FormField-Crp3F-hv.mjs.map} +1 -1
- package/dist/FormField.d.mts +1 -1
- package/dist/{Grid-DOyYYsvk.mjs → Grid-eMLuyRzV.mjs} +1 -1
- package/dist/{Grid-DOyYYsvk.mjs.map → Grid-eMLuyRzV.mjs.map} +1 -1
- package/dist/{Header-BqEKkEp5.d.mts → Header-DxJ6TfPw.d.mts} +1 -1
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-mOVSuEB8.d.mts → HelperTooltip-DcyrpEZI.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/{HoverCopyableField-CN3gl0ny.mjs → HoverCopyableField-12bBuG-d.mjs} +3 -3
- package/dist/{HoverCopyableField-CN3gl0ny.mjs.map → HoverCopyableField-12bBuG-d.mjs.map} +1 -1
- package/dist/{IconButton-CjPFhpVG.d.mts → IconButton-BUMMN-gH.d.mts} +2 -2
- package/dist/{IconButton-CqTPMhjV.mjs → IconButton-CCLMYWVN.mjs} +1 -1
- package/dist/{IconButton-CqTPMhjV.mjs.map → IconButton-CCLMYWVN.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-CZ_6KWDN.d.mts → Input-2N2e5JCf.d.mts} +3 -3
- package/dist/{Input-C_3QwAAt.mjs → Input-Cl4o41k4.mjs} +7 -3
- package/dist/Input-Cl4o41k4.mjs.map +1 -0
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-lag6BM5h.d.mts → InputProps-TWzig3QO.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/Link-I9Bklen-.mjs +79 -0
- package/dist/Link-I9Bklen-.mjs.map +1 -0
- package/dist/Link.d.mts +1 -1
- package/dist/{ListBox-nYAdYVQx.d.mts → ListBox-BcoXOt73.d.mts} +3 -3
- package/dist/{ListBox-D4j4LCT3.mjs → ListBox-sqeLBiKS.mjs} +33 -16
- package/dist/ListBox-sqeLBiKS.mjs.map +1 -0
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +2 -2
- package/dist/{LoadingShimmer-Dizk2sZu.mjs → LoadingShimmer-dRSkdlqD.mjs} +13 -8
- package/dist/LoadingShimmer-dRSkdlqD.mjs.map +1 -0
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-k4ZPtjN0.d.mts → LogicRow-DXywXdYt.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +1 -1
- package/dist/{Menu-Bu7-KBhp.d.mts → Menu-BekLwm8w.d.mts} +3 -3
- package/dist/{Menu-Cd6oxjAe.mjs → Menu-CwlI7BMN.mjs} +1 -1
- package/dist/{Menu-Cd6oxjAe.mjs.map → Menu-CwlI7BMN.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/{Modal-BN0K8QXi.mjs → Modal-CMiFcXC9.mjs} +6 -4
- package/dist/Modal-CMiFcXC9.mjs.map +1 -0
- package/dist/{Modal-Dwq-QBw_.d.mts → Modal-ymxlGYKt.d.mts} +2 -2
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-BTtm3hRQ.mjs → PageHeader-D_0p7UK_.mjs} +2 -2
- package/dist/{PageHeader-BTtm3hRQ.mjs.map → PageHeader-D_0p7UK_.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageSelector-CeGC84N1.d.mts → PageSelector-Bxulu6vU.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-CPd4mSnw.mjs → Pagination-Co9CfyFQ.mjs} +5 -5
- package/dist/{Pagination-CPd4mSnw.mjs.map → Pagination-Co9CfyFQ.mjs.map} +1 -1
- package/dist/{Pagination-H-CcXrCD.d.mts → Pagination-Dg-4O7F7.d.mts} +2 -2
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-Dz4woKd8.mjs → Pii-JGV9gP95.mjs} +2 -2
- package/dist/{Pii-Dz4woKd8.mjs.map → Pii-JGV9gP95.mjs.map} +1 -1
- package/dist/{PillShell-BQC-k7Rl.d.mts → PillShell-BA7KK1zS.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-opVa9Xhc.mjs → Popover-ZAj03lws.mjs} +15 -2
- package/dist/Popover-ZAj03lws.mjs.map +1 -0
- package/dist/{ProgressIndicator-3A4Aqci6.mjs → ProgressIndicator-CQg08vuA.mjs} +3 -3
- package/dist/ProgressIndicator-CQg08vuA.mjs.map +1 -0
- package/dist/{ProgressIndicator-DbOLOaxJ.d.mts → ProgressIndicator-D85HQGSx.d.mts} +1 -1
- package/dist/ProgressIndicator.d.mts +1 -1
- package/dist/{PseudoClassProps-CHtBNv8B.d.mts → PseudoClassProps-BHs8TX_3.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-Cxt89w8s.mjs → Radio-CYV290JI.mjs} +2 -2
- package/dist/{Radio-Cxt89w8s.mjs.map → Radio-CYV290JI.mjs.map} +1 -1
- package/dist/{RadioGroup-BjrfVPZQ.d.mts → RadioGroup-Cq3KV1TN.d.mts} +1 -1
- package/dist/{RadioGroup-B6Cg1kdm.mjs → RadioGroup-lWMMtu9V.mjs} +2 -2
- package/dist/{RadioGroup-B6Cg1kdm.mjs.map → RadioGroup-lWMMtu9V.mjs.map} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/{RangeCalendar-CPnLaM-J.d.mts → RangeCalendar-Mh7h74Tp.d.mts} +2 -2
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/{RouterContext-CbvHIl4K.d.mts → RouterContext-B3IU1jb0.d.mts} +2 -2
- package/dist/RouterContext.d.mts +1 -1
- package/dist/{RouterLink-v9AG9fYa.d.mts → RouterLink-CwAqTLC2.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-CIjwmT8R.d.mts → SearchInput-BGyUUcoz.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-BcwfLuHA.mjs → SegmentedControl-BEbIcV3g.mjs} +3 -3
- package/dist/SegmentedControl-BEbIcV3g.mjs.map +1 -0
- package/dist/{SegmentedControl-Crr_aHAs.d.mts → SegmentedControl-DgDabSgr.d.mts} +1 -1
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-CJQeuCiF.d.mts → Select-wqTtGyga.d.mts} +3 -3
- package/dist/{Select-BstCz8P1.mjs → Select-yC2t_gZb.mjs} +10 -8
- package/dist/Select-yC2t_gZb.mjs.map +1 -0
- package/dist/Select.d.mts +1 -1
- package/dist/{Spinner-DplDSBqf.mjs → Spinner-BlAg8_OX.mjs} +1 -1
- package/dist/{Spinner-DplDSBqf.mjs.map → Spinner-BlAg8_OX.mjs.map} +1 -1
- package/dist/{Stack-ChsImaEY.mjs → Stack-Bkn0TUDe.mjs} +1 -1
- package/dist/{Stack-ChsImaEY.mjs.map → Stack-Bkn0TUDe.mjs.map} +1 -1
- package/dist/{Stack-RVptVTVi.d.mts → Stack-CYqjBXe8.d.mts} +1 -1
- package/dist/Stack.d.mts +1 -1
- package/dist/StatusIndicator-DT2zNbkp.mjs +315 -0
- package/dist/StatusIndicator-DT2zNbkp.mjs.map +1 -0
- package/dist/{Sticker-C3Eb13OQ.mjs → Sticker-BLbgJxcH.mjs} +5 -8
- package/dist/Sticker-BLbgJxcH.mjs.map +1 -0
- package/dist/{Sticker-BVX38LKi.d.mts → Sticker-BmyKaxwx.d.mts} +4 -4
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +1 -1
- package/dist/{TabBar-BepWbJHz.mjs → TabBar-Bj84q1Mr.mjs} +4 -7
- package/dist/{TabBar-BepWbJHz.mjs.map → TabBar-Bj84q1Mr.mjs.map} +1 -1
- package/dist/{Table-DFiSWroB.d.mts → Table-DhdHUQ8V.d.mts} +1 -1
- package/dist/{Table-B1gRr2XT.mjs → Table-WqNfjasd.mjs} +22 -3
- package/dist/Table-WqNfjasd.mjs.map +1 -0
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-Di9JYHDN.d.mts → TableBody-qoSvQDds.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-DAQ3Plqx.mjs → TableBox-obl64W5Y.mjs} +22 -17
- package/dist/TableBox-obl64W5Y.mjs.map +1 -0
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-D6h1X5ph.d.mts → TableBoxCell-DzYMx4Ju.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/TableBoxField.d.mts +3 -3
- package/dist/{TableBoxRow-C6l6J4mq.d.mts → TableBoxRow-B4rFCvWK.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-CsLN1b1J.d.mts → TableBoxRowActions-qMKcVuTL.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-WSDXw79Q.d.mts → TableCell-CGPQRc5g.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-BxuPCUQS.mjs → TableControls-RS_ozBsI.mjs} +207 -66
- package/dist/TableControls-RS_ozBsI.mjs.map +1 -0
- package/dist/{TableControls-cswMgBAr.d.mts → TableControls-WP78qtET.d.mts} +4 -3
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-Cbh8wear.d.mts → TableControlsContext-DZIZSyfX.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-CkL1fEg2.d.mts → TableHead-36j-_oyn.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-K9Ry6YqO.d.mts → TableHeaderCell-C7gp9j1X.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-CYRGIFEl.d.mts → TableLayout-CQqIV0vj.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-DMHlo1eg.d.mts → TableRow-BJZM8I8i.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-BRbOcVNc.d.mts → TableViewConfigurationDropdown-Dwy_9FBz.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-_LtE-PRY.mjs → TechnicalSticker-CL0zkOAj.mjs} +1 -1
- package/dist/{TechnicalSticker-_LtE-PRY.mjs.map → TechnicalSticker-CL0zkOAj.mjs.map} +1 -1
- package/dist/{Text-B69gp3X_.d.mts → Text-DbtTa83E.d.mts} +3 -3
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-Cjsdl07-.d.mts → TextArea-CbxF6u7z.d.mts} +2 -2
- package/dist/{TextArea-CcxltuBh.mjs → TextArea-CfZr5Sk4.mjs} +2 -2
- package/dist/{TextArea-CcxltuBh.mjs.map → TextArea-CfZr5Sk4.mjs.map} +1 -1
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-DDzKLCeX.d.mts → TextUnderlineTooltip-BgLQuK38.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-B5sSdb_q.d.mts → Toggle-BYMLrPXk.d.mts} +1 -1
- package/dist/{Toggle-DWbJOwf3.mjs → Toggle-D4ZaUcVt.mjs} +9 -4
- package/dist/Toggle-D4ZaUcVt.mjs.map +1 -0
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-x1pFf-Mj.d.mts → Tooltip-4pshzB_i.d.mts} +2 -2
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-BE8FuEQm.d.mts → TruncatedText-O7hE3w0O.d.mts} +1 -1
- package/dist/VersionHistory.d.mts +23 -0
- package/dist/VersionHistoryItem-CIcEgl0K.d.mts +54 -0
- package/dist/VersionHistoryItem.d.mts +2 -0
- package/dist/WizardModal.d.mts +2 -2
- package/dist/{accordionTitleTypography-BYhjSN9t.d.mts → accordionTitleTypography-CNB1w3kn.d.mts} +2 -2
- package/dist/accordionTitleTypography.d.mts +1 -1
- package/dist/assertNever.d.mts +5 -0
- package/dist/{codec-BcgsGCHE.d.mts → codec-BXVBsB8Y.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/{color-LH7zKfKo.d.mts → color-3UO63ocQ.d.mts} +9 -4
- package/dist/components/Accordion/index.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +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 +5 -3
- package/dist/components/BottomPanel/index.mjs.map +1 -1
- 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 +3 -1
- package/dist/components/CodeHighlight/index.mjs.map +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 +19 -19
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.mjs +27 -16
- package/dist/components/DataTable/index.mjs.map +1 -1
- 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 +10 -7
- package/dist/components/FloatingPanel/index.mjs.map +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 +1 -1
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +13 -9
- package/dist/components/ImageTile/index.mjs.map +1 -1
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +1 -78
- 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/ProgressBar/index.mjs +1 -2
- package/dist/components/ProgressBar/index.mjs.map +1 -1
- package/dist/components/ProgressIndicator/index.d.mts +1 -1
- package/dist/components/ProgressIndicator/index.mjs +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 +10 -7
- package/dist/components/RightPanel/index.mjs.map +1 -1
- 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/Slider/index.mjs +1 -1
- package/dist/components/Slider/index.mjs.map +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +2 -105
- package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Stack/index.mjs +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -314
- 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 +2 -2
- package/dist/components/Toast/index.mjs +2 -2
- package/dist/components/Toast/index.mjs.map +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 +3 -0
- package/dist/components/VersionHistory/index.mjs +389 -0
- package/dist/components/VersionHistory/index.mjs.map +1 -0
- package/dist/components/WizardModal/index.mjs +4 -4
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-BpwnTzcv.d.mts → constants-BOxzLX-O.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{createPath-Bst12Uxr.d.mts → createPath-OeTC9kvS.d.mts} +2 -2
- package/dist/createPath.d.mts +1 -1
- package/dist/{date-filter-CZeChs9T.mjs → date-filter-BnzR6NxT.mjs} +1 -1
- package/dist/{date-filter-CZeChs9T.mjs.map → date-filter-BnzR6NxT.mjs.map} +1 -1
- package/dist/{date-range-rule-value-C4ir2Y8W.d.mts → date-range-rule-value-BRp5Bi7R.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-gKmuxMVA.d.mts → date-rule-intent-CDBtV0ET.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-BOpH6pBm.d.mts → filter-size-context-CqvQ190x.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/format-date-value.d.mts +5 -0
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-C2-PBfN3.d.mts → index-BXSe73Xn.d.mts} +2 -2
- package/dist/{index-c0aXmZV9.d.mts → index-CyAok7As.d.mts} +2 -2
- package/dist/{index-BXdrzR0c.d.mts → index-wKK9f9La.d.mts} +3 -3
- 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 +14 -14
- package/dist/{input-DVJhMlxU.d.mts → input-C6cyiqm2.d.mts} +3 -3
- package/dist/inputFields.d.mts +10 -10
- package/dist/{intersperse-Bxcrxj2Q.mjs → intersperse-Df9zw7Bk.mjs} +1 -1
- package/dist/{intersperse-Bxcrxj2Q.mjs.map → intersperse-Df9zw7Bk.mjs.map} +1 -1
- package/dist/{jsonSchema-DmdZYC4a.d.mts → jsonSchema-CfGi1bzI.d.mts} +34 -2
- package/dist/lib/PDSProvider.d.mts +2 -2
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/chainTypes.d.mts +17 -0
- package/dist/lib/chainTypes.mjs +0 -0
- package/dist/lib/color.d.mts +2 -2
- package/dist/lib/color.mjs +18 -11
- package/dist/lib/color.mjs.map +1 -1
- package/dist/lib/customFunctionSchema.d.mts +49 -0
- package/dist/lib/customFunctionSchema.mjs +299 -0
- package/dist/lib/customFunctionSchema.mjs.map +1 -0
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/date-filter/index.mjs +1 -1
- package/dist/lib/jsonSchema.d.mts +2 -2
- package/dist/lib/jsonSchema.mjs +26 -1
- package/dist/lib/jsonSchema.mjs.map +1 -1
- package/dist/lib/jsonSchemaType.d.mts +7 -0
- package/dist/lib/jsonSchemaType.mjs +31 -0
- package/dist/lib/jsonSchemaType.mjs.map +1 -0
- package/dist/lib/letPointerDownReachDocument.d.mts +22 -0
- package/dist/lib/letPointerDownReachDocument.mjs +25 -0
- package/dist/lib/letPointerDownReachDocument.mjs.map +1 -0
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +3 -66
- package/dist/lib/methodChain.mjs +1 -237
- package/dist/lib/methodChainNormalize.d.mts +2 -2
- package/dist/lib/methodChainTypes.d.mts +2 -23
- package/dist/lib/objectSchemaTypes.d.mts +1 -1
- package/dist/lib/platformObject.d.mts +38 -0
- package/dist/lib/platformObject.mjs +79 -0
- package/dist/lib/platformObject.mjs.map +1 -0
- 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 +173 -0
- package/dist/lib/schemaOptions.mjs +481 -0
- package/dist/lib/schemaOptions.mjs.map +1 -0
- package/dist/lib/semanticColor.d.mts +1 -1
- package/dist/lib/snakifyPath.d.mts +5 -0
- package/dist/lib/snakifyPath.mjs +11 -0
- package/dist/lib/snakifyPath.mjs.map +1 -0
- package/dist/{message-CKSLIKF0.d.mts → message-CblP0EjG.d.mts} +1 -1
- package/dist/methodChain-DAQxLgxt.mjs +241 -0
- package/dist/methodChain-DAQxLgxt.mjs.map +1 -0
- package/dist/methodChain-Pk1C3i_E.d.mts +66 -0
- package/dist/methodChainTypes-CqWzfx0M.d.mts +23 -0
- 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/input.mjs +6 -14
- package/dist/mixins/input.mjs.map +1 -1
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/scrollbar.d.mts +10 -0
- package/dist/mixins/scrollbar.mjs +31 -0
- package/dist/mixins/scrollbar.mjs.map +1 -0
- package/dist/mixins/text.d.mts +1 -1
- package/dist/{operators-1_jTgYRX.d.mts → operators-CoXL5Hv6.d.mts} +2 -2
- package/dist/operators.d.mts +1 -1
- package/dist/{palette-CMOEyNPH.d.mts → palette-CxXUs1Fu.d.mts} +3 -3
- package/dist/palette.d.mts +1 -1
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +5 -5
- package/dist/patterns/PageLayout/index.mjs +2 -2
- package/dist/reactRouterFallback.d.mts +1 -1
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/{semantic-BXwNUd4a.d.mts → semantic-CFMBsuiJ.d.mts} +2 -2
- package/dist/{semanticColor-Cru2gSys.d.mts → semanticColor-DuJCmDrH.d.mts} +3 -3
- package/dist/{text-CxIup7HJ.d.mts → text-D8HPjiEX.d.mts} +1 -1
- package/dist/{theme-CW6qlONZ.d.mts → theme-BcaR-Au5.d.mts} +3 -3
- package/dist/theme.d.mts +1 -1
- package/dist/time-range.d.mts +7 -0
- package/dist/tone.d.mts +3 -3
- package/dist/{types-ChkiGhjQ.d.mts → types-BCiq4hGv.d.mts} +1 -1
- package/dist/types-BGMmkUpy.d.mts +105 -0
- package/dist/{types-BEjWTkZV.d.mts → types-C4WUSW3e.d.mts} +7 -2
- package/dist/{types-B-stjYNc.d.mts → types-CkpixGWr.d.mts} +1 -1
- package/dist/{types-YojUycQK.d.mts → types-Cl-w8tYc.d.mts} +1 -1
- package/dist/{types-3iEDsymE.d.mts → types-CoVZwrMW.d.mts} +2 -2
- package/dist/{types-g-aqbnek.d.mts → types-DgyGecdM.d.mts} +1 -1
- 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 +1 -1
- package/dist/types5.d.mts +1 -1
- package/dist/types6.d.mts +1 -1
- package/dist/{url-state-CHK2N2fA.d.mts → url-state-8j_ef8Uf.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-B26e5iUx.d.mts → useFilterStateV2-CW6eght1.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-DPFClB5h.d.mts → useFormField-CLRZkUZt.d.mts} +2 -2
- package/dist/{useFormField-BzhMbl5P.mjs → useFormField-XezSxho_.mjs} +2 -2
- package/dist/{useFormField-BzhMbl5P.mjs.map → useFormField-XezSxho_.mjs.map} +1 -1
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-CH3kiXoa.mjs → useFormGroup-C7Cax8zO.mjs} +1 -1
- package/dist/{useFormGroup-CH3kiXoa.mjs.map → useFormGroup-C7Cax8zO.mjs.map} +1 -1
- package/dist/{useLocationPathname-CnRd_Rzn.d.mts → useLocationPathname-DH5Tdq5X.d.mts} +1 -1
- package/dist/useLocationPathname.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-DWlG5vhl.d.mts → useTableBoxDragAndDrop-Da4TiYBT.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-BcGuP8Fd.d.mts → utilities-DcsbI71T.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/storybook.mjs +1 -1
- package/dist/utils/testing.d.mts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-B-Om4ANo.d.mts → validation-BgwNghi2.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-BiyhB8zt.d.mts → value-control-resolver-B0HDRxRN.d.mts} +3 -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/dist/variables/semantic.mjs +15 -18
- package/dist/variables/semantic.mjs.map +1 -1
- package/package.json +23 -4
- package/skills/ui-authoring/COMPONENTS.md +1 -0
- package/dist/Combobox-C2b9u955.mjs.map +0 -1
- package/dist/DatePicker-IgiUI3Wj.mjs.map +0 -1
- package/dist/DropdownMenu-CuKSNxc9.mjs.map +0 -1
- package/dist/Input-C_3QwAAt.mjs.map +0 -1
- package/dist/ListBox-D4j4LCT3.mjs.map +0 -1
- package/dist/LoadingShimmer-Dizk2sZu.mjs.map +0 -1
- package/dist/Modal-BN0K8QXi.mjs.map +0 -1
- package/dist/Popover-opVa9Xhc.mjs.map +0 -1
- package/dist/ProgressIndicator-3A4Aqci6.mjs.map +0 -1
- package/dist/SegmentedControl-BcwfLuHA.mjs.map +0 -1
- package/dist/Select-BstCz8P1.mjs.map +0 -1
- package/dist/Sticker-C3Eb13OQ.mjs.map +0 -1
- package/dist/Table-B1gRr2XT.mjs.map +0 -1
- package/dist/TableBox-DAQ3Plqx.mjs.map +0 -1
- package/dist/TableControls-BxuPCUQS.mjs.map +0 -1
- package/dist/Toggle-DWbJOwf3.mjs.map +0 -1
- package/dist/components/Link/index.mjs.map +0 -1
- package/dist/components/StatusIndicator/index.mjs.map +0 -1
- package/dist/lib/methodChain.mjs.map +0 -1
- /package/dist/{index--p6oQT9I.d.mts → index-B24gUwOx.d.mts} +0 -0
- /package/dist/{index-BCh-G39Y2.d.mts → index-BFnNtGdX.d.mts} +0 -0
- /package/dist/{index-BMBcfD_R.d.mts → index-BNRXMhlr.d.mts} +0 -0
- /package/dist/{index-BO_854F2.d.mts → index-BPiqSRRl.d.mts} +0 -0
- /package/dist/{index-BOn0AAue.d.mts → index-BYd3Btr1.d.mts} +0 -0
- /package/dist/{index-BcsXXrHq.d.mts → index-B_BBnMou.d.mts} +0 -0
- /package/dist/{index-BwFl_eS0.d.mts → index-Bt4QNofW.d.mts} +0 -0
- /package/dist/{index-C-lwXyQ6.d.mts → index-C6HcjJiY.d.mts} +0 -0
- /package/dist/{index-C1o2TFfS.d.mts → index-CEqOS-7M.d.mts} +0 -0
- /package/dist/{index-C3kE54DD.d.mts → index-CIABef8t.d.mts} +0 -0
- /package/dist/{index-CREkvfw9.d.mts → index-CTHojwxd.d.mts} +0 -0
- /package/dist/{index-CRo77wc3.d.mts → index-CjDodOH2.d.mts} +0 -0
- /package/dist/{index-CfCYi7PF.d.mts → index-Cm-1i165.d.mts} +0 -0
- /package/dist/{index-CuYZJcK3.d.mts → index-DB7t8whN.d.mts} +0 -0
- /package/dist/{index-DCTy4zg0.d.mts → index-DBGd4WeR.d.mts} +0 -0
- /package/dist/{index-DWIh4oP5.d.mts → index-DGsJdI5l.d.mts} +0 -0
- /package/dist/{index-De7MV8-j.d.mts → index-DWfPppPU.d.mts} +0 -0
- /package/dist/{index-Dflz2i1X.d.mts → index-DeVKzGce.d.mts} +0 -0
- /package/dist/{index-DgJfEygr.d.mts → index-DedbSZMv.d.mts} +0 -0
- /package/dist/{index-DkrC-i1D.d.mts → index-Deol7ZWO.d.mts} +0 -0
- /package/dist/{index-DrK1_jKY.d.mts → index-Jh0C5PIG.d.mts} +0 -0
- /package/dist/{index-Es5nKSSL.d.mts → index-NKYLt_R9.d.mts} +0 -0
- /package/dist/{index-Wc1llEvP.d.mts → index-VWno75SQ.d.mts} +0 -0
- /package/dist/{index-bHnO4ZKt.d.mts → index-fxXoW-qc.d.mts} +0 -0
- /package/dist/{index-dhjtMp5F.d.mts → index-gVcIuWLd.d.mts} +0 -0
- /package/dist/{index-xmouCHX9.d.mts → index-zeAhjge4.d.mts} +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { T as JsonSchemaTypes, b as JsonSchemaObjectKey, c as JsonSchemaBasicTypes, dt as ObjectSchemaMap, f as JsonSchemaCustomTypes, n as JsonSchema, st as FunctionJsonSchema, y as JsonSchemaObject } from "../jsonSchema-CfGi1bzI.mjs";
|
|
2
|
+
import { n as Chain, s as MethodChainNode } from "../methodChainTypes-CqWzfx0M.mjs";
|
|
3
|
+
|
|
4
|
+
//#region lib/schemaOptions.d.ts
|
|
5
|
+
type VariableSchemaObject = {
|
|
6
|
+
value: string;
|
|
7
|
+
schema?: JsonSchema | null;
|
|
8
|
+
isVariable?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type Option = {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
property: string;
|
|
14
|
+
schema: JsonSchema | FunctionJsonSchema;
|
|
15
|
+
methodChain: Chain | null;
|
|
16
|
+
utility?: boolean;
|
|
17
|
+
workflowObjectKey?: string;
|
|
18
|
+
isVariable?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Extracts the top-level platform-object key from a schema's `$ref`/`$id`/
|
|
22
|
+
* `objectKey`/`objectType.const` markers. Collapses subtypes to their root
|
|
23
|
+
* (`/schema/verification/document/merged` -> `verification`) because callers
|
|
24
|
+
* compare against top-level `ApiModel` values.
|
|
25
|
+
*/
|
|
26
|
+
declare const extractPlatformObjectKey: (schema: JsonSchema | null | undefined, platformObjectJsonSchema?: ObjectSchemaMap) => string | null;
|
|
27
|
+
type PossibleType = JsonSchemaTypes | JsonSchemaCustomTypes | JsonSchemaObjectKey;
|
|
28
|
+
type PossibleArrayType = JsonSchemaBasicTypes | JsonSchemaTypes.Object | JsonSchemaObjectKey;
|
|
29
|
+
declare const isValidOption: (schema: JsonSchema, allowedFieldPaths: string[], disallowedFieldPaths: string[], allowedTypes: PossibleType[], allowedArrayTypes: PossibleArrayType[], path: string[] | undefined, platformObjectJsonSchema: ObjectSchemaMap) => boolean;
|
|
30
|
+
declare const getSchemaOptions: ({
|
|
31
|
+
option,
|
|
32
|
+
optionFilters,
|
|
33
|
+
platformObjectJsonSchema,
|
|
34
|
+
primitiveUtilities,
|
|
35
|
+
digPrimitives
|
|
36
|
+
}: {
|
|
37
|
+
option: Pick<Option, "schema" | "methodChain">;
|
|
38
|
+
optionFilters?: OptionFilters;
|
|
39
|
+
platformObjectJsonSchema: ObjectSchemaMap;
|
|
40
|
+
primitiveUtilities: ObjectSchemaMap;
|
|
41
|
+
digPrimitives?: boolean;
|
|
42
|
+
}) => Option[];
|
|
43
|
+
declare const formatDisplayValue: (value: any) => string;
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the schema at a dotted path (e.g. "account.birthDate").
|
|
46
|
+
* Tries direct key lookup first, then traverses into nested object .properties by path part.
|
|
47
|
+
* Normalizes kebab/snake at each level for key lookup.
|
|
48
|
+
*/
|
|
49
|
+
declare function getSchemaByPath(properties: Record<string, JsonSchema> | null | undefined, path: string): JsonSchema | undefined;
|
|
50
|
+
declare const getSchemaForFieldPath: ({
|
|
51
|
+
path,
|
|
52
|
+
initialSchema,
|
|
53
|
+
platformObjectJsonSchema,
|
|
54
|
+
primitiveUtilities
|
|
55
|
+
}: {
|
|
56
|
+
path: string;
|
|
57
|
+
initialSchema: JsonSchema;
|
|
58
|
+
platformObjectJsonSchema?: ObjectSchemaMap;
|
|
59
|
+
primitiveUtilities?: ObjectSchemaMap;
|
|
60
|
+
}) => {
|
|
61
|
+
schema: JsonSchema | null;
|
|
62
|
+
propertyName: string | null;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Get the schema for a variable path from usableObjects.
|
|
66
|
+
*/
|
|
67
|
+
declare const getSchemaForVariablePath: ({
|
|
68
|
+
path,
|
|
69
|
+
usableObjects
|
|
70
|
+
}: {
|
|
71
|
+
path: string;
|
|
72
|
+
usableObjects: VariableSchemaObject[];
|
|
73
|
+
}) => {
|
|
74
|
+
schema: JsonSchema | null;
|
|
75
|
+
propertyName: string | null;
|
|
76
|
+
};
|
|
77
|
+
declare const nextLinkSchema: ({
|
|
78
|
+
currentSchema,
|
|
79
|
+
nextLink,
|
|
80
|
+
platformObjectJsonSchema,
|
|
81
|
+
primitiveUtilities
|
|
82
|
+
}: {
|
|
83
|
+
currentSchema: JsonSchema | null;
|
|
84
|
+
nextLink: MethodChainNode;
|
|
85
|
+
platformObjectJsonSchema: ObjectSchemaMap;
|
|
86
|
+
primitiveUtilities: ObjectSchemaMap;
|
|
87
|
+
}) => JsonSchema | null;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the FunctionJsonSchema for `functionName` within `parentSchema`, checking both
|
|
90
|
+
* primitive utilities (e.g. array/string methods) and direct object properties.
|
|
91
|
+
* Returns null if not found or not a function schema.
|
|
92
|
+
*/
|
|
93
|
+
declare const getFunctionSchemaForNode: ({
|
|
94
|
+
parentSchema,
|
|
95
|
+
functionName,
|
|
96
|
+
isCustomFunction,
|
|
97
|
+
platformObjectJsonSchema,
|
|
98
|
+
primitiveUtilities
|
|
99
|
+
}: {
|
|
100
|
+
parentSchema: JsonSchema;
|
|
101
|
+
functionName: string;
|
|
102
|
+
isCustomFunction: boolean;
|
|
103
|
+
platformObjectJsonSchema: ObjectSchemaMap;
|
|
104
|
+
primitiveUtilities: ObjectSchemaMap;
|
|
105
|
+
}) => FunctionJsonSchema | null;
|
|
106
|
+
declare const isTypeMatch: ({
|
|
107
|
+
fieldJsonSchema,
|
|
108
|
+
types,
|
|
109
|
+
platformObjectJsonSchema,
|
|
110
|
+
arrayTypes,
|
|
111
|
+
traversedSchemaIds
|
|
112
|
+
}: {
|
|
113
|
+
fieldJsonSchema: JsonSchema;
|
|
114
|
+
types: PossibleType[];
|
|
115
|
+
platformObjectJsonSchema: ObjectSchemaMap;
|
|
116
|
+
arrayTypes?: PossibleArrayType[];
|
|
117
|
+
traversedSchemaIds?: Set<string>;
|
|
118
|
+
}) => boolean;
|
|
119
|
+
interface OptionFilters {
|
|
120
|
+
allowedArrayTypes?: PossibleArrayType[];
|
|
121
|
+
allowedFieldPaths?: string[];
|
|
122
|
+
allowedTypes?: PossibleType[];
|
|
123
|
+
disallowedFieldPaths?: string[];
|
|
124
|
+
fieldPathsAreStrictMatch?: boolean;
|
|
125
|
+
requiredPropertyShape?: string[];
|
|
126
|
+
}
|
|
127
|
+
declare const hasRequiredPropertyShape: (schema: JsonSchema, requiredPropertyShape: string[], platformObjectJsonSchema?: ObjectSchemaMap, checkRecursively?: boolean) => boolean;
|
|
128
|
+
declare const getOptionForValue: ({
|
|
129
|
+
value,
|
|
130
|
+
jsonSchema,
|
|
131
|
+
schemaForFieldPath
|
|
132
|
+
}: {
|
|
133
|
+
value: string;
|
|
134
|
+
jsonSchema: JsonSchema;
|
|
135
|
+
schemaForFieldPath: (path: string, initialSchema: JsonSchema) => {
|
|
136
|
+
schema: JsonSchema | null;
|
|
137
|
+
propertyName: string | null;
|
|
138
|
+
};
|
|
139
|
+
}) => Option | null;
|
|
140
|
+
declare const validatePath: ({
|
|
141
|
+
path,
|
|
142
|
+
jsonSchema,
|
|
143
|
+
platformObjectJsonSchema,
|
|
144
|
+
primitiveUtilities,
|
|
145
|
+
optionFilters
|
|
146
|
+
}: {
|
|
147
|
+
path: string;
|
|
148
|
+
jsonSchema: JsonSchema;
|
|
149
|
+
platformObjectJsonSchema: ObjectSchemaMap;
|
|
150
|
+
primitiveUtilities: ObjectSchemaMap;
|
|
151
|
+
optionFilters?: OptionFilters;
|
|
152
|
+
}) => {
|
|
153
|
+
valid: boolean;
|
|
154
|
+
schemaOptions: Option[];
|
|
155
|
+
partial: string;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Given a method chain that corresponds to the passed schema, find the right-most indentifier that
|
|
159
|
+
* is a platform object and split the method chain on that identifier, with the platform object on
|
|
160
|
+
* the left side.
|
|
161
|
+
*
|
|
162
|
+
* This function is used to optimize a method chain into two parts, left side for server resolution
|
|
163
|
+
* and right side for client resolution.
|
|
164
|
+
*
|
|
165
|
+
* For example:
|
|
166
|
+
* current_case.fields.field_a -> ['current_case', 'fields.field_a']
|
|
167
|
+
* current_case.inquiries.first.id -> ['current_case.inquiries.first', 'id']
|
|
168
|
+
* current_case.account.fields.field_b -> ['current_case.account', 'fields.field_b']
|
|
169
|
+
*/
|
|
170
|
+
declare const splitAtNearestParentObject: (chain: Chain, currentSchema: JsonSchemaObject, platformSchemaMap: ObjectSchemaMap, primitiveUtilities: ObjectSchemaMap) => [leftChain: Chain, rightChain: Chain];
|
|
171
|
+
//#endregion
|
|
172
|
+
export { Option, OptionFilters, extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
|
|
173
|
+
//# sourceMappingURL=schemaOptions.d.mts.map
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import { EMPTY_JSON_SCHEMA_OBJECT, JsonSchemaAllTypes, JsonSchemaStringifiableTypes, genericArrayItemSchema, getNonNullableRefSchema, getNonNullableType, isConvertedTypeSchema, isFileType, isFunctionSchema, isGenericParameterSchema, isJsonSchemaArray, isJsonSchemaDate, isJsonSchemaDateTime, isJsonSchemaObject, isJsonSchemaRef, isJsonSchemaString, isJsonType, isPrecedingSchema } from "./jsonSchema.mjs";
|
|
2
|
+
import { getJsonSchemaType } from "./jsonSchemaType.mjs";
|
|
3
|
+
import { _ as methodChainToString, d as isIdentifierNode, f as isStringNode, n as MethodChainNodeTypes, p as isValid, r as appendedMethodChain, t as EMPTY_METHOD_CHAIN, u as isFunctionNode, v as parseMethodChain, w as assertNever, y as parseWithPartialOption } from "../methodChain-DAQxLgxt.mjs";
|
|
4
|
+
import { MERGED_SCHEMA_ID, getPlatformObjectTypeFromJsonSchema, getSchemaId, resolveJssRef } from "./platformObject.mjs";
|
|
5
|
+
import { compact, flatten, last, sortBy, trim } from "lodash-es";
|
|
6
|
+
//#region lib/schemaOptions.ts
|
|
7
|
+
const fullNodeName = (node) => `${node.type === MethodChainNodeTypes.CustomFunction ? "@" : ""}${node.name}`;
|
|
8
|
+
const SCHEMA_PATH_PATTERN = /\/schema\/([a-z][a-z0-9-_]*)/i;
|
|
9
|
+
/**
|
|
10
|
+
* Extracts the top-level platform-object key from a schema's `$ref`/`$id`/
|
|
11
|
+
* `objectKey`/`objectType.const` markers. Collapses subtypes to their root
|
|
12
|
+
* (`/schema/verification/document/merged` -> `verification`) because callers
|
|
13
|
+
* compare against top-level `ApiModel` values.
|
|
14
|
+
*/
|
|
15
|
+
const extractPlatformObjectKey = (schema, platformObjectJsonSchema = {}) => {
|
|
16
|
+
if (!schema) return null;
|
|
17
|
+
if (isJsonSchemaRef(schema)) {
|
|
18
|
+
const refMatch = schema.$ref?.match(SCHEMA_PATH_PATTERN);
|
|
19
|
+
if (refMatch) return refMatch[1];
|
|
20
|
+
return extractPlatformObjectKey(resolveJssRef(schema, platformObjectJsonSchema), platformObjectJsonSchema);
|
|
21
|
+
}
|
|
22
|
+
if ("$id" in schema && typeof schema.$id === "string") {
|
|
23
|
+
const idMatch = schema.$id.match(SCHEMA_PATH_PATTERN);
|
|
24
|
+
if (idMatch) return idMatch[1];
|
|
25
|
+
}
|
|
26
|
+
if ("objectKey" in schema && typeof schema.objectKey === "string") return schema.objectKey.split("/")[0];
|
|
27
|
+
return getPlatformObjectTypeFromJsonSchema(schema);
|
|
28
|
+
};
|
|
29
|
+
const isMatchingType = (schema, allowedTypes, allowedArrayTypes) => {
|
|
30
|
+
if (allowedTypes.length === 0) return true;
|
|
31
|
+
const jsonSchemaType = getJsonSchemaType(schema);
|
|
32
|
+
if (allowedTypes.some((schemaType) => schemaType === "string") && JsonSchemaStringifiableTypes.some((schemaType) => schemaType === jsonSchemaType)) return true;
|
|
33
|
+
else if (jsonSchemaType === JsonSchemaAllTypes.Array) {
|
|
34
|
+
const itemsSchema = "items" in schema ? schema.items : null;
|
|
35
|
+
if (!allowedTypes.includes(JsonSchemaAllTypes.Array) || allowedArrayTypes?.length && !allowedArrayTypes.some((schemaType) => schemaType === getJsonSchemaType(itemsSchema))) return false;
|
|
36
|
+
} else if (jsonSchemaType !== JsonSchemaAllTypes.Object && !allowedTypes.some((schemaType) => schemaType === jsonSchemaType)) return false;
|
|
37
|
+
return true;
|
|
38
|
+
};
|
|
39
|
+
const isValidOptionHelper = (schema, allowedFieldPaths, disallowedFieldPaths, allowedTypes, allowedArrayTypes, path, platformObjectJsonSchema, traversedSchemaIds = /* @__PURE__ */ new Set()) => {
|
|
40
|
+
const resolvedSchema = isJsonSchemaRef(schema) ? resolveJssRef(schema, platformObjectJsonSchema) : schema;
|
|
41
|
+
if (resolvedSchema.$id) if (traversedSchemaIds.has(resolvedSchema.$id)) return false;
|
|
42
|
+
else traversedSchemaIds.add(resolvedSchema.$id);
|
|
43
|
+
const dotPath = path.join(".");
|
|
44
|
+
if (disallowedFieldPaths.has(dotPath)) return false;
|
|
45
|
+
if (!isMatchingType(resolvedSchema, allowedTypes, allowedArrayTypes)) return false;
|
|
46
|
+
if (allowedFieldPaths.has(dotPath)) return true;
|
|
47
|
+
if (getJsonSchemaType(resolvedSchema) === "object") {
|
|
48
|
+
if ("fieldType" in resolvedSchema && isJsonType(resolvedSchema.fieldType)) return allowedFieldPaths.size === 0;
|
|
49
|
+
return "properties" in resolvedSchema && resolvedSchema.properties != null && Object.entries(resolvedSchema.properties).some(([prop, propSchema]) => isValidOptionHelper(propSchema, allowedFieldPaths, disallowedFieldPaths, allowedTypes, allowedArrayTypes, [...path, prop], platformObjectJsonSchema, traversedSchemaIds));
|
|
50
|
+
}
|
|
51
|
+
return allowedFieldPaths.size === 0;
|
|
52
|
+
};
|
|
53
|
+
const isValidOption = (schema, allowedFieldPaths, disallowedFieldPaths, allowedTypes, allowedArrayTypes, path = [], platformObjectJsonSchema) => {
|
|
54
|
+
const allowedFieldPathsSet = allowedFieldPaths == null ? /* @__PURE__ */ new Set() : new Set(allowedFieldPaths);
|
|
55
|
+
const disallowedFieldPathsSet = disallowedFieldPaths == null ? /* @__PURE__ */ new Set() : new Set(disallowedFieldPaths);
|
|
56
|
+
if (allowedFieldPathsSet.size === 0 && disallowedFieldPathsSet.size === 0 && allowedTypes.length === 0 && allowedArrayTypes.length === 0) return true;
|
|
57
|
+
return isValidOptionHelper(schema, allowedFieldPathsSet, disallowedFieldPathsSet, allowedTypes ?? [], allowedArrayTypes ?? [], path, platformObjectJsonSchema);
|
|
58
|
+
};
|
|
59
|
+
const buildSchemaOptionsFor = (rootSchema, baseChain) => Object.entries(rootSchema?.properties ?? {}).map(([property, propSchema]) => {
|
|
60
|
+
const appended = appendedMethodChain(baseChain ?? EMPTY_METHOD_CHAIN, property);
|
|
61
|
+
return {
|
|
62
|
+
label: methodChainToString(appended),
|
|
63
|
+
value: methodChainToString(appended),
|
|
64
|
+
property,
|
|
65
|
+
schema: propSchema,
|
|
66
|
+
methodChain: appended,
|
|
67
|
+
workflowObjectKey: "objectKey" in propSchema ? propSchema.objectKey : void 0,
|
|
68
|
+
isVariable: "isVariable" in propSchema ? propSchema.isVariable : false
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
const getSupportedArrayFunctions = (schema, arrayPrimitive) => {
|
|
72
|
+
if (isJsonSchemaArray(schema) && schema["supportedFunctions"]) return schema["supportedFunctions"];
|
|
73
|
+
return arrayPrimitive["baseSupportedFunctions"] ?? [];
|
|
74
|
+
};
|
|
75
|
+
const getSchemaOptions = ({ option, optionFilters, platformObjectJsonSchema, primitiveUtilities, digPrimitives = false }) => {
|
|
76
|
+
const { schema, methodChain } = option;
|
|
77
|
+
const nullableRefSchema = getNonNullableRefSchema(schema);
|
|
78
|
+
const baseSchema = nullableRefSchema ?? schema;
|
|
79
|
+
const refResolved = isJsonSchemaRef(baseSchema) ? resolveJssRef(baseSchema, platformObjectJsonSchema) : baseSchema;
|
|
80
|
+
const nonNullable = refResolved && getNonNullableType(refResolved);
|
|
81
|
+
const resolvedSchema = nonNullable ? {
|
|
82
|
+
...refResolved,
|
|
83
|
+
type: nonNullable
|
|
84
|
+
} : refResolved;
|
|
85
|
+
const schemaType = getJsonSchemaType(resolvedSchema);
|
|
86
|
+
const schemaOptions = (() => {
|
|
87
|
+
switch (schemaType) {
|
|
88
|
+
case JsonSchemaAllTypes.Object: return buildSchemaOptionsFor(resolvedSchema, methodChain);
|
|
89
|
+
case JsonSchemaAllTypes.Array:
|
|
90
|
+
case JsonSchemaAllTypes.MultiEnum: {
|
|
91
|
+
if (!digPrimitives) return [];
|
|
92
|
+
const arrayPrimitive = primitiveUtilities["/schema/array"];
|
|
93
|
+
if (!arrayPrimitive) return [];
|
|
94
|
+
const allOptions = buildSchemaOptionsFor(arrayPrimitive, methodChain);
|
|
95
|
+
const supported = getSupportedArrayFunctions(resolvedSchema, arrayPrimitive);
|
|
96
|
+
return allOptions.filter((opt) => supported.includes(opt.property));
|
|
97
|
+
}
|
|
98
|
+
case JsonSchemaAllTypes.String: return digPrimitives ? buildSchemaOptionsFor(primitiveUtilities["/schema/string"], methodChain) : [];
|
|
99
|
+
case JsonSchemaAllTypes.Enum:
|
|
100
|
+
if (digPrimitives && isJsonSchemaString(resolvedSchema)) return buildSchemaOptionsFor(primitiveUtilities["/schema/string"], methodChain);
|
|
101
|
+
return [];
|
|
102
|
+
case JsonSchemaAllTypes.File: return digPrimitives ? buildSchemaOptionsFor(primitiveUtilities["/schema/field/file"], methodChain) : [];
|
|
103
|
+
case JsonSchemaAllTypes.Integer:
|
|
104
|
+
case JsonSchemaAllTypes.Number: return digPrimitives && primitiveUtilities["/schema/number"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/number"], methodChain) : [];
|
|
105
|
+
case JsonSchemaAllTypes.Boolean: return digPrimitives && primitiveUtilities["/schema/boolean"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/boolean"], methodChain) : [];
|
|
106
|
+
case JsonSchemaAllTypes.Date: return digPrimitives && primitiveUtilities["/schema/date"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/date"], methodChain) : [];
|
|
107
|
+
case JsonSchemaAllTypes.Datetime: return digPrimitives && primitiveUtilities["/schema/datetime"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/datetime"], methodChain) : [];
|
|
108
|
+
case JsonSchemaAllTypes.GroupedEnum:
|
|
109
|
+
case JsonSchemaAllTypes.Null:
|
|
110
|
+
case JsonSchemaAllTypes.Relation:
|
|
111
|
+
case JsonSchemaAllTypes.MaskedString:
|
|
112
|
+
case JsonSchemaAllTypes.Unknown: return [];
|
|
113
|
+
default: assertNever(schemaType);
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
const nullSafeOptions = nullableRefSchema != null || nonNullable != null ? schemaOptions.filter((opt) => {
|
|
117
|
+
if (isFunctionSchema(opt.schema) && opt.schema.codeChainFunctionToken != null) return opt.schema.acceptsNullReceiver === true;
|
|
118
|
+
return nullableRefSchema == null;
|
|
119
|
+
}) : schemaOptions;
|
|
120
|
+
return sortBy(optionFilters && !!flatten(compact(Object.values(optionFilters))).length ? filterForAllowedSchemaOptions(nullSafeOptions, optionFilters, platformObjectJsonSchema) : nullSafeOptions, (opt) => opt.property.replace(/^@/, ""));
|
|
121
|
+
};
|
|
122
|
+
const formatDisplayValue = (value) => {
|
|
123
|
+
return typeof value === "string" ? value : trim(JSON.stringify(value, null, 1), "\"");
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Resolves the schema at a dotted path (e.g. "account.birthDate").
|
|
127
|
+
* Tries direct key lookup first, then traverses into nested object .properties by path part.
|
|
128
|
+
* Normalizes kebab/snake at each level for key lookup.
|
|
129
|
+
*/
|
|
130
|
+
function getSchemaByPath(properties, path) {
|
|
131
|
+
if (!properties || !path) return;
|
|
132
|
+
const lookup = (props, key) => props[key] ?? props[key.replace(/_/g, "-")] ?? props[key.replace(/-/g, "_")];
|
|
133
|
+
const byFullPath = lookup(properties, path);
|
|
134
|
+
if (byFullPath != null) return byFullPath;
|
|
135
|
+
const i = path.indexOf(".");
|
|
136
|
+
if (i === -1) return;
|
|
137
|
+
const nestedKey = path.slice(0, i);
|
|
138
|
+
const rest = path.slice(i + 1);
|
|
139
|
+
const next = lookup(properties, nestedKey);
|
|
140
|
+
if (next == null || !isJsonSchemaObject(next) || !next.properties) return;
|
|
141
|
+
return getSchemaByPath(next.properties, rest);
|
|
142
|
+
}
|
|
143
|
+
const parseMethodChainForJSS = (path) => {
|
|
144
|
+
const { methodChain, partial, valid } = parseWithPartialOption(path);
|
|
145
|
+
if (!valid) return null;
|
|
146
|
+
if (partial.length > 0) return appendedMethodChain(methodChain, partial);
|
|
147
|
+
return methodChain;
|
|
148
|
+
};
|
|
149
|
+
const getSchemaForFieldPath = ({ path, initialSchema, platformObjectJsonSchema = {}, primitiveUtilities = {} }) => {
|
|
150
|
+
if (!initialSchema || !("type" in initialSchema) && !("$ref" in initialSchema)) return {
|
|
151
|
+
schema: null,
|
|
152
|
+
propertyName: null
|
|
153
|
+
};
|
|
154
|
+
const schema = isJsonSchemaRef(initialSchema) ? resolveJssRef(initialSchema, platformObjectJsonSchema) : initialSchema;
|
|
155
|
+
if (path === "" || !isValid(path)) return {
|
|
156
|
+
schema: null,
|
|
157
|
+
propertyName: null
|
|
158
|
+
};
|
|
159
|
+
const methodChain = parseMethodChain(path);
|
|
160
|
+
if (!methodChain) return {
|
|
161
|
+
schema: null,
|
|
162
|
+
propertyName: null
|
|
163
|
+
};
|
|
164
|
+
const result = methodChain.links.reduce((currentSchema, link) => {
|
|
165
|
+
return nextLinkSchema({
|
|
166
|
+
currentSchema,
|
|
167
|
+
nextLink: link,
|
|
168
|
+
platformObjectJsonSchema,
|
|
169
|
+
primitiveUtilities
|
|
170
|
+
});
|
|
171
|
+
}, schema);
|
|
172
|
+
return {
|
|
173
|
+
schema: result,
|
|
174
|
+
propertyName: result ? last(methodChain.links)?.name || null : null
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Get the schema for a variable path from usableObjects.
|
|
179
|
+
*/
|
|
180
|
+
const getSchemaForVariablePath = ({ path, usableObjects }) => {
|
|
181
|
+
return getSchemaForFieldPath({
|
|
182
|
+
path,
|
|
183
|
+
initialSchema: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: Object.fromEntries(usableObjects.filter((obj) => obj.schema != null && obj.isVariable === true).map((obj) => [obj.value, obj.schema]))
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
const getPrimitiveSchemaId = (schema) => {
|
|
190
|
+
if (!("type" in schema)) return null;
|
|
191
|
+
if (isJsonSchemaObject(schema) && isFileType(schema.fieldType)) return "/schema/field/file";
|
|
192
|
+
if (isJsonSchemaDate(schema)) return "/schema/date";
|
|
193
|
+
if (isJsonSchemaDateTime(schema)) return "/schema/datetime";
|
|
194
|
+
const type = Array.isArray(schema.type) ? getNonNullableType(schema) : schema.type;
|
|
195
|
+
if (!type) return null;
|
|
196
|
+
if (type === "integer" || type === "number") return "/schema/number";
|
|
197
|
+
if (type === "boolean") return "/schema/boolean";
|
|
198
|
+
return getSchemaId(type);
|
|
199
|
+
};
|
|
200
|
+
const nextLinkSchema = ({ currentSchema, nextLink, platformObjectJsonSchema, primitiveUtilities }) => {
|
|
201
|
+
if (!currentSchema) return null;
|
|
202
|
+
if (nextLink.type === MethodChainNodeTypes.CustomFunction) {
|
|
203
|
+
const unwrapped = getNonNullableRefSchema(currentSchema);
|
|
204
|
+
const nonNullType = unwrapped ? null : getNonNullableType(currentSchema);
|
|
205
|
+
const receiver = unwrapped ?? (nonNullType ? {
|
|
206
|
+
...currentSchema,
|
|
207
|
+
type: nonNullType
|
|
208
|
+
} : null);
|
|
209
|
+
if (receiver) {
|
|
210
|
+
if (getFunctionSchemaForNode({
|
|
211
|
+
parentSchema: currentSchema,
|
|
212
|
+
functionName: fullNodeName(nextLink),
|
|
213
|
+
isCustomFunction: true,
|
|
214
|
+
platformObjectJsonSchema,
|
|
215
|
+
primitiveUtilities
|
|
216
|
+
})?.acceptsNullReceiver !== true) return null;
|
|
217
|
+
currentSchema = receiver;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (isJsonSchemaRef(currentSchema)) currentSchema = resolveJssRef(currentSchema, platformObjectJsonSchema);
|
|
221
|
+
else if (isJsonSchemaArray(currentSchema) && isJsonSchemaRef(currentSchema.items)) currentSchema = {
|
|
222
|
+
...currentSchema,
|
|
223
|
+
items: { ...resolveJssRef(currentSchema.items, platformObjectJsonSchema) }
|
|
224
|
+
};
|
|
225
|
+
if (!("type" in currentSchema)) return null;
|
|
226
|
+
const schemaId = getPrimitiveSchemaId(currentSchema);
|
|
227
|
+
if (schemaId && schemaId in primitiveUtilities) {
|
|
228
|
+
const utilityReturnType = getPrimitiveUtilitiesReturnSchema(currentSchema, nextLink, primitiveUtilities[schemaId]);
|
|
229
|
+
if (utilityReturnType) return utilityReturnType;
|
|
230
|
+
}
|
|
231
|
+
if ("properties" in currentSchema) {
|
|
232
|
+
const propertySchema = currentSchema.properties[fullNodeName(nextLink)];
|
|
233
|
+
if (propertySchema && isFunctionSchema(propertySchema)) return propertySchema.properties.returnType;
|
|
234
|
+
return propertySchema ?? null;
|
|
235
|
+
}
|
|
236
|
+
return null;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Returns the FunctionJsonSchema for `functionName` within `parentSchema`, checking both
|
|
240
|
+
* primitive utilities (e.g. array/string methods) and direct object properties.
|
|
241
|
+
* Returns null if not found or not a function schema.
|
|
242
|
+
*/
|
|
243
|
+
const getFunctionSchemaForNode = ({ parentSchema, functionName, isCustomFunction, platformObjectJsonSchema, primitiveUtilities }) => {
|
|
244
|
+
if (isCustomFunction) parentSchema = getNonNullableRefSchema(parentSchema) ?? parentSchema;
|
|
245
|
+
if (isJsonSchemaRef(parentSchema)) parentSchema = resolveJssRef(parentSchema, platformObjectJsonSchema);
|
|
246
|
+
const schemaId = getPrimitiveSchemaId(parentSchema);
|
|
247
|
+
if (schemaId && schemaId in primitiveUtilities) {
|
|
248
|
+
const utilitySchema = primitiveUtilities[schemaId].properties[functionName];
|
|
249
|
+
if (utilitySchema && isFunctionSchema(utilitySchema)) return utilitySchema;
|
|
250
|
+
}
|
|
251
|
+
if (isJsonSchemaObject(parentSchema) && functionName in parentSchema.properties) {
|
|
252
|
+
const propSchema = parentSchema.properties[functionName];
|
|
253
|
+
if (isFunctionSchema(propSchema)) return propSchema;
|
|
254
|
+
}
|
|
255
|
+
return null;
|
|
256
|
+
};
|
|
257
|
+
const injectRefForPlatformObjectArray = (schema) => {
|
|
258
|
+
if (schema && isJsonSchemaArray(schema) && isJsonSchemaObject(schema.items) && "objectKey" in schema.items && schema.items.objectKey) {
|
|
259
|
+
const schemaId = getSchemaId(schema.items.objectKey, MERGED_SCHEMA_ID);
|
|
260
|
+
return {
|
|
261
|
+
...schema,
|
|
262
|
+
items: {
|
|
263
|
+
...schema.items,
|
|
264
|
+
$ref: schemaId
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
return schema;
|
|
269
|
+
};
|
|
270
|
+
const getPrimitiveUtilitiesReturnSchema = (object, node, schema) => {
|
|
271
|
+
const name = fullNodeName(node);
|
|
272
|
+
if (!(name in schema.properties)) return null;
|
|
273
|
+
const utilitySchema = schema.properties[name];
|
|
274
|
+
const returnSchema = isFunctionSchema(utilitySchema) ? utilitySchema.properties.returnType : utilitySchema;
|
|
275
|
+
const itemSchema = genericArrayItemSchema(object, returnSchema);
|
|
276
|
+
if (itemSchema) return itemSchema;
|
|
277
|
+
if (isPrecedingSchema(returnSchema)) return object;
|
|
278
|
+
if (isConvertedTypeSchema(returnSchema) && isFunctionNode(node) && node.params[returnSchema.position] && isStringNode(node.params[returnSchema.position])) {
|
|
279
|
+
const stringNode = node.params[returnSchema.position];
|
|
280
|
+
return returnSchema.schemaByValue[stringNode.value] ?? EMPTY_JSON_SCHEMA_OBJECT;
|
|
281
|
+
}
|
|
282
|
+
if (isGenericParameterSchema(returnSchema) && isFunctionNode(node) && node.params[returnSchema.position] && isStringNode(node.params[returnSchema.position])) {
|
|
283
|
+
const stringNode = node.params[returnSchema.position];
|
|
284
|
+
const objectSchema = isJsonSchemaArray(object) ? object.items : object;
|
|
285
|
+
if (isJsonSchemaObject(objectSchema)) return injectRefForPlatformObjectArray(stringNode.value.split(".").reduce((schema, key) => {
|
|
286
|
+
if (schema == null || !isJsonSchemaObject(schema) || !schema.properties[key]) return null;
|
|
287
|
+
return schema.properties[key];
|
|
288
|
+
}, objectSchema));
|
|
289
|
+
}
|
|
290
|
+
return "genericType" in returnSchema ? EMPTY_JSON_SCHEMA_OBJECT : returnSchema;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* @param path
|
|
294
|
+
* @param allowedFieldPaths - can be a complete path to a base type field
|
|
295
|
+
* (e.g. 'data.some.string_field'), or a partial path to an object ('data')
|
|
296
|
+
* @param fieldPathsAreStrictMatch - true if we only want to match exact paths in allowedFieldPaths and disallowedFieldPaths
|
|
297
|
+
*/
|
|
298
|
+
const isAllowedPath = (path, allowedFieldPaths) => {
|
|
299
|
+
return allowedFieldPaths.some((fieldPath) => {
|
|
300
|
+
const valueIsPartialMatch = fieldPath.startsWith(path);
|
|
301
|
+
const valueIsNestedProp = path.startsWith(`${fieldPath}.`);
|
|
302
|
+
return valueIsPartialMatch || valueIsNestedProp;
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* @param path
|
|
307
|
+
* @param disallowedFieldPaths - can be a complete path to a base type field
|
|
308
|
+
* (e.g. 'data.some.string_field'), or a partial path to an object ('data')
|
|
309
|
+
*/
|
|
310
|
+
const isDisallowedPath = (path, disallowedFieldPaths) => {
|
|
311
|
+
return disallowedFieldPaths.some((fieldPath) => {
|
|
312
|
+
const valueIsMatch = fieldPath === path;
|
|
313
|
+
const valueIsNestedProp = path.startsWith(`${fieldPath}.`);
|
|
314
|
+
return valueIsMatch || valueIsNestedProp;
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
const isTypeMatch = ({ fieldJsonSchema, types, platformObjectJsonSchema = {}, arrayTypes, traversedSchemaIds = /* @__PURE__ */ new Set() }) => {
|
|
318
|
+
const resolvedSchema = isJsonSchemaRef(fieldJsonSchema) ? resolveJssRef(fieldJsonSchema, platformObjectJsonSchema) : fieldJsonSchema;
|
|
319
|
+
if (resolvedSchema.$id) if (traversedSchemaIds.has(resolvedSchema.$id)) return false;
|
|
320
|
+
else traversedSchemaIds.add(resolvedSchema.$id);
|
|
321
|
+
const fieldJsonSchemaType = getJsonSchemaType(resolvedSchema);
|
|
322
|
+
switch (fieldJsonSchemaType) {
|
|
323
|
+
case JsonSchemaAllTypes.Object: {
|
|
324
|
+
const objectSchema = resolvedSchema;
|
|
325
|
+
const isObjectKeyOfType = (type) => objectSchema.objectKey && types.includes(type) && objectSchema.objectKey.split("/")[0] === type;
|
|
326
|
+
if (types.includes("object") || objectSchema.objectKey && types.includes(objectSchema.objectKey) || isObjectKeyOfType("report") || isObjectKeyOfType("verification")) return true;
|
|
327
|
+
return Object.values(objectSchema.properties || {}).some((propJsonSchema) => isTypeMatch({
|
|
328
|
+
fieldJsonSchema: propJsonSchema,
|
|
329
|
+
types,
|
|
330
|
+
platformObjectJsonSchema,
|
|
331
|
+
arrayTypes,
|
|
332
|
+
traversedSchemaIds
|
|
333
|
+
}));
|
|
334
|
+
}
|
|
335
|
+
case JsonSchemaAllTypes.Array: {
|
|
336
|
+
const arraySchema = resolvedSchema;
|
|
337
|
+
const itemSchema = isJsonSchemaRef(arraySchema.items) ? resolveJssRef(arraySchema.items, platformObjectJsonSchema) : arraySchema.items;
|
|
338
|
+
return types.includes(JsonSchemaAllTypes.Array) && !!arrayTypes && arrayTypes.some((schemaType) => schemaType === getJsonSchemaType(itemSchema) || isJsonSchemaObject(itemSchema) && schemaType === itemSchema.objectKey);
|
|
339
|
+
}
|
|
340
|
+
case JsonSchemaAllTypes.String:
|
|
341
|
+
case JsonSchemaAllTypes.Number:
|
|
342
|
+
case JsonSchemaAllTypes.Boolean:
|
|
343
|
+
case JsonSchemaAllTypes.Integer:
|
|
344
|
+
case JsonSchemaAllTypes.Date:
|
|
345
|
+
case JsonSchemaAllTypes.Datetime:
|
|
346
|
+
case JsonSchemaAllTypes.Enum:
|
|
347
|
+
case JsonSchemaAllTypes.MultiEnum:
|
|
348
|
+
case JsonSchemaAllTypes.GroupedEnum:
|
|
349
|
+
case JsonSchemaAllTypes.Unknown: return types.some((schemaType) => schemaType === fieldJsonSchemaType);
|
|
350
|
+
default: return false;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
const hasRequiredPropertyShape = (schema, requiredPropertyShape, platformObjectJsonSchema = {}, checkRecursively = true) => {
|
|
354
|
+
if (!requiredPropertyShape?.length) return true;
|
|
355
|
+
const resolvedSchema = isJsonSchemaRef(schema) ? resolveJssRef(schema, platformObjectJsonSchema) : schema;
|
|
356
|
+
if (resolvedSchema && "type" in resolvedSchema && resolvedSchema.type === "object" && "properties" in resolvedSchema && resolvedSchema.properties) {
|
|
357
|
+
const schemaProperties = resolvedSchema.properties;
|
|
358
|
+
if (requiredPropertyShape.every((propName) => propName in schemaProperties)) return true;
|
|
359
|
+
if (checkRecursively) return Object.values(schemaProperties).some((propSchema) => hasRequiredPropertyShape(propSchema, requiredPropertyShape, platformObjectJsonSchema, checkRecursively));
|
|
360
|
+
}
|
|
361
|
+
return false;
|
|
362
|
+
};
|
|
363
|
+
const filterForAllowedSchemaOptions = (options = [], { allowedArrayTypes, allowedFieldPaths, allowedTypes, disallowedFieldPaths, fieldPathsAreStrictMatch, requiredPropertyShape }, platformObjectJsonSchema = {}) => {
|
|
364
|
+
let filteredOptions = options;
|
|
365
|
+
if (fieldPathsAreStrictMatch) {
|
|
366
|
+
if (allowedFieldPaths?.length || disallowedFieldPaths?.length || allowedTypes?.length) filteredOptions = filteredOptions.filter((option) => isValidOption(option.schema, allowedFieldPaths ?? [], disallowedFieldPaths ?? [], allowedTypes ?? [], allowedArrayTypes ?? [], option.value.split("."), platformObjectJsonSchema));
|
|
367
|
+
} else {
|
|
368
|
+
if (allowedFieldPaths?.length) filteredOptions = filteredOptions.filter((option) => isAllowedPath(option.value, allowedFieldPaths));
|
|
369
|
+
if (disallowedFieldPaths?.length) filteredOptions = filteredOptions.filter((option) => !isDisallowedPath(option.value, disallowedFieldPaths));
|
|
370
|
+
if (allowedTypes?.length) filteredOptions = filteredOptions.filter((option) => isTypeMatch({
|
|
371
|
+
fieldJsonSchema: option.schema,
|
|
372
|
+
types: allowedTypes,
|
|
373
|
+
platformObjectJsonSchema,
|
|
374
|
+
arrayTypes: allowedArrayTypes
|
|
375
|
+
}));
|
|
376
|
+
}
|
|
377
|
+
if (requiredPropertyShape?.length) filteredOptions = filteredOptions.filter((option) => hasRequiredPropertyShape(option.schema, requiredPropertyShape, platformObjectJsonSchema));
|
|
378
|
+
return filteredOptions;
|
|
379
|
+
};
|
|
380
|
+
const getOptionForValue = ({ value, jsonSchema, schemaForFieldPath }) => {
|
|
381
|
+
const { schema, propertyName } = schemaForFieldPath(value, jsonSchema);
|
|
382
|
+
if (!schema || !propertyName) return null;
|
|
383
|
+
const methodChain = parseMethodChainForJSS(value);
|
|
384
|
+
return {
|
|
385
|
+
label: methodChain ? methodChainToString(methodChain) : value,
|
|
386
|
+
value: methodChain ? methodChainToString(methodChain) : value,
|
|
387
|
+
property: propertyName,
|
|
388
|
+
schema,
|
|
389
|
+
methodChain
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
const validatePath = ({ path, jsonSchema, platformObjectJsonSchema = {}, primitiveUtilities = {}, optionFilters }) => {
|
|
393
|
+
const schemaOptions = getSchemaOptions({
|
|
394
|
+
option: {
|
|
395
|
+
schema: jsonSchema,
|
|
396
|
+
methodChain: parseMethodChainForJSS("")
|
|
397
|
+
},
|
|
398
|
+
optionFilters,
|
|
399
|
+
platformObjectJsonSchema,
|
|
400
|
+
primitiveUtilities
|
|
401
|
+
});
|
|
402
|
+
const { methodChain, partial } = parseWithPartialOption(path);
|
|
403
|
+
const optionsWithPartiallyMatchedFinalLink = methodChain.links.reduce((currentSchema, link) => {
|
|
404
|
+
if (currentSchema.length === 0) return [];
|
|
405
|
+
const optionMatch = currentSchema.find((option) => option.property === link.name);
|
|
406
|
+
if (optionMatch) return getSchemaOptions({
|
|
407
|
+
option: optionMatch,
|
|
408
|
+
optionFilters,
|
|
409
|
+
platformObjectJsonSchema,
|
|
410
|
+
primitiveUtilities
|
|
411
|
+
});
|
|
412
|
+
return [];
|
|
413
|
+
}, schemaOptions).filter((option) => option.property.includes(partial));
|
|
414
|
+
return {
|
|
415
|
+
valid: optionsWithPartiallyMatchedFinalLink.length > 0,
|
|
416
|
+
schemaOptions: optionsWithPartiallyMatchedFinalLink,
|
|
417
|
+
partial
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* Given a method chain that corresponds to the passed schema, find the right-most indentifier that
|
|
422
|
+
* is a platform object and split the method chain on that identifier, with the platform object on
|
|
423
|
+
* the left side.
|
|
424
|
+
*
|
|
425
|
+
* This function is used to optimize a method chain into two parts, left side for server resolution
|
|
426
|
+
* and right side for client resolution.
|
|
427
|
+
*
|
|
428
|
+
* For example:
|
|
429
|
+
* current_case.fields.field_a -> ['current_case', 'fields.field_a']
|
|
430
|
+
* current_case.inquiries.first.id -> ['current_case.inquiries.first', 'id']
|
|
431
|
+
* current_case.account.fields.field_b -> ['current_case.account', 'fields.field_b']
|
|
432
|
+
*/
|
|
433
|
+
const splitAtNearestParentObject = (chain, currentSchema, platformSchemaMap, primitiveUtilities) => {
|
|
434
|
+
const leafUpLinkSchemas = [currentSchema];
|
|
435
|
+
for (const link of chain.links) {
|
|
436
|
+
const nextSchema = nextLinkSchema({
|
|
437
|
+
currentSchema: leafUpLinkSchemas[0],
|
|
438
|
+
nextLink: link,
|
|
439
|
+
platformObjectJsonSchema: platformSchemaMap,
|
|
440
|
+
primitiveUtilities
|
|
441
|
+
});
|
|
442
|
+
leafUpLinkSchemas.unshift(nextSchema);
|
|
443
|
+
}
|
|
444
|
+
const leafUpLeftLinks = [...chain.links].reverse();
|
|
445
|
+
const leafUpRightLinks = [];
|
|
446
|
+
for (const [i, linkSchema] of leafUpLinkSchemas.entries()) {
|
|
447
|
+
if (!linkSchema) {
|
|
448
|
+
if (isIdentifierNode(leafUpLeftLinks[0])) {
|
|
449
|
+
if (leafUpLinkSchemas.slice(i + 1).find((s) => s && (isJsonSchemaRef(s) || isJsonSchemaArray(s) && isJsonSchemaRef(s.items)))) {
|
|
450
|
+
leafUpRightLinks.push(leafUpLeftLinks.shift());
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
break;
|
|
455
|
+
} else if ("$id" in linkSchema || isJsonSchemaRef(linkSchema)) break;
|
|
456
|
+
else if (isJsonSchemaArray(linkSchema)) {
|
|
457
|
+
if ("$id" in linkSchema.items || isJsonSchemaRef(linkSchema.items)) break;
|
|
458
|
+
if (isFunctionNode(leafUpLeftLinks[0])) break;
|
|
459
|
+
} else if (isFunctionNode(leafUpLeftLinks[0])) break;
|
|
460
|
+
else if (isIdentifierNode(leafUpLeftLinks[0])) {
|
|
461
|
+
const nextSchema = leafUpLinkSchemas[i + 1];
|
|
462
|
+
if (nextSchema) {
|
|
463
|
+
const primitiveId = getPrimitiveSchemaId(nextSchema);
|
|
464
|
+
if (primitiveId && primitiveId in primitiveUtilities) break;
|
|
465
|
+
}
|
|
466
|
+
if (nextSchema && isJsonSchemaArray(nextSchema)) break;
|
|
467
|
+
}
|
|
468
|
+
leafUpRightLinks.push(leafUpLeftLinks.shift());
|
|
469
|
+
}
|
|
470
|
+
return [{
|
|
471
|
+
type: MethodChainNodeTypes.Chain,
|
|
472
|
+
links: leafUpLeftLinks.reverse()
|
|
473
|
+
}, {
|
|
474
|
+
type: MethodChainNodeTypes.Chain,
|
|
475
|
+
links: leafUpRightLinks.reverse()
|
|
476
|
+
}];
|
|
477
|
+
};
|
|
478
|
+
//#endregion
|
|
479
|
+
export { extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
|
|
480
|
+
|
|
481
|
+
//# sourceMappingURL=schemaOptions.mjs.map
|