themelia-react-ui 1.0.2 → 2.0.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 +281 -1
- package/README.md +10 -5
- package/dist/{accordion-BRTcsp8J.js → accordion-CQXVcd7Q.js} +13 -13
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/{affordance-geometry.generated-CL84ZN9A.js → affordance-geometry.generated-CCIXb2A1.js} +7 -2
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-2PQ2fItc.js} +171 -176
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-C_fKpljx.js → app-shell-BE_j8-AT.js} +4 -4
- package/dist/{app-shell-C_fKpljx.js.map → app-shell-BE_j8-AT.js.map} +1 -1
- package/dist/{attachment-DbjUWsP0.js → attachment-q69dlt5Y.js} +9 -9
- package/dist/{attachment-DbjUWsP0.js.map → attachment-q69dlt5Y.js.map} +1 -1
- package/dist/{auth-CAQcasMV.js → auth-M3vGMgDR.js} +42 -42
- package/dist/{auth-CAQcasMV.js.map → auth-M3vGMgDR.js.map} +1 -1
- package/dist/{avatar-Bu2HhitA.js → avatar-djdaaQ_s.js} +14 -12
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-CzId1Wlm.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/buttons.js +2 -2
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +11 -11
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +244 -222
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +81 -76
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +42 -42
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +9 -9
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +4 -4
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +229 -220
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +147 -180
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +530 -523
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1390 -1516
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +82 -91
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-BuYz5SDU.js → breadcrumbs-BG_FfMK4.js} +5 -5
- package/dist/{breadcrumbs-BuYz5SDU.js.map → breadcrumbs-BG_FfMK4.js.map} +1 -1
- package/dist/{button-BZDasD04.js → button-BS3KDg00.js} +185 -162
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BZyfTvwm.js → button-R9CCoH7A.js} +2 -2
- package/dist/{button-BZyfTvwm.js.map → button-R9CCoH7A.js.map} +1 -1
- package/dist/{buttons-D_6KJvEE.js → buttons-DS0ZIwJ_.js} +11 -11
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-qGSErLw_.js → cards-QoJ4syG9.js} +7 -7
- package/dist/{cards-qGSErLw_.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/{chart-Bsc5BICK.js → chart-DwYRKKc-.js} +17 -15
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-DzHKRybS.js → code-block-CD0B7M93.js} +19 -19
- package/dist/{code-block-DzHKRybS.js.map → code-block-CD0B7M93.js.map} +1 -1
- package/dist/{collapsible-ClvC7Bj3.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-D6S8cv_n.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-D6S8cv_n.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/{combobox-BFnbJJp3.js → combobox-6dvVny2q.js} +96 -97
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/{combobox-hozNwUcc.js → combobox-CB7039j7.js} +326 -308
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-BnmSchli.js → command-kPMPjIxJ.js} +34 -30
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-u5L0OGip.js → comments-You0Bzbr.js} +349 -348
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +13 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-sizing.d.ts +32 -0
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +42 -19
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +53 -3
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +9 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +35 -13
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/{containers-DqB-bSYE.js → containers-D_L4mTVb.js} +3 -3
- package/dist/{containers-DqB-bSYE.js.map → containers-D_L4mTVb.js.map} +1 -1
- package/dist/{copyable-BTSByfmq.js → copyable-DDjTeW_j.js} +4 -4
- package/dist/{copyable-BTSByfmq.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/{data-display-Bihs9Ven.js → data-display-3xWQUnMA.js} +471 -478
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CS6Hbk18.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +38 -35
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +36 -35
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +325 -326
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +190 -200
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +77 -77
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +8 -8
- package/dist/features/media-library.js +499 -502
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1216 -1248
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +46 -44
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +96 -88
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +11 -11
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +188 -184
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +469 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-CJkUAapr.js → feedback-C7nR0UtT.js} +9 -10
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-DQQpiLWC.js → field-state-recipes-C-MFBX_8.js} +3 -3
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-D6FF8L6s.js → filters-Da-gNPsE.js} +467 -467
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-CZwrkP7m.js → form-field-VZRULhUK.js} +7 -7
- package/dist/{form-field-CZwrkP7m.js.map → form-field-VZRULhUK.js.map} +1 -1
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B5NCbkSC.js → forms-DDeEnXSY.js} +11 -11
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-kxruN3RM.js → header-2ycNqGOR.js} +43 -42
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-BrlnCwQd.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-BrlnCwQd.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{icon-badge-Btc6pQrp.js → icon-badge-DKlaKXoo.js} +3 -3
- package/dist/{icon-badge-Btc6pQrp.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{input-vxcaNCYC.js → input-BoLm9Hks.js} +3 -3
- package/dist/{input-vxcaNCYC.js.map → input-BoLm9Hks.js.map} +1 -1
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/{input-SX9V0AL3.js.map → input-DhQdBnV3.js.map} +1 -1
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +6 -1
- package/dist/lib/field-affordance-recipes.d.ts +35 -0
- package/dist/lib/field-state-recipes.d.ts +4 -2
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
- package/dist/lib/surface-recipes.d.ts +8 -6
- package/dist/lib/token-merge.generated.d.ts +11 -11
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +5 -2
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DLp3HAz0.js → media-gallery-DQUQ0m3O.js} +8 -8
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-Cl0Kt_Pd.js → mentions-DwnO1hh4.js} +34 -35
- package/dist/{mentions-Cl0Kt_Pd.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/{message-SZUNB1eX.js → message-YfFmbXNP.js} +5 -5
- package/dist/{message-SZUNB1eX.js.map → message-YfFmbXNP.js.map} +1 -1
- package/dist/{navigation-DyytsLRB.js → navigation-Cbp5V8gG.js} +33 -34
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/{navigation-DnQSNMT0.js → navigation-Cs1npsPm.js} +111 -87
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-DlU-4QYO.js} +2 -2
- package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-DlU-4QYO.js.map} +1 -1
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-D8nERkn5.js → page-header-hUTzcRZX.js} +9 -9
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-NLGqRirf.js → pagination-Cm0jqa3I.js} +8 -8
- package/dist/{pagination-NLGqRirf.js.map → pagination-Cm0jqa3I.js.map} +1 -1
- package/dist/{popover-CghIYdQf.js → popover-Dcv_9jxr.js} +6 -6
- package/dist/{popover-CghIYdQf.js.map → popover-Dcv_9jxr.js.map} +1 -1
- package/dist/{popover-menu-B4PoWhRl.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-wmbvL8Ah.js} +2 -2
- package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-wmbvL8Ah.js.map} +1 -1
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BroqrAyV.js → progress-Br9WTFya.js} +7 -7
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BuJynLgf.js → receipt-CV89q1fs.js} +6 -6
- package/dist/{receipt-BuJynLgf.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/{rich-text-editor-BKyG7rWz.js → rich-text-editor-CF8QYt5p.js} +6 -6
- package/dist/{rich-text-editor-BKyG7rWz.js.map → rich-text-editor-CF8QYt5p.js.map} +1 -1
- package/dist/{rich-text-editor.recipes-B72Nfuze.js → rich-text-editor.recipes-CnrbmTS1.js} +4 -4
- package/dist/{rich-text-editor.recipes-B72Nfuze.js.map → rich-text-editor.recipes-CnrbmTS1.js.map} +1 -1
- package/dist/{rich-text-DlxDOtf4.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-DlxDOtf4.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-D-pIhEKl.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-BhtFyo4x.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-BhtFyo4x.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-BNIgG3au.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-DOTOzeZ2.js → settings-DHk0L2MF.js} +17 -17
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-CyR4XKwR.js → sidebar-Crc9M9JV.js} +18 -18
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-3F0uhYn3.js → skeleton-DVMXr15h.js} +4 -4
- package/dist/{skeleton-3F0uhYn3.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/{smart-card-DjGVV2xr.js → smart-card-Bek-TwUp.js} +222 -207
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-Cpf7oRkF.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-CRdqVawd.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-CRdqVawd.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/{table-CcRDZiLP.js → table-Dn4XSrSB.js} +348 -348
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/{tabs-BNgu7g0u.js → tabs-Dk8E_knt.js} +14 -13
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/{text-inputs-DsR56TR-.js → text-inputs-BFpku0Qd.js} +150 -149
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +16 -12
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-D1pkt3se.js → timelines-CxuAFIc2.js} +25 -38
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BtmYyMZV.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BtmYyMZV.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-DRPn3qNl.js → ui-provider-D2_TeLqw.js} +20 -21
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CDbYw1WN.js → upload-B0WHW7ak.js} +221 -220
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-CNd_hH_a.js → upload-queue-BHZ_wBfd.js} +59 -62
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-VyJLUwRr.js → usage-card-U0YBLTNT.js} +42 -43
- package/dist/{usage-card-VyJLUwRr.js.map → usage-card-U0YBLTNT.js.map} +1 -1
- package/dist/{utils-BvH9PSmq.js → utils-Cospvlj1.js} +221 -51
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-CcR8r-Nt.js → workspace-YoFjXi6i.js} +44 -45
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +51 -38
- package/docs/consumer-skill/examples/app-layout.tsx +2 -4
- package/docs/consumer-skill/examples/detail.tsx +3 -4
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +28 -6
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/references/composition.md +89 -17
- package/docs/consumer-skill/references/discovery.md +4 -0
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +32 -1
- package/docs/consumer-skill/references/public-api.json +111 -70
- package/docs/consumer-skill/references/review.md +20 -4
- package/docs/consumer-skill/references/theming.md +7 -1
- package/docs/consumer-skill/references/tokens.json +5 -2
- package/docs/consumer-skill/references/workflows.md +4 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +93 -2
- package/docs/consumer-skill/scripts/discovery.mjs +11 -3
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/package.json +5 -3
- package/dist/accordion-BRTcsp8J.js.map +0 -1
- package/dist/action-menu-Drxw_vJk.js +0 -265
- package/dist/action-menu-Drxw_vJk.js.map +0 -1
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
- package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
- package/dist/avatar-Bu2HhitA.js.map +0 -1
- package/dist/badge-CzId1Wlm.js.map +0 -1
- package/dist/button-BZDasD04.js.map +0 -1
- package/dist/buttons-D_6KJvEE.js.map +0 -1
- package/dist/chart-Bsc5BICK.js.map +0 -1
- package/dist/checkbox-BQNDjUCh.js +0 -34
- package/dist/checkbox-BQNDjUCh.js.map +0 -1
- package/dist/choice-inputs-Mk3iWbhr.js +0 -725
- package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
- package/dist/combobox-BFnbJJp3.js.map +0 -1
- package/dist/combobox-hozNwUcc.js.map +0 -1
- package/dist/command-BnmSchli.js.map +0 -1
- package/dist/comments-u5L0OGip.js.map +0 -1
- package/dist/data-display-Bihs9Ven.js.map +0 -1
- package/dist/date-DOKhJPu7.js +0 -140
- package/dist/date-DOKhJPu7.js.map +0 -1
- package/dist/date-picker-DzP5HQq7.js +0 -1541
- package/dist/date-picker-DzP5HQq7.js.map +0 -1
- package/dist/date-pickers-BpgGz7S-.js +0 -196
- package/dist/date-pickers-BpgGz7S-.js.map +0 -1
- package/dist/display-CS6Hbk18.js.map +0 -1
- package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
- package/dist/feedback-CJkUAapr.js.map +0 -1
- package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
- package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
- package/dist/filters-D6FF8L6s.js.map +0 -1
- package/dist/form-sizing-QP8aIRaW.js +0 -103
- package/dist/form-sizing-QP8aIRaW.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B5NCbkSC.js.map +0 -1
- package/dist/forms-numeric-Crrm80Lm.js +0 -867
- package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
- package/dist/header-kxruN3RM.js.map +0 -1
- package/dist/input-SX9V0AL3.js +0 -255
- package/dist/item-DE4YnuJx.js +0 -258
- package/dist/item-DE4YnuJx.js.map +0 -1
- package/dist/media-gallery-DLp3HAz0.js.map +0 -1
- package/dist/navigation-DnQSNMT0.js.map +0 -1
- package/dist/navigation-DyytsLRB.js.map +0 -1
- package/dist/number-DasMFWEG.js +0 -269
- package/dist/number-DasMFWEG.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-DUbs1KEi.js +0 -1011
- package/dist/overlays-DUbs1KEi.js.map +0 -1
- package/dist/page-hGmT4nWK.js +0 -213
- package/dist/page-hGmT4nWK.js.map +0 -1
- package/dist/page-header-D8nERkn5.js.map +0 -1
- package/dist/primitives-C7ff0QaI.js +0 -337
- package/dist/primitives-C7ff0QaI.js.map +0 -1
- package/dist/progress-BroqrAyV.js.map +0 -1
- package/dist/scroll-area-D-pIhEKl.js.map +0 -1
- package/dist/separator-BNIgG3au.js.map +0 -1
- package/dist/settings-DOTOzeZ2.js.map +0 -1
- package/dist/sheet-BFhrNehm.js +0 -205
- package/dist/sheet-BFhrNehm.js.map +0 -1
- package/dist/sidebar-CyR4XKwR.js.map +0 -1
- package/dist/sidebar-SvGJ0Zwi.js +0 -506
- package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
- package/dist/smart-card-DjGVV2xr.js.map +0 -1
- package/dist/spinner-Cpf7oRkF.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-Dd__PD-w.js +0 -28
- package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
- package/dist/table-CLtJTxoR.js +0 -147
- package/dist/table-CLtJTxoR.js.map +0 -1
- package/dist/table-CcRDZiLP.js.map +0 -1
- package/dist/tabs-BNgu7g0u.js.map +0 -1
- package/dist/text-inputs-DsR56TR-.js.map +0 -1
- package/dist/text.styles-Q4sGAIgA.js.map +0 -1
- package/dist/timelines-D1pkt3se.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-BxQgiZyw.js +0 -96
- package/dist/typography-BxQgiZyw.js.map +0 -1
- package/dist/ui-provider-DRPn3qNl.js.map +0 -1
- package/dist/upload-CDbYw1WN.js.map +0 -1
- package/dist/upload-queue-CNd_hH_a.js.map +0 -1
- package/dist/utils-BvH9PSmq.js.map +0 -1
- package/dist/value-inputs-D0KCrfVC.js +0 -840
- package/dist/value-inputs-D0KCrfVC.js.map +0 -1
- package/dist/workspace-CcR8r-Nt.js.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as e, s as t } from "./ui-provider-
|
|
2
|
+
import { _ as e, s as t } from "./ui-provider-D2_TeLqw.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import { a as i,
|
|
6
|
-
import { t as s } from "./button-
|
|
7
|
-
import { r as c, t as l } from "./structure-
|
|
8
|
-
import { n as u, t as d } from "./feedback-
|
|
9
|
-
import { _ as f, g as p, m } from "./primitives-
|
|
10
|
-
import { t as h } from "./number-
|
|
11
|
-
import { n as g, t as _ } from "./date-
|
|
12
|
-
import { t as v } from "./badge-
|
|
13
|
-
import { t as y } from "./field-affordance-recipes-
|
|
14
|
-
import { a as b, i as x, n as S, o as C, r as w, s as T, t as E } from "./command-
|
|
15
|
-
import { d as D,
|
|
16
|
-
import { t as A } from "./input-
|
|
17
|
-
import { t as j } from "./date-picker-
|
|
18
|
-
import { a as M, c as N, i as P, o as F, r as I, t as ee } from "./popover-
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import { t as
|
|
24
|
-
import
|
|
25
|
-
import { Fragment as
|
|
26
|
-
import { CalendarIcon as
|
|
27
|
-
import { format as
|
|
4
|
+
import { t as r } from "./utils-Cospvlj1.js";
|
|
5
|
+
import { a as i, i as a, s as o } from "./typography-CAr3dQhX.js";
|
|
6
|
+
import { t as s } from "./button-BS3KDg00.js";
|
|
7
|
+
import { r as c, t as l } from "./structure-hzCW-XsV.js";
|
|
8
|
+
import { n as u, t as d } from "./feedback-C7nR0UtT.js";
|
|
9
|
+
import { _ as f, g as p, m } from "./primitives-BHrwQXFC.js";
|
|
10
|
+
import { t as h } from "./number-CKRBYmZK.js";
|
|
11
|
+
import { n as g, t as _ } from "./date-uf3z37Nm.js";
|
|
12
|
+
import { t as v } from "./badge-0tATj-tW.js";
|
|
13
|
+
import { t as y } from "./field-affordance-recipes-CkOCdE2y.js";
|
|
14
|
+
import { a as b, i as x, n as S, o as C, r as w, s as T, t as E } from "./command-kPMPjIxJ.js";
|
|
15
|
+
import { d as D, g as O, u as k } from "./form-sizing-uWP4lzVh.js";
|
|
16
|
+
import { t as A } from "./input-DhQdBnV3.js";
|
|
17
|
+
import { t as j } from "./date-picker-DrDFj8Lo.js";
|
|
18
|
+
import { a as M, c as N, i as P, o as F, r as I, t as ee } from "./popover-Dcv_9jxr.js";
|
|
19
|
+
import { n as L, r as R, t as te } from "./control-group-recipes-DBXmfh2E.js";
|
|
20
|
+
import { i as z, r as B, t as ne } from "./tabs-Dk8E_knt.js";
|
|
21
|
+
import { t as re } from "./popover-menu-DnRFKnHP.js";
|
|
22
|
+
import { t as ie } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
23
|
+
import { t as ae } from "./use-debounce-DZ_1ZBPa.js";
|
|
24
|
+
import V, { Component as oe, createContext as se, useCallback as H, useContext as ce, useEffect as U, useId as le, useMemo as W, useRef as G, useState as K } from "react";
|
|
25
|
+
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
26
|
+
import { CalendarIcon as ue, Check as de, ChevronDown as fe, ChevronLeft as pe, ChevronsUpDown as me, Filter as he, Loader2 as ge, Plus as _e, X as ve } from "lucide-react";
|
|
27
|
+
import { format as ye, isValid as be, parse as xe } from "date-fns";
|
|
28
28
|
//#region src/components/features/filters/filters.strings.ts
|
|
29
|
-
var
|
|
29
|
+
var Se = {
|
|
30
30
|
loading: "Loading",
|
|
31
31
|
loadingOptions: "Loading {filterLabel} options...",
|
|
32
32
|
addFilter: "Add filter",
|
|
@@ -105,20 +105,20 @@ var Ce = {
|
|
|
105
105
|
invalidFormat: "Invalid format"
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
function
|
|
108
|
+
function X(e, t) {
|
|
109
109
|
return e.replace(/{(\w+)}/g, (e, n) => String(t[n] ?? e)).replace(/:(\w+)/g, (e, n) => t[n] === void 0 ? e : String(t[n]));
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ce(e, t, n) {
|
|
112
112
|
let r = t.split("."), i = e;
|
|
113
113
|
for (let e of r) {
|
|
114
114
|
if (typeof i != "object" || !i) return t;
|
|
115
115
|
i = i[e];
|
|
116
116
|
}
|
|
117
|
-
return typeof i == "string" ? n ?
|
|
117
|
+
return typeof i == "string" ? n ? X(i, n) : i : t;
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region src/components/features/filters/filters.types.ts
|
|
121
|
-
var
|
|
121
|
+
var Z = {
|
|
122
122
|
SELECT: "select",
|
|
123
123
|
MULTI_SELECT: "multi_select",
|
|
124
124
|
ASYNC_SELECT: "async_select",
|
|
@@ -126,7 +126,7 @@ var X = {
|
|
|
126
126
|
RANGE: "range",
|
|
127
127
|
DATE: "date",
|
|
128
128
|
TAGS: "tags"
|
|
129
|
-
},
|
|
129
|
+
}, Q = {
|
|
130
130
|
EQUALS: "equals",
|
|
131
131
|
CONTAINS: "contains",
|
|
132
132
|
IN: "in",
|
|
@@ -143,112 +143,112 @@ var X = {
|
|
|
143
143
|
HAS_ANY: "has_any",
|
|
144
144
|
HAS_ALL: "has_all"
|
|
145
145
|
};
|
|
146
|
-
function
|
|
146
|
+
function we(e) {
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/features/filters/operator-options.ts
|
|
151
|
-
function
|
|
151
|
+
function Te(e) {
|
|
152
152
|
return [
|
|
153
153
|
{
|
|
154
154
|
label: e.contains,
|
|
155
|
-
value:
|
|
155
|
+
value: Q.CONTAINS
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
label: e.equals,
|
|
159
|
-
value:
|
|
159
|
+
value: Q.EQUALS
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
label: e.notContains,
|
|
163
|
-
value:
|
|
163
|
+
value: Q.NOT
|
|
164
164
|
}
|
|
165
165
|
];
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Ee(e) {
|
|
168
168
|
return [{
|
|
169
169
|
label: e.is,
|
|
170
|
-
value:
|
|
170
|
+
value: Q.EQUALS
|
|
171
171
|
}, {
|
|
172
172
|
label: e.isNot,
|
|
173
|
-
value:
|
|
173
|
+
value: Q.NOT
|
|
174
174
|
}];
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function De(e) {
|
|
177
177
|
return [
|
|
178
178
|
{
|
|
179
179
|
label: e.equals,
|
|
180
|
-
value:
|
|
180
|
+
value: Q.EQUALS
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
label: e.greaterThan,
|
|
184
|
-
value:
|
|
184
|
+
value: Q.GT
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
label: e.lessThan,
|
|
188
|
-
value:
|
|
188
|
+
value: Q.LT
|
|
189
189
|
}
|
|
190
190
|
];
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Oe(e) {
|
|
193
193
|
return [
|
|
194
194
|
{
|
|
195
195
|
label: e.before,
|
|
196
|
-
value:
|
|
196
|
+
value: Q.BEFORE
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
label: e.after,
|
|
200
|
-
value:
|
|
200
|
+
value: Q.AFTER
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
label: e.between,
|
|
204
|
-
value:
|
|
204
|
+
value: Q.BETWEEN
|
|
205
205
|
}
|
|
206
206
|
];
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function ke(e) {
|
|
209
209
|
return [{
|
|
210
210
|
label: e.equals,
|
|
211
|
-
value:
|
|
211
|
+
value: Q.EQUALS
|
|
212
212
|
}];
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Ae(e, t) {
|
|
215
215
|
switch (e) {
|
|
216
|
-
case
|
|
217
|
-
case
|
|
216
|
+
case Z.SEARCH: return Te(t);
|
|
217
|
+
case Z.TAGS: return [
|
|
218
218
|
{
|
|
219
219
|
label: t.has,
|
|
220
|
-
value:
|
|
220
|
+
value: Q.HAS
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
label: t.hasAny,
|
|
224
|
-
value:
|
|
224
|
+
value: Q.HAS_ANY
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
label: t.hasAll,
|
|
228
|
-
value:
|
|
228
|
+
value: Q.HAS_ALL
|
|
229
229
|
}
|
|
230
230
|
];
|
|
231
|
-
case
|
|
232
|
-
case
|
|
233
|
-
case
|
|
234
|
-
case
|
|
235
|
-
default: return
|
|
231
|
+
case Z.SELECT:
|
|
232
|
+
case Z.ASYNC_SELECT: return Ee(t);
|
|
233
|
+
case Z.RANGE: return De(t);
|
|
234
|
+
case Z.DATE: return Oe(t);
|
|
235
|
+
default: return Te(t);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function je(e) {
|
|
239
239
|
switch (e) {
|
|
240
|
-
case
|
|
241
|
-
case
|
|
242
|
-
case
|
|
243
|
-
case
|
|
244
|
-
case
|
|
245
|
-
case
|
|
246
|
-
default: return
|
|
240
|
+
case Z.SEARCH: return Q.CONTAINS;
|
|
241
|
+
case Z.TAGS: return Q.HAS;
|
|
242
|
+
case Z.SELECT:
|
|
243
|
+
case Z.ASYNC_SELECT: return Q.EQUALS;
|
|
244
|
+
case Z.RANGE: return Q.EQUALS;
|
|
245
|
+
case Z.DATE: return Q.BEFORE;
|
|
246
|
+
default: return Q.EQUALS;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/components/features/filters/utils/filter-utils.ts
|
|
251
|
-
function
|
|
251
|
+
function Me(e, t, n) {
|
|
252
252
|
if (e.type === "date" && Array.isArray(t) && t.every((e) => typeof e == "string")) return !0;
|
|
253
253
|
if (e.validation?.required && (!t || Array.isArray(t) && t.length === 0)) return n("validation.required");
|
|
254
254
|
if (typeof t == "number") {
|
|
@@ -264,14 +264,14 @@ function Ne(e, t, n) {
|
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
266
|
//#region src/components/features/filters/filter-context.tsx
|
|
267
|
-
var
|
|
268
|
-
function
|
|
269
|
-
let c =
|
|
267
|
+
var Ne = se(void 0);
|
|
268
|
+
function Pe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navigating: a = !1, strings: o, onError: s }) {
|
|
269
|
+
let c = G(t), l = G(i), u = G(s);
|
|
270
270
|
u.current = s;
|
|
271
|
-
let [d, f] =
|
|
271
|
+
let [d, f] = K(0), p = G(/* @__PURE__ */ new Map()), m = W(() => {
|
|
272
272
|
let e = /* @__PURE__ */ new Map();
|
|
273
273
|
for (let n of t) {
|
|
274
|
-
if (n.type !==
|
|
274
|
+
if (n.type !== Z.ASYNC_SELECT) continue;
|
|
275
275
|
let t = n.asyncConfig?.fetcher, r = n.asyncConfig?.mapToOption, i = n.asyncConfig?.limit ?? 10, a = p.current.get(n.key), o = a && a.fetcher === t && a.mapToOption === r;
|
|
276
276
|
e.set(n.key, o && a.limit === i ? a : {
|
|
277
277
|
fetcher: t,
|
|
@@ -281,34 +281,34 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
return e.size === p.current.size && [...e].every(([e, t]) => p.current.get(e) === t) ? p.current : (p.current = e, e);
|
|
284
|
-
}, [t]), h = JSON.stringify(r.filter((e) => m.has(e.key)).map(({ key: e, value: t }) => [e, t])), g = n(
|
|
285
|
-
|
|
284
|
+
}, [t]), h = JSON.stringify(r.filter((e) => m.has(e.key)).map(({ key: e, value: t }) => [e, t])), g = n(Se, o);
|
|
285
|
+
U(() => {
|
|
286
286
|
c.current = t;
|
|
287
|
-
}, [t]),
|
|
287
|
+
}, [t]), U(() => {
|
|
288
288
|
l.current = i;
|
|
289
289
|
}, [i]);
|
|
290
|
-
let _ =
|
|
290
|
+
let _ = H((e) => {
|
|
291
291
|
let t = [...r, e];
|
|
292
292
|
l.current(t);
|
|
293
|
-
}, [r]), v =
|
|
293
|
+
}, [r]), v = H((e) => {
|
|
294
294
|
let t = r.filter((t) => t.id !== e && t.key !== e);
|
|
295
295
|
l.current(t);
|
|
296
|
-
}, [r]), y =
|
|
296
|
+
}, [r]), y = H((e, t) => {
|
|
297
297
|
let n = r.map((n) => n.id === e || n.key === e ? {
|
|
298
298
|
...n,
|
|
299
299
|
...t
|
|
300
300
|
} : n);
|
|
301
301
|
l.current(n);
|
|
302
|
-
}, [r]), b =
|
|
302
|
+
}, [r]), b = H(() => {
|
|
303
303
|
l.current([]);
|
|
304
|
-
}, []), x =
|
|
304
|
+
}, []), x = H((e) => {
|
|
305
305
|
l.current(e);
|
|
306
|
-
}, []), S =
|
|
306
|
+
}, []), S = H((e) => c.current.find((t) => t.key === e), []), C = H((e) => r.find((t) => t.key === e)?.value || [], [r]), w = H((e, t) => {
|
|
307
307
|
let n = r.find((t) => t.key === e);
|
|
308
308
|
if (t.length === 0) n && v(e);
|
|
309
309
|
else if (n) y(e, { value: t });
|
|
310
310
|
else {
|
|
311
|
-
let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ?
|
|
311
|
+
let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ? je(n.type) : "equals");
|
|
312
312
|
_({
|
|
313
313
|
id: e,
|
|
314
314
|
key: e,
|
|
@@ -321,21 +321,21 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
321
321
|
_,
|
|
322
322
|
v,
|
|
323
323
|
y
|
|
324
|
-
]), T =
|
|
324
|
+
]), T = H((e) => r.some((t) => t.key === e && t.value.length > 0), [r]), E = H((e) => r.find((t) => t.key === e)?.operator || "equals", [r]), D = H((e, t) => {
|
|
325
325
|
r.find((t) => t.key === e) && y(e, { operator: t });
|
|
326
|
-
}, [r, y]), O =
|
|
326
|
+
}, [r, y]), O = H((e, t) => {
|
|
327
327
|
let n = c.current.find((t) => t.key === e);
|
|
328
|
-
return n ?
|
|
329
|
-
}, [g]), k =
|
|
328
|
+
return n ? Me(n, t, (e) => Ce(g, e)) : !1;
|
|
329
|
+
}, [g]), k = H((e) => c.current.filter((t) => t.dependencies?.some((t) => t.key === e)), []), A = H((e, t) => {
|
|
330
330
|
let n = m.get(e)?.options;
|
|
331
331
|
if (!n) return;
|
|
332
332
|
let r = !1;
|
|
333
333
|
for (let e of t) n.get(e.value)?.label !== e.label && (r = !0), n.set(e.value, e);
|
|
334
334
|
r && f((e) => e + 1);
|
|
335
|
-
}, [m]), j =
|
|
335
|
+
}, [m]), j = H((e, t) => m.get(e)?.options.get(t)?.label, [m, d]), M = H((e, t) => {
|
|
336
336
|
u.current?.(e, t);
|
|
337
337
|
}, []);
|
|
338
|
-
|
|
338
|
+
U(() => {
|
|
339
339
|
let e = new AbortController(), t = (t, n) => {
|
|
340
340
|
e.signal.aborted || t && t.name === "AbortError" || u.current?.(t, {
|
|
341
341
|
phase: "fetch-options",
|
|
@@ -360,7 +360,7 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
360
360
|
m,
|
|
361
361
|
A
|
|
362
362
|
]);
|
|
363
|
-
let N =
|
|
363
|
+
let N = W(() => ({
|
|
364
364
|
activeFilters: r,
|
|
365
365
|
filters: t,
|
|
366
366
|
addFilter: _,
|
|
@@ -403,28 +403,28 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
403
403
|
j,
|
|
404
404
|
M
|
|
405
405
|
]);
|
|
406
|
-
return /* @__PURE__ */
|
|
406
|
+
return /* @__PURE__ */ J(Ne.Provider, {
|
|
407
407
|
value: N,
|
|
408
408
|
children: e
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
let e =
|
|
411
|
+
function $() {
|
|
412
|
+
let e = ce(Ne);
|
|
413
413
|
if (!e) throw Error("useFilters must be used within a FilterProvider");
|
|
414
414
|
return e;
|
|
415
415
|
}
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region src/components/features/filters/hooks/use-filter-groups.ts
|
|
418
|
-
function
|
|
419
|
-
let { dynamicFilterOptions: t } = e, { filters: n, isFilterActive: r } =
|
|
418
|
+
function Fe(e = {}) {
|
|
419
|
+
let { dynamicFilterOptions: t } = e, { filters: n, isFilterActive: r } = $(), i = W(() => t ? n.map((e) => {
|
|
420
420
|
let n = t[e.key];
|
|
421
421
|
return Array.isArray(n) ? {
|
|
422
422
|
...e,
|
|
423
423
|
options: n
|
|
424
424
|
} : e;
|
|
425
425
|
}) : n, [n, t]);
|
|
426
|
-
return
|
|
427
|
-
let e = i.filter((e) => e.type ===
|
|
426
|
+
return W(() => {
|
|
427
|
+
let e = i.filter((e) => e.type === Z.SEARCH), t = i.filter((e) => !e.displayConfig?.hidden && e.displayConfig?.display !== "hidden"), n = i.filter((e) => e.type !== Z.SEARCH && !e.displayConfig?.hidden && e.displayConfig?.display !== "hidden" && r(e.key)), a = t.filter((e) => e.type !== Z.SEARCH && !r(e.key) && e.displayConfig?.display === "always"), o = t.filter((e) => e.type !== Z.SEARCH && !r(e.key) && e.displayConfig?.display !== "always"), s = n.map((e) => e.key);
|
|
428
428
|
return {
|
|
429
429
|
processedFilters: i,
|
|
430
430
|
searchFilters: e,
|
|
@@ -438,28 +438,28 @@ function Ie(e = {}) {
|
|
|
438
438
|
}
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/components/features/filters/partials/filter-operator-select.tsx
|
|
441
|
-
function
|
|
442
|
-
let [c, l] =
|
|
443
|
-
return /* @__PURE__ */
|
|
441
|
+
function Ie({ operator: e, operators: t, onOperatorChange: n, segmentResetClass: a }) {
|
|
442
|
+
let [c, l] = K(!1), { strings: u } = $(), d = t.find((t) => t.value === e)?.label || e;
|
|
443
|
+
return /* @__PURE__ */ J(re, {
|
|
444
444
|
open: c,
|
|
445
445
|
onOpenChange: l,
|
|
446
446
|
search: !1,
|
|
447
447
|
contentLabel: u.operator,
|
|
448
|
-
trigger: /* @__PURE__ */
|
|
448
|
+
trigger: /* @__PURE__ */ J(s, {
|
|
449
449
|
tone: "secondary",
|
|
450
450
|
buttonStyle: "ghost",
|
|
451
|
-
className: r("filter-operator-select--component", a, "h-full px-control text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
451
|
+
className: r("filter-operator-select--component", a, "h-full min-h-0 px-control text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
452
452
|
onClick: (e) => {
|
|
453
453
|
e.stopPropagation();
|
|
454
454
|
},
|
|
455
455
|
type: "button",
|
|
456
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ J(o, {
|
|
457
457
|
tag: "span",
|
|
458
458
|
type: "secondary",
|
|
459
459
|
children: d
|
|
460
460
|
})
|
|
461
461
|
}),
|
|
462
|
-
header: /* @__PURE__ */
|
|
462
|
+
header: /* @__PURE__ */ J(i, {
|
|
463
463
|
tag: "span",
|
|
464
464
|
children: u.operator
|
|
465
465
|
}),
|
|
@@ -476,163 +476,163 @@ function Le({ operator: e, operators: t, onOperatorChange: n, segmentResetClass:
|
|
|
476
476
|
}
|
|
477
477
|
//#endregion
|
|
478
478
|
//#region src/components/features/filters/partials/filter-value-display.tsx
|
|
479
|
-
function
|
|
480
|
-
let { strings: n } =
|
|
481
|
-
return t.length === 0 && e.type !==
|
|
479
|
+
function Le({ filter: e, value: t }) {
|
|
480
|
+
let { strings: n } = $();
|
|
481
|
+
return t.length === 0 && e.type !== Z.DATE ? /* @__PURE__ */ J(o, {
|
|
482
482
|
tag: "span",
|
|
483
483
|
type: "secondary",
|
|
484
484
|
className: "filter-value-display--component leading-none",
|
|
485
485
|
children: n.nothingSelected
|
|
486
|
-
}) : e.type ===
|
|
486
|
+
}) : e.type === Z.ASYNC_SELECT && !e.options?.length ? /* @__PURE__ */ J(o, {
|
|
487
487
|
tag: "span",
|
|
488
488
|
weight: "semibold",
|
|
489
489
|
className: "filter-value-display--component leading-none",
|
|
490
|
-
children:
|
|
491
|
-
}) : e.options && e.type !==
|
|
490
|
+
children: ze(e, t, n)
|
|
491
|
+
}) : e.options && e.type !== Z.DATE ? /* @__PURE__ */ Y(l, {
|
|
492
492
|
direction: "horizontal",
|
|
493
493
|
gap: "xs",
|
|
494
494
|
wrap: !1,
|
|
495
495
|
className: "filter-value-display--component",
|
|
496
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
497
497
|
className: "relative flex",
|
|
498
498
|
children: [t.slice(0, 2).map((t, n) => {
|
|
499
499
|
let r = e.options?.find((e) => e.value === t);
|
|
500
|
-
return r?.icon ? /* @__PURE__ */
|
|
500
|
+
return r?.icon ? /* @__PURE__ */ J("div", {
|
|
501
501
|
className: `${n > 0 ? "-ml-space-sm" : ""} border-background bg-background relative rounded-full border`,
|
|
502
502
|
style: { zIndex: 10 - n },
|
|
503
503
|
children: r.icon
|
|
504
504
|
}, t) : null;
|
|
505
|
-
}), t.length > 2 && /* @__PURE__ */
|
|
505
|
+
}), t.length > 2 && /* @__PURE__ */ J("div", {
|
|
506
506
|
className: "bg-muted border-background relative -ml-space-sm flex size-icon items-center justify-center rounded-full border",
|
|
507
|
-
children: /* @__PURE__ */
|
|
507
|
+
children: /* @__PURE__ */ Y(o, {
|
|
508
508
|
tag: "span",
|
|
509
509
|
size: "xs",
|
|
510
510
|
weight: "medium",
|
|
511
|
-
children: ["+", /* @__PURE__ */
|
|
511
|
+
children: ["+", /* @__PURE__ */ J(h, {
|
|
512
512
|
value: t.length - 2,
|
|
513
513
|
size: "inherit",
|
|
514
514
|
align: "center"
|
|
515
515
|
})]
|
|
516
516
|
})
|
|
517
517
|
})]
|
|
518
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ J(o, {
|
|
519
519
|
tag: "span",
|
|
520
520
|
weight: "semibold",
|
|
521
521
|
className: "truncate leading-none",
|
|
522
|
-
children:
|
|
522
|
+
children: Be(e, t, n)
|
|
523
523
|
})]
|
|
524
|
-
}) : e.type ===
|
|
524
|
+
}) : e.type === Z.DATE ? /* @__PURE__ */ Y(l, {
|
|
525
525
|
direction: "horizontal",
|
|
526
526
|
gap: "xs",
|
|
527
527
|
wrap: !1,
|
|
528
528
|
className: "filter-value-display--component",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
530
|
-
}) : /* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ J(ue, { className: "text-muted-foreground size-icon-sm" }), Re(e, t, n)]
|
|
530
|
+
}) : /* @__PURE__ */ J(o, {
|
|
531
531
|
tag: "span",
|
|
532
532
|
weight: "semibold",
|
|
533
533
|
className: "filter-value-display--component truncate leading-none",
|
|
534
|
-
children:
|
|
534
|
+
children: Be(e, t, n)
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
return e.operator === "between" && t.length === 2 ?
|
|
537
|
+
function Re(e, t, n) {
|
|
538
|
+
return e.operator === "between" && t.length === 2 ? Ue(t[0], t[1], e.dateFormat?.display) : t.length === 1 ? He(t[0], e.dateFormat?.display) : t.length === 2 ? Ue(t[0], t[1], e.dateFormat?.display) : /* @__PURE__ */ J(f, {
|
|
539
539
|
weight: "semibold",
|
|
540
540
|
className: "truncate leading-none",
|
|
541
541
|
children: e.datePickerConfig?.noDatePlaceholder || n.calendar.notDateSelected
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
return t.length === 0 ? "" :
|
|
544
|
+
function ze(e, t, n) {
|
|
545
|
+
return t.length === 0 ? "" : X(n.selected, {
|
|
546
546
|
count: t.length,
|
|
547
547
|
filterLabel: (t.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
return t.length > 1 ?
|
|
550
|
+
function Be(e, t, n) {
|
|
551
|
+
return t.length > 1 ? X(n.selected, {
|
|
552
552
|
count: t.length,
|
|
553
553
|
filterLabel: e.pluralLabel ?? e.label
|
|
554
554
|
}) : t.map((t) => e.options?.find((e) => e.value === t)?.label || t).join(", ");
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function Ve(e) {
|
|
557
557
|
let t = new Date(e);
|
|
558
558
|
return !Number.isNaN(t.getTime());
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
return
|
|
560
|
+
function He(e, t) {
|
|
561
|
+
return Ve(e) ? /* @__PURE__ */ J(_, {
|
|
562
562
|
value: e,
|
|
563
563
|
format: t,
|
|
564
564
|
weight: "semibold",
|
|
565
565
|
className: "truncate leading-none"
|
|
566
|
-
}) : /* @__PURE__ */
|
|
566
|
+
}) : /* @__PURE__ */ J(f, {
|
|
567
567
|
weight: "semibold",
|
|
568
568
|
className: "truncate leading-none",
|
|
569
569
|
children: e
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
return
|
|
572
|
+
function Ue(e, t, n) {
|
|
573
|
+
return Ve(e) && Ve(t) ? /* @__PURE__ */ J(g, {
|
|
574
574
|
from: e,
|
|
575
575
|
to: t,
|
|
576
576
|
format: n,
|
|
577
577
|
weight: "semibold",
|
|
578
578
|
className: "truncate leading-none"
|
|
579
|
-
}) : /* @__PURE__ */
|
|
579
|
+
}) : /* @__PURE__ */ Y("span", {
|
|
580
580
|
className: "inline-flex min-w-0 items-center gap-space-xs truncate leading-none",
|
|
581
581
|
children: [
|
|
582
|
-
|
|
583
|
-
/* @__PURE__ */
|
|
582
|
+
He(e, n),
|
|
583
|
+
/* @__PURE__ */ J(f, {
|
|
584
584
|
weight: "semibold",
|
|
585
585
|
children: "–"
|
|
586
586
|
}),
|
|
587
|
-
|
|
587
|
+
He(t, n)
|
|
588
588
|
]
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
//#endregion
|
|
592
592
|
//#region src/components/features/filters/partials/active-filter-item.tsx
|
|
593
|
-
function
|
|
594
|
-
let { defaultScale: h } = t(), g = e(void 0, h), { strings: _ } =
|
|
593
|
+
function We({ filter: n, value: i, active: a, popoverOpen: c, triggerRef: l, operators: u, operator: d, onOperatorChange: f, onFilterClear: p, onFilterClick: m }) {
|
|
594
|
+
let { defaultScale: h } = t(), g = e(void 0, h), { strings: _ } = $(), v = V.useId(), y = V.useId(), b = `${R.joinedItem} !border-0 !rounded-none !shadow-none focus-visible:!ring-0 focus-visible:!border-transparent`, x = () => /* @__PURE__ */ J("div", {
|
|
595
595
|
"aria-hidden": !0,
|
|
596
596
|
className: "w-px self-stretch bg-border"
|
|
597
597
|
});
|
|
598
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ Y("div", {
|
|
599
599
|
role: "group",
|
|
600
600
|
"aria-label": n.label,
|
|
601
|
-
"data-active":
|
|
602
|
-
className: r("active-filter-item--component",
|
|
601
|
+
"data-active": a || void 0,
|
|
602
|
+
className: r("active-filter-item--component", R.joinedFrame, te[g], "bg-background", n.displayConfig?.className),
|
|
603
603
|
children: [
|
|
604
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ Y(s, {
|
|
605
605
|
type: "button",
|
|
606
606
|
tone: "secondary",
|
|
607
607
|
buttonStyle: "ghost",
|
|
608
|
-
className: r(b, "flex h-full items-center gap-space-sm px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
608
|
+
className: r(b, "flex h-full min-h-0 items-center gap-space-sm px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
609
609
|
ref: l,
|
|
610
610
|
"aria-haspopup": "dialog",
|
|
611
611
|
"aria-expanded": c,
|
|
612
612
|
onClick: m,
|
|
613
613
|
children: [
|
|
614
|
-
!!n.icon && /* @__PURE__ */
|
|
614
|
+
!!n.icon && /* @__PURE__ */ J("span", {
|
|
615
615
|
className: "flex items-center text-muted-foreground",
|
|
616
616
|
children: n.icon
|
|
617
617
|
}),
|
|
618
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ J(o, {
|
|
619
619
|
id: v,
|
|
620
620
|
tag: "span",
|
|
621
621
|
weight: "semibold",
|
|
622
622
|
children: n.label
|
|
623
623
|
}),
|
|
624
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ J(fe, { className: "size-icon-sm" })
|
|
625
625
|
]
|
|
626
626
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ J(x, {}),
|
|
628
|
+
/* @__PURE__ */ J(Ie, {
|
|
629
629
|
operator: d,
|
|
630
630
|
operators: u,
|
|
631
631
|
onOperatorChange: f,
|
|
632
632
|
segmentResetClass: b
|
|
633
633
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ J(x, {}),
|
|
635
|
+
/* @__PURE__ */ J(s, {
|
|
636
636
|
type: "button",
|
|
637
637
|
tone: "secondary",
|
|
638
638
|
buttonStyle: "ghost",
|
|
@@ -640,28 +640,28 @@ function Ge({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, ope
|
|
|
640
640
|
"aria-haspopup": "dialog",
|
|
641
641
|
"aria-expanded": c,
|
|
642
642
|
onClick: m,
|
|
643
|
-
className: r(b, "flex h-full min-w-0 flex-1 items-center justify-start px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
644
|
-
children: /* @__PURE__ */
|
|
643
|
+
className: r(b, "flex h-full min-h-0 min-w-0 flex-1 items-center justify-start px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
644
|
+
children: /* @__PURE__ */ J("span", {
|
|
645
645
|
id: y,
|
|
646
646
|
className: "min-w-0",
|
|
647
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ J(Le, {
|
|
648
648
|
filter: n,
|
|
649
|
-
value:
|
|
649
|
+
value: i
|
|
650
650
|
})
|
|
651
651
|
})
|
|
652
652
|
}),
|
|
653
|
-
!!
|
|
653
|
+
!!a && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(x, {}), /* @__PURE__ */ Y(s, {
|
|
654
654
|
type: "button",
|
|
655
655
|
tone: "secondary",
|
|
656
656
|
buttonStyle: "ghost",
|
|
657
|
-
className: r(b, "flex h-full shrink-0 items-center justify-center px-space-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
657
|
+
className: r(b, "flex h-full min-h-0 shrink-0 items-center justify-center px-space-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
658
658
|
onClick: (e) => {
|
|
659
659
|
e.stopPropagation(), e.preventDefault(), p();
|
|
660
660
|
},
|
|
661
|
-
children: [/* @__PURE__ */
|
|
661
|
+
children: [/* @__PURE__ */ J(ve, {
|
|
662
662
|
"aria-hidden": "true",
|
|
663
663
|
className: "size-icon"
|
|
664
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ J(o, {
|
|
665
665
|
tag: "span",
|
|
666
666
|
className: "sr-only",
|
|
667
667
|
children: _.clear
|
|
@@ -672,18 +672,18 @@ function Ge({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, ope
|
|
|
672
672
|
}
|
|
673
673
|
//#endregion
|
|
674
674
|
//#region src/components/features/filters/hooks/use-async-options.ts
|
|
675
|
-
function
|
|
675
|
+
function Ge(e, t, n) {
|
|
676
676
|
for (let [t, r] of e) Date.now() - r.timestamp > n && e.delete(t);
|
|
677
677
|
return e.get(t);
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
let { asyncConfig: i } = e, a = i?.fetcher, o = i?.mapToOption, s =
|
|
679
|
+
function Ke(e, t, n, r = {}) {
|
|
680
|
+
let { asyncConfig: i } = e, a = i?.fetcher, o = i?.mapToOption, s = W(() => /* @__PURE__ */ new Map(), [
|
|
681
681
|
e.key,
|
|
682
682
|
a,
|
|
683
683
|
o
|
|
684
|
-
]), c =
|
|
684
|
+
]), c = G(r.onError);
|
|
685
685
|
c.current = r.onError;
|
|
686
|
-
let l = i?.debounceMs ?? e.delay ?? 300, u = (
|
|
686
|
+
let l = i?.debounceMs ?? e.delay ?? 300, u = (ae(t, l) ?? "").trim(), d = i?.limit ?? 10, f = i?.minQueryLength ?? 0, p = i?.preload ?? !0, m = i?.staleTime ?? 6e4, h = i?.gcTime ?? 3e5, g = u.length === 0 && p, _ = u.length >= f, v = !!i?.fetcher && n && (g || u.length > 0 && _), y = n && !g && u.length > 0 && u.length < f, b = W(() => i?.queryKey ? JSON.stringify(i.queryKey({
|
|
687
687
|
query: u,
|
|
688
688
|
limit: d
|
|
689
689
|
})) : JSON.stringify([
|
|
@@ -696,7 +696,7 @@ function qe(e, t, n, r = {}) {
|
|
|
696
696
|
e.key,
|
|
697
697
|
u,
|
|
698
698
|
d
|
|
699
|
-
]), x =
|
|
699
|
+
]), x = H(async (e) => a && o ? (await a({
|
|
700
700
|
query: u,
|
|
701
701
|
limit: d,
|
|
702
702
|
signal: e
|
|
@@ -705,8 +705,8 @@ function qe(e, t, n, r = {}) {
|
|
|
705
705
|
o,
|
|
706
706
|
u,
|
|
707
707
|
d
|
|
708
|
-
]), [S, C] =
|
|
709
|
-
let e =
|
|
708
|
+
]), [S, C] = K(() => {
|
|
709
|
+
let e = Ge(s, b, h);
|
|
710
710
|
return {
|
|
711
711
|
cache: s,
|
|
712
712
|
data: e?.data ?? [],
|
|
@@ -714,11 +714,11 @@ function qe(e, t, n, r = {}) {
|
|
|
714
714
|
fetching: !1,
|
|
715
715
|
error: !1
|
|
716
716
|
};
|
|
717
|
-
}), [w, T] =
|
|
718
|
-
return
|
|
717
|
+
}), [w, T] = K(0), E = H(() => T((e) => e + 1), []), D = G(0);
|
|
718
|
+
return U(() => {
|
|
719
719
|
let t = D.current !== w;
|
|
720
720
|
if (D.current = w, !v) return;
|
|
721
|
-
let n =
|
|
721
|
+
let n = Ge(s, b, h), r = n !== void 0 && Date.now() - n.timestamp < m, i = new AbortController();
|
|
722
722
|
if (r && !t) return C({
|
|
723
723
|
cache: s,
|
|
724
724
|
data: n.data,
|
|
@@ -780,21 +780,21 @@ function qe(e, t, n, r = {}) {
|
|
|
780
780
|
}
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region src/components/features/filters/partials/async-filter-content.tsx
|
|
783
|
-
function
|
|
784
|
-
let { strings: c, cacheAsyncOptions: f, getAsyncOptionLabel: p, reportError: m } =
|
|
783
|
+
function qe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: i, triggerSource: a = "chip" }) {
|
|
784
|
+
let { strings: c, cacheAsyncOptions: f, getAsyncOptionLabel: p, reportError: m } = $(), [h, g] = K(""), [_, v] = K(t ?? []), y = G(t);
|
|
785
785
|
if (t !== y.current) {
|
|
786
786
|
let e = y.current ?? [], n = t ?? [];
|
|
787
787
|
y.current = t, (n.length !== e.length || n.some((t, n) => t !== e[n])) && v(n);
|
|
788
788
|
}
|
|
789
|
-
let { options: T, isLoading: D, isFetching: O, isError: k, refetch: A, isBelowMinQuery: j, minQueryLength: M } =
|
|
790
|
-
|
|
789
|
+
let { options: T, isLoading: D, isFetching: O, isError: k, refetch: A, isBelowMinQuery: j, minQueryLength: M } = Ke(e, h, !0, { onError: m });
|
|
790
|
+
U(() => {
|
|
791
791
|
T.length > 0 && f(e.key, T);
|
|
792
792
|
}, [
|
|
793
793
|
f,
|
|
794
794
|
e.key,
|
|
795
795
|
T
|
|
796
796
|
]);
|
|
797
|
-
let N = e.multiple !== !1, F = e.maxSelected, ee =
|
|
797
|
+
let N = e.multiple !== !1, F = e.maxSelected, ee = a === "toolbar", L = _.length !== t.length || _.some((e) => !t.includes(e)), R = W(() => {
|
|
798
798
|
let t = new Set(_), n = new Set(T.map((e) => e.value)), r = [];
|
|
799
799
|
for (let t of _) if (!n.has(t)) {
|
|
800
800
|
let n = p(e.key, t);
|
|
@@ -811,20 +811,20 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
811
811
|
e.key,
|
|
812
812
|
e.icon,
|
|
813
813
|
p
|
|
814
|
-
]),
|
|
814
|
+
]), te = (t) => {
|
|
815
815
|
if (N) {
|
|
816
816
|
if (_.includes(t)) v(_.filter((e) => e !== t));
|
|
817
817
|
else {
|
|
818
818
|
if (F && _.length >= F) return;
|
|
819
819
|
v([..._, t]);
|
|
820
820
|
}
|
|
821
|
-
} else v([t]), e.closeOnSelect === !0 && (n([t]),
|
|
822
|
-
},
|
|
823
|
-
n(_),
|
|
824
|
-
},
|
|
821
|
+
} else v([t]), e.closeOnSelect === !0 && (n([t]), i());
|
|
822
|
+
}, z = () => {
|
|
823
|
+
n(_), i();
|
|
824
|
+
}, B = W(() => D || O ? /* @__PURE__ */ J(u, { label: c.searching }) : k ? /* @__PURE__ */ J(d, {
|
|
825
825
|
variant: "inline",
|
|
826
826
|
title: c.fetchError,
|
|
827
|
-
action: /* @__PURE__ */
|
|
827
|
+
action: /* @__PURE__ */ J(s, {
|
|
828
828
|
tone: "secondary",
|
|
829
829
|
buttonStyle: "outline",
|
|
830
830
|
size: "sm",
|
|
@@ -833,13 +833,13 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
833
833
|
},
|
|
834
834
|
children: c.retryFetch
|
|
835
835
|
})
|
|
836
|
-
}) : j ? /* @__PURE__ */
|
|
836
|
+
}) : j ? /* @__PURE__ */ J("div", {
|
|
837
837
|
className: "text-muted-foreground flex items-center justify-center py-space-xl",
|
|
838
|
-
children: /* @__PURE__ */
|
|
838
|
+
children: /* @__PURE__ */ J(o, {
|
|
839
839
|
tag: "span",
|
|
840
840
|
size: "xs",
|
|
841
841
|
type: "secondary",
|
|
842
|
-
children:
|
|
842
|
+
children: X(c.minQueryHint, { min: M })
|
|
843
843
|
})
|
|
844
844
|
}) : c.noOptionsFound, [
|
|
845
845
|
D,
|
|
@@ -850,9 +850,9 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
850
850
|
c,
|
|
851
851
|
A
|
|
852
852
|
]);
|
|
853
|
-
return /* @__PURE__ */ q
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
start: ee ? /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ Y(q, { children: [
|
|
854
|
+
/* @__PURE__ */ Y(P, {
|
|
855
|
+
start: ee ? /* @__PURE__ */ J(s, {
|
|
856
856
|
tone: "secondary",
|
|
857
857
|
buttonStyle: "ghost",
|
|
858
858
|
size: "sm",
|
|
@@ -860,62 +860,62 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
860
860
|
className: "shrink-0",
|
|
861
861
|
onClick: r,
|
|
862
862
|
"aria-label": c.backToFilters,
|
|
863
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ J(pe, {
|
|
864
864
|
"aria-hidden": "true",
|
|
865
865
|
className: "size-icon-sm rtl:rotate-180"
|
|
866
866
|
})
|
|
867
867
|
}) : void 0,
|
|
868
|
-
children: [/* @__PURE__ */
|
|
868
|
+
children: [/* @__PURE__ */ J(o, {
|
|
869
869
|
tag: "span",
|
|
870
870
|
weight: "semibold",
|
|
871
871
|
children: e.label
|
|
872
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ J(o, {
|
|
873
873
|
tag: "span",
|
|
874
874
|
size: "xs",
|
|
875
875
|
type: "secondary",
|
|
876
876
|
children: c.selectValues
|
|
877
877
|
})]
|
|
878
878
|
}),
|
|
879
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ Y(E, {
|
|
880
880
|
shouldFilter: !1,
|
|
881
881
|
inset: "flush",
|
|
882
882
|
className: "rounded-none",
|
|
883
|
-
children: [/* @__PURE__ */
|
|
884
|
-
placeholder:
|
|
883
|
+
children: [/* @__PURE__ */ J(x, {
|
|
884
|
+
placeholder: X(c.searchPlaceholder, { filterLabel: e.label.toLowerCase() }),
|
|
885
885
|
value: h,
|
|
886
886
|
onValueChange: g
|
|
887
|
-
}), /* @__PURE__ */
|
|
887
|
+
}), /* @__PURE__ */ J(C, { children: R.length === 0 ? /* @__PURE__ */ J(S, { children: B }) : /* @__PURE__ */ Y(w, { children: [!(!O || D) && /* @__PURE__ */ Y(l, {
|
|
888
888
|
direction: "horizontal",
|
|
889
889
|
gap: "sm",
|
|
890
890
|
wrap: !1,
|
|
891
891
|
className: "px-control-sm py-space-xs",
|
|
892
|
-
children: [/* @__PURE__ */
|
|
892
|
+
children: [/* @__PURE__ */ J(ge, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ J(o, {
|
|
893
893
|
tag: "span",
|
|
894
894
|
size: "xs",
|
|
895
895
|
type: "secondary",
|
|
896
896
|
children: c.searching
|
|
897
897
|
})]
|
|
898
|
-
}),
|
|
899
|
-
onSelect: () =>
|
|
898
|
+
}), R.map((e) => /* @__PURE__ */ Y(b, {
|
|
899
|
+
onSelect: () => te(e.value),
|
|
900
900
|
"data-checked": _.includes(e.value) || void 0,
|
|
901
901
|
disabled: e.disabled || !!F && _.length >= F && !_.includes(e.value),
|
|
902
902
|
className: "flex items-center gap-space-sm",
|
|
903
|
-
children: [e.icon, /* @__PURE__ */
|
|
903
|
+
children: [e.icon, /* @__PURE__ */ J(o, {
|
|
904
904
|
tag: "span",
|
|
905
905
|
lineHeight: "tight",
|
|
906
906
|
children: e.label
|
|
907
907
|
})]
|
|
908
908
|
}, e.value))] }) })]
|
|
909
909
|
}),
|
|
910
|
-
|
|
911
|
-
caption:
|
|
910
|
+
L && /* @__PURE__ */ J(I, {
|
|
911
|
+
caption: X(c.selected, {
|
|
912
912
|
count: _.length,
|
|
913
913
|
filterLabel: (_.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
914
914
|
}),
|
|
915
|
-
children: /* @__PURE__ */
|
|
915
|
+
children: /* @__PURE__ */ J(s, {
|
|
916
916
|
tone: "primary",
|
|
917
917
|
size: "sm",
|
|
918
|
-
onClick:
|
|
918
|
+
onClick: z,
|
|
919
919
|
children: c.confirm
|
|
920
920
|
})
|
|
921
921
|
})
|
|
@@ -923,12 +923,12 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
923
923
|
}
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region src/components/features/filters/facets/date-facet.tsx
|
|
926
|
-
var
|
|
927
|
-
function
|
|
928
|
-
let { strings: a } =
|
|
926
|
+
var Je = [];
|
|
927
|
+
function Ye({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
928
|
+
let { strings: a } = $(), o = e.operators?.some((e) => e.value === "between") || e.operator === "between" || e.key.toLowerCase().includes("range") || e.key.toLowerCase().includes("between"), s = e.dateFormat?.param ?? "yyyy-MM-dd", c = e.dateFormat?.display ?? "PPP", l = o ? e.datePickerConfig?.noRangePlaceholder ?? e.placeholder ?? a.calendar.notDateRangeSelected : e.datePickerConfig?.noDatePlaceholder ?? e.placeholder ?? a.calendar.notDateSelected, u = !!e.datePickerConfig?.showConfirmButton, d = e.datePickerConfig?.autoApply ?? !u, f = e.datePickerConfig?.showShortcuts ?? !0, p = o && (t.start || t.end) ? {
|
|
929
929
|
from: t.start,
|
|
930
930
|
to: t.end
|
|
931
|
-
} : void 0, m = !o && t.start &&
|
|
931
|
+
} : void 0, m = !o && t.start && be(t.start) ? t.start : void 0, h = {
|
|
932
932
|
format: s,
|
|
933
933
|
readableFormat: c,
|
|
934
934
|
placeholder: l,
|
|
@@ -936,7 +936,7 @@ function Xe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
936
936
|
numberOfMonths: 1,
|
|
937
937
|
className: r("date-facet--component", "w-full", i)
|
|
938
938
|
};
|
|
939
|
-
return o ? /* @__PURE__ */
|
|
939
|
+
return o ? /* @__PURE__ */ J(j, {
|
|
940
940
|
mode: "range",
|
|
941
941
|
value: p,
|
|
942
942
|
onValueChange: (e) => {
|
|
@@ -947,9 +947,9 @@ function Xe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
947
947
|
},
|
|
948
948
|
withConfirm: u,
|
|
949
949
|
closeOnSelect: d,
|
|
950
|
-
presets: f ? void 0 :
|
|
950
|
+
presets: f ? void 0 : Je,
|
|
951
951
|
...h
|
|
952
|
-
}) : /* @__PURE__ */
|
|
952
|
+
}) : /* @__PURE__ */ J(j, {
|
|
953
953
|
mode: "single",
|
|
954
954
|
value: m,
|
|
955
955
|
onValueChange: (e) => {
|
|
@@ -964,17 +964,17 @@ function Xe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
964
964
|
}
|
|
965
965
|
//#endregion
|
|
966
966
|
//#region src/components/features/filters/partials/date-filter-content.tsx
|
|
967
|
-
function
|
|
968
|
-
let { strings: a } =
|
|
967
|
+
function Xe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, triggerSource: i = "chip" }) {
|
|
968
|
+
let { strings: a } = $(), o = (t) => {
|
|
969
969
|
if (!t) return;
|
|
970
970
|
if (e.dateFormat?.param) {
|
|
971
|
-
let n =
|
|
972
|
-
return
|
|
971
|
+
let n = xe(t, e.dateFormat.param, /* @__PURE__ */ new Date());
|
|
972
|
+
return be(n) ? n : void 0;
|
|
973
973
|
}
|
|
974
974
|
let n = new Date(t);
|
|
975
|
-
return
|
|
975
|
+
return be(n) ? n : void 0;
|
|
976
976
|
}, c = o(t[0]), l = o(t[1]), u = (t) => {
|
|
977
|
-
if (t &&
|
|
977
|
+
if (t && be(t)) return ye(t, e.dateFormat?.param ?? "yyyy-MM-dd");
|
|
978
978
|
}, d = ({ start: e, end: t }) => {
|
|
979
979
|
let r = [], i = u(e), a = u(t);
|
|
980
980
|
i && r.push(i), a && r.push(a), n(r);
|
|
@@ -982,10 +982,10 @@ function Ze({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
982
982
|
start: c,
|
|
983
983
|
end: l
|
|
984
984
|
};
|
|
985
|
-
return /* @__PURE__ */
|
|
985
|
+
return /* @__PURE__ */ Y("div", {
|
|
986
986
|
className: "flex flex-col",
|
|
987
|
-
children: [/* @__PURE__ */
|
|
988
|
-
start: f ? /* @__PURE__ */
|
|
987
|
+
children: [/* @__PURE__ */ J(P, {
|
|
988
|
+
start: f ? /* @__PURE__ */ J(s, {
|
|
989
989
|
type: "button",
|
|
990
990
|
tone: "secondary",
|
|
991
991
|
buttonStyle: "ghost",
|
|
@@ -994,15 +994,15 @@ function Ze({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
994
994
|
onClick: r,
|
|
995
995
|
className: "shrink-0",
|
|
996
996
|
"aria-label": a.backToFilters,
|
|
997
|
-
children: /* @__PURE__ */
|
|
997
|
+
children: /* @__PURE__ */ J(pe, {
|
|
998
998
|
"aria-hidden": "true",
|
|
999
999
|
className: "size-icon-sm rtl:rotate-180"
|
|
1000
1000
|
})
|
|
1001
1001
|
}) : void 0,
|
|
1002
|
-
children: /* @__PURE__ */
|
|
1003
|
-
}), /* @__PURE__ */
|
|
1002
|
+
children: /* @__PURE__ */ J(M, { children: e.label })
|
|
1003
|
+
}), /* @__PURE__ */ J("div", {
|
|
1004
1004
|
className: "p-surface",
|
|
1005
|
-
children: /* @__PURE__ */
|
|
1005
|
+
children: /* @__PURE__ */ J(Ye, {
|
|
1006
1006
|
filter: e,
|
|
1007
1007
|
value: p,
|
|
1008
1008
|
onValueChange: d
|
|
@@ -1012,7 +1012,7 @@ function Ze({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
1012
1012
|
}
|
|
1013
1013
|
//#endregion
|
|
1014
1014
|
//#region src/components/features/filters/partials/filter-error-boundary.tsx
|
|
1015
|
-
var
|
|
1015
|
+
var Ze = class extends oe {
|
|
1016
1016
|
state = {
|
|
1017
1017
|
hasError: !1,
|
|
1018
1018
|
error: null
|
|
@@ -1038,19 +1038,19 @@ var Qe = class extends se {
|
|
|
1038
1038
|
render() {
|
|
1039
1039
|
if (this.state.hasError) {
|
|
1040
1040
|
let { fallback: e, filterKey: t, labels: n } = this.props;
|
|
1041
|
-
return e ? /* @__PURE__ */
|
|
1041
|
+
return e ? /* @__PURE__ */ J("div", {
|
|
1042
1042
|
className: "filter-error-boundary--component contents",
|
|
1043
1043
|
children: e
|
|
1044
|
-
}) : /* @__PURE__ */
|
|
1044
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1045
1045
|
className: "filter-error-boundary--component rounded-radius border border-destructive/30 bg-destructive/10 p-surface-xs text-destructive",
|
|
1046
1046
|
children: [
|
|
1047
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ Y("div", {
|
|
1048
1048
|
className: "mb-space-xs flex items-center justify-between",
|
|
1049
|
-
children: [/* @__PURE__ */
|
|
1049
|
+
children: [/* @__PURE__ */ J(o, {
|
|
1050
1050
|
tag: "span",
|
|
1051
1051
|
weight: "semibold",
|
|
1052
1052
|
children: n.title
|
|
1053
|
-
}), /* @__PURE__ */
|
|
1053
|
+
}), /* @__PURE__ */ J(s, {
|
|
1054
1054
|
type: "button",
|
|
1055
1055
|
tone: "destructive",
|
|
1056
1056
|
buttonStyle: "ghost",
|
|
@@ -1058,11 +1058,11 @@ var Qe = class extends se {
|
|
|
1058
1058
|
iconOnly: !0,
|
|
1059
1059
|
onClick: this.handleReset,
|
|
1060
1060
|
"aria-label": n.reset,
|
|
1061
|
-
children: /* @__PURE__ */
|
|
1061
|
+
children: /* @__PURE__ */ J(ve, { className: "size-icon-sm" })
|
|
1062
1062
|
})]
|
|
1063
1063
|
}),
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ J(o, { children: n.getDescription(t) }),
|
|
1065
|
+
/* @__PURE__ */ J(m, {
|
|
1066
1066
|
size: "xs",
|
|
1067
1067
|
className: "mt-space-xs text-destructive",
|
|
1068
1068
|
children: this.state.error?.message || n.unknownError
|
|
@@ -1070,20 +1070,20 @@ var Qe = class extends se {
|
|
|
1070
1070
|
]
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
return /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ J("div", {
|
|
1074
1074
|
className: "filter-error-boundary--component contents",
|
|
1075
1075
|
children: this.props.children
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
};
|
|
1079
|
-
function
|
|
1080
|
-
let { strings: t, reportError: n } =
|
|
1079
|
+
function Qe(e) {
|
|
1080
|
+
let { strings: t, reportError: n } = $(), r = W(() => ({
|
|
1081
1081
|
title: t.error.title,
|
|
1082
1082
|
reset: t.clear,
|
|
1083
|
-
getDescription: (e) => e ?
|
|
1083
|
+
getDescription: (e) => e ? X(t.error.descriptionWithKey, { filterKey: e }) : t.error.generic,
|
|
1084
1084
|
unknownError: t.error.unknown
|
|
1085
1085
|
}), [t]);
|
|
1086
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ J(Ze, {
|
|
1087
1087
|
...e,
|
|
1088
1088
|
labels: r,
|
|
1089
1089
|
onError: n
|
|
@@ -1092,21 +1092,21 @@ function $(e) {
|
|
|
1092
1092
|
//#endregion
|
|
1093
1093
|
//#region src/components/features/filters/partials/filter-list-item.tsx
|
|
1094
1094
|
function $e({ filter: e, onSelect: t }) {
|
|
1095
|
-
let { strings: n } =
|
|
1096
|
-
return /* @__PURE__ */
|
|
1095
|
+
let { strings: n } = $(), r = e.type === Z.DATE ? e.operator === "between" ? n?.selectDateRange : n?.selectDate : e.options ? `${e.options.length} ${n?.options ?? ""}`.trim() : null;
|
|
1096
|
+
return /* @__PURE__ */ Y(b, {
|
|
1097
1097
|
onSelect: t,
|
|
1098
|
-
children: [!!e.icon && /* @__PURE__ */
|
|
1098
|
+
children: [!!e.icon && /* @__PURE__ */ J("span", {
|
|
1099
1099
|
className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
|
|
1100
1100
|
children: e.icon
|
|
1101
|
-
}), /* @__PURE__ */
|
|
1101
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1102
1102
|
className: "flex min-w-0 flex-col gap-dense leading-tight",
|
|
1103
|
-
children: [/* @__PURE__ */
|
|
1103
|
+
children: [/* @__PURE__ */ J(o, {
|
|
1104
1104
|
tag: "span",
|
|
1105
1105
|
lineHeight: "tight",
|
|
1106
1106
|
weight: "medium",
|
|
1107
1107
|
className: "truncate",
|
|
1108
1108
|
children: e.label
|
|
1109
|
-
}), !!r && /* @__PURE__ */
|
|
1109
|
+
}), !!r && /* @__PURE__ */ J(o, {
|
|
1110
1110
|
tag: "span",
|
|
1111
1111
|
lineHeight: "tight",
|
|
1112
1112
|
size: "xs",
|
|
@@ -1120,24 +1120,24 @@ function $e({ filter: e, onSelect: t }) {
|
|
|
1120
1120
|
//#endregion
|
|
1121
1121
|
//#region src/components/features/filters/partials/filter-list-content.tsx
|
|
1122
1122
|
function et({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
|
|
1123
|
-
let { strings: r } =
|
|
1123
|
+
let { strings: r } = $(), i = (e) => {
|
|
1124
1124
|
n(e);
|
|
1125
1125
|
};
|
|
1126
|
-
return /* @__PURE__ */
|
|
1126
|
+
return /* @__PURE__ */ Y(E, {
|
|
1127
1127
|
inset: "compact",
|
|
1128
1128
|
className: "rounded-none",
|
|
1129
|
-
children: [/* @__PURE__ */
|
|
1130
|
-
/* @__PURE__ */
|
|
1131
|
-
e.length > 0 && /* @__PURE__ */
|
|
1129
|
+
children: [/* @__PURE__ */ J(x, { placeholder: r.searchFilters }), /* @__PURE__ */ Y(C, { children: [
|
|
1130
|
+
/* @__PURE__ */ J(S, { children: r.noFiltersAvailable }),
|
|
1131
|
+
e.length > 0 && /* @__PURE__ */ J(w, {
|
|
1132
1132
|
heading: r.availableFilters,
|
|
1133
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1133
|
+
children: e.map((e) => /* @__PURE__ */ J($e, {
|
|
1134
1134
|
filter: e,
|
|
1135
1135
|
onSelect: () => i(e)
|
|
1136
1136
|
}, e.key))
|
|
1137
1137
|
}),
|
|
1138
|
-
t.length > 0 && /* @__PURE__ */ q
|
|
1138
|
+
t.length > 0 && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(T, {}), /* @__PURE__ */ J(w, {
|
|
1139
1139
|
heading: r.activeFilters,
|
|
1140
|
-
children: t.map((e) => /* @__PURE__ */
|
|
1140
|
+
children: t.map((e) => /* @__PURE__ */ J($e, {
|
|
1141
1141
|
filter: e,
|
|
1142
1142
|
onSelect: () => i(e)
|
|
1143
1143
|
}, e.key))
|
|
@@ -1147,19 +1147,19 @@ function et({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
//#endregion
|
|
1149
1149
|
//#region src/components/features/filters/partials/regular-filter-content.tsx
|
|
1150
|
-
function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose:
|
|
1151
|
-
let { strings: c, reportError: u } =
|
|
1152
|
-
|
|
1150
|
+
function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: i, triggerSource: a = "chip" }) {
|
|
1151
|
+
let { strings: c, reportError: u } = $(), d = e.multiple === !0 || e.type === Z.MULTI_SELECT, f = a === "toolbar", [p, m] = K(t || []);
|
|
1152
|
+
U(() => {
|
|
1153
1153
|
m(t || []);
|
|
1154
1154
|
}, [t]);
|
|
1155
1155
|
let h = (t) => {
|
|
1156
1156
|
if (d) {
|
|
1157
1157
|
let e = p.includes(t) ? p.filter((e) => e !== t) : [...p, t];
|
|
1158
1158
|
m(e);
|
|
1159
|
-
} else m([t]), e.closeOnSelect === !0 && (n([t]),
|
|
1159
|
+
} else m([t]), e.closeOnSelect === !0 && (n([t]), i());
|
|
1160
1160
|
}, g = () => {
|
|
1161
1161
|
try {
|
|
1162
|
-
n(p),
|
|
1162
|
+
n(p), i();
|
|
1163
1163
|
} catch (t) {
|
|
1164
1164
|
u(t, {
|
|
1165
1165
|
phase: "apply",
|
|
@@ -1167,11 +1167,11 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
1169
|
}, _ = JSON.stringify(p.slice().sort()) !== JSON.stringify((t ?? []).slice().sort());
|
|
1170
|
-
return /* @__PURE__ */
|
|
1170
|
+
return /* @__PURE__ */ Y("div", {
|
|
1171
1171
|
className: "flex flex-col",
|
|
1172
1172
|
children: [
|
|
1173
|
-
/* @__PURE__ */
|
|
1174
|
-
start: f ? /* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ J(P, {
|
|
1174
|
+
start: f ? /* @__PURE__ */ J(s, {
|
|
1175
1175
|
type: "button",
|
|
1176
1176
|
tone: "secondary",
|
|
1177
1177
|
buttonStyle: "ghost",
|
|
@@ -1180,47 +1180,47 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1180
1180
|
onClick: r,
|
|
1181
1181
|
className: "shrink-0",
|
|
1182
1182
|
"aria-label": c.backToFilters,
|
|
1183
|
-
children: /* @__PURE__ */
|
|
1183
|
+
children: /* @__PURE__ */ J(pe, {
|
|
1184
1184
|
"aria-hidden": "true",
|
|
1185
1185
|
className: "size-icon-sm rtl:rotate-180"
|
|
1186
1186
|
})
|
|
1187
1187
|
}) : void 0,
|
|
1188
|
-
children: /* @__PURE__ */
|
|
1188
|
+
children: /* @__PURE__ */ J(o, {
|
|
1189
1189
|
tag: "span",
|
|
1190
1190
|
weight: "semibold",
|
|
1191
1191
|
children: e.label
|
|
1192
1192
|
})
|
|
1193
1193
|
}),
|
|
1194
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ Y(E, {
|
|
1195
1195
|
inset: "flush",
|
|
1196
1196
|
className: "rounded-none",
|
|
1197
|
-
children: [/* @__PURE__ */
|
|
1197
|
+
children: [/* @__PURE__ */ J(x, { placeholder: X(c.searchPlaceholder, { filterLabel: e.label.toLowerCase() }) }), /* @__PURE__ */ Y(C, {
|
|
1198
1198
|
className: "max-h-64",
|
|
1199
|
-
children: [/* @__PURE__ */
|
|
1199
|
+
children: [/* @__PURE__ */ J(S, { children: /* @__PURE__ */ J(o, {
|
|
1200
1200
|
type: "secondary",
|
|
1201
1201
|
align: "center",
|
|
1202
1202
|
className: "py-space-xl",
|
|
1203
1203
|
children: c.noOptionsFound
|
|
1204
|
-
}) }), /* @__PURE__ */
|
|
1204
|
+
}) }), /* @__PURE__ */ J(w, { children: e.options?.map((e) => {
|
|
1205
1205
|
let t = p.includes(e.value);
|
|
1206
|
-
return /* @__PURE__ */
|
|
1206
|
+
return /* @__PURE__ */ Y(b, {
|
|
1207
1207
|
onSelect: () => h(e.value),
|
|
1208
1208
|
"data-checked": t || void 0,
|
|
1209
1209
|
disabled: e.disabled,
|
|
1210
1210
|
className: "data-[checked=true]:**:[svg]:text-primary-accent",
|
|
1211
|
-
children: [!!e.icon && /* @__PURE__ */
|
|
1211
|
+
children: [!!e.icon && /* @__PURE__ */ J("span", {
|
|
1212
1212
|
className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
|
|
1213
1213
|
children: e.icon
|
|
1214
|
-
}), /* @__PURE__ */
|
|
1214
|
+
}), /* @__PURE__ */ Y(l, {
|
|
1215
1215
|
gap: "dense",
|
|
1216
1216
|
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
1217
|
-
children: [/* @__PURE__ */
|
|
1217
|
+
children: [/* @__PURE__ */ J(o, {
|
|
1218
1218
|
tag: "span",
|
|
1219
1219
|
lineHeight: "tight",
|
|
1220
1220
|
weight: t ? "medium" : "regular",
|
|
1221
1221
|
className: "truncate",
|
|
1222
1222
|
children: e.label
|
|
1223
|
-
}), !!e.description && /* @__PURE__ */
|
|
1223
|
+
}), !!e.description && /* @__PURE__ */ J(o, {
|
|
1224
1224
|
tag: "span",
|
|
1225
1225
|
size: "xs",
|
|
1226
1226
|
lineHeight: "tight",
|
|
@@ -1233,12 +1233,12 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1233
1233
|
}) })]
|
|
1234
1234
|
})]
|
|
1235
1235
|
}),
|
|
1236
|
-
!!_ && /* @__PURE__ */
|
|
1237
|
-
caption:
|
|
1236
|
+
!!_ && /* @__PURE__ */ J(I, {
|
|
1237
|
+
caption: X(c.selected, {
|
|
1238
1238
|
count: p.length,
|
|
1239
1239
|
filterLabel: (p.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
1240
1240
|
}),
|
|
1241
|
-
children: /* @__PURE__ */
|
|
1241
|
+
children: /* @__PURE__ */ J(s, {
|
|
1242
1242
|
tone: "primary",
|
|
1243
1243
|
size: "sm",
|
|
1244
1244
|
onClick: g,
|
|
@@ -1250,29 +1250,29 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1250
1250
|
}
|
|
1251
1251
|
//#endregion
|
|
1252
1252
|
//#region src/components/features/filters/facets/tags-facet.tsx
|
|
1253
|
-
function nt({ filter: e, value: n, onValueChange:
|
|
1254
|
-
let { defaultScale: c } = t(), u = O(void 0, c), { strings: d } =
|
|
1253
|
+
function nt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
1254
|
+
let { defaultScale: c } = t(), u = O(void 0, c), { strings: d } = $(), [f, p] = K(""), m = H(() => {
|
|
1255
1255
|
let e = f.trim();
|
|
1256
|
-
e && !n.includes(e) && (
|
|
1256
|
+
e && !n.includes(e) && (i([...n, e]), p(""));
|
|
1257
1257
|
}, [
|
|
1258
1258
|
f,
|
|
1259
1259
|
n,
|
|
1260
|
-
|
|
1261
|
-
]), h =
|
|
1262
|
-
|
|
1263
|
-
}, [n,
|
|
1260
|
+
i
|
|
1261
|
+
]), h = H((e) => {
|
|
1262
|
+
i(n.filter((t) => t !== e));
|
|
1263
|
+
}, [n, i]), g = (e) => {
|
|
1264
1264
|
e.key === "Enter" && (e.preventDefault(), m());
|
|
1265
|
-
}, _ =
|
|
1266
|
-
|
|
1267
|
-
}, [
|
|
1265
|
+
}, _ = H(() => {
|
|
1266
|
+
i([]), p("");
|
|
1267
|
+
}, [i]), b = n.length > 0, x = n.length === 1 ? d.tag : d.tags, S = b ? /* @__PURE__ */ Y(l, {
|
|
1268
1268
|
gap: "md",
|
|
1269
1269
|
className: "tags-facet--summary",
|
|
1270
|
-
children: [/* @__PURE__ */
|
|
1270
|
+
children: [/* @__PURE__ */ Y(l, {
|
|
1271
1271
|
direction: "horizontal",
|
|
1272
1272
|
gap: "sm",
|
|
1273
1273
|
justify: "between",
|
|
1274
1274
|
wrap: !1,
|
|
1275
|
-
children: [/* @__PURE__ */
|
|
1275
|
+
children: [/* @__PURE__ */ Y(o, {
|
|
1276
1276
|
tag: "span",
|
|
1277
1277
|
size: "xs",
|
|
1278
1278
|
type: "secondary",
|
|
@@ -1281,7 +1281,7 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1281
1281
|
" ",
|
|
1282
1282
|
x
|
|
1283
1283
|
]
|
|
1284
|
-
}), /* @__PURE__ */
|
|
1284
|
+
}), /* @__PURE__ */ J(s, {
|
|
1285
1285
|
onClick: _,
|
|
1286
1286
|
tone: "secondary",
|
|
1287
1287
|
buttonStyle: "ghost",
|
|
@@ -1291,22 +1291,22 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1291
1291
|
"aria-label": d.clearAll,
|
|
1292
1292
|
children: d.clearAll
|
|
1293
1293
|
})]
|
|
1294
|
-
}), /* @__PURE__ */
|
|
1294
|
+
}), /* @__PURE__ */ J(l, {
|
|
1295
1295
|
direction: "horizontal",
|
|
1296
1296
|
gap: "md",
|
|
1297
|
-
children: n.map((e) => /* @__PURE__ */
|
|
1297
|
+
children: n.map((e) => /* @__PURE__ */ Y(v, {
|
|
1298
1298
|
tone: "secondary",
|
|
1299
1299
|
className: "flex items-center gap-space-sm py-space-2xs pl-space-md pr-space-sm",
|
|
1300
|
-
children: [/* @__PURE__ */
|
|
1300
|
+
children: [/* @__PURE__ */ J(o, {
|
|
1301
1301
|
tag: "span",
|
|
1302
1302
|
size: "xs",
|
|
1303
1303
|
children: e
|
|
1304
|
-
}), /* @__PURE__ */
|
|
1304
|
+
}), /* @__PURE__ */ J("button", {
|
|
1305
1305
|
onClick: () => h(e),
|
|
1306
1306
|
className: r(y.target, y.focus, y.toggle),
|
|
1307
1307
|
type: "button",
|
|
1308
1308
|
"aria-label": `${d.removeTag} ${e}`,
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1309
|
+
children: /* @__PURE__ */ J(ve, {
|
|
1310
1310
|
className: y.icon,
|
|
1311
1311
|
"aria-hidden": "true"
|
|
1312
1312
|
})
|
|
@@ -1314,30 +1314,31 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1314
1314
|
}, e))
|
|
1315
1315
|
})]
|
|
1316
1316
|
}) : null;
|
|
1317
|
-
return /* @__PURE__ */
|
|
1317
|
+
return /* @__PURE__ */ Y(l, {
|
|
1318
1318
|
gap: "lg",
|
|
1319
|
-
className: r("tags-facet--component",
|
|
1320
|
-
children: [/* @__PURE__ */
|
|
1319
|
+
className: r("tags-facet--component", a),
|
|
1320
|
+
children: [/* @__PURE__ */ Y(l, {
|
|
1321
1321
|
direction: "horizontal",
|
|
1322
1322
|
gap: "md",
|
|
1323
1323
|
wrap: !1,
|
|
1324
|
-
children: [/* @__PURE__ */
|
|
1324
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1325
1325
|
className: "relative flex-1",
|
|
1326
|
-
children: /* @__PURE__ */
|
|
1326
|
+
children: /* @__PURE__ */ J(A, {
|
|
1327
1327
|
type: "text",
|
|
1328
1328
|
value: f,
|
|
1329
1329
|
onChange: (e) => p(e.target.value),
|
|
1330
1330
|
onKeyDown: g,
|
|
1331
1331
|
placeholder: e.placeholder ?? d.enterTag
|
|
1332
1332
|
})
|
|
1333
|
-
}), /* @__PURE__ */
|
|
1333
|
+
}), /* @__PURE__ */ Y(s, {
|
|
1334
|
+
tone: "primary",
|
|
1334
1335
|
onClick: m,
|
|
1335
1336
|
disabled: !f.trim(),
|
|
1336
1337
|
size: u,
|
|
1337
1338
|
iconOnly: !0,
|
|
1338
|
-
className: r(k[u],
|
|
1339
|
+
className: r(k[u], L[u]),
|
|
1339
1340
|
type: "button",
|
|
1340
|
-
children: [/* @__PURE__ */
|
|
1341
|
+
children: [/* @__PURE__ */ J(_e, { className: "size-icon" }), /* @__PURE__ */ J(o, {
|
|
1341
1342
|
tag: "span",
|
|
1342
1343
|
size: "pxs",
|
|
1343
1344
|
className: "sr-only",
|
|
@@ -1347,13 +1348,13 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1347
1348
|
}), S]
|
|
1348
1349
|
});
|
|
1349
1350
|
}
|
|
1350
|
-
var rt =
|
|
1351
|
+
var rt = V.memo(nt);
|
|
1351
1352
|
rt.displayName = "TagsFacet";
|
|
1352
1353
|
//#endregion
|
|
1353
1354
|
//#region src/components/features/filters/partials/tags-filter-content.tsx
|
|
1354
1355
|
function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: i, triggerSource: a = "chip" }) {
|
|
1355
|
-
let { strings: o, reportError: c } =
|
|
1356
|
-
|
|
1356
|
+
let { strings: o, reportError: c } = $(), [l, u] = K(t || []), d = a === "toolbar", f = l.length === 1 ? o.tag : o.tags;
|
|
1357
|
+
U(() => {
|
|
1357
1358
|
u(t || []);
|
|
1358
1359
|
}, [t]);
|
|
1359
1360
|
let m = () => {
|
|
@@ -1366,11 +1367,11 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1366
1367
|
});
|
|
1367
1368
|
}
|
|
1368
1369
|
}, h = JSON.stringify(l.slice().sort()) !== JSON.stringify((t ?? []).slice().sort());
|
|
1369
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ Y("div", {
|
|
1370
1371
|
className: "flex flex-col",
|
|
1371
1372
|
children: [
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
start: d ? /* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ J(P, {
|
|
1374
|
+
start: d ? /* @__PURE__ */ J(s, {
|
|
1374
1375
|
type: "button",
|
|
1375
1376
|
tone: "secondary",
|
|
1376
1377
|
buttonStyle: "ghost",
|
|
@@ -1379,23 +1380,23 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1379
1380
|
onClick: r,
|
|
1380
1381
|
className: "shrink-0",
|
|
1381
1382
|
"aria-label": o.backToFilters,
|
|
1382
|
-
children: /* @__PURE__ */
|
|
1383
|
+
children: /* @__PURE__ */ J(pe, {
|
|
1383
1384
|
"aria-hidden": "true",
|
|
1384
1385
|
className: "size-icon-sm rtl:rotate-180"
|
|
1385
1386
|
})
|
|
1386
1387
|
}) : void 0,
|
|
1387
|
-
children: /* @__PURE__ */
|
|
1388
|
+
children: /* @__PURE__ */ J(M, { children: e.label })
|
|
1388
1389
|
}),
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ J("div", {
|
|
1390
1391
|
className: "p-surface",
|
|
1391
|
-
children: /* @__PURE__ */
|
|
1392
|
+
children: /* @__PURE__ */ J(rt, {
|
|
1392
1393
|
filter: e,
|
|
1393
1394
|
value: l,
|
|
1394
1395
|
onValueChange: u
|
|
1395
1396
|
})
|
|
1396
1397
|
}),
|
|
1397
|
-
!!h && /* @__PURE__ */
|
|
1398
|
-
caption: /* @__PURE__ */
|
|
1398
|
+
!!h && /* @__PURE__ */ J(I, {
|
|
1399
|
+
caption: /* @__PURE__ */ Y(p, {
|
|
1399
1400
|
size: "xs",
|
|
1400
1401
|
className: "tabular-nums",
|
|
1401
1402
|
children: [
|
|
@@ -1404,7 +1405,7 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1404
1405
|
f
|
|
1405
1406
|
]
|
|
1406
1407
|
}),
|
|
1407
|
-
children: /* @__PURE__ */
|
|
1408
|
+
children: /* @__PURE__ */ J(s, {
|
|
1408
1409
|
tone: "primary",
|
|
1409
1410
|
size: "sm",
|
|
1410
1411
|
onClick: m,
|
|
@@ -1417,44 +1418,44 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1417
1418
|
//#endregion
|
|
1418
1419
|
//#region src/components/features/filters/partials/filter-popover-content.tsx
|
|
1419
1420
|
function at({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, getFilterValue: i, setFilterValue: a, onFilterSelect: o, onBackToFilterList: s, onClose: c, triggerSource: l = "chip", finalFocus: u }) {
|
|
1420
|
-
let { strings: d } =
|
|
1421
|
+
let { strings: d } = $(), f = e?.type === Z.DATE || e?.type === Z.TAGS ? "w-auto min-w-80 gap-0 overflow-hidden" : e?.type === Z.ASYNC_SELECT ? "w-72 gap-0 overflow-hidden" : "w-64 gap-0 overflow-hidden", p = (e, t) => {
|
|
1421
1422
|
a(e, t);
|
|
1422
1423
|
};
|
|
1423
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ J(ee, {
|
|
1424
1425
|
finalFocus: u,
|
|
1425
|
-
type: e?.type ===
|
|
1426
|
+
type: e?.type === Z.DATE || e?.type === Z.TAGS ? "display" : "menu",
|
|
1426
1427
|
"aria-label": e?.label ?? d.addFilter,
|
|
1427
1428
|
inset: "flush",
|
|
1428
1429
|
className: r("filter-popover-content--component", f),
|
|
1429
1430
|
align: "start",
|
|
1430
|
-
children: e ? e.type ===
|
|
1431
|
+
children: e ? e.type === Z.DATE ? /* @__PURE__ */ J(Xe, {
|
|
1431
1432
|
filter: e,
|
|
1432
1433
|
value: i(e.key),
|
|
1433
1434
|
onFilterChange: (t) => p(e.key, t),
|
|
1434
1435
|
onBackToFilterList: s,
|
|
1435
1436
|
triggerSource: l
|
|
1436
|
-
}) : e.type ===
|
|
1437
|
+
}) : e.type === Z.TAGS ? /* @__PURE__ */ J(it, {
|
|
1437
1438
|
filter: e,
|
|
1438
1439
|
value: i(e.key),
|
|
1439
1440
|
onFilterChange: (t) => p(e.key, t),
|
|
1440
1441
|
onBackToFilterList: s,
|
|
1441
1442
|
onClose: c,
|
|
1442
1443
|
triggerSource: l
|
|
1443
|
-
}) : e.type ===
|
|
1444
|
+
}) : e.type === Z.ASYNC_SELECT ? /* @__PURE__ */ J(qe, {
|
|
1444
1445
|
filter: e,
|
|
1445
1446
|
value: i(e.key),
|
|
1446
1447
|
onFilterChange: (t) => p(e.key, t),
|
|
1447
1448
|
onBackToFilterList: s,
|
|
1448
1449
|
onClose: c,
|
|
1449
1450
|
triggerSource: l
|
|
1450
|
-
}) : /* @__PURE__ */
|
|
1451
|
+
}) : /* @__PURE__ */ J(tt, {
|
|
1451
1452
|
filter: e,
|
|
1452
1453
|
value: i(e.key),
|
|
1453
1454
|
onFilterChange: (t) => p(e.key, t),
|
|
1454
1455
|
onBackToFilterList: s,
|
|
1455
1456
|
onClose: c,
|
|
1456
1457
|
triggerSource: l
|
|
1457
|
-
}) : /* @__PURE__ */
|
|
1458
|
+
}) : /* @__PURE__ */ J(et, {
|
|
1458
1459
|
availableFilters: t,
|
|
1459
1460
|
activeFilters: n,
|
|
1460
1461
|
onFilterSelect: o
|
|
@@ -1464,23 +1465,23 @@ function at({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, g
|
|
|
1464
1465
|
//#endregion
|
|
1465
1466
|
//#region src/components/features/filters/partials/filter-pill.tsx
|
|
1466
1467
|
function ot({ filter: e, value: t, active: n, operator: r, operators: i, onOperatorChange: a, onValueChange: o, onClear: s, availableFilters: c, activeFilters: l, operatorChangeRef: u }) {
|
|
1467
|
-
let d =
|
|
1468
|
-
return /* @__PURE__ */
|
|
1468
|
+
let d = G(!1), f = u ?? d, [p, m] = K(!1), h = G(null), g = G(null);
|
|
1469
|
+
return /* @__PURE__ */ J(Qe, {
|
|
1469
1470
|
filterKey: e.key,
|
|
1470
|
-
children: /* @__PURE__ */
|
|
1471
|
+
children: /* @__PURE__ */ Y(F, {
|
|
1471
1472
|
open: p,
|
|
1472
1473
|
onOpenChange: (e) => {
|
|
1473
1474
|
e && f.current || m(e);
|
|
1474
1475
|
},
|
|
1475
|
-
children: [/* @__PURE__ */
|
|
1476
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1476
1477
|
className: "filter-pill--component filter-pill--anchor relative",
|
|
1477
|
-
children: [/* @__PURE__ */
|
|
1478
|
-
render: /* @__PURE__ */
|
|
1478
|
+
children: [/* @__PURE__ */ J(N, {
|
|
1479
|
+
render: /* @__PURE__ */ J("span", {}),
|
|
1479
1480
|
nativeButton: !1,
|
|
1480
1481
|
tabIndex: -1,
|
|
1481
1482
|
"aria-hidden": "true",
|
|
1482
1483
|
className: "pointer-events-none absolute inset-0"
|
|
1483
|
-
}), /* @__PURE__ */
|
|
1484
|
+
}), /* @__PURE__ */ J(We, {
|
|
1484
1485
|
filter: e,
|
|
1485
1486
|
popoverOpen: p,
|
|
1486
1487
|
triggerRef: h,
|
|
@@ -1500,7 +1501,7 @@ function ot({ filter: e, value: t, active: n, operator: r, operators: i, onOpera
|
|
|
1500
1501
|
f.current || (g.current = e?.currentTarget ?? h.current, m(!0));
|
|
1501
1502
|
}
|
|
1502
1503
|
})]
|
|
1503
|
-
}), /* @__PURE__ */
|
|
1504
|
+
}), /* @__PURE__ */ J(at, {
|
|
1504
1505
|
finalFocus: g,
|
|
1505
1506
|
activeFilterInPopover: e,
|
|
1506
1507
|
availableFilters: c,
|
|
@@ -1519,25 +1520,25 @@ ot.displayName = "FilterPill";
|
|
|
1519
1520
|
//#endregion
|
|
1520
1521
|
//#region src/components/features/filters/partials/filters-button.tsx
|
|
1521
1522
|
function st({ triggerRef: e, availableFilters: n, activeFilters: i, activeFilterInPopover: a, getFilterValue: o, setFilterValue: c, setActiveFilterInPopover: l }) {
|
|
1522
|
-
let { defaultScale: u } = t(), d = O(void 0, u), [f, p] =
|
|
1523
|
-
return
|
|
1523
|
+
let { defaultScale: u } = t(), d = O(void 0, u), [f, p] = K(!1), { strings: m } = $();
|
|
1524
|
+
return U(() => {
|
|
1524
1525
|
f || l(null);
|
|
1525
|
-
}, [f, l]), /* @__PURE__ */
|
|
1526
|
+
}, [f, l]), /* @__PURE__ */ Y(F, {
|
|
1526
1527
|
open: f,
|
|
1527
1528
|
onOpenChange: p,
|
|
1528
|
-
children: [/* @__PURE__ */
|
|
1529
|
+
children: [/* @__PURE__ */ J(N, {
|
|
1529
1530
|
asChild: !0,
|
|
1530
|
-
children: /* @__PURE__ */
|
|
1531
|
+
children: /* @__PURE__ */ J(s, {
|
|
1531
1532
|
ref: e,
|
|
1532
1533
|
tone: "secondary",
|
|
1533
1534
|
buttonStyle: "outline",
|
|
1534
1535
|
size: d,
|
|
1535
1536
|
iconOnly: !0,
|
|
1536
1537
|
"aria-label": m.addFilter,
|
|
1537
|
-
className: r("filters-button--component shrink-0", k[d],
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1538
|
+
className: r("filters-button--component shrink-0", k[d], L[d]),
|
|
1539
|
+
children: /* @__PURE__ */ J(he, { className: "size-icon-sm" })
|
|
1539
1540
|
})
|
|
1540
|
-
}), /* @__PURE__ */
|
|
1541
|
+
}), /* @__PURE__ */ J(at, {
|
|
1541
1542
|
activeFilterInPopover: a,
|
|
1542
1543
|
availableFilters: n,
|
|
1543
1544
|
activeFilters: i,
|
|
@@ -1559,27 +1560,27 @@ function st({ triggerRef: e, availableFilters: n, activeFilters: i, activeFilter
|
|
|
1559
1560
|
//#endregion
|
|
1560
1561
|
//#region src/components/features/filters/partials/filter-tabs.tsx
|
|
1561
1562
|
function ct({ tabs: e }) {
|
|
1562
|
-
let { activeFilters: t, filters: n, replaceFilters:
|
|
1563
|
+
let { activeFilters: t, filters: n, replaceFilters: i } = $(), a = W(() => t.filter((e) => n.find((t) => t.key === e.key)?.type !== Z.SEARCH), [t, n]), s = W(() => t.filter((e) => n.find((t) => t.key === e.key)?.type === Z.SEARCH), [t, n]), c = W(() => {
|
|
1563
1564
|
for (let t of e) {
|
|
1564
1565
|
if (t.presets.length === 0) {
|
|
1565
|
-
if (
|
|
1566
|
+
if (a.length === 0) return t.id;
|
|
1566
1567
|
continue;
|
|
1567
1568
|
}
|
|
1568
|
-
if (t.presets.length ===
|
|
1569
|
-
let t =
|
|
1569
|
+
if (t.presets.length === a.length && t.presets.every((e) => {
|
|
1570
|
+
let t = a.find((t) => t.key === e.key);
|
|
1570
1571
|
if (!t) return !1;
|
|
1571
1572
|
let n = [...e.value].sort(), r = [...t.value].sort();
|
|
1572
1573
|
return !(n.length !== r.length || n.some((e, t) => e !== r[t]) || e.operator && t.operator !== e.operator);
|
|
1573
1574
|
})) return t.id;
|
|
1574
1575
|
}
|
|
1575
1576
|
return null;
|
|
1576
|
-
}, [e,
|
|
1577
|
+
}, [e, a]), l = H((e) => {
|
|
1577
1578
|
if (e.presets.length === 0) {
|
|
1578
|
-
|
|
1579
|
+
i([...s]);
|
|
1579
1580
|
return;
|
|
1580
1581
|
}
|
|
1581
1582
|
let t = e.presets.map((e) => {
|
|
1582
|
-
let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ?
|
|
1583
|
+
let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ? je(t.type) : "equals");
|
|
1583
1584
|
return {
|
|
1584
1585
|
id: e.key,
|
|
1585
1586
|
key: e.key,
|
|
@@ -1587,44 +1588,43 @@ function ct({ tabs: e }) {
|
|
|
1587
1588
|
operator: r
|
|
1588
1589
|
};
|
|
1589
1590
|
});
|
|
1590
|
-
|
|
1591
|
+
i([...s, ...t]);
|
|
1591
1592
|
}, [
|
|
1592
1593
|
n,
|
|
1593
1594
|
s,
|
|
1594
|
-
|
|
1595
|
+
i
|
|
1595
1596
|
]);
|
|
1596
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
1597
|
+
return e.length === 0 ? null : /* @__PURE__ */ J(ne, {
|
|
1597
1598
|
value: c,
|
|
1598
1599
|
onValueChange: (t) => {
|
|
1599
1600
|
let n = e.find((e) => e.id === t);
|
|
1600
1601
|
n && l(n);
|
|
1601
1602
|
},
|
|
1602
1603
|
className: "filter-tabs--component",
|
|
1603
|
-
children: /* @__PURE__ */
|
|
1604
|
+
children: /* @__PURE__ */ J(B, {
|
|
1604
1605
|
role: "group",
|
|
1605
1606
|
"aria-orientation": void 0,
|
|
1606
1607
|
activateOnFocus: !0,
|
|
1607
1608
|
className: "h-auto! flex-wrap justify-start gap-space-md bg-transparent p-0",
|
|
1608
1609
|
children: e.map((e) => {
|
|
1609
1610
|
let t = c === e.id;
|
|
1610
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ Y(z, {
|
|
1611
1612
|
value: e.id,
|
|
1612
1613
|
role: "button",
|
|
1613
1614
|
"aria-selected": void 0,
|
|
1614
1615
|
"aria-controls": void 0,
|
|
1615
1616
|
"aria-pressed": t,
|
|
1616
|
-
className: r("h-action-sm flex-none gap-space-sm rounded-inner px-control-sm py-0 transition-colors after:hidden data-active:bg-
|
|
1617
|
-
children: [/* @__PURE__ */
|
|
1617
|
+
className: r("h-action-sm flex-none gap-space-sm rounded-inner px-control-sm py-0 transition-colors after:hidden data-active:bg-secondary data-active:text-secondary-foreground data-active:hover:bg-secondary data-active:hover:text-secondary-foreground", t ? "bg-secondary text-secondary-foreground" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"),
|
|
1618
|
+
children: [/* @__PURE__ */ J(o, {
|
|
1618
1619
|
tag: "span",
|
|
1619
|
-
weight: "
|
|
1620
|
+
weight: "medium",
|
|
1620
1621
|
className: "text-inherit",
|
|
1621
1622
|
children: e.label
|
|
1622
|
-
}), e.count !== void 0 && /* @__PURE__ */
|
|
1623
|
+
}), e.count !== void 0 && /* @__PURE__ */ J(o, {
|
|
1623
1624
|
tag: "span",
|
|
1624
1625
|
size: "xs",
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
className: r("text-inherit", t ? "text-background" : "text-muted-foreground"),
|
|
1626
|
+
type: "secondary",
|
|
1627
|
+
className: "tabular-nums",
|
|
1628
1628
|
children: e.count
|
|
1629
1629
|
})]
|
|
1630
1630
|
}, e.id);
|
|
@@ -1634,20 +1634,20 @@ function ct({ tabs: e }) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
//#endregion
|
|
1636
1636
|
//#region src/components/features/filters/facets/search-facet.tsx
|
|
1637
|
-
var lt =
|
|
1638
|
-
return /* @__PURE__ */
|
|
1637
|
+
var lt = V.forwardRef(function(e, t) {
|
|
1638
|
+
return /* @__PURE__ */ J(ge, {
|
|
1639
1639
|
...e,
|
|
1640
1640
|
ref: t,
|
|
1641
1641
|
className: r("animate-spin", e.className)
|
|
1642
1642
|
});
|
|
1643
1643
|
});
|
|
1644
1644
|
function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
1645
|
-
let { strings: a, isNavigating: o } =
|
|
1646
|
-
|
|
1645
|
+
let { strings: a, isNavigating: o } = $(), [s, c] = K(t[0] || ""), l = G(s);
|
|
1646
|
+
U(() => {
|
|
1647
1647
|
l.current = s;
|
|
1648
1648
|
}, [s]);
|
|
1649
|
-
let u =
|
|
1650
|
-
|
|
1649
|
+
let u = G(t[0] || null), d = G(!1);
|
|
1650
|
+
U(() => {
|
|
1651
1651
|
if (d.current || o) return;
|
|
1652
1652
|
let e = l.current;
|
|
1653
1653
|
if (!t.length || t[0] === "") {
|
|
@@ -1656,14 +1656,14 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
t[0] !== void 0 && t[0] !== e && t[0] !== u.current && (c(t[0]), u.current = t[0]);
|
|
1658
1658
|
}, [t, o]);
|
|
1659
|
-
let f =
|
|
1659
|
+
let f = ie((e) => {
|
|
1660
1660
|
u.current = e, d.current = !1, n([e]);
|
|
1661
1661
|
}, e.delay ?? 300), p = (e) => {
|
|
1662
1662
|
u.current !== e && f(e);
|
|
1663
1663
|
};
|
|
1664
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ J("div", {
|
|
1665
1665
|
className: r("search-facet--component", "search-facet relative w-full min-w-0 rounded-inner bg-background", i),
|
|
1666
|
-
children: /* @__PURE__ */
|
|
1666
|
+
children: /* @__PURE__ */ J(A, {
|
|
1667
1667
|
type: "text",
|
|
1668
1668
|
"aria-label": e.label,
|
|
1669
1669
|
value: s,
|
|
@@ -1682,7 +1682,7 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1682
1682
|
},
|
|
1683
1683
|
placeholder: e.placeholder ?? (() => {
|
|
1684
1684
|
let t = e.label.trim().toLowerCase();
|
|
1685
|
-
return !t || t === "search" ?
|
|
1685
|
+
return !t || t === "search" ? X(a.searchPlaceholder, { filterLabel: "" }).replace(/\s+([….?!])/g, "$1").replace(/\s{2,}/g, " ").trim() : X(a.searchPlaceholder, { filterLabel: t });
|
|
1686
1686
|
})(),
|
|
1687
1687
|
clearable: s.trim() !== "" && !o,
|
|
1688
1688
|
endIcon: o ? lt : void 0,
|
|
@@ -1690,19 +1690,19 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1690
1690
|
})
|
|
1691
1691
|
});
|
|
1692
1692
|
}
|
|
1693
|
-
var dt =
|
|
1693
|
+
var dt = V.memo(ut);
|
|
1694
1694
|
dt.displayName = "SearchFacet";
|
|
1695
1695
|
//#endregion
|
|
1696
1696
|
//#region src/components/features/filters/partials/search-filters-list.tsx
|
|
1697
|
-
function ft({ filters: e, getFilterValue: t, setFilterValue: n, className:
|
|
1698
|
-
return /* @__PURE__ */
|
|
1697
|
+
function ft({ filters: e, getFilterValue: t, setFilterValue: n, className: i }) {
|
|
1698
|
+
return /* @__PURE__ */ J(q, { children: e.map((e) => /* @__PURE__ */ Y(l, {
|
|
1699
1699
|
gap: "lg",
|
|
1700
|
-
className: r("search-filters-list--component", "w-full min-w-0 sm:w-64 sm:flex-none", e.displayConfig.className,
|
|
1701
|
-
children: [/* @__PURE__ */
|
|
1700
|
+
className: r("search-filters-list--component", "w-full min-w-0 sm:w-64 sm:flex-none", e.displayConfig.className, i),
|
|
1701
|
+
children: [/* @__PURE__ */ J(dt, {
|
|
1702
1702
|
filter: e,
|
|
1703
1703
|
value: t(e.key),
|
|
1704
1704
|
onValueChange: (t) => n(e.key, t)
|
|
1705
|
-
}), !!e.description && /* @__PURE__ */
|
|
1705
|
+
}), !!e.description && /* @__PURE__ */ J(o, {
|
|
1706
1706
|
size: "xs",
|
|
1707
1707
|
type: "secondary",
|
|
1708
1708
|
children: e.description
|
|
@@ -1718,59 +1718,59 @@ var pt = {
|
|
|
1718
1718
|
compact: "sm",
|
|
1719
1719
|
default: "md"
|
|
1720
1720
|
};
|
|
1721
|
-
function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}, variant:
|
|
1722
|
-
let { getFilterValue: u, setFilterValue: d, isFilterActive: f, clearFilters: p, getFilterOperator: m, setFilterOperator: h, isNavigating: g, strings: _ } =
|
|
1721
|
+
function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}, variant: i = "default", showClearFilters: a = !1, tabs: c }) {
|
|
1722
|
+
let { getFilterValue: u, setFilterValue: d, isFilterActive: f, clearFilters: p, getFilterOperator: m, setFilterOperator: h, isNavigating: g, strings: _ } = $(), { processedFilters: v, searchFilters: y, alwaysVisibleFilters: b, activeRegularFilters: x, popoverFilters: S, hasActive: C } = Fe({ dynamicFilterOptions: t }), [w, T] = K(null), E = v.find((e) => e.key === w) ?? null, D = H((e) => {
|
|
1723
1723
|
T(e?.key ?? null);
|
|
1724
1724
|
}, []);
|
|
1725
|
-
|
|
1725
|
+
U(() => {
|
|
1726
1726
|
w !== null && E === null && T(null);
|
|
1727
1727
|
}, [w, E]);
|
|
1728
|
-
let O =
|
|
1728
|
+
let O = G(null), k = G(null);
|
|
1729
1729
|
function A(e, t) {
|
|
1730
1730
|
t.length === 0 && e.displayConfig?.display !== "always" && (k.current = e.key), d(e.key, t);
|
|
1731
1731
|
}
|
|
1732
|
-
|
|
1732
|
+
U(() => {
|
|
1733
1733
|
let e = k.current;
|
|
1734
1734
|
e !== null && !f(e) && (O.current?.focus(), k.current = null);
|
|
1735
1735
|
}, [f]);
|
|
1736
1736
|
function j(e) {
|
|
1737
|
-
return e.operators && e.operators.length > 0 ? e.operators :
|
|
1737
|
+
return e.operators && e.operators.length > 0 ? e.operators : Ae(e.type, _.operators);
|
|
1738
1738
|
}
|
|
1739
1739
|
function M(e, t) {
|
|
1740
1740
|
h(e, t);
|
|
1741
1741
|
}
|
|
1742
|
-
return /* @__PURE__ */
|
|
1743
|
-
gap: pt[
|
|
1742
|
+
return /* @__PURE__ */ Y(l, {
|
|
1743
|
+
gap: pt[i],
|
|
1744
1744
|
className: r("filter-layout--component", e),
|
|
1745
|
-
children: [!!c && c.length > 0 && /* @__PURE__ */
|
|
1745
|
+
children: [!!c && c.length > 0 && /* @__PURE__ */ J(ct, { tabs: c }), /* @__PURE__ */ Y(l, {
|
|
1746
1746
|
direction: "horizontal",
|
|
1747
1747
|
align: "center",
|
|
1748
|
-
gap: mt[
|
|
1749
|
-
children: [/* @__PURE__ */
|
|
1748
|
+
gap: mt[i],
|
|
1749
|
+
children: [/* @__PURE__ */ J(Qe, {
|
|
1750
1750
|
filterKey: "search-filters",
|
|
1751
|
-
children: /* @__PURE__ */
|
|
1751
|
+
children: /* @__PURE__ */ J(ft, {
|
|
1752
1752
|
filters: y,
|
|
1753
1753
|
getFilterValue: u,
|
|
1754
1754
|
setFilterValue: d
|
|
1755
1755
|
})
|
|
1756
|
-
}), /* @__PURE__ */
|
|
1756
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1757
1757
|
className: r("contents", g && "pointer-events-none opacity-60"),
|
|
1758
1758
|
children: [
|
|
1759
1759
|
Object.entries(n).filter(([, e]) => e).map(([e]) => {
|
|
1760
1760
|
let t = v.find((t) => t.key === e)?.label || e;
|
|
1761
|
-
return /* @__PURE__ */
|
|
1761
|
+
return /* @__PURE__ */ Y(l, {
|
|
1762
1762
|
direction: "horizontal",
|
|
1763
1763
|
gap: "sm",
|
|
1764
1764
|
wrap: !1,
|
|
1765
1765
|
className: "rounded-radius bg-muted/50 px-control-sm py-space-xs",
|
|
1766
|
-
children: [/* @__PURE__ */
|
|
1766
|
+
children: [/* @__PURE__ */ J("div", { className: "border-muted-foreground/30 border-t-primary size-icon-sm animate-spin rounded-full border-2" }), /* @__PURE__ */ J(o, {
|
|
1767
1767
|
tag: "span",
|
|
1768
1768
|
type: "secondary",
|
|
1769
|
-
children:
|
|
1769
|
+
children: X(_.loadingOptions, { filterLabel: t })
|
|
1770
1770
|
})]
|
|
1771
1771
|
}, `loading-${e}`);
|
|
1772
1772
|
}),
|
|
1773
|
-
[...b, ...x].map((e) => /* @__PURE__ */
|
|
1773
|
+
[...b, ...x].map((e) => /* @__PURE__ */ J(ot, {
|
|
1774
1774
|
filter: e,
|
|
1775
1775
|
value: u(e.key) ?? [],
|
|
1776
1776
|
active: f(e.key),
|
|
@@ -1782,9 +1782,9 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1782
1782
|
availableFilters: S,
|
|
1783
1783
|
activeFilters: [...x, ...b]
|
|
1784
1784
|
}, e.key)),
|
|
1785
|
-
S.length > 0 && /* @__PURE__ */
|
|
1785
|
+
S.length > 0 && /* @__PURE__ */ J(Qe, {
|
|
1786
1786
|
filterKey: "filters-button",
|
|
1787
|
-
children: /* @__PURE__ */
|
|
1787
|
+
children: /* @__PURE__ */ J(st, {
|
|
1788
1788
|
triggerRef: O,
|
|
1789
1789
|
availableFilters: S,
|
|
1790
1790
|
activeFilters: x,
|
|
@@ -1794,7 +1794,7 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1794
1794
|
setActiveFilterInPopover: D
|
|
1795
1795
|
})
|
|
1796
1796
|
}),
|
|
1797
|
-
!!
|
|
1797
|
+
!!a && C && /* @__PURE__ */ J(s, {
|
|
1798
1798
|
tone: "secondary",
|
|
1799
1799
|
buttonStyle: "ghost",
|
|
1800
1800
|
onClick: p,
|
|
@@ -1808,7 +1808,7 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1808
1808
|
}
|
|
1809
1809
|
//#endregion
|
|
1810
1810
|
//#region src/components/features/filters/filter-query.ts
|
|
1811
|
-
var gt = "__op", _t = ["page"], vt = new Set(Object.values(
|
|
1811
|
+
var gt = "__op", _t = ["page"], vt = new Set(Object.values(Q));
|
|
1812
1812
|
function yt(e) {
|
|
1813
1813
|
let t = {};
|
|
1814
1814
|
if (!e) return t;
|
|
@@ -1844,7 +1844,7 @@ function Ct(e, t) {
|
|
|
1844
1844
|
}).filter((e) => e.length > 0);
|
|
1845
1845
|
}
|
|
1846
1846
|
function wt(e) {
|
|
1847
|
-
return e.operator ?? e.operators?.[0]?.value ??
|
|
1847
|
+
return e.operator ?? e.operators?.[0]?.value ?? je(e.type);
|
|
1848
1848
|
}
|
|
1849
1849
|
function Tt(e, t, n) {
|
|
1850
1850
|
let [r] = t[`${e.key}${n}`] ?? [];
|
|
@@ -1854,7 +1854,7 @@ function Et(e, t, n) {
|
|
|
1854
1854
|
return e === "always" || e !== "never" && t !== n;
|
|
1855
1855
|
}
|
|
1856
1856
|
function Dt(e) {
|
|
1857
|
-
return e.type ===
|
|
1857
|
+
return e.type === Z.MULTI_SELECT || e.type === Z.TAGS || e.multiple === !0;
|
|
1858
1858
|
}
|
|
1859
1859
|
function Ot(e, t, n = {}) {
|
|
1860
1860
|
let r = n.operatorSuffix ?? gt, i = n.arrayFormat ?? "repeat", a = yt(t);
|
|
@@ -1891,20 +1891,20 @@ function At(e, t, n = {}) {
|
|
|
1891
1891
|
}
|
|
1892
1892
|
//#endregion
|
|
1893
1893
|
//#region src/components/features/filters/facets/select-facet.tsx
|
|
1894
|
-
function jt({ filter: e, value: n, onValueChange:
|
|
1895
|
-
let { defaultScale: c } = t(), l = O(void 0, c), { strings: u } =
|
|
1896
|
-
e.multiple ? n.includes(t) ?
|
|
1897
|
-
}, v = (e) => g?.find((t) => t.value === e)?.label ?? e, y =
|
|
1894
|
+
function jt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
1895
|
+
let { defaultScale: c } = t(), l = O(void 0, c), { strings: u } = $(), [d, f] = K(!1), [p, m] = K(""), h = n.length > 0, g = e.options, _ = (t) => {
|
|
1896
|
+
e.multiple ? n.includes(t) ? i(n.filter((e) => e !== t)) : i([...n, t]) : (i([t]), e.closeOnSelect !== !1 && f(!1));
|
|
1897
|
+
}, v = (e) => g?.find((t) => t.value === e)?.label ?? e, y = W(() => (g ?? []).map((e) => ({
|
|
1898
1898
|
value: e.value,
|
|
1899
1899
|
label: e.label,
|
|
1900
1900
|
description: e.description,
|
|
1901
1901
|
icon: e.icon,
|
|
1902
1902
|
selected: n.includes(e.value),
|
|
1903
1903
|
disabled: e.disabled
|
|
1904
|
-
})), [g, n]), b =
|
|
1905
|
-
return /* @__PURE__ */
|
|
1906
|
-
className: r("select-facet--component", "relative",
|
|
1907
|
-
children: /* @__PURE__ */
|
|
1904
|
+
})), [g, n]), b = X(u.searchPlaceholder, { filterLabel: e.label.toLowerCase() });
|
|
1905
|
+
return /* @__PURE__ */ J("div", {
|
|
1906
|
+
className: r("select-facet--component", "relative", a),
|
|
1907
|
+
children: /* @__PURE__ */ J(re, {
|
|
1908
1908
|
open: d,
|
|
1909
1909
|
onOpenChange: f,
|
|
1910
1910
|
search: !0,
|
|
@@ -1915,30 +1915,30 @@ function jt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1915
1915
|
empty: u.noOptionsFound
|
|
1916
1916
|
},
|
|
1917
1917
|
contentClassName: "w-(--anchor-width) min-w-56",
|
|
1918
|
-
trigger: /* @__PURE__ */
|
|
1918
|
+
trigger: /* @__PURE__ */ Y(s, {
|
|
1919
1919
|
tone: "secondary",
|
|
1920
1920
|
buttonStyle: "outline",
|
|
1921
1921
|
size: l,
|
|
1922
1922
|
role: "combobox",
|
|
1923
1923
|
"aria-expanded": d,
|
|
1924
1924
|
className: D(l),
|
|
1925
|
-
children: [h ? n.length === 1 ? /* @__PURE__ */
|
|
1925
|
+
children: [h ? n.length === 1 ? /* @__PURE__ */ J(o, {
|
|
1926
1926
|
tag: "span",
|
|
1927
1927
|
weight: "semibold",
|
|
1928
1928
|
className: "truncate",
|
|
1929
1929
|
children: v(n[0])
|
|
1930
|
-
}) : /* @__PURE__ */
|
|
1930
|
+
}) : /* @__PURE__ */ J(o, {
|
|
1931
1931
|
tag: "span",
|
|
1932
1932
|
weight: "semibold",
|
|
1933
|
-
children:
|
|
1933
|
+
children: X(u.selected, {
|
|
1934
1934
|
count: n.length,
|
|
1935
1935
|
filterLabel: (n.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
1936
1936
|
})
|
|
1937
|
-
}) : /* @__PURE__ */
|
|
1937
|
+
}) : /* @__PURE__ */ J(o, {
|
|
1938
1938
|
tag: "span",
|
|
1939
1939
|
type: "secondary",
|
|
1940
1940
|
children: e.placeholder ?? u.select
|
|
1941
|
-
}), /* @__PURE__ */
|
|
1941
|
+
}), /* @__PURE__ */ J(me, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
|
|
1942
1942
|
}),
|
|
1943
1943
|
items: y,
|
|
1944
1944
|
onSelect: (e) => _(e.value)
|
|
@@ -1947,13 +1947,13 @@ function jt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1947
1947
|
}
|
|
1948
1948
|
//#endregion
|
|
1949
1949
|
//#region src/components/features/filters/facets/async-select-facet.tsx
|
|
1950
|
-
function Mt({ filter: e, value: n, onValueChange:
|
|
1951
|
-
let { defaultScale: c } = t(), f = O(void 0, c), { strings: p, cacheAsyncOptions: m, getAsyncOptionLabel: h, reportError: g } =
|
|
1950
|
+
function Mt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
1951
|
+
let { defaultScale: c } = t(), f = O(void 0, c), { strings: p, cacheAsyncOptions: m, getAsyncOptionLabel: h, reportError: g } = $(), [_, v] = K(!1), [y, T] = K(""), k = W(() => /* @__PURE__ */ new Map(), [
|
|
1952
1952
|
e.key,
|
|
1953
1953
|
e.asyncConfig?.fetcher,
|
|
1954
1954
|
e.asyncConfig?.mapToOption
|
|
1955
|
-
]), { options: A, isLoading: j, isFetching: M, isError: P, refetch: I, isBelowMinQuery:
|
|
1956
|
-
|
|
1955
|
+
]), { options: A, isLoading: j, isFetching: M, isError: P, refetch: I, isBelowMinQuery: L, minQueryLength: R } = Ke(e, y, _, { onError: g });
|
|
1956
|
+
U(() => {
|
|
1957
1957
|
if (A.length !== 0) {
|
|
1958
1958
|
for (let e of A) k.set(e.value, e);
|
|
1959
1959
|
m(e.key, A);
|
|
@@ -1964,13 +1964,13 @@ function Mt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1964
1964
|
k,
|
|
1965
1965
|
A
|
|
1966
1966
|
]);
|
|
1967
|
-
let
|
|
1968
|
-
let t = new Set(n), r = new Set([...
|
|
1967
|
+
let te = e.multiple !== !1, z = e.maxSelected, B = W(() => e.options ?? [], [e.options]), ne = W(() => {
|
|
1968
|
+
let t = new Set(n), r = new Set([...B, ...A].map((e) => e.value)), i = [];
|
|
1969
1969
|
for (let t of n) if (!r.has(t)) {
|
|
1970
1970
|
let n = k.get(t);
|
|
1971
1971
|
if (n) i.push(n);
|
|
1972
1972
|
else {
|
|
1973
|
-
let n =
|
|
1973
|
+
let n = B.find((e) => e.value === t);
|
|
1974
1974
|
if (n) {
|
|
1975
1975
|
i.push(n);
|
|
1976
1976
|
continue;
|
|
@@ -1985,39 +1985,39 @@ function Mt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1985
1985
|
}
|
|
1986
1986
|
return [
|
|
1987
1987
|
...i,
|
|
1988
|
-
...
|
|
1988
|
+
...B,
|
|
1989
1989
|
...A
|
|
1990
1990
|
].sort((e, n) => +!t.has(e.value) - !t.has(n.value));
|
|
1991
1991
|
}, [
|
|
1992
|
-
|
|
1992
|
+
B,
|
|
1993
1993
|
A,
|
|
1994
1994
|
n,
|
|
1995
1995
|
e.key,
|
|
1996
1996
|
e.icon,
|
|
1997
1997
|
k,
|
|
1998
1998
|
h
|
|
1999
|
-
]),
|
|
2000
|
-
if (
|
|
2001
|
-
if (n.includes(t))
|
|
1999
|
+
]), re = (t) => {
|
|
2000
|
+
if (te) {
|
|
2001
|
+
if (n.includes(t)) i(n.filter((e) => e !== t));
|
|
2002
2002
|
else {
|
|
2003
|
-
if (
|
|
2004
|
-
|
|
2003
|
+
if (z && n.length >= z) return;
|
|
2004
|
+
i([...n, t]);
|
|
2005
2005
|
}
|
|
2006
|
-
} else
|
|
2007
|
-
},
|
|
2006
|
+
} else i([t]), e.closeOnSelect !== !1 && v(!1);
|
|
2007
|
+
}, ie = (t) => {
|
|
2008
2008
|
let n = A.find((e) => e.value === t);
|
|
2009
2009
|
if (n) return n.label;
|
|
2010
|
-
let r =
|
|
2010
|
+
let r = B.find((e) => e.value === t);
|
|
2011
2011
|
if (r) return r.label;
|
|
2012
2012
|
let i = k.get(t);
|
|
2013
2013
|
return i ? i.label : h(e.key, t) ?? t;
|
|
2014
|
-
},
|
|
2014
|
+
}, ae = n.length > 0, V = W(() => j || M ? /* @__PURE__ */ J(u, {
|
|
2015
2015
|
className: "async-select-facet--component",
|
|
2016
2016
|
label: p.searching
|
|
2017
|
-
}) : P ? /* @__PURE__ */
|
|
2017
|
+
}) : P ? /* @__PURE__ */ J(d, {
|
|
2018
2018
|
variant: "inline",
|
|
2019
2019
|
title: p.fetchError,
|
|
2020
|
-
action: /* @__PURE__ */
|
|
2020
|
+
action: /* @__PURE__ */ J(s, {
|
|
2021
2021
|
tone: "secondary",
|
|
2022
2022
|
buttonStyle: "outline",
|
|
2023
2023
|
size: "sm",
|
|
@@ -2026,15 +2026,15 @@ function Mt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
2026
2026
|
},
|
|
2027
2027
|
children: p.retryFetch
|
|
2028
2028
|
})
|
|
2029
|
-
}) :
|
|
2029
|
+
}) : L ? /* @__PURE__ */ J("div", {
|
|
2030
2030
|
className: "text-muted-foreground flex items-center justify-center py-space-xl",
|
|
2031
|
-
children: /* @__PURE__ */
|
|
2031
|
+
children: /* @__PURE__ */ J(o, {
|
|
2032
2032
|
tag: "span",
|
|
2033
2033
|
size: "xs",
|
|
2034
2034
|
type: "secondary",
|
|
2035
|
-
children:
|
|
2035
|
+
children: X(p.minQueryHint, { min: R })
|
|
2036
2036
|
})
|
|
2037
|
-
}) : /* @__PURE__ */
|
|
2037
|
+
}) : /* @__PURE__ */ J(o, {
|
|
2038
2038
|
tag: "span",
|
|
2039
2039
|
type: "secondary",
|
|
2040
2040
|
children: p.noOptionsFound
|
|
@@ -2042,76 +2042,76 @@ function Mt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
2042
2042
|
j,
|
|
2043
2043
|
M,
|
|
2044
2044
|
P,
|
|
2045
|
-
te,
|
|
2046
2045
|
L,
|
|
2046
|
+
R,
|
|
2047
2047
|
p,
|
|
2048
2048
|
I
|
|
2049
2049
|
]);
|
|
2050
|
-
return /* @__PURE__ */
|
|
2051
|
-
className: r("async-select-facet--component relative",
|
|
2052
|
-
children: /* @__PURE__ */
|
|
2050
|
+
return /* @__PURE__ */ J("div", {
|
|
2051
|
+
className: r("async-select-facet--component relative", a),
|
|
2052
|
+
children: /* @__PURE__ */ Y(F, {
|
|
2053
2053
|
open: _,
|
|
2054
2054
|
onOpenChange: (e) => {
|
|
2055
2055
|
v(e), e || T("");
|
|
2056
2056
|
},
|
|
2057
|
-
children: [/* @__PURE__ */
|
|
2057
|
+
children: [/* @__PURE__ */ J(N, { render: /* @__PURE__ */ Y(s, {
|
|
2058
2058
|
tone: "secondary",
|
|
2059
2059
|
buttonStyle: "outline",
|
|
2060
2060
|
size: f,
|
|
2061
2061
|
role: "combobox",
|
|
2062
2062
|
"aria-expanded": _,
|
|
2063
2063
|
className: D(f),
|
|
2064
|
-
children: [
|
|
2064
|
+
children: [ae ? n.length === 1 ? /* @__PURE__ */ J(o, {
|
|
2065
2065
|
tag: "span",
|
|
2066
2066
|
weight: "semibold",
|
|
2067
2067
|
className: "truncate",
|
|
2068
|
-
children:
|
|
2069
|
-
}) : /* @__PURE__ */
|
|
2068
|
+
children: ie(n[0])
|
|
2069
|
+
}) : /* @__PURE__ */ J(o, {
|
|
2070
2070
|
tag: "span",
|
|
2071
2071
|
weight: "semibold",
|
|
2072
|
-
children:
|
|
2072
|
+
children: X(p.selected, {
|
|
2073
2073
|
count: n.length,
|
|
2074
2074
|
filterLabel: (n.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
2075
2075
|
})
|
|
2076
|
-
}) : /* @__PURE__ */
|
|
2076
|
+
}) : /* @__PURE__ */ J(o, {
|
|
2077
2077
|
tag: "span",
|
|
2078
2078
|
type: "secondary",
|
|
2079
2079
|
children: e.placeholder ?? p.select
|
|
2080
|
-
}), /* @__PURE__ */
|
|
2081
|
-
}) }), /* @__PURE__ */
|
|
2080
|
+
}), /* @__PURE__ */ J(me, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
|
|
2081
|
+
}) }), /* @__PURE__ */ J(ee, {
|
|
2082
2082
|
type: "menu",
|
|
2083
2083
|
inset: "flush",
|
|
2084
2084
|
className: "w-full min-w-70 gap-0",
|
|
2085
|
-
children: /* @__PURE__ */
|
|
2085
|
+
children: /* @__PURE__ */ Y(E, {
|
|
2086
2086
|
shouldFilter: !1,
|
|
2087
2087
|
inset: "flush",
|
|
2088
2088
|
className: "rounded-none",
|
|
2089
|
-
children: [/* @__PURE__ */
|
|
2090
|
-
placeholder:
|
|
2089
|
+
children: [/* @__PURE__ */ J(x, {
|
|
2090
|
+
placeholder: X(p.searchPlaceholder, { filterLabel: e.label }),
|
|
2091
2091
|
value: y,
|
|
2092
2092
|
onValueChange: T
|
|
2093
|
-
}), /* @__PURE__ */
|
|
2093
|
+
}), /* @__PURE__ */ J(C, { children: ne.length === 0 ? /* @__PURE__ */ J(S, { children: V }) : /* @__PURE__ */ Y(w, { children: [!(!M || j) && /* @__PURE__ */ Y(l, {
|
|
2094
2094
|
direction: "horizontal",
|
|
2095
2095
|
gap: "sm",
|
|
2096
2096
|
wrap: !1,
|
|
2097
2097
|
className: "px-control-sm py-space-xs",
|
|
2098
|
-
children: [/* @__PURE__ */
|
|
2098
|
+
children: [/* @__PURE__ */ J(ge, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ J(o, {
|
|
2099
2099
|
tag: "span",
|
|
2100
2100
|
size: "xs",
|
|
2101
2101
|
type: "secondary",
|
|
2102
2102
|
children: p.searching
|
|
2103
2103
|
})]
|
|
2104
|
-
}),
|
|
2104
|
+
}), ne.map((e) => /* @__PURE__ */ Y(b, {
|
|
2105
2105
|
value: e.value,
|
|
2106
|
-
onSelect: () =>
|
|
2107
|
-
disabled: e.disabled || !!
|
|
2106
|
+
onSelect: () => re(e.value),
|
|
2107
|
+
disabled: e.disabled || !!z && n.length >= z && !n.includes(e.value),
|
|
2108
2108
|
children: [
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
!!e.icon && /* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ J(de, { className: r("mr-control-gap size-icon-sm", n.includes(e.value) ? "opacity-100" : "opacity-0") }),
|
|
2110
|
+
!!e.icon && /* @__PURE__ */ J("span", {
|
|
2111
2111
|
className: "mr-1.5",
|
|
2112
2112
|
children: e.icon
|
|
2113
2113
|
}),
|
|
2114
|
-
/* @__PURE__ */
|
|
2114
|
+
/* @__PURE__ */ J(o, {
|
|
2115
2115
|
tag: "span",
|
|
2116
2116
|
children: e.label
|
|
2117
2117
|
})
|
|
@@ -2125,31 +2125,31 @@ function Mt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
2125
2125
|
//#endregion
|
|
2126
2126
|
//#region src/components/features/filters/facets/range-facet.tsx
|
|
2127
2127
|
function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
2128
|
-
let { strings: o } =
|
|
2128
|
+
let { strings: o } = $(), [s, u] = K(t.min?.toString() ?? ""), [d, f] = K(t.max?.toString() ?? ""), p = le(), m = ie((e) => {
|
|
2129
2129
|
(e.min !== t.min || e.max !== t.max) && n(e);
|
|
2130
2130
|
}, e.delay ?? 300);
|
|
2131
|
-
return
|
|
2131
|
+
return U(() => (m({
|
|
2132
2132
|
min: s ? Number(s) : void 0,
|
|
2133
2133
|
max: d ? Number(d) : void 0
|
|
2134
2134
|
}), m.cancel), [
|
|
2135
2135
|
s,
|
|
2136
2136
|
d,
|
|
2137
2137
|
m
|
|
2138
|
-
]), /* @__PURE__ */
|
|
2138
|
+
]), /* @__PURE__ */ J(l, {
|
|
2139
2139
|
gap: "md",
|
|
2140
2140
|
className: r("range-facet--component", i),
|
|
2141
|
-
children: /* @__PURE__ */
|
|
2141
|
+
children: /* @__PURE__ */ Y(c, {
|
|
2142
2142
|
columns: {
|
|
2143
2143
|
base: 1,
|
|
2144
2144
|
sm: 2
|
|
2145
2145
|
},
|
|
2146
2146
|
gap: "md",
|
|
2147
|
-
children: [/* @__PURE__ */
|
|
2147
|
+
children: [/* @__PURE__ */ Y(l, {
|
|
2148
2148
|
gap: "xs",
|
|
2149
|
-
children: [/* @__PURE__ */
|
|
2149
|
+
children: [/* @__PURE__ */ J(a, {
|
|
2150
2150
|
htmlFor: `${p}-min`,
|
|
2151
2151
|
children: o.min
|
|
2152
|
-
}), /* @__PURE__ */
|
|
2152
|
+
}), /* @__PURE__ */ J(A, {
|
|
2153
2153
|
id: `${p}-min`,
|
|
2154
2154
|
type: "text",
|
|
2155
2155
|
value: s,
|
|
@@ -2160,12 +2160,12 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2160
2160
|
placeholder: o.min,
|
|
2161
2161
|
className: "w-full"
|
|
2162
2162
|
})]
|
|
2163
|
-
}), /* @__PURE__ */
|
|
2163
|
+
}), /* @__PURE__ */ Y(l, {
|
|
2164
2164
|
gap: "xs",
|
|
2165
|
-
children: [/* @__PURE__ */
|
|
2165
|
+
children: [/* @__PURE__ */ J(a, {
|
|
2166
2166
|
htmlFor: `${p}-max`,
|
|
2167
2167
|
children: o.max
|
|
2168
|
-
}), /* @__PURE__ */
|
|
2168
|
+
}), /* @__PURE__ */ J(A, {
|
|
2169
2169
|
id: `${p}-max`,
|
|
2170
2170
|
type: "text",
|
|
2171
2171
|
value: d,
|
|
@@ -2193,6 +2193,6 @@ function Ft(e, t) {
|
|
|
2193
2193
|
return (n) => e(n) ? !0 : t;
|
|
2194
2194
|
}
|
|
2195
2195
|
//#endregion
|
|
2196
|
-
export {
|
|
2196
|
+
export { Ae as A, Fe as C, Oe as D, ke as E, we as F, Se as I, Ce as L, Te as M, Q as N, je as O, Z as P, X as R, Ie as S, $ as T, Qe as _, jt as a, We as b, kt as c, dt as d, ct as f, rt as g, at as h, Mt as i, Ee as j, De as k, ht as l, ot as m, Pt as n, At as o, st as p, Nt as r, Ot as s, Ft as t, ft as u, Ye as v, Pe as w, Le as x, Ke as y };
|
|
2197
2197
|
|
|
2198
|
-
//# sourceMappingURL=filters-
|
|
2198
|
+
//# sourceMappingURL=filters-Da-gNPsE.js.map
|