udp-stencil-component-library 26.3.0-beta.2 → 26.3.0-beta.21
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/dist/cjs/add-map-feature-popup_4.cjs.entry.js +12 -12
- package/dist/cjs/address-search_6.cjs.entry.js +18 -18
- package/dist/cjs/advanced-search_12.cjs.entry.js +13 -13
- package/dist/cjs/ag-grid-base_63.cjs.entry.js +404 -164
- package/dist/cjs/ambient-template-grid.cjs.entry.js +16 -16
- package/dist/cjs/api-method-instance-grid.cjs.entry.js +2 -2
- package/dist/cjs/app-bar.cjs.entry.js +1 -1
- package/dist/cjs/chart-container_3.cjs.entry.js +2 -2
- package/dist/cjs/charts-theme-DmrbXz3l.js +386 -0
- package/dist/cjs/check-box.cjs.entry.js +2 -2
- package/dist/cjs/chip-section.cjs.entry.js +2 -2
- package/dist/cjs/date-time-renderer_9.cjs.entry.js +21 -21
- package/dist/cjs/feature-details-card_2.cjs.entry.js +5 -5
- package/dist/cjs/file-upload_2.cjs.entry.js +5 -5
- package/dist/cjs/filter-conditions_7.cjs.entry.js +5 -5
- package/dist/cjs/form-metadata-display_10.cjs.entry.js +8 -8
- package/dist/cjs/icon-grid.cjs.entry.js +1 -1
- package/dist/cjs/index-G1ccGqOs.js +44 -4
- package/dist/cjs/index.cjs.js +6 -154
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-component_2.cjs.entry.js +2 -2
- package/dist/cjs/primary-action-header_2.cjs.entry.js +4 -4
- package/dist/cjs/question-configs-renderer_4.cjs.entry.js +15 -15
- package/dist/cjs/resource-timeline-calendar.cjs.entry.js +1 -1
- package/dist/cjs/resource-timeline-primary-bar.cjs.entry.js +3 -3
- package/dist/cjs/search-method-grid.cjs.entry.js +1 -1
- package/dist/cjs/server-side-grid.cjs.entry.js +1 -1
- package/dist/cjs/side-sheet-container.cjs.entry.js +1 -1
- package/dist/cjs/simple-card.cjs.entry.js +1 -1
- package/dist/cjs/slot-helpers-C-ntX3IL.js +11 -0
- package/dist/cjs/status-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/stencil-chip.cjs.entry.js +2 -2
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/cjs/stencil-toggle.cjs.entry.js +4 -4
- package/dist/cjs/text-field_2.cjs.entry.js +7 -7
- package/dist/cjs/theme-manager-vLJfQYn8.js +157 -0
- package/dist/cjs/udp-adornment.cjs.entry.js +1 -1
- package/dist/cjs/udp-advanced-search-builder.cjs.entry.js +7 -4
- package/dist/cjs/udp-ag-area-chart.cjs.entry.js +120 -0
- package/dist/cjs/{udp-bar-chart_4.cjs.entry.js → udp-ag-bar-chart_4.cjs.entry.js} +123 -44
- package/dist/cjs/udp-ag-bubble-chart.cjs.entry.js +120 -0
- package/dist/cjs/udp-ag-combo-chart.cjs.entry.js +120 -0
- package/dist/cjs/udp-ag-donut-chart.cjs.entry.js +118 -0
- package/dist/cjs/udp-ag-line-chart.cjs.entry.js +120 -0
- package/dist/cjs/udp-ag-pie-chart.cjs.entry.js +118 -0
- package/dist/cjs/udp-ag-scatter-chart.cjs.entry.js +120 -0
- package/dist/cjs/udp-attachment-item_2.cjs.entry.js +1 -1
- package/dist/cjs/udp-bar-chart.cjs.entry.js +41 -0
- package/dist/cjs/udp-calendar-base.cjs.entry.js +44 -71
- package/dist/cjs/udp-calendar-day.cjs.entry.js +1 -3
- package/dist/cjs/udp-calendar-month.cjs.entry.js +1 -3
- package/dist/cjs/udp-calendar-week.cjs.entry.js +1 -3
- package/dist/cjs/udp-calendar-year.cjs.entry.js +1 -3
- package/dist/cjs/udp-card-action-area.cjs.entry.js +1 -1
- package/dist/cjs/udp-card_6.cjs.entry.js +7 -7
- package/dist/cjs/udp-charts-example.cjs.entry.js +14 -1
- package/dist/cjs/udp-container-query-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/udp-container-query-grid.cjs.entry.js +1 -1
- package/dist/cjs/udp-container-query.cjs.entry.js +2 -2
- package/dist/cjs/udp-container.cjs.entry.js +2 -2
- package/dist/cjs/udp-dynamic-container-with-menu.cjs.entry.js +1 -1
- package/dist/cjs/udp-dynamic-form.cjs.entry.js +1 -1
- package/dist/cjs/udp-fluent-file-input.cjs.entry.js +4 -4
- package/dist/cjs/udp-fluent-image.cjs.entry.js +1 -1
- package/dist/cjs/udp-fluent-inline-edit.cjs.entry.js +1 -1
- package/dist/cjs/udp-fluent-link.cjs.entry.js +1 -1
- package/dist/cjs/udp-fluent-location-input.cjs.entry.js +3 -3
- package/dist/cjs/udp-fluent-number-input.cjs.entry.js +99 -0
- package/dist/cjs/udp-fluent-signature-input.cjs.entry.js +4 -4
- package/dist/cjs/udp-forms-builder-style-override.cjs.entry.js +1 -1
- package/dist/cjs/udp-forms-follow-up-list-card.cjs.entry.js +2 -2
- package/dist/cjs/udp-forms-list-card.cjs.entry.js +4 -4
- package/dist/cjs/udp-forms-list.cjs.entry.js +1 -1
- package/dist/cjs/udp-forms-renderer.cjs.entry.js +1 -1
- package/dist/cjs/udp-kpi-card.cjs.entry.js +1 -1
- package/dist/cjs/udp-kpi-cards.cjs.entry.js +2 -2
- package/dist/cjs/udp-map.cjs.entry.js +3 -3
- package/dist/cjs/udp-menu.cjs.entry.js +1 -1
- package/dist/cjs/udp-page.cjs.entry.js +1 -1
- package/dist/cjs/udp-sankey-chart.cjs.entry.js +1 -1
- package/dist/cjs/udp-sidebar-layout.cjs.entry.js +67 -0
- package/dist/cjs/udp-skeleton-loading.cjs.entry.js +1 -1
- package/dist/cjs/udp-split-screen.cjs.entry.js +1 -1
- package/dist/cjs/udp-stepper-demo.cjs.entry.js +1 -1
- package/dist/cjs/udp-tab.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline-connector.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline-dot.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline-item.cjs.entry.js +2 -2
- package/dist/cjs/udp-timeline-separator.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline.cjs.entry.js +1 -1
- package/dist/cjs/udp-xy-chart.cjs.entry.js +1 -1
- package/dist/cjs/udp-xy-multi-series-chart.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/advanced-search-builder/udp-advanced-search-builder.js +7 -4
- package/dist/collection/components/calendar/udp-calendar-base.js +100 -77
- package/dist/collection/components/calendar/udp-calendar-day.js +10 -9
- package/dist/collection/components/calendar/udp-calendar-month.js +10 -9
- package/dist/collection/components/calendar/udp-calendar-week.js +10 -9
- package/dist/collection/components/calendar/udp-calendar-year.js +10 -9
- package/dist/collection/components/charts/chart-container/chart-container.js +7 -0
- package/dist/collection/components/charts/chart-kpi/chart-kpi.js +6 -1
- package/dist/collection/components/charts/charts-theme.js +380 -0
- package/dist/collection/components/charts/udp-ag-area-chart/udp-ag-area-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-area-chart/udp-ag-area-chart.js +312 -0
- package/dist/collection/components/charts/udp-ag-bar-chart/udp-ag-bar-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-bar-chart/udp-ag-bar-chart.js +302 -0
- package/dist/collection/components/charts/udp-ag-bubble-chart/udp-ag-bubble-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-bubble-chart/udp-ag-bubble-chart.js +308 -0
- package/dist/collection/components/charts/udp-ag-combo-chart/udp-ag-combo-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-combo-chart/udp-ag-combo-chart.js +320 -0
- package/dist/collection/components/charts/udp-ag-donut-chart/udp-ag-donut-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-donut-chart/udp-ag-donut-chart.js +309 -0
- package/dist/collection/components/charts/udp-ag-line-chart/udp-ag-line-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-line-chart/udp-ag-line-chart.js +314 -0
- package/dist/collection/components/charts/udp-ag-pie-chart/udp-ag-pie-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-pie-chart/udp-ag-pie-chart.js +310 -0
- package/dist/collection/components/charts/udp-ag-scatter-chart/udp-ag-scatter-chart.css +13 -0
- package/dist/collection/components/charts/udp-ag-scatter-chart/udp-ag-scatter-chart.js +314 -0
- package/dist/collection/components/charts/udp-bar-chart/udp-bar-chart.js +5 -1
- package/dist/collection/components/charts/udp-charts-example.js +15 -2
- package/dist/collection/components/charts/udp-distribution-chart/udp-distribution-chart.js +5 -1
- package/dist/collection/components/charts/udp-donut-chart/udp-donut-chart.js +5 -1
- package/dist/collection/components/charts/udp-line-chart/udp-line-chart.js +5 -1
- package/dist/collection/components/charts/udp-sankey-chart/udp-sankey-chart.js +6 -1
- package/dist/collection/components/charts/udp-xy-chart/udp-xy-chart.js +6 -1
- package/dist/collection/components/charts/udp-xy-multi-series-chart/udp-xy-multi-series-chart.js +5 -1
- package/dist/collection/components/data-display/adornment/udp-adornment/udp-adornment.js +1 -1
- package/dist/collection/components/data-display/badge/udp-badge.js +1 -1
- package/dist/collection/components/data-display/cards/udp-ambient-card/udp-ambient-card.js +1 -1
- package/dist/collection/components/data-display/cards/udp-card/udp-card-action-area/udp-card-action-area.js +1 -1
- package/dist/collection/components/data-display/cards/udp-card/udp-card-actions/udp-card-actions.js +1 -1
- package/dist/collection/components/data-display/cards/udp-card/udp-card-content/udp-card-content.js +1 -1
- package/dist/collection/components/data-display/cards/udp-card/udp-card-header/udp-card-header.js +1 -1
- package/dist/collection/components/data-display/cards/udp-card/udp-card-media/udp-card-media.js +1 -1
- package/dist/collection/components/data-display/cards/udp-card/udp-card.js +3 -3
- package/dist/collection/components/data-display/chips/stencil-chip/status-chip/status-chip.js +1 -1
- package/dist/collection/components/data-display/chips/stencil-chip/stencil-chip.js +2 -2
- package/dist/collection/components/data-display/chips/udp-chip.js +1 -1
- package/dist/collection/components/data-display/divider/udp-divider.js +1 -1
- package/dist/collection/components/data-display/empty-state-display/udp-empty-state-display.js +1 -1
- package/dist/collection/components/data-display/headers/udp-column-header.js +1 -1
- package/dist/collection/components/data-display/headers/udp-page-header/udp-page-header.js +1 -1
- package/dist/collection/components/data-display/hint-panel/hint-panel.js +1 -1
- package/dist/collection/components/data-display/kpi/kpi-list.js +1 -1
- package/dist/collection/components/data-display/kpi/udp-kpi-card.js +1 -1
- package/dist/collection/components/data-display/kpi/udp-kpi-cards.js +2 -2
- package/dist/collection/components/data-display/list-item/list-item.js +2 -2
- package/dist/collection/components/data-display/pop-over/udp-pop-over.js +1 -1
- package/dist/collection/components/data-display/pop-over-grid-action-header/udp-pop-over-grid-action-header.js +1 -1
- package/dist/collection/components/data-display/primary-action-header/primary-action-header.js +2 -2
- package/dist/collection/components/data-display/simple-card/simple-card.js +1 -1
- package/dist/collection/components/data-display/tool-tip/udp-ambient-tool-tip.js +2 -2
- package/dist/collection/components/data-display/tree/tree-list-item/search-item/search-list-item.js +1 -1
- package/dist/collection/components/data-display/udp-avatar/udp-avatar.js +1 -1
- package/dist/collection/components/dialogs/udp-dialog.js +1 -1
- package/dist/collection/components/drawers/udp-side-sheet/udp-side-sheet.js +9 -9
- package/dist/collection/components/feedback/udp-notification/alerts/upd-alert-banner.js +1 -1
- package/dist/collection/components/feedback/udp-notification/udp-notification.js +2 -2
- package/dist/collection/components/fluent-ui/autocomplete/udp-autocomplete.js +74 -13
- package/dist/collection/components/fluent-ui/avatar/udp-fluent-avatar.js +1 -1
- package/dist/collection/components/fluent-ui/badge/udp-fluent-badge.js +1 -1
- package/dist/collection/components/fluent-ui/button/udp-fluent-button.js +1 -1
- package/dist/collection/components/fluent-ui/card/udp-fluent-card.js +3 -3
- package/dist/collection/components/fluent-ui/checkbox/udp-fluent-checkbox.js +1 -1
- package/dist/collection/components/fluent-ui/compound-button/udp-compound-button.js +1 -1
- package/dist/collection/components/fluent-ui/counter-badge/udp-fluent-counter-badge.js +1 -1
- package/dist/collection/components/fluent-ui/date-input/udp-date-input.js +61 -11
- package/dist/collection/components/fluent-ui/date-time-input/udp-date-time-input.js +40 -3
- package/dist/collection/components/fluent-ui/dialog/udp-fluent-dialog.js +1 -1
- package/dist/collection/components/fluent-ui/divider/udp-fluent-divider.js +1 -1
- package/dist/collection/components/fluent-ui/drawer/udp-fluent-drawer.js +1 -1
- package/dist/collection/components/fluent-ui/dropdown/udp-fluent-dropdown.js +63 -12
- package/dist/collection/components/fluent-ui/file-input/udp-fluent-file-input.js +4 -4
- package/dist/collection/components/fluent-ui/icon/icon-grid/icon-grid.js +1 -1
- package/dist/collection/components/fluent-ui/icon-button/udp-fluent-icon-button.js +1 -1
- package/dist/collection/components/fluent-ui/image/udp-fluent-image.js +1 -1
- package/dist/collection/components/fluent-ui/inline-edit/udp-fluent-inline-edit.js +1 -1
- package/dist/collection/components/fluent-ui/link/udp-fluent-link.js +1 -1
- package/dist/collection/components/fluent-ui/location-input/udp-fluent-location-input.js +3 -3
- package/dist/collection/components/fluent-ui/message-bar/udp-message-bar.js +1 -1
- package/dist/collection/components/fluent-ui/number-input/udp-fluent-number-input.css +68 -0
- package/dist/collection/components/fluent-ui/number-input/udp-fluent-number-input.js +547 -0
- package/dist/collection/components/fluent-ui/progress-bar/udp-progress-bar.js +1 -1
- package/dist/collection/components/fluent-ui/radio-group/udp-fluent-radio-group.js +1 -1
- package/dist/collection/components/fluent-ui/search-input/udp-search-input.js +3 -3
- package/dist/collection/components/fluent-ui/signature-input/udp-fluent-signature-input.js +4 -4
- package/dist/collection/components/fluent-ui/slider/udp-slider.js +1 -1
- package/dist/collection/components/fluent-ui/spinner/udp-spinner.js +1 -1
- package/dist/collection/components/fluent-ui/switch/udp-fluent-switch.js +1 -1
- package/dist/collection/components/fluent-ui/tablist/udp-fluent-tablist.css +43 -10
- package/dist/collection/components/fluent-ui/text-input/udp-fluent-text-input.js +2 -2
- package/dist/collection/components/fluent-ui/textarea/udp-textarea.js +2 -2
- package/dist/collection/components/fluent-ui/time-input/udp-time-input.js +1 -1
- package/dist/collection/components/fluent-ui/toggle-button/udp-fluent-toggle-button.js +1 -1
- package/dist/collection/components/fluent-ui/tooltip/udp-tooltip.js +2 -2
- package/dist/collection/components/fluent-ui/tree/udp-tree.css +53 -0
- package/dist/collection/components/fluent-ui/tree/udp-tree.js +256 -4
- package/dist/collection/components/forms/dynamic-form/udp-dynamic-form.js +1 -1
- package/dist/collection/components/forms/edit-view-form/edit-view-form.js +2 -2
- package/dist/collection/components/forms/form/stencil-form.js +1 -1
- package/dist/collection/components/forms/save-view-form/save-view-form.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/forms-question-item/udp-forms-builder-question-item.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/file-upload-renderer/file-upload-renderer.js +4 -4
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.js +3 -3
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/list-option-renderer/list-options-renderer.js +3 -3
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/location-renderer/location-renderer.js +6 -6
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-configs-renderer/question-configs-renderer.js +7 -7
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/section-configs-renderer/section-configs-renderer.js +4 -4
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/signature-renderer/signature-renderer.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/table-columns-renderer/table-columns-renderer.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/text-input-renderer/text-input-renderer.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-menu/udp-forms-builder-menu.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-style-override/udp-forms-builder-style-override.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list-card/udp-forms-list-card.js +4 -4
- package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-follow-up-list-card/udp-forms-follow-up-list-card.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-question/table-input/table-input.js +1 -1
- package/dist/collection/components/grid/ambient-template-grid/ambient-template-grid.js +16 -16
- package/dist/collection/components/grid/grid-primary-bar/grid-primary-bar.js +2 -2
- package/dist/collection/components/grid/hotlists/udp-hotlist-form/udp-hotlist-form.js +1 -1
- package/dist/collection/components/grid/new-grid/ag-grid-base.js +1 -1
- package/dist/collection/components/grid/new-grid/api-method-instance-grid.js +2 -2
- package/dist/collection/components/grid/new-grid/client-side-grid.js +1 -1
- package/dist/collection/components/grid/new-grid/gridFunctions/bulkActions.js +45 -6
- package/dist/collection/components/grid/new-grid/search-method-grid.js +1 -1
- package/dist/collection/components/grid/new-grid/server-side-grid.js +1 -1
- package/dist/collection/components/grid/resource-timeline-calendar/resource-timeline-calendar.js +1 -1
- package/dist/collection/components/grid/resource-timeline-calendar/resource-timeline-primary-bar.js +3 -3
- package/dist/collection/components/inputs/address-search/address-search.js +3 -3
- package/dist/collection/components/inputs/checkbox/check-box.js +2 -2
- package/dist/collection/components/inputs/date-range-selector/udp-date-range-selector.js +2 -2
- package/dist/collection/components/inputs/date-selector/udp-date-selector.js +3 -3
- package/dist/collection/components/inputs/date-time-selector/udp-datetime-selector.js +3 -3
- package/dist/collection/components/inputs/file-upload/file-upload.js +4 -4
- package/dist/collection/components/inputs/form metadata display/form-metadata-display.js +1 -1
- package/dist/collection/components/inputs/image-upload/image-upload.js +1 -1
- package/dist/collection/components/inputs/numeric-field/numeric-field.js +3 -3
- package/dist/collection/components/inputs/signature-input/signature-input.js +2 -2
- package/dist/collection/components/inputs/tally/tally.js +2 -2
- package/dist/collection/components/inputs/text-area/text-area.js +3 -3
- package/dist/collection/components/inputs/text-field/text-field.js +3 -3
- package/dist/collection/components/inputs/time-selector/udp-time-selector.js +3 -3
- package/dist/collection/components/inputs/toggle/stencil-toggle.js +4 -4
- package/dist/collection/components/inputs/udp-selector/udp-selector.js +4 -4
- package/dist/collection/components/layout/udp-container/udp-container.js +2 -2
- package/dist/collection/components/layout/udp-container-query/udp-container-query.js +2 -2
- package/dist/collection/components/layout/udp-container-query-grid/udp-container-query-grid.js +1 -1
- package/dist/collection/components/layout/udp-container-query-grid-item/udp-container-query-grid-item.js +1 -1
- package/dist/collection/components/layout/udp-page/udp-page.js +1 -1
- package/dist/collection/components/layout/udp-sidebar-layout/udp-sidebar-layout.css +139 -0
- package/dist/collection/components/layout/udp-sidebar-layout/udp-sidebar-layout.js +264 -0
- package/dist/collection/components/layout/udp-split-screen/udp-split-screen.js +1 -1
- package/dist/collection/components/loaders/udp-grid-loader/udp-grid-loader.js +2 -2
- package/dist/collection/components/loaders/udp-linear-loader/udp-linear-loader.js +1 -1
- package/dist/collection/components/loaders/udp-skeleton-loading.js +1 -1
- package/dist/collection/components/map/udp-map/map-component.js +1 -1
- package/dist/collection/components/map/udp-map/popups/add-map-feature-popup.js +3 -3
- package/dist/collection/components/map/udp-map/popups/feature-details-card/feature-details-card.js +4 -4
- package/dist/collection/components/map/udp-map/popups/feature-details-popup.js +1 -1
- package/dist/collection/components/map/udp-map/popups/select-layer-popup.js +2 -2
- package/dist/collection/components/map/udp-map/popups/split-line-popup.js +1 -1
- package/dist/collection/components/map/udp-map/toolbar/map-toolbar.js +6 -6
- package/dist/collection/components/map/udp-map/udp-map-toolbar.js +1 -1
- package/dist/collection/components/map/udp-map/udp-map.js +3 -3
- package/dist/collection/components/menu/menu-item/udp-menu-item.js +1 -1
- package/dist/collection/components/menu/udp-menu.js +1 -1
- package/dist/collection/components/new-form/field/udp-field.js +1 -1
- package/dist/collection/components/new-form/form/udp-form-component.js +2 -2
- package/dist/collection/components/stepper/udp-stepper-demo.js +1 -1
- package/dist/collection/components/tabs/tab/tabs/udp-tabs.js +2 -2
- package/dist/collection/components/tabs/tab/udp-tab.js +1 -1
- package/dist/collection/components/tabs/udp-tab-panel/udp-tab-panel.js +1 -1
- package/dist/collection/components/timeline/udp-timeline-connector.js +1 -1
- package/dist/collection/components/timeline/udp-timeline-dot.js +1 -1
- package/dist/collection/components/timeline/udp-timeline-item.js +2 -2
- package/dist/collection/components/timeline/udp-timeline-separator.js +1 -1
- package/dist/collection/components/timeline/udp-timeline.js +1 -1
- package/dist/collection/components/toolbars/app-bar/app-bar.js +1 -1
- package/dist/collection/components/util/ghost-render/ghost-render.js +1 -1
- package/dist/collection/components/util/lazy-loader/udp-lazy-loader.js +1 -1
- package/dist/collection/deprecated/components/side-sheet/side-sheet-container.js +1 -1
- package/dist/collection/deprecated/components/side-sheet/side-sheet.js +1 -1
- package/dist/collection/test-pages/test-components-page.js +28 -28
- package/dist/collection/test-pages/test-form.js +4 -4
- package/dist/collection/theme/ag-grid-theme-bridge.js +1 -1
- package/dist/collection/udp-utilities/layout/udp-dynamic-container-with-menu/chip-section/chip-section.js +2 -2
- package/dist/collection/udp-utilities/layout/udp-dynamic-container-with-menu/udp-dynamic-container-with-menu.js +1 -1
- package/dist/components/add-map-feature-popup2.js +1 -1
- package/dist/components/address-search2.js +1 -1
- package/dist/components/ag-grid-base2.js +1 -1
- package/dist/components/ambient-template-grid.js +1 -1
- package/dist/components/api-method-instance-grid.js +1 -1
- package/dist/components/app-bar.js +1 -1
- package/dist/components/chart-kpi2.js +1 -1
- package/dist/components/charts-theme.js +1 -0
- package/dist/components/check-box.js +1 -1
- package/dist/components/chip-section.js +1 -1
- package/dist/components/client-side-grid2.js +1 -1
- package/dist/components/edit-view-form.js +1 -1
- package/dist/components/feature-details-card2.js +1 -1
- package/dist/components/feature-details-popup2.js +1 -1
- package/dist/components/file-upload-renderer2.js +1 -1
- package/dist/components/file-upload2.js +1 -1
- package/dist/components/form-metadata-display-renderer2.js +1 -1
- package/dist/components/form-metadata-display2.js +1 -1
- package/dist/components/ghost-render2.js +1 -1
- package/dist/components/grid-primary-bar2.js +1 -1
- package/dist/components/hint-panel2.js +1 -1
- package/dist/components/icon-grid.js +1 -1
- package/dist/components/image-upload2.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kpi-list2.js +1 -1
- package/dist/components/list-item.js +1 -1
- package/dist/components/list-options-renderer2.js +1 -1
- package/dist/components/location-renderer2.js +1 -1
- package/dist/components/map-component2.js +1 -1
- package/dist/components/map-toolbar2.js +1 -1
- package/dist/components/numeric-field2.js +1 -1
- package/dist/components/primary-action-header2.js +1 -1
- package/dist/components/question-configs-renderer2.js +1 -1
- package/dist/components/resource-timeline-calendar.js +1 -1
- package/dist/components/resource-timeline-primary-bar2.js +1 -1
- package/dist/components/save-view-form.js +1 -1
- package/dist/components/search-list-item2.js +1 -1
- package/dist/components/search-method-grid2.js +1 -1
- package/dist/components/section-configs-renderer2.js +1 -1
- package/dist/components/select-layer-popup2.js +1 -1
- package/dist/components/server-side-grid2.js +1 -1
- package/dist/components/side-sheet-container2.js +1 -1
- package/dist/components/side-sheet2.js +1 -1
- package/dist/components/signature-input2.js +1 -1
- package/dist/components/signature-renderer2.js +1 -1
- package/dist/components/simple-card.js +1 -1
- package/dist/components/split-line-popup2.js +1 -1
- package/dist/components/status-chip2.js +1 -1
- package/dist/components/stencil-chip2.js +1 -1
- package/dist/components/stencil-form2.js +1 -1
- package/dist/components/stencil-toggle2.js +1 -1
- package/dist/components/table-columns-renderer2.js +1 -1
- package/dist/components/table-input2.js +1 -1
- package/dist/components/tally.js +1 -1
- package/dist/components/test-components-page.js +1 -1
- package/dist/components/test-form2.js +1 -1
- package/dist/components/text-area2.js +1 -1
- package/dist/components/text-field2.js +1 -1
- package/dist/components/text-input-renderer2.js +1 -1
- package/dist/components/theme-manager.js +1 -0
- package/dist/components/udp-adornment2.js +1 -1
- package/dist/components/udp-advanced-search-builder.js +1 -1
- package/dist/components/udp-ag-area-chart.d.ts +11 -0
- package/dist/components/udp-ag-area-chart.js +2 -0
- package/dist/components/udp-ag-bar-chart.d.ts +11 -0
- package/dist/components/udp-ag-bar-chart.js +2 -0
- package/dist/components/udp-ag-bar-chart2.js +1 -0
- package/dist/components/udp-ag-bubble-chart.d.ts +11 -0
- package/dist/components/udp-ag-bubble-chart.js +2 -0
- package/dist/components/udp-ag-combo-chart.d.ts +11 -0
- package/dist/components/udp-ag-combo-chart.js +2 -0
- package/dist/components/udp-ag-donut-chart.d.ts +11 -0
- package/dist/components/udp-ag-donut-chart.js +2 -0
- package/dist/components/udp-ag-line-chart.d.ts +11 -0
- package/dist/components/udp-ag-line-chart.js +2 -0
- package/dist/components/udp-ag-pie-chart.d.ts +11 -0
- package/dist/components/udp-ag-pie-chart.js +2 -0
- package/dist/components/udp-ag-scatter-chart.d.ts +11 -0
- package/dist/components/udp-ag-scatter-chart.js +2 -0
- package/dist/components/udp-ambient-card2.js +1 -1
- package/dist/components/udp-ambient-tool-tip2.js +1 -1
- package/dist/components/udp-autocomplete2.js +1 -1
- package/dist/components/udp-avatar2.js +1 -1
- package/dist/components/udp-badge2.js +1 -1
- package/dist/components/udp-bar-chart.js +1 -1
- package/dist/components/udp-calendar-base2.js +1 -1
- package/dist/components/udp-calendar-day.js +1 -1
- package/dist/components/udp-calendar-month.js +1 -1
- package/dist/components/udp-calendar-week.js +1 -1
- package/dist/components/udp-calendar-year.js +1 -1
- package/dist/components/udp-card-action-area.js +1 -1
- package/dist/components/udp-card-actions2.js +1 -1
- package/dist/components/udp-card-content2.js +1 -1
- package/dist/components/udp-card-header2.js +1 -1
- package/dist/components/udp-card-media2.js +1 -1
- package/dist/components/udp-card2.js +1 -1
- package/dist/components/udp-charts-example.js +1 -1
- package/dist/components/udp-chip2.js +1 -1
- package/dist/components/udp-column-header2.js +1 -1
- package/dist/components/udp-compound-button2.js +1 -1
- package/dist/components/udp-container-query-grid-item.js +1 -1
- package/dist/components/udp-container-query-grid.js +1 -1
- package/dist/components/udp-container-query2.js +1 -1
- package/dist/components/udp-container2.js +1 -1
- package/dist/components/udp-date-input2.js +1 -1
- package/dist/components/udp-date-range-selector2.js +1 -1
- package/dist/components/udp-date-selector2.js +1 -1
- package/dist/components/udp-date-time-input2.js +1 -1
- package/dist/components/udp-datetime-selector2.js +1 -1
- package/dist/components/udp-dialog2.js +1 -1
- package/dist/components/udp-distribution-chart2.js +1 -1
- package/dist/components/udp-divider2.js +1 -1
- package/dist/components/udp-donut-chart2.js +1 -1
- package/dist/components/udp-dynamic-container-with-menu2.js +1 -1
- package/dist/components/udp-dynamic-form.js +1 -1
- package/dist/components/udp-empty-state-display2.js +1 -1
- package/dist/components/udp-field2.js +1 -1
- package/dist/components/udp-fluent-avatar2.js +1 -1
- package/dist/components/udp-fluent-badge2.js +1 -1
- package/dist/components/udp-fluent-button2.js +1 -1
- package/dist/components/udp-fluent-card2.js +1 -1
- package/dist/components/udp-fluent-checkbox2.js +1 -1
- package/dist/components/udp-fluent-counter-badge2.js +1 -1
- package/dist/components/udp-fluent-dialog2.js +1 -1
- package/dist/components/udp-fluent-divider2.js +1 -1
- package/dist/components/udp-fluent-drawer2.js +1 -1
- package/dist/components/udp-fluent-dropdown2.js +1 -1
- package/dist/components/udp-fluent-file-input.js +1 -1
- package/dist/components/udp-fluent-icon-button2.js +1 -1
- package/dist/components/udp-fluent-image.js +1 -1
- package/dist/components/udp-fluent-inline-edit.js +1 -1
- package/dist/components/udp-fluent-link.js +1 -1
- package/dist/components/udp-fluent-location-input.js +1 -1
- package/dist/components/udp-fluent-number-input.d.ts +11 -0
- package/dist/components/udp-fluent-number-input.js +2 -0
- package/dist/components/udp-fluent-radio-group2.js +1 -1
- package/dist/components/udp-fluent-signature-input.js +1 -1
- package/dist/components/udp-fluent-switch2.js +1 -1
- package/dist/components/udp-fluent-tablist2.js +1 -1
- package/dist/components/udp-fluent-text-input2.js +1 -1
- package/dist/components/udp-fluent-toggle-button2.js +1 -1
- package/dist/components/udp-form-component2.js +1 -1
- package/dist/components/udp-forms-builder-menu2.js +1 -1
- package/dist/components/udp-forms-builder-question-item2.js +1 -1
- package/dist/components/udp-forms-builder-style-override.js +1 -1
- package/dist/components/udp-forms-follow-up-list-card.js +1 -1
- package/dist/components/udp-forms-list-card2.js +1 -1
- package/dist/components/udp-forms-list.js +1 -1
- package/dist/components/udp-forms-renderer.js +1 -1
- package/dist/components/udp-grid-loader2.js +1 -1
- package/dist/components/udp-hotlist-form2.js +1 -1
- package/dist/components/udp-kpi-card2.js +1 -1
- package/dist/components/udp-kpi-cards.js +1 -1
- package/dist/components/udp-lazy-loader2.js +1 -1
- package/dist/components/udp-line-chart2.js +1 -1
- package/dist/components/udp-linear-loader2.js +1 -1
- package/dist/components/udp-map-toolbar2.js +1 -1
- package/dist/components/udp-map.js +1 -1
- package/dist/components/udp-menu-item2.js +1 -1
- package/dist/components/udp-menu.js +1 -1
- package/dist/components/udp-message-bar2.js +1 -1
- package/dist/components/udp-notification2.js +1 -1
- package/dist/components/udp-page-header2.js +1 -1
- package/dist/components/udp-page.js +1 -1
- package/dist/components/udp-pop-over-grid-action-header2.js +1 -1
- package/dist/components/udp-pop-over2.js +1 -1
- package/dist/components/udp-progress-bar2.js +1 -1
- package/dist/components/udp-sankey-chart.js +1 -1
- package/dist/components/udp-search-input2.js +1 -1
- package/dist/components/udp-selector2.js +1 -1
- package/dist/components/udp-side-sheet2.js +1 -1
- package/dist/components/udp-sidebar-layout.d.ts +11 -0
- package/dist/components/udp-sidebar-layout.js +2 -0
- package/dist/components/udp-skeleton-loading2.js +1 -1
- package/dist/components/udp-slider2.js +1 -1
- package/dist/components/udp-spinner2.js +1 -1
- package/dist/components/udp-split-screen.js +1 -1
- package/dist/components/udp-stepper-demo.js +1 -1
- package/dist/components/udp-tab-panel2.js +1 -1
- package/dist/components/udp-tab.js +1 -1
- package/dist/components/udp-tabs2.js +1 -1
- package/dist/components/udp-textarea2.js +1 -1
- package/dist/components/udp-time-input2.js +1 -1
- package/dist/components/udp-time-selector2.js +1 -1
- package/dist/components/udp-timeline-connector.js +1 -1
- package/dist/components/udp-timeline-dot.js +1 -1
- package/dist/components/udp-timeline-item.js +1 -1
- package/dist/components/udp-timeline-separator.js +1 -1
- package/dist/components/udp-timeline.js +1 -1
- package/dist/components/udp-tooltip2.js +1 -1
- package/dist/components/udp-tree2.js +1 -1
- package/dist/components/udp-xy-chart2.js +1 -1
- package/dist/components/udp-xy-multi-series-chart.js +1 -1
- package/dist/components/upd-alert-banner2.js +1 -1
- package/dist/docs.json +13789 -10151
- package/dist/esm/add-map-feature-popup_4.entry.js +12 -12
- package/dist/esm/address-search_6.entry.js +18 -18
- package/dist/esm/advanced-search_12.entry.js +13 -13
- package/dist/esm/ag-grid-base_63.entry.js +388 -148
- package/dist/esm/ambient-template-grid.entry.js +16 -16
- package/dist/esm/api-method-instance-grid.entry.js +2 -2
- package/dist/esm/app-bar.entry.js +1 -1
- package/dist/esm/chart-container_3.entry.js +2 -2
- package/dist/esm/charts-theme-B2HoYVMf.js +383 -0
- package/dist/esm/check-box.entry.js +2 -2
- package/dist/esm/chip-section.entry.js +2 -2
- package/dist/esm/date-time-renderer_9.entry.js +21 -21
- package/dist/esm/feature-details-card_2.entry.js +5 -5
- package/dist/esm/file-upload_2.entry.js +5 -5
- package/dist/esm/filter-conditions_7.entry.js +5 -5
- package/dist/esm/form-metadata-display_10.entry.js +8 -8
- package/dist/esm/icon-grid.entry.js +1 -1
- package/dist/esm/index-Cgpvu-iV.js +44 -4
- package/dist/esm/index.js +4 -152
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-component_2.entry.js +2 -2
- package/dist/esm/primary-action-header_2.entry.js +4 -4
- package/dist/esm/question-configs-renderer_4.entry.js +15 -15
- package/dist/esm/resource-timeline-calendar.entry.js +1 -1
- package/dist/esm/resource-timeline-primary-bar.entry.js +3 -3
- package/dist/esm/search-method-grid.entry.js +1 -1
- package/dist/esm/server-side-grid.entry.js +1 -1
- package/dist/esm/side-sheet-container.entry.js +1 -1
- package/dist/esm/simple-card.entry.js +1 -1
- package/dist/esm/slot-helpers-Dx6EW-PP.js +9 -0
- package/dist/esm/status-chip_2.entry.js +1 -1
- package/dist/esm/stencil-chip.entry.js +2 -2
- package/dist/esm/stencil-library.js +1 -1
- package/dist/esm/stencil-toggle.entry.js +4 -4
- package/dist/esm/text-field_2.entry.js +7 -7
- package/dist/esm/theme-manager-DeVqiL0i.js +153 -0
- package/dist/esm/udp-adornment.entry.js +1 -1
- package/dist/esm/udp-advanced-search-builder.entry.js +7 -4
- package/dist/esm/udp-ag-area-chart.entry.js +118 -0
- package/dist/esm/{udp-bar-chart_4.entry.js → udp-ag-bar-chart_4.entry.js} +110 -31
- package/dist/esm/udp-ag-bubble-chart.entry.js +118 -0
- package/dist/esm/udp-ag-combo-chart.entry.js +118 -0
- package/dist/esm/udp-ag-donut-chart.entry.js +116 -0
- package/dist/esm/udp-ag-line-chart.entry.js +118 -0
- package/dist/esm/udp-ag-pie-chart.entry.js +116 -0
- package/dist/esm/udp-ag-scatter-chart.entry.js +118 -0
- package/dist/esm/udp-attachment-item_2.entry.js +1 -1
- package/dist/esm/udp-bar-chart.entry.js +39 -0
- package/dist/esm/udp-calendar-base.entry.js +44 -71
- package/dist/esm/udp-calendar-day.entry.js +1 -3
- package/dist/esm/udp-calendar-month.entry.js +1 -3
- package/dist/esm/udp-calendar-week.entry.js +1 -3
- package/dist/esm/udp-calendar-year.entry.js +1 -3
- package/dist/esm/udp-card-action-area.entry.js +1 -1
- package/dist/esm/udp-card_6.entry.js +7 -7
- package/dist/esm/udp-charts-example.entry.js +14 -1
- package/dist/esm/udp-container-query-grid-item.entry.js +1 -1
- package/dist/esm/udp-container-query-grid.entry.js +1 -1
- package/dist/esm/udp-container-query.entry.js +2 -2
- package/dist/esm/udp-container.entry.js +2 -2
- package/dist/esm/udp-dynamic-container-with-menu.entry.js +1 -1
- package/dist/esm/udp-dynamic-form.entry.js +1 -1
- package/dist/esm/udp-fluent-file-input.entry.js +4 -4
- package/dist/esm/udp-fluent-image.entry.js +1 -1
- package/dist/esm/udp-fluent-inline-edit.entry.js +1 -1
- package/dist/esm/udp-fluent-link.entry.js +1 -1
- package/dist/esm/udp-fluent-location-input.entry.js +3 -3
- package/dist/esm/udp-fluent-number-input.entry.js +97 -0
- package/dist/esm/udp-fluent-signature-input.entry.js +4 -4
- package/dist/esm/udp-forms-builder-style-override.entry.js +1 -1
- package/dist/esm/udp-forms-follow-up-list-card.entry.js +2 -2
- package/dist/esm/udp-forms-list-card.entry.js +4 -4
- package/dist/esm/udp-forms-list.entry.js +1 -1
- package/dist/esm/udp-forms-renderer.entry.js +1 -1
- package/dist/esm/udp-kpi-card.entry.js +1 -1
- package/dist/esm/udp-kpi-cards.entry.js +2 -2
- package/dist/esm/udp-map.entry.js +3 -3
- package/dist/esm/udp-menu.entry.js +1 -1
- package/dist/esm/udp-page.entry.js +1 -1
- package/dist/esm/udp-sankey-chart.entry.js +1 -1
- package/dist/esm/udp-sidebar-layout.entry.js +65 -0
- package/dist/esm/udp-skeleton-loading.entry.js +1 -1
- package/dist/esm/udp-split-screen.entry.js +1 -1
- package/dist/esm/udp-stepper-demo.entry.js +1 -1
- package/dist/esm/udp-tab.entry.js +1 -1
- package/dist/esm/udp-timeline-connector.entry.js +1 -1
- package/dist/esm/udp-timeline-dot.entry.js +1 -1
- package/dist/esm/udp-timeline-item.entry.js +2 -2
- package/dist/esm/udp-timeline-separator.entry.js +1 -1
- package/dist/esm/udp-timeline.entry.js +1 -1
- package/dist/esm/udp-xy-chart.entry.js +1 -1
- package/dist/esm/udp-xy-multi-series-chart.entry.js +1 -1
- package/dist/stencil-library/add-map-feature-popup_4.entry.js +1 -1
- package/dist/stencil-library/address-search_6.entry.js +1 -1
- package/dist/stencil-library/advanced-search_12.entry.js +1 -1
- package/dist/stencil-library/ag-grid-base_63.entry.js +1 -1
- package/dist/stencil-library/ambient-template-grid.entry.js +1 -1
- package/dist/stencil-library/api-method-instance-grid.entry.js +1 -1
- package/dist/stencil-library/app-bar.entry.js +1 -1
- package/dist/stencil-library/chart-container_3.entry.js +1 -1
- package/dist/stencil-library/charts-theme-B2HoYVMf.js +1 -0
- package/dist/stencil-library/check-box.entry.js +1 -1
- package/dist/stencil-library/chip-section.entry.js +1 -1
- package/dist/stencil-library/date-time-renderer_9.entry.js +1 -1
- package/dist/stencil-library/feature-details-card_2.entry.js +1 -1
- package/dist/stencil-library/file-upload_2.entry.js +1 -1
- package/dist/stencil-library/filter-conditions_7.entry.js +1 -1
- package/dist/stencil-library/form-metadata-display_10.entry.js +1 -1
- package/dist/stencil-library/icon-grid.entry.js +1 -1
- package/dist/stencil-library/index.esm.js +1 -1
- package/dist/stencil-library/map-component_2.entry.js +1 -1
- package/dist/stencil-library/primary-action-header_2.entry.js +1 -1
- package/dist/stencil-library/question-configs-renderer_4.entry.js +1 -1
- package/dist/stencil-library/resource-timeline-calendar.entry.js +1 -1
- package/dist/stencil-library/resource-timeline-primary-bar.entry.js +1 -1
- package/dist/stencil-library/search-method-grid.entry.js +1 -1
- package/dist/stencil-library/server-side-grid.entry.js +1 -1
- package/dist/stencil-library/side-sheet-container.entry.js +1 -1
- package/dist/stencil-library/simple-card.entry.js +1 -1
- package/dist/stencil-library/slot-helpers-Dx6EW-PP.js +1 -0
- package/dist/stencil-library/status-chip_2.entry.js +1 -1
- package/dist/stencil-library/stencil-chip.entry.js +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/stencil-library/stencil-toggle.entry.js +1 -1
- package/dist/stencil-library/text-field_2.entry.js +1 -1
- package/dist/stencil-library/theme-manager-DeVqiL0i.js +1 -0
- package/dist/stencil-library/udp-adornment.entry.js +1 -1
- package/dist/stencil-library/udp-advanced-search-builder.entry.js +1 -1
- package/dist/stencil-library/udp-ag-area-chart.entry.js +1 -0
- package/dist/stencil-library/udp-ag-bar-chart_4.entry.js +1 -0
- package/dist/stencil-library/udp-ag-bubble-chart.entry.js +1 -0
- package/dist/stencil-library/udp-ag-combo-chart.entry.js +1 -0
- package/dist/stencil-library/udp-ag-donut-chart.entry.js +1 -0
- package/dist/stencil-library/udp-ag-line-chart.entry.js +1 -0
- package/dist/stencil-library/udp-ag-pie-chart.entry.js +1 -0
- package/dist/stencil-library/udp-ag-scatter-chart.entry.js +1 -0
- package/dist/stencil-library/udp-attachment-item_2.entry.js +1 -1
- package/dist/stencil-library/udp-bar-chart.entry.js +1 -0
- package/dist/stencil-library/udp-calendar-base.entry.js +1 -1
- package/dist/stencil-library/udp-calendar-day.entry.js +1 -1
- package/dist/stencil-library/udp-calendar-month.entry.js +1 -1
- package/dist/stencil-library/udp-calendar-week.entry.js +1 -1
- package/dist/stencil-library/udp-calendar-year.entry.js +1 -1
- package/dist/stencil-library/udp-card-action-area.entry.js +1 -1
- package/dist/stencil-library/udp-card_6.entry.js +1 -1
- package/dist/stencil-library/udp-charts-example.entry.js +1 -1
- package/dist/stencil-library/udp-container-query-grid-item.entry.js +1 -1
- package/dist/stencil-library/udp-container-query-grid.entry.js +1 -1
- package/dist/stencil-library/udp-container-query.entry.js +1 -1
- package/dist/stencil-library/udp-container.entry.js +1 -1
- package/dist/stencil-library/udp-dynamic-container-with-menu.entry.js +1 -1
- package/dist/stencil-library/udp-dynamic-form.entry.js +1 -1
- package/dist/stencil-library/udp-fluent-file-input.entry.js +1 -1
- package/dist/stencil-library/udp-fluent-image.entry.js +1 -1
- package/dist/stencil-library/udp-fluent-inline-edit.entry.js +1 -1
- package/dist/stencil-library/udp-fluent-link.entry.js +1 -1
- package/dist/stencil-library/udp-fluent-location-input.entry.js +1 -1
- package/dist/stencil-library/udp-fluent-number-input.entry.js +1 -0
- package/dist/stencil-library/udp-fluent-signature-input.entry.js +1 -1
- package/dist/stencil-library/udp-forms-builder-style-override.entry.js +1 -1
- package/dist/stencil-library/udp-forms-follow-up-list-card.entry.js +1 -1
- package/dist/stencil-library/udp-forms-list-card.entry.js +1 -1
- package/dist/stencil-library/udp-forms-list.entry.js +1 -1
- package/dist/stencil-library/udp-forms-renderer.entry.js +1 -1
- package/dist/stencil-library/udp-kpi-card.entry.js +1 -1
- package/dist/stencil-library/udp-kpi-cards.entry.js +1 -1
- package/dist/stencil-library/udp-map.entry.js +1 -1
- package/dist/stencil-library/udp-menu.entry.js +1 -1
- package/dist/stencil-library/udp-page.entry.js +1 -1
- package/dist/stencil-library/udp-sankey-chart.entry.js +1 -1
- package/dist/stencil-library/udp-sidebar-layout.entry.js +1 -0
- package/dist/stencil-library/udp-skeleton-loading.entry.js +1 -1
- package/dist/stencil-library/udp-split-screen.entry.js +1 -1
- package/dist/stencil-library/udp-stepper-demo.entry.js +1 -1
- package/dist/stencil-library/udp-tab.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-connector.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-dot.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-item.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-separator.entry.js +1 -1
- package/dist/stencil-library/udp-timeline.entry.js +1 -1
- package/dist/stencil-library/udp-xy-chart.entry.js +1 -1
- package/dist/stencil-library/udp-xy-multi-series-chart.entry.js +1 -1
- package/dist/types/components/calendar/udp-calendar-base.d.ts +5 -2
- package/dist/types/components/calendar/udp-calendar-day.d.ts +1 -2
- package/dist/types/components/calendar/udp-calendar-month.d.ts +1 -2
- package/dist/types/components/calendar/udp-calendar-week.d.ts +1 -2
- package/dist/types/components/calendar/udp-calendar-year.d.ts +1 -2
- package/dist/types/components/charts/chart-container/chart-container.d.ts +7 -0
- package/dist/types/components/charts/chart-kpi/chart-kpi.d.ts +5 -0
- package/dist/types/components/charts/charts-theme.d.ts +80 -0
- package/dist/types/components/charts/udp-ag-area-chart/udp-ag-area-chart.d.ts +73 -0
- package/dist/types/components/charts/udp-ag-bar-chart/udp-ag-bar-chart.d.ts +62 -0
- package/dist/types/components/charts/udp-ag-bubble-chart/udp-ag-bubble-chart.d.ts +70 -0
- package/dist/types/components/charts/udp-ag-combo-chart/udp-ag-combo-chart.d.ts +83 -0
- package/dist/types/components/charts/udp-ag-donut-chart/udp-ag-donut-chart.d.ts +70 -0
- package/dist/types/components/charts/udp-ag-line-chart/udp-ag-line-chart.d.ts +75 -0
- package/dist/types/components/charts/udp-ag-pie-chart/udp-ag-pie-chart.d.ts +72 -0
- package/dist/types/components/charts/udp-ag-scatter-chart/udp-ag-scatter-chart.d.ts +76 -0
- package/dist/types/components/charts/udp-bar-chart/udp-bar-chart.d.ts +4 -0
- package/dist/types/components/charts/udp-charts-example.d.ts +1 -1
- package/dist/types/components/charts/udp-distribution-chart/udp-distribution-chart.d.ts +4 -0
- package/dist/types/components/charts/udp-donut-chart/udp-donut-chart.d.ts +4 -0
- package/dist/types/components/charts/udp-line-chart/udp-line-chart.d.ts +4 -0
- package/dist/types/components/charts/udp-sankey-chart/udp-sankey-chart.d.ts +5 -0
- package/dist/types/components/charts/udp-xy-chart/udp-xy-chart.d.ts +5 -0
- package/dist/types/components/charts/udp-xy-multi-series-chart/udp-xy-multi-series-chart.d.ts +4 -0
- package/dist/types/components/fluent-ui/autocomplete/udp-autocomplete.d.ts +39 -7
- package/dist/types/components/fluent-ui/date-input/udp-date-input.d.ts +15 -1
- package/dist/types/components/fluent-ui/date-time-input/udp-date-time-input.d.ts +10 -1
- package/dist/types/components/fluent-ui/dropdown/udp-fluent-dropdown.d.ts +33 -5
- package/dist/types/components/fluent-ui/number-input/udp-fluent-number-input.d.ts +66 -0
- package/dist/types/components/fluent-ui/tree/udp-tree.d.ts +78 -0
- package/dist/types/components/grid/new-grid/gridFunctions/bulkActions.d.ts +20 -0
- package/dist/types/components/layout/udp-sidebar-layout/udp-sidebar-layout.d.ts +54 -0
- package/dist/types/components.d.ts +1912 -76
- package/package.json +2 -1
- package/dist/components/udp-bar-chart2.js +0 -1
- package/dist/stencil-library/udp-bar-chart_4.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,a as s}from"./index-Cgpvu-iV.js";import e from"ol/Map";import h from"ol/View";import o from"ol/layer/Tile";import n from"ol/source/OSM";import l from"ol/layer/Vector";import a from"ol/source/Vector";import{Zoom as r,FullScreen as d}from"ol/control";import p from"proj4";import{register as c}from"ol/proj/proj4";import{Select as u,Draw as v,defaults as f,DragRotateAndZoom as m}from"ol/interaction";import{Feature as y,Overlay as w}from"ol";import{h as b,g as S,a as g,b as O,c as M,d as F,s as P}from"./udp-map-utils-v_NyJK7e.js";import{Point as L,LineString as C,Polygon as j}from"ol/geom";import*as x from"@turf/turf";import{createBox as z}from"ol/interaction/Draw";import{transformExtent as B}from"ol/proj";import{click as T}from"ol/events/condition";import{first as V,debounce as D}from"lodash-es";import{S as k,D as A,P as Z}from"./common-CwN0FuAf.js";import"ol/format/GeoJSON";const I=class{constructor(i){t(this,i),this.data=[],this.isGeoJsonFormat=!0,this.enableZoom=!0,this.mapZoom=17,this.mapCenter=[0,0],this.mapHeight="80vh",this.mapProjection="",this.filterPanel="",this.enableTileSelection=!0,this.tileLayersOptions=[],this.defaultTileOptionName="",this.layerOptions=[],this.initialSelectedLayers=[],this.bulkSelectedFeaturesActionPanel="",this.filterLayersByRole=!1,this.layerKeySeparator="",this.filteredLayerOptionsByRole=[],this.readOnlyMap=!1,this.enableViewFeature=!0,this.bulkSelectionActive=!1,this.splitActive=!1,this.enableDragBox=!1,this.enableAddNewFeature=!0,this.readOnlyLayers=[],this.popoverPrimaryActions=[],this.popoverMoreIconButtonActions=[],this.hideMessageIconPopover=!1,this.popoverCardConfig={},this.minZoom=0,this.maxZoom=28,this.definedProjection=!1,this.popoverContainer=null,this.showPopOver=!1,this.isReadOnlyFeature=!1,this.mapFeatures=[],this.initializeMap=(t,i)=>{var s;this.definedProjection=this.registerProjection(this.crs),this.filterLayerOptions();let p=[];if(this.tileLayersOptions&&(null===(s=this.tileLayersOptions)||void 0===s?void 0:s.length)>0)for(let t of this.tileLayersOptions){const i=new o({source:null==t?void 0:t.source,properties:{value:null==t?void 0:t.name,isBaseTile:!0},visible:!this.defaultTileOptionName||(null==t?void 0:t.name)===this.defaultTileOptionName});p[p.length]=i}else{const t=new o({source:new n,properties:{value:"Open Street Map",isBaseTile:!0},visible:!0});p[p.length]=t}p.push(new l({source:new a({}),properties:{id:A}}));const c=new h({center:this.mapCenter,zoom:this.mapZoom,projection:this.mapProjection,minZoom:this.minZoom,maxZoom:this.maxZoom});this.mapInstance=new e({target:i,layers:p,view:c,interactions:f().extend([new m]),controls:[new r,new d],overlays:[new w({element:t,autoPan:{animation:{duration:250}},id:Z})]}),this.mapInstance.on("moveend",D((()=>{this.getMapExtentAndZoom()}),500)),this.setVectorLayers(),this.addSelectInteraction(),this.handleSetMapComponent&&this.handleSetMapComponent(this.mapInstance)},this.setVectorLayers=()=>{let t=S(this.data,this.isGeoJsonFormat,this.geoJsonMappingConfig,this.filterPanel,this.filterPanelCallback);this.mapFeatures=g(t,this.crs,this.definedProjection,this.mapProjection,this.mapDataProjection,this.getFilteredMapData);let i=this.getVisibleLayersOnLoad(this.layerOptions);this.addVectorLayersToMap(this.mapFeatures,i),this.updateIntialSelectedLayersVisibility()},this.clearVectorLayers=()=>{var t,i,s;(null!==(s=null===(i=null===(t=this.mapInstance)||void 0===t?void 0:t.getLayers())||void 0===i?void 0:i.getArray())&&void 0!==s?s:[]).forEach((t=>{t instanceof l&&t.get("id")!==A&&this.mapInstance.removeLayer(t)}))},this.registerProjection=t=>(null==t?void 0:t.length)>0&&(p.defs(t),c(p),!0),this.filterLayerOptions=()=>{let t=this.filterLayersByRole?O(this.user,this.layerRoles,this.layerOptions):this.layerOptions;this.handleSetFilteredLayerOptionsByRole(t)},this.addVectorLayersToMap=(t,i)=>{var s;if(t&&this.mapInstance)if(this.getVectorLayerSources)null===(s=this.getVectorLayerSources(i,t))||void 0===s||s.forEach((t=>{var i;const s=new a({features:null!==(i=null==t?void 0:t.features)&&void 0!==i?i:[]}),e=new l({source:s,properties:{value:null==t?void 0:t.layer},style:this.getFeatureStyles});this.mapInstance.addLayer(e)}));else for(let s of i){const i=null==t?void 0:t.filter((t=>{const i=t.getProperties();if(this.getFeatureStyles){let i=this.getFeatureStyles(t);b(i)&&t.setStyle(i)}const e=M(this.layerKeys,this.layerKeySeparator,i);return s===e})),e=new a({features:i}),h=new l({source:e,properties:{value:s}});this.mapInstance.addLayer(h)}},this.getVisibleLayersOnLoad=t=>{const i=this.filterLayersByRole?O(this.user,this.layerRoles,t):t;return F(i)},this.updateLayerVisibility=(t,i=!1)=>{var s,e;let h=i?o:l;null===(e=null===(s=this.mapInstance)||void 0===s?void 0:s.getLayers())||void 0===e||e.forEach((i=>{i instanceof h&&(t.includes(i.get("value"))||i.get("id")===A?i.setVisible(!0):i.setVisible(!1))}))},this.insertFeatureStyles=()=>{this.getFeatureStyles&&this.mapInstance.getLayers().forEach((t=>{t instanceof l&&t.getSource().getFeatures().forEach((t=>{let i=this.getFeatureStyles(t);b(i)&&t.setStyle(i)}))}))},this.addSelectInteraction=()=>{((t,i,s,e,h,o,n,l,a,r,d)=>{const p=new u({condition:t=>T(t),multi:!1,hitTolerance:30});p.set("id",k),p.on("select",(async l=>{if(!a&&!t)if(l.selected.length>0){const t=V(l.selected);if(d){let i=await d(l.selected);i&&"object"==typeof i&&Object.keys(i).forEach((s=>{t.values_[`${s}`]=i[s]}))}if(i(t),h&&h(t),s(t),o(t),n){let i=n(t);b(i)&&t.setStyle(i)}}else s(null),e()})),r(p),l(p)})(this.splitActive,this.handleSetCurrentSelectedFeature,this.handleSetSelectedFeatureProperties,this.handleOnCloseFeaturePopover,this.handleSetSelectedFeatureOnSelect,this.showPopper,this.getSelectedFeatureStyles,this.handleAddInteraction,this.enableDragBox,this.handleUpdateSelectInteraction,this.handleGetAdditionalFeaturePropertiesOnSelect)},this.handleUpdateSelectInteraction=t=>{this.selectInteraction=t},this.handleSetCurrentSelectedFeature=t=>{this.currentSelectedFeature=t},this.handleSetShowPopOver=t=>{this.showPopOver=t},this.showPopper=t=>{if(!this.enableDragBox&&!this.enableAddNewFeature&&!this.splitActive&&t){const i=this.mapInstance.getOverlayById(Z);i&&(t.getGeometry()instanceof L?i.setPosition(t.getGeometry().getCoordinates()):t.getGeometry()instanceof C?i.setPosition(t.getGeometry().getCoordinates()[0]):t.getGeometry()instanceof j&&i.setPosition(t.getGeometry().getCoordinates()[0][0])),this.showPopOver=!0}},this.handleOnCloseFeaturePopover=t=>{this.additionalOnclosePopover&&this.additionalOnclosePopover(t),this.setSelectedFeatureIdExternal&&this.setSelectedFeatureIdExternal(null),this.showPopOver=!1},this.handleAddInteraction=t=>{this.mapInstance.addInteraction(t)},this.handleShowMarkerFromExternal=t=>{var i,s;if(t&&this.mapFeatures&&this.selectInteraction){const e=null===(i=this.mapFeatures)||void 0===i?void 0:i.find((i=>(null==i?void 0:i.getId())===t)),h=null==e?void 0:e.getProperties();if(e){this.handleSetSelectedFeatureProperties(e);const t=M(this.layerKeys,this.layerKeySeparator,h),i=F(this.filteredLayerOptionsByRole);if(!(null===(s=this.selectedLayers)||void 0===s?void 0:s.includes(t))&&(null==i?void 0:i.includes(t))&&this.handleSetSelectedLayers){const i=[...this.selectedLayers,t];this.handleSetSelectedLayers(i),this.updateLayerVisibility(i)}const o=this.selectInteraction.getFeatures(),n=o.getArray().slice();o.clear(),o.push(e),this.selectInteraction.dispatchEvent({type:"select",selected:[e],deselected:n,mapBrowserEvent:null})}}}}componentDidLoad(){requestAnimationFrame((()=>{this.popoverContainer=this.el.shadowRoot.querySelector("#featureDetailsPopOverContainer");const t=this.el.shadowRoot.querySelector("#map");this.popoverContainer&&t&&this.initializeMap(this.popoverContainer,t)}))}reinitializeMap(){this.clearVectorLayers(),this.setVectorLayers()}resetPopover(){this.showPopOver=!1}updateProjection(){this.crs&&(this.definedProjection=this.registerProjection(this.crs))}updateFilteredLayerOptions(){this.filterLayerOptions()}handleSelectFeatureOnMap(){var t;this.selectedFeatureIdExternal&&(null===(t=this.selectInteraction)||void 0===t?void 0:t.getActive())?this.handleShowMarkerFromExternal(this.selectedFeatureIdExternal):this.selectedFeatureIdExternal&&this.setSelectedFeatureIdExternal&&this.setSelectedFeatureIdExternal(null)}updateReadOnlyLayers(){var t;if(this.selectedFeatureProperties){const i=M(this.layerKeys,this.layerKeySeparator,this.selectedFeatureProperties);this.isReadOnlyFeature=null===(t=this.readOnlyLayers)||void 0===t?void 0:t.includes(i)}}handleUpdateInitialSelectedLayersVisibility(){this.updateIntialSelectedLayersVisibility()}updateMapView(){if(this.mapInstance){const t=this.mapInstance.getView().getCenter(),i=this.mapInstance.getView().getZoom();this.mapInstance.setView(new h({center:t,zoom:i,projection:this.mapProjection}))}}updateMapCenter(){var t;this.mapInstance&&this.mapCenter&&(null===(t=this.mapInstance.getView())||void 0===t||t.setCenter(this.mapCenter))}updateFeatureStyles(){this.mapInstance&&this.insertFeatureStyles()}updateMinZoom(){var t,i;this.mapInstance&&this.minZoom&&(null===(i=null===(t=this.mapInstance)||void 0===t?void 0:t.getView())||void 0===i||i.setMinZoom(this.minZoom))}updateMaxZoom(){var t,i;this.mapInstance&&this.maxZoom&&(null===(i=null===(t=this.mapInstance)||void 0===t?void 0:t.getView())||void 0===i||i.setMaxZoom(this.maxZoom))}getMapExtentAndZoom(){if(this.handleGetZoomExtent){const t=this.mapInstance.getView().calculateExtent(this.mapInstance.getSize()),i=this.mapInstance.getView().getZoom();this.handleGetZoomExtent(i,t)}}updateIntialSelectedLayersVisibility(){let t=P(this.filteredLayerOptionsByRole,this.initialSelectedLayers);this.updateLayerVisibility(t),this.handleSetSelectedLayers&&this.handleSetSelectedLayers(t)}render(){return i("div",{key:"3761f5eb6d0cb6995d6d9a3dc690e9479209b90a"},i("div",{key:"8bdb3f0ead695d5fe8eeb799c8fd85f8429c9544",id:"map",style:{height:this.mapHeight,width:"100%",overflow:"hidden"}},i("slot",{key:"a427b36c3000615fbbd4bda72a77f830ab2e3915"})),i("div",{key:"e898750fe07a4a576edebc104f509277358e010d",id:"featureDetailsPopOverContainer"},i("feature-details-popup",{key:"dc2c1bfd60135457c822ea181c658fb5ee47ce08",currentSelectedFeature:this.currentSelectedFeature,data:this.selectedFeatureProperties,coordinates:this.selectedFeatureCoordinates,enableViewFeature:this.enableViewFeature,handleViewFeature:this.handleViewFeature,showPopOver:this.showPopOver,isReadOnly:this.isReadOnlyFeature,additionalOnclosePopover:this.handleOnCloseFeaturePopover,primaryActions:this.popoverPrimaryActions,moreIconActions:this.popoverMoreIconButtonActions,getMessage:this.getMessagePopover,getMessageIcon:this.getMessageIconPopover,hideMessageIcon:this.hideMessageIconPopover,cardConfig:this.popoverCardConfig,popoverWidth:this.popoverWidth,popoverContainer:this.popoverContainer})))}get el(){return s(this)}static get watchers(){return{data:[{reinitializeMap:0},{resetPopover:0}],layerOptions:[{reinitializeMap:0},{updateFilteredLayerOptions:0}],mapDataProjection:[{reinitializeMap:0}],mapProjection:[{reinitializeMap:0},{updateMapView:0}],crs:[{updateProjection:0}],layerRoles:[{updateFilteredLayerOptions:0}],user:[{updateFilteredLayerOptions:0}],selectedFeatureIdExternal:[{handleSelectFeatureOnMap:0}],readOnlyLayers:[{updateReadOnlyLayers:0}],selectedFeatureProperties:[{updateReadOnlyLayers:0}],initialSelectedLayers:[{handleUpdateInitialSelectedLayersVisibility:0}],mapCenter:[{updateMapCenter:0}],getMapStyles:[{updateFeatureStyles:0}],minZoom:[{updateMinZoom:0}],maxZoom:[{updateMaxZoom:0}]}}};I.style=":host{display:block}.zoomControl{left:'auto';right:'20';top:'20'}.iconButtonWrapper{padding:var(--spacing-04)}#featureDetailsPopOverContainer{position:absolute;z-index:1000}.hidden-controls .ol-zoom,.hidden-controls .ol-attribution{display:none}.ol-control{width:fit-content !important}";const N=class{constructor(i){t(this,i),this.mapTitle="",this.mapProjection="",this.filterPanel="",this.enableTileSelection=!0,this.tileLayersOptions=[],this.defaultTileOptionName="",this.layerOptions=[],this.bulkSelectedFeaturesActionPanel="",this.refreshButtonTooltip="",this.readOnlyMap=!1,this.enableAdd=!0,this.addMultipleFeatures=!0,this.enableSplitFeature=!0,this.filteredLayerOptionsByRole=[],this.enableDragBox=!1,this.splitActive=!1,this.enableAddNewFeature=!1,this.readOnlyLayers=[],this.selectedTile={label:"Open Street Map",value:"Open Street Map"},this.selectedBulkSelectionType="box",this.selectedFeatureByBoxSelection=[],this.tileSelectOptions=[{label:"Open Street Map",value:"Open Street Map"}],this.newFeatureObjectsAdded=[],this.showSplitButton=!1,this.setEnableDragBox=t=>{this.handleSetEnableDragBox(t)},this.setBulkSelectonActive=t=>{this.handleSetBulkSelectionActive(t)},this.getTileLayerOptions=()=>{this.tileSelectOptions=this.tileLayersOptions.map((t=>({label:null==t?void 0:t.name,value:null==t?void 0:t.name}))),this.selectedTile=this.tileSelectOptions.filter((t=>t.value===this.defaultTileOptionName))[0]},this.handleSelectTile=t=>{var i;if(t&&(this.selectedTile=t,this.enableTileSelection&&(null===(i=this.tileLayersOptions)||void 0===i?void 0:i.length)>0)){const i=this.tileLayersOptions.find((i=>(null==i?void 0:i.name)===t));if(!i)return;this.map.getLayers().getArray().filter((t=>t.get("isBaseTile"))).forEach((t=>{this.map.removeLayer(t)}));const s=new o({source:i.source,visible:!0,zIndex:0,properties:{value:i.name,isBaseTile:!0}});this.map.getLayers().insertAt(0,s)}},this.handleSelectLayers=t=>{this.handleSetSelectedLayers&&this.handleSetSelectedLayers(t),this.updateLayerVisibility(t),this.handleSelectLayersCallback&&this.handleSelectLayersCallback(t)},this.updateLayerVisibility=(t,i=!1)=>{var s,e;let h=i?o:l;null===(e=null===(s=this.map)||void 0===s?void 0:s.getLayers())||void 0===e||e.forEach((i=>{i instanceof h&&(t.includes(i.get("value"))||i.get("id")===A?i.setVisible(!0):i.setVisible(!1))}))},this.bulkSelectDraw=(t,i)=>{((t,i,s,e,h,o,n,a,r,d,p,c,u,f,m,y)=>{if((0,this.setBulkSelectonActive)(!0),h(!0),o(null),u([]),f(i),n(),t){a&&d(a);const e={type:"Circle"};"box"===i?e.geometryFunction=z():"polygon"===i?e.type="Polygon":"lasso"===i&&(e.type="Polygon",e.freehand=!0);const o=new v(e);r(o),p(o),o.setActive(!0);let n=[];o.on("drawend",(i=>{d(a);let e=i.feature.getGeometry().getExtent();if(e=B(e,t.getView().getProjection(),s),t.getLayers().forEach((t=>{if(t instanceof l){const i=t.getSource().getFeaturesInExtent(e).filter((t=>t.getGeometry().intersectsExtent(e)&&!c.includes(t)));m&&i.forEach((t=>{let i=m(t);b(i)&&t.setStyle(i)})),n.push(...i)}})),n.length>0){let t=(null==c?void 0:c.length)>0?[...c,...n]:n;u(t),y&&y(c)}h(!1),o.setActive(!1)})),r(o)}})(this.map,t,i,0,this.setEnableDragBox,this.handleSetSelectedFeatureProperties,this.clearSelectFeatureInteraction,this.currentBulkSelectDrawInteraction,this.handleSetCurrentBulkSelectDrawInteraction,this.handleRemoveInteraction,this.handleAddInteraction,this.selectedFeatureByBoxSelection,this.handleSetSelectedFeatureByBoxSelection,this.handleSetSelectedBulkSelectionType,this.getSelectedFeatureStyles,this.handleSetSelectedFeaturesOnBulkSelect)},this.clearSelectFeatureInteraction=()=>{this.selectFeatureInteraction&&(this.selectFeatureInteraction.getFeatures().clear(),this.selectFeatureInteraction.setActive(!1))},this.handleSetCurrentBulkSelectDrawInteraction=t=>{this.currentBulkSelectDrawInteraction=t},this.handleSetSelectedFeatureByBoxSelection=t=>{this.selectedFeatureByBoxSelection=t},this.handleSetSelectedBulkSelectionType=t=>{this.selectedBulkSelectionType=t},this.handleCancelBulkSelectDraw=()=>{this.setBulkSelectonActive(!1),this.setEnableDragBox(!1),this.currentBulkSelectDrawInteraction.setActive(!1),this.map.removeInteraction(this.currentBulkSelectDrawInteraction)},this.handleBulkUnselectFeatures=()=>{this.selectedFeatureByBoxSelection.length>0&&this.getFeatureStyles&&this.selectedFeatureByBoxSelection.forEach((t=>{let i=this.getFeatureStyles(t);b(i)&&t.setStyle(i)})),this.setEnableDragBox(!1),this.setBulkSelectonActive(!1),this.selectedFeatureByBoxSelection=[],this.handleSetSelectedFeaturesOnBulkSelect&&this.handleSetSelectedFeaturesOnBulkSelect([])},this.startDrawingMapFeature=(t,i="Point")=>{((t,i,s="Point",e,h,o,n,r,d,p,c,u)=>{var f,m,y,w;d&&d(null),r(!0),h&&e(h);let b=new a;i?null===(f=null==t?void 0:t.getLayers())||void 0===f||f.forEach((t=>{t instanceof l&&i.value===t.getProperties().value&&(b=t.getSource())})):b=null===(w=null===(y=null===(m=null==t?void 0:t.getLayers())||void 0===m?void 0:m.getArray())||void 0===y?void 0:y.find((t=>t instanceof l&&t.get("id")===A)))||void 0===w?void 0:w.getSource();const S=new v({source:b,type:s});o(S),S.on("drawend",(function(t){const e=t.feature;let h=e.getGeometry();if(h instanceof L||h instanceof C||h instanceof j){let t={feature:e,type:s,coordinates:h.getCoordinates(),geometry:h,layer:i,source:b};n&&n(t),c||u()}})),p(S)})(this.map,t,i,this.handleRemoveInteraction,this.currentAddFeatureDrawInteraction,this.handleSetCurrentInteraction,this.handleGetFeatureObject,this.handleEnableAddNewFeature,this.handleSetSelectedFeatureProperties,this.handleAddInteraction,this.addMultipleFeatures,this.addNewFeature)},this.handleGetFeatureObject=t=>{this.newFeatureObjectsAdded=[...this.newFeatureObjectsAdded,t]},this.handleAddInteraction=t=>{this.map.addInteraction(t)},this.handleRemoveInteraction=t=>{this.map.removeInteraction(t),this.currentAddFeatureDrawInteraction=null},this.handleSetCurrentInteraction=t=>{this.currentAddFeatureDrawInteraction=t},this.cancelAddNewFeature=()=>{this.handleEnableAddNewFeature(!1),this.map.removeInteraction(this.currentAddFeatureDrawInteraction)},this.addNewFeature=()=>{this.handleEnableAddNewFeature(!1),this.map.removeInteraction(this.currentAddFeatureDrawInteraction),this.handleAddNewFeatures&&this.handleAddNewFeatures(this.newFeatureObjectsAdded)},this.handleStartSplitting=t=>{this.handleSetSplit(!0),this.splitActive=!0,((t,i,s,e,h,o,n,r)=>{s&&(0,this.handleRemoveInteraction)(s),e(null),h(!0);let d=new a;t.getLayers().forEach((t=>{t instanceof l&&i.value===t.getProperties().value&&(d=t.getSource())}));const p=new v({source:d,type:"LineString"});e(p),p.on("drawend",(function(t){const i=t.feature,s=i.getGeometry();if(s instanceof C){const e=s.getCoordinates(),h=x.lineString(e);let o,n=new y,l=new y;d.getFeatures().forEach((t=>{const i=t.getGeometry();if(i instanceof C){let t=i.getCoordinates();const s=x.lineString(t);if(o=x.lineIntersect(s,h),o.features.length>0){const t=o.features[0].geometry.coordinates,i=[t,s.geometry.coordinates[1]];n=new y({geometry:new C([s.geometry.coordinates[0],t]),name:"Split LineString 1"}),l=new y({geometry:new C(i),name:"Split LineString 2"})}}})),d.removeFeature(i),d.removeFeature(t.feature),d.addFeature(n),d.addFeature(l),r&&r({originalFeature:i,newFeature1:n,newFeature2:l})}})),n(p),e(p)})(this.map,t,this.currentSplitInteraction,this.handleSetCurrentSplitInteraction,this.handleSetSplit,0,this.handleAddInteraction,this.handleRetrieveSplitFeature)},this.handleSetSplit=t=>{this.handleSetSplitActive(t),this.showSplitButton=t},this.handleRetrieveSplitFeature=t=>{this.splitFeatureDetails=t},this.handleSetCurrentSplitInteraction=t=>{this.currentSplitInteraction=t},this.handleCancelSplit=()=>{this.handleSetSplit(!1),this.splitActive=!1,this.handleRemoveInteraction(this.currentSplitInteraction),this.currentSplitInteraction=null},this.handleSaveSplit=()=>{this.handleSetSplit(!1),this.handleRemoveInteraction(this.currentSplitInteraction),this.currentSplitInteraction=null,this.handleSplitFeature(this.splitFeatureDetails)}}componentWillLoad(){var t;this.tileLayersOptions&&(null===(t=this.tileLayersOptions)||void 0===t?void 0:t.length)>0&&this.getTileLayerOptions()}updateTileSelectOptions(){var t;this.tileLayersOptions&&(null===(t=this.tileLayersOptions)||void 0===t?void 0:t.length)>0&&this.getTileLayerOptions()}render(){return i("map-toolbar",{key:"e14e2f752d19ab4449ca27237bd75b8dcc776edb",map:this.map,mapTitle:this.mapTitle,layerOptions:this.layerOptions,handleSelectLayers:this.handleSelectLayers,visibleLayers:this.selectedLayers,tileOptions:this.tileSelectOptions,handleSelectTile:this.handleSelectTile,selectedTile:this.selectedTile,enableTileSelection:this.enableTileSelection,filterPanel:this.filterPanel,enableDragBox:this.enableDragBox,selectedFeatureByBoxSelection:this.selectedFeatureByBoxSelection,handleUnselectFeatures:this.handleBulkUnselectFeatures,selectedFeaturesActionPanel:this.bulkSelectedFeaturesActionPanel,handleCancelBoxSelection:this.handleCancelBulkSelectDraw,handleBulkSelectionTypeOnChange:this.bulkSelectDraw,mapProjection:this.mapProjection,refreshEvent:this.handleRefresh,refreshButtonTooltip:this.refreshButtonTooltip,enableAddNewFeature:this.enableAddNewFeature,handleStartDrawingMapFeature:this.startDrawingMapFeature,cancelAddNewFeature:this.cancelAddNewFeature,addNewFeature:this.addNewFeature,enableSplit:this.enableSplitFeature,handleStartSplitting:this.handleStartSplitting,handleCancelSplit:this.handleCancelSplit,handleSaveSplit:this.handleSaveSplit,readOnlyMap:this.readOnlyMap,enableAdd:this.enableAdd,addMultipleFeatures:this.addMultipleFeatures,showSplitButton:this.showSplitButton,readOnlyLayers:this.readOnlyLayers,addFeaturePanelConfig:this.addFeaturePanelConfig})}get el(){return s(this)}static get watchers(){return{tileLayersOptions:[{updateTileSelectOptions:0}]}}};N.style=":host{display:block}.zoomControl{left:'auto';right:'20';top:'20'}.iconButtonWrapper{padding:var(--spacing-04)}#featureDetailsPopOverContainer{position:absolute;z-index:1000}.hidden-controls .ol-zoom,.hidden-controls .ol-attribution{display:none}.ol-control{width:fit-content !important}";export{I as map_component,N as udp_map_toolbar}
|
|
1
|
+
import{r as t,h as i,a as s}from"./index-Cgpvu-iV.js";import e from"ol/Map";import h from"ol/View";import o from"ol/layer/Tile";import n from"ol/source/OSM";import l from"ol/layer/Vector";import a from"ol/source/Vector";import{Zoom as r,FullScreen as d}from"ol/control";import p from"proj4";import{register as c}from"ol/proj/proj4";import{Select as u,Draw as v,defaults as f,DragRotateAndZoom as m}from"ol/interaction";import{Feature as y,Overlay as w}from"ol";import{h as b,g as S,a as g,b as O,c as M,d as F,s as P}from"./udp-map-utils-v_NyJK7e.js";import{Point as L,LineString as C,Polygon as j}from"ol/geom";import*as x from"@turf/turf";import{createBox as z}from"ol/interaction/Draw";import{transformExtent as B}from"ol/proj";import{click as T}from"ol/events/condition";import{first as V,debounce as D}from"lodash-es";import{S as k,D as A,P as Z}from"./common-CwN0FuAf.js";import"ol/format/GeoJSON";const I=class{constructor(i){t(this,i),this.data=[],this.isGeoJsonFormat=!0,this.enableZoom=!0,this.mapZoom=17,this.mapCenter=[0,0],this.mapHeight="80vh",this.mapProjection="",this.filterPanel="",this.enableTileSelection=!0,this.tileLayersOptions=[],this.defaultTileOptionName="",this.layerOptions=[],this.initialSelectedLayers=[],this.bulkSelectedFeaturesActionPanel="",this.filterLayersByRole=!1,this.layerKeySeparator="",this.filteredLayerOptionsByRole=[],this.readOnlyMap=!1,this.enableViewFeature=!0,this.bulkSelectionActive=!1,this.splitActive=!1,this.enableDragBox=!1,this.enableAddNewFeature=!0,this.readOnlyLayers=[],this.popoverPrimaryActions=[],this.popoverMoreIconButtonActions=[],this.hideMessageIconPopover=!1,this.popoverCardConfig={},this.minZoom=0,this.maxZoom=28,this.definedProjection=!1,this.popoverContainer=null,this.showPopOver=!1,this.isReadOnlyFeature=!1,this.mapFeatures=[],this.initializeMap=(t,i)=>{var s;this.definedProjection=this.registerProjection(this.crs),this.filterLayerOptions();let p=[];if(this.tileLayersOptions&&(null===(s=this.tileLayersOptions)||void 0===s?void 0:s.length)>0)for(let t of this.tileLayersOptions){const i=new o({source:null==t?void 0:t.source,properties:{value:null==t?void 0:t.name,isBaseTile:!0},visible:!this.defaultTileOptionName||(null==t?void 0:t.name)===this.defaultTileOptionName});p[p.length]=i}else{const t=new o({source:new n,properties:{value:"Open Street Map",isBaseTile:!0},visible:!0});p[p.length]=t}p.push(new l({source:new a({}),properties:{id:A}}));const c=new h({center:this.mapCenter,zoom:this.mapZoom,projection:this.mapProjection,minZoom:this.minZoom,maxZoom:this.maxZoom});this.mapInstance=new e({target:i,layers:p,view:c,interactions:f().extend([new m]),controls:[new r,new d],overlays:[new w({element:t,autoPan:{animation:{duration:250}},id:Z})]}),this.mapInstance.on("moveend",D((()=>{this.getMapExtentAndZoom()}),500)),this.setVectorLayers(),this.addSelectInteraction(),this.handleSetMapComponent&&this.handleSetMapComponent(this.mapInstance)},this.setVectorLayers=()=>{let t=S(this.data,this.isGeoJsonFormat,this.geoJsonMappingConfig,this.filterPanel,this.filterPanelCallback);this.mapFeatures=g(t,this.crs,this.definedProjection,this.mapProjection,this.mapDataProjection,this.getFilteredMapData);let i=this.getVisibleLayersOnLoad(this.layerOptions);this.addVectorLayersToMap(this.mapFeatures,i),this.updateIntialSelectedLayersVisibility()},this.clearVectorLayers=()=>{var t,i,s;(null!==(s=null===(i=null===(t=this.mapInstance)||void 0===t?void 0:t.getLayers())||void 0===i?void 0:i.getArray())&&void 0!==s?s:[]).forEach((t=>{t instanceof l&&t.get("id")!==A&&this.mapInstance.removeLayer(t)}))},this.registerProjection=t=>(null==t?void 0:t.length)>0&&(p.defs(t),c(p),!0),this.filterLayerOptions=()=>{let t=this.filterLayersByRole?O(this.user,this.layerRoles,this.layerOptions):this.layerOptions;this.handleSetFilteredLayerOptionsByRole(t)},this.addVectorLayersToMap=(t,i)=>{var s;if(t&&this.mapInstance)if(this.getVectorLayerSources)null===(s=this.getVectorLayerSources(i,t))||void 0===s||s.forEach((t=>{var i;const s=new a({features:null!==(i=null==t?void 0:t.features)&&void 0!==i?i:[]}),e=new l({source:s,properties:{value:null==t?void 0:t.layer},style:this.getFeatureStyles});this.mapInstance.addLayer(e)}));else for(let s of i){const i=null==t?void 0:t.filter((t=>{const i=t.getProperties();if(this.getFeatureStyles){let i=this.getFeatureStyles(t);b(i)&&t.setStyle(i)}const e=M(this.layerKeys,this.layerKeySeparator,i);return s===e})),e=new a({features:i}),h=new l({source:e,properties:{value:s}});this.mapInstance.addLayer(h)}},this.getVisibleLayersOnLoad=t=>{const i=this.filterLayersByRole?O(this.user,this.layerRoles,t):t;return F(i)},this.updateLayerVisibility=(t,i=!1)=>{var s,e;let h=i?o:l;null===(e=null===(s=this.mapInstance)||void 0===s?void 0:s.getLayers())||void 0===e||e.forEach((i=>{i instanceof h&&(t.includes(i.get("value"))||i.get("id")===A?i.setVisible(!0):i.setVisible(!1))}))},this.insertFeatureStyles=()=>{this.getFeatureStyles&&this.mapInstance.getLayers().forEach((t=>{t instanceof l&&t.getSource().getFeatures().forEach((t=>{let i=this.getFeatureStyles(t);b(i)&&t.setStyle(i)}))}))},this.addSelectInteraction=()=>{((t,i,s,e,h,o,n,l,a,r,d)=>{const p=new u({condition:t=>T(t),multi:!1,hitTolerance:30});p.set("id",k),p.on("select",(async l=>{if(!a&&!t)if(l.selected.length>0){const t=V(l.selected);if(d){let i=await d(l.selected);i&&"object"==typeof i&&Object.keys(i).forEach((s=>{t.values_[`${s}`]=i[s]}))}if(i(t),h&&h(t),s(t),o(t),n){let i=n(t);b(i)&&t.setStyle(i)}}else s(null),e()})),r(p),l(p)})(this.splitActive,this.handleSetCurrentSelectedFeature,this.handleSetSelectedFeatureProperties,this.handleOnCloseFeaturePopover,this.handleSetSelectedFeatureOnSelect,this.showPopper,this.getSelectedFeatureStyles,this.handleAddInteraction,this.enableDragBox,this.handleUpdateSelectInteraction,this.handleGetAdditionalFeaturePropertiesOnSelect)},this.handleUpdateSelectInteraction=t=>{this.selectInteraction=t},this.handleSetCurrentSelectedFeature=t=>{this.currentSelectedFeature=t},this.handleSetShowPopOver=t=>{this.showPopOver=t},this.showPopper=t=>{if(!this.enableDragBox&&!this.enableAddNewFeature&&!this.splitActive&&t){const i=this.mapInstance.getOverlayById(Z);i&&(t.getGeometry()instanceof L?i.setPosition(t.getGeometry().getCoordinates()):t.getGeometry()instanceof C?i.setPosition(t.getGeometry().getCoordinates()[0]):t.getGeometry()instanceof j&&i.setPosition(t.getGeometry().getCoordinates()[0][0])),this.showPopOver=!0}},this.handleOnCloseFeaturePopover=t=>{this.additionalOnclosePopover&&this.additionalOnclosePopover(t),this.setSelectedFeatureIdExternal&&this.setSelectedFeatureIdExternal(null),this.showPopOver=!1},this.handleAddInteraction=t=>{this.mapInstance.addInteraction(t)},this.handleShowMarkerFromExternal=t=>{var i,s;if(t&&this.mapFeatures&&this.selectInteraction){const e=null===(i=this.mapFeatures)||void 0===i?void 0:i.find((i=>(null==i?void 0:i.getId())===t)),h=null==e?void 0:e.getProperties();if(e){this.handleSetSelectedFeatureProperties(e);const t=M(this.layerKeys,this.layerKeySeparator,h),i=F(this.filteredLayerOptionsByRole);if(!(null===(s=this.selectedLayers)||void 0===s?void 0:s.includes(t))&&(null==i?void 0:i.includes(t))&&this.handleSetSelectedLayers){const i=[...this.selectedLayers,t];this.handleSetSelectedLayers(i),this.updateLayerVisibility(i)}const o=this.selectInteraction.getFeatures(),n=o.getArray().slice();o.clear(),o.push(e),this.selectInteraction.dispatchEvent({type:"select",selected:[e],deselected:n,mapBrowserEvent:null})}}}}componentDidLoad(){requestAnimationFrame((()=>{this.popoverContainer=this.el.shadowRoot.querySelector("#featureDetailsPopOverContainer");const t=this.el.shadowRoot.querySelector("#map");this.popoverContainer&&t&&this.initializeMap(this.popoverContainer,t)}))}reinitializeMap(){this.clearVectorLayers(),this.setVectorLayers()}resetPopover(){this.showPopOver=!1}updateProjection(){this.crs&&(this.definedProjection=this.registerProjection(this.crs))}updateFilteredLayerOptions(){this.filterLayerOptions()}handleSelectFeatureOnMap(){var t;this.selectedFeatureIdExternal&&(null===(t=this.selectInteraction)||void 0===t?void 0:t.getActive())?this.handleShowMarkerFromExternal(this.selectedFeatureIdExternal):this.selectedFeatureIdExternal&&this.setSelectedFeatureIdExternal&&this.setSelectedFeatureIdExternal(null)}updateReadOnlyLayers(){var t;if(this.selectedFeatureProperties){const i=M(this.layerKeys,this.layerKeySeparator,this.selectedFeatureProperties);this.isReadOnlyFeature=null===(t=this.readOnlyLayers)||void 0===t?void 0:t.includes(i)}}handleUpdateInitialSelectedLayersVisibility(){this.updateIntialSelectedLayersVisibility()}updateMapView(){if(this.mapInstance){const t=this.mapInstance.getView().getCenter(),i=this.mapInstance.getView().getZoom();this.mapInstance.setView(new h({center:t,zoom:i,projection:this.mapProjection}))}}updateMapCenter(){var t;this.mapInstance&&this.mapCenter&&(null===(t=this.mapInstance.getView())||void 0===t||t.setCenter(this.mapCenter))}updateFeatureStyles(){this.mapInstance&&this.insertFeatureStyles()}updateMinZoom(){var t,i;this.mapInstance&&this.minZoom&&(null===(i=null===(t=this.mapInstance)||void 0===t?void 0:t.getView())||void 0===i||i.setMinZoom(this.minZoom))}updateMaxZoom(){var t,i;this.mapInstance&&this.maxZoom&&(null===(i=null===(t=this.mapInstance)||void 0===t?void 0:t.getView())||void 0===i||i.setMaxZoom(this.maxZoom))}getMapExtentAndZoom(){if(this.handleGetZoomExtent){const t=this.mapInstance.getView().calculateExtent(this.mapInstance.getSize()),i=this.mapInstance.getView().getZoom();this.handleGetZoomExtent(i,t)}}updateIntialSelectedLayersVisibility(){let t=P(this.filteredLayerOptionsByRole,this.initialSelectedLayers);this.updateLayerVisibility(t),this.handleSetSelectedLayers&&this.handleSetSelectedLayers(t)}render(){return i("div",{key:"8851fab5625f6285b174b3a5075d00d38c2d0276"},i("div",{key:"c04901b2cecb47d1344f67de5005aaf05bb4d8a8",id:"map",style:{height:this.mapHeight,width:"100%",overflow:"hidden"}},i("slot",{key:"e6bb0624bdb76a718b07bb70b68ba17950d6db35"})),i("div",{key:"175e1cad5ef31d7b0af02318f1b7ec0f57d9dd40",id:"featureDetailsPopOverContainer"},i("feature-details-popup",{key:"11094c85b5d9f49921f306657818aecfd3a8749b",currentSelectedFeature:this.currentSelectedFeature,data:this.selectedFeatureProperties,coordinates:this.selectedFeatureCoordinates,enableViewFeature:this.enableViewFeature,handleViewFeature:this.handleViewFeature,showPopOver:this.showPopOver,isReadOnly:this.isReadOnlyFeature,additionalOnclosePopover:this.handleOnCloseFeaturePopover,primaryActions:this.popoverPrimaryActions,moreIconActions:this.popoverMoreIconButtonActions,getMessage:this.getMessagePopover,getMessageIcon:this.getMessageIconPopover,hideMessageIcon:this.hideMessageIconPopover,cardConfig:this.popoverCardConfig,popoverWidth:this.popoverWidth,popoverContainer:this.popoverContainer})))}get el(){return s(this)}static get watchers(){return{data:[{reinitializeMap:0},{resetPopover:0}],layerOptions:[{reinitializeMap:0},{updateFilteredLayerOptions:0}],mapDataProjection:[{reinitializeMap:0}],mapProjection:[{reinitializeMap:0},{updateMapView:0}],crs:[{updateProjection:0}],layerRoles:[{updateFilteredLayerOptions:0}],user:[{updateFilteredLayerOptions:0}],selectedFeatureIdExternal:[{handleSelectFeatureOnMap:0}],readOnlyLayers:[{updateReadOnlyLayers:0}],selectedFeatureProperties:[{updateReadOnlyLayers:0}],initialSelectedLayers:[{handleUpdateInitialSelectedLayersVisibility:0}],mapCenter:[{updateMapCenter:0}],getMapStyles:[{updateFeatureStyles:0}],minZoom:[{updateMinZoom:0}],maxZoom:[{updateMaxZoom:0}]}}};I.style=":host{display:block}.zoomControl{left:'auto';right:'20';top:'20'}.iconButtonWrapper{padding:var(--spacing-04)}#featureDetailsPopOverContainer{position:absolute;z-index:1000}.hidden-controls .ol-zoom,.hidden-controls .ol-attribution{display:none}.ol-control{width:fit-content !important}";const N=class{constructor(i){t(this,i),this.mapTitle="",this.mapProjection="",this.filterPanel="",this.enableTileSelection=!0,this.tileLayersOptions=[],this.defaultTileOptionName="",this.layerOptions=[],this.bulkSelectedFeaturesActionPanel="",this.refreshButtonTooltip="",this.readOnlyMap=!1,this.enableAdd=!0,this.addMultipleFeatures=!0,this.enableSplitFeature=!0,this.filteredLayerOptionsByRole=[],this.enableDragBox=!1,this.splitActive=!1,this.enableAddNewFeature=!1,this.readOnlyLayers=[],this.selectedTile={label:"Open Street Map",value:"Open Street Map"},this.selectedBulkSelectionType="box",this.selectedFeatureByBoxSelection=[],this.tileSelectOptions=[{label:"Open Street Map",value:"Open Street Map"}],this.newFeatureObjectsAdded=[],this.showSplitButton=!1,this.setEnableDragBox=t=>{this.handleSetEnableDragBox(t)},this.setBulkSelectonActive=t=>{this.handleSetBulkSelectionActive(t)},this.getTileLayerOptions=()=>{this.tileSelectOptions=this.tileLayersOptions.map((t=>({label:null==t?void 0:t.name,value:null==t?void 0:t.name}))),this.selectedTile=this.tileSelectOptions.filter((t=>t.value===this.defaultTileOptionName))[0]},this.handleSelectTile=t=>{var i;if(t&&(this.selectedTile=t,this.enableTileSelection&&(null===(i=this.tileLayersOptions)||void 0===i?void 0:i.length)>0)){const i=this.tileLayersOptions.find((i=>(null==i?void 0:i.name)===t));if(!i)return;this.map.getLayers().getArray().filter((t=>t.get("isBaseTile"))).forEach((t=>{this.map.removeLayer(t)}));const s=new o({source:i.source,visible:!0,zIndex:0,properties:{value:i.name,isBaseTile:!0}});this.map.getLayers().insertAt(0,s)}},this.handleSelectLayers=t=>{this.handleSetSelectedLayers&&this.handleSetSelectedLayers(t),this.updateLayerVisibility(t),this.handleSelectLayersCallback&&this.handleSelectLayersCallback(t)},this.updateLayerVisibility=(t,i=!1)=>{var s,e;let h=i?o:l;null===(e=null===(s=this.map)||void 0===s?void 0:s.getLayers())||void 0===e||e.forEach((i=>{i instanceof h&&(t.includes(i.get("value"))||i.get("id")===A?i.setVisible(!0):i.setVisible(!1))}))},this.bulkSelectDraw=(t,i)=>{((t,i,s,e,h,o,n,a,r,d,p,c,u,f,m,y)=>{if((0,this.setBulkSelectonActive)(!0),h(!0),o(null),u([]),f(i),n(),t){a&&d(a);const e={type:"Circle"};"box"===i?e.geometryFunction=z():"polygon"===i?e.type="Polygon":"lasso"===i&&(e.type="Polygon",e.freehand=!0);const o=new v(e);r(o),p(o),o.setActive(!0);let n=[];o.on("drawend",(i=>{d(a);let e=i.feature.getGeometry().getExtent();if(e=B(e,t.getView().getProjection(),s),t.getLayers().forEach((t=>{if(t instanceof l){const i=t.getSource().getFeaturesInExtent(e).filter((t=>t.getGeometry().intersectsExtent(e)&&!c.includes(t)));m&&i.forEach((t=>{let i=m(t);b(i)&&t.setStyle(i)})),n.push(...i)}})),n.length>0){let t=(null==c?void 0:c.length)>0?[...c,...n]:n;u(t),y&&y(c)}h(!1),o.setActive(!1)})),r(o)}})(this.map,t,i,0,this.setEnableDragBox,this.handleSetSelectedFeatureProperties,this.clearSelectFeatureInteraction,this.currentBulkSelectDrawInteraction,this.handleSetCurrentBulkSelectDrawInteraction,this.handleRemoveInteraction,this.handleAddInteraction,this.selectedFeatureByBoxSelection,this.handleSetSelectedFeatureByBoxSelection,this.handleSetSelectedBulkSelectionType,this.getSelectedFeatureStyles,this.handleSetSelectedFeaturesOnBulkSelect)},this.clearSelectFeatureInteraction=()=>{this.selectFeatureInteraction&&(this.selectFeatureInteraction.getFeatures().clear(),this.selectFeatureInteraction.setActive(!1))},this.handleSetCurrentBulkSelectDrawInteraction=t=>{this.currentBulkSelectDrawInteraction=t},this.handleSetSelectedFeatureByBoxSelection=t=>{this.selectedFeatureByBoxSelection=t},this.handleSetSelectedBulkSelectionType=t=>{this.selectedBulkSelectionType=t},this.handleCancelBulkSelectDraw=()=>{this.setBulkSelectonActive(!1),this.setEnableDragBox(!1),this.currentBulkSelectDrawInteraction.setActive(!1),this.map.removeInteraction(this.currentBulkSelectDrawInteraction)},this.handleBulkUnselectFeatures=()=>{this.selectedFeatureByBoxSelection.length>0&&this.getFeatureStyles&&this.selectedFeatureByBoxSelection.forEach((t=>{let i=this.getFeatureStyles(t);b(i)&&t.setStyle(i)})),this.setEnableDragBox(!1),this.setBulkSelectonActive(!1),this.selectedFeatureByBoxSelection=[],this.handleSetSelectedFeaturesOnBulkSelect&&this.handleSetSelectedFeaturesOnBulkSelect([])},this.startDrawingMapFeature=(t,i="Point")=>{((t,i,s="Point",e,h,o,n,r,d,p,c,u)=>{var f,m,y,w;d&&d(null),r(!0),h&&e(h);let b=new a;i?null===(f=null==t?void 0:t.getLayers())||void 0===f||f.forEach((t=>{t instanceof l&&i.value===t.getProperties().value&&(b=t.getSource())})):b=null===(w=null===(y=null===(m=null==t?void 0:t.getLayers())||void 0===m?void 0:m.getArray())||void 0===y?void 0:y.find((t=>t instanceof l&&t.get("id")===A)))||void 0===w?void 0:w.getSource();const S=new v({source:b,type:s});o(S),S.on("drawend",(function(t){const e=t.feature;let h=e.getGeometry();if(h instanceof L||h instanceof C||h instanceof j){let t={feature:e,type:s,coordinates:h.getCoordinates(),geometry:h,layer:i,source:b};n&&n(t),c||u()}})),p(S)})(this.map,t,i,this.handleRemoveInteraction,this.currentAddFeatureDrawInteraction,this.handleSetCurrentInteraction,this.handleGetFeatureObject,this.handleEnableAddNewFeature,this.handleSetSelectedFeatureProperties,this.handleAddInteraction,this.addMultipleFeatures,this.addNewFeature)},this.handleGetFeatureObject=t=>{this.newFeatureObjectsAdded=[...this.newFeatureObjectsAdded,t]},this.handleAddInteraction=t=>{this.map.addInteraction(t)},this.handleRemoveInteraction=t=>{this.map.removeInteraction(t),this.currentAddFeatureDrawInteraction=null},this.handleSetCurrentInteraction=t=>{this.currentAddFeatureDrawInteraction=t},this.cancelAddNewFeature=()=>{this.handleEnableAddNewFeature(!1),this.map.removeInteraction(this.currentAddFeatureDrawInteraction)},this.addNewFeature=()=>{this.handleEnableAddNewFeature(!1),this.map.removeInteraction(this.currentAddFeatureDrawInteraction),this.handleAddNewFeatures&&this.handleAddNewFeatures(this.newFeatureObjectsAdded)},this.handleStartSplitting=t=>{this.handleSetSplit(!0),this.splitActive=!0,((t,i,s,e,h,o,n,r)=>{s&&(0,this.handleRemoveInteraction)(s),e(null),h(!0);let d=new a;t.getLayers().forEach((t=>{t instanceof l&&i.value===t.getProperties().value&&(d=t.getSource())}));const p=new v({source:d,type:"LineString"});e(p),p.on("drawend",(function(t){const i=t.feature,s=i.getGeometry();if(s instanceof C){const e=s.getCoordinates(),h=x.lineString(e);let o,n=new y,l=new y;d.getFeatures().forEach((t=>{const i=t.getGeometry();if(i instanceof C){let t=i.getCoordinates();const s=x.lineString(t);if(o=x.lineIntersect(s,h),o.features.length>0){const t=o.features[0].geometry.coordinates,i=[t,s.geometry.coordinates[1]];n=new y({geometry:new C([s.geometry.coordinates[0],t]),name:"Split LineString 1"}),l=new y({geometry:new C(i),name:"Split LineString 2"})}}})),d.removeFeature(i),d.removeFeature(t.feature),d.addFeature(n),d.addFeature(l),r&&r({originalFeature:i,newFeature1:n,newFeature2:l})}})),n(p),e(p)})(this.map,t,this.currentSplitInteraction,this.handleSetCurrentSplitInteraction,this.handleSetSplit,0,this.handleAddInteraction,this.handleRetrieveSplitFeature)},this.handleSetSplit=t=>{this.handleSetSplitActive(t),this.showSplitButton=t},this.handleRetrieveSplitFeature=t=>{this.splitFeatureDetails=t},this.handleSetCurrentSplitInteraction=t=>{this.currentSplitInteraction=t},this.handleCancelSplit=()=>{this.handleSetSplit(!1),this.splitActive=!1,this.handleRemoveInteraction(this.currentSplitInteraction),this.currentSplitInteraction=null},this.handleSaveSplit=()=>{this.handleSetSplit(!1),this.handleRemoveInteraction(this.currentSplitInteraction),this.currentSplitInteraction=null,this.handleSplitFeature(this.splitFeatureDetails)}}componentWillLoad(){var t;this.tileLayersOptions&&(null===(t=this.tileLayersOptions)||void 0===t?void 0:t.length)>0&&this.getTileLayerOptions()}updateTileSelectOptions(){var t;this.tileLayersOptions&&(null===(t=this.tileLayersOptions)||void 0===t?void 0:t.length)>0&&this.getTileLayerOptions()}render(){return i("map-toolbar",{key:"060b205b86f9f2d618907e1c60a414b103760300",map:this.map,mapTitle:this.mapTitle,layerOptions:this.layerOptions,handleSelectLayers:this.handleSelectLayers,visibleLayers:this.selectedLayers,tileOptions:this.tileSelectOptions,handleSelectTile:this.handleSelectTile,selectedTile:this.selectedTile,enableTileSelection:this.enableTileSelection,filterPanel:this.filterPanel,enableDragBox:this.enableDragBox,selectedFeatureByBoxSelection:this.selectedFeatureByBoxSelection,handleUnselectFeatures:this.handleBulkUnselectFeatures,selectedFeaturesActionPanel:this.bulkSelectedFeaturesActionPanel,handleCancelBoxSelection:this.handleCancelBulkSelectDraw,handleBulkSelectionTypeOnChange:this.bulkSelectDraw,mapProjection:this.mapProjection,refreshEvent:this.handleRefresh,refreshButtonTooltip:this.refreshButtonTooltip,enableAddNewFeature:this.enableAddNewFeature,handleStartDrawingMapFeature:this.startDrawingMapFeature,cancelAddNewFeature:this.cancelAddNewFeature,addNewFeature:this.addNewFeature,enableSplit:this.enableSplitFeature,handleStartSplitting:this.handleStartSplitting,handleCancelSplit:this.handleCancelSplit,handleSaveSplit:this.handleSaveSplit,readOnlyMap:this.readOnlyMap,enableAdd:this.enableAdd,addMultipleFeatures:this.addMultipleFeatures,showSplitButton:this.showSplitButton,readOnlyLayers:this.readOnlyLayers,addFeaturePanelConfig:this.addFeaturePanelConfig})}get el(){return s(this)}static get watchers(){return{tileLayersOptions:[{updateTileSelectOptions:0}]}}};N.style=":host{display:block}.zoomControl{left:'auto';right:'20';top:'20'}.iconButtonWrapper{padding:var(--spacing-04)}#featureDetailsPopOverContainer{position:absolute;z-index:1000}.hidden-controls .ol-zoom,.hidden-controls .ol-attribution{display:none}.ol-control{width:fit-content !important}";export{I as map_component,N as udp_map_toolbar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t,c as i,a as e}from"./index-Cgpvu-iV.js";import{i as r}from"./iconMapping-C3k5yilV.js";import"@carbon/icons/es/add/16";import"@carbon/icons/es/add/32";import"@carbon/icons/es/add--alt/16";import"@carbon/icons/es/add--filled/16";import"@carbon/icons/es/arrows--horizontal/16";import"@carbon/icons/es/attachment/16";import"@carbon/icons/es/batch-job/16";import"@carbon/icons/es/box/16";import"@carbon/icons/es/close/16";import"@carbon/icons/es/close/24";import"@carbon/icons/es/close/32";import"@carbon/icons/es/close--filled/16";import"@carbon/icons/es/close--outline/16";import"@carbon/icons/es/checkmark/16";import"@carbon/icons/es/checkmark/24";import"@carbon/icons/es/checkmark/32";import"@carbon/icons/es/chevron--left/16";import"@carbon/icons/es/chevron--right/16";import"@carbon/icons/es/chevron--down/16";import"@carbon/icons/es/data-enrichment/16";import"@carbon/icons/es/document/16";import"@carbon/icons/es/document--add/16";import"@carbon/icons/es/document--attachment/16";import"@carbon/icons/es/document--pdf/16";import"@carbon/icons/es/document--video/16";import"@carbon/icons/es/document--audio/16";import"@carbon/icons/es/draggable/16";import"@carbon/icons/es/edit/16";import"@carbon/icons/es/export/16";import"@carbon/icons/es/flag/16";import"@carbon/icons/es/information/16";import"@carbon/icons/es/information/32";import"@carbon/icons/es/link/16";import"@carbon/icons/es/location/16";import"@carbon/icons/es/overflow-menu--vertical/16";import"@carbon/icons/es/overflow-menu--vertical/32";import"@carbon/icons/es/return/16";import"@carbon/icons/es/save/16";import"@carbon/icons/es/settings/16";import"@carbon/icons/es/subtract/16";import"@carbon/icons/es/subtract--alt/16";import"@carbon/icons/es/subtract--filled/16";import"@carbon/icons/es/trash-can/16";import"@carbon/icons/es/user/16";import"@carbon/icons/es/view/16";import"@carbon/icons/es/warning/16";import"@carbon/icons/es/warning/32";import"@carbon/icons/es/warning--alt/16";import"@carbon/icons/es/warning--alt/32";import"@carbon/icons/es/product/16";import"@carbon/icons/es/workspace/16";import"@carbon/icons/es/arrow--up/16";import"@carbon/icons/es/arrow--down/16";import"@carbon/icons/es/arrow--right/16";import"@carbon/icons/es/arrow--left/16";import"@carbon/icons/es/copy/16";import"@carbon/icons/es/star/16";import"@carbon/icons/es/data-table/16";import"@carbon/icons/es/fit-to-width/16";import"@carbon/icons/es/search--advanced/16";import"@carbon/icons/es/reset/16";import"@carbon/icons/es/column/16";import"@carbon/icons/es/column--delete/16";import"@carbon/icons/es/watson-health/rotate--360/16";import"@carbon/icons/es/filter/16";import"@carbon/icons/es/app-connectivity/16";import"@carbon/icons/es/text--font/16";import"@carbon/icons/es/text--long-paragraph/16";import"@carbon/icons/es/character--whole-number/16";import"@carbon/icons/es/checkbox--checked/16";import"@carbon/icons/es/radio-button--checked/16";import"@carbon/icons/es/event--schedule/16";import"@carbon/icons/es/view--off/16";import"@carbon/icons/es/time/16";import"@carbon/icons/es/calendar/16";import"@carbon/icons/es/list--checked/16";import"@carbon/icons/es/list--bulleted/16";import"@carbon/icons/es/cloud--upload/16";import"@carbon/icons/es/locked/16";import"@carbon/icons/es/pause/16";import"@carbon/icons/es/unlocked/16";import"@carbon/icons/es/send/16";import"@carbon/icons/es/email/16";import"@carbon/icons/es/checkmark--outline/16";import"@carbon/icons/es/migrate--alt/16";import"@carbon/icons/es/checkbox--checked--filled/16";import"@carbon/icons/es/checkbox/16";import"@carbon/icons/es/ZIP/16";import"@carbon/icons/es/image/16";import"@carbon/icons/es/PPT/16";import"@carbon/icons/es/XLS/16";import"@carbon/icons/es/ibm--elo--method-composer/16";import"@carbon/icons/es/undo/16";import"@carbon/icons/es/catalog/16";import"@carbon/icons/es/table--split/16";const a=class{constructor(t){o(this,t),this.hiddenActionButtons=[],this.hiddenLabels=[],this.actionButtons=[],this.defaultActionButtons=[],this.tabs=!0,this.actionButtonLabel=""}getIconComponent(o,t){return t||("string"==typeof o?r[o]:o)}renderIcon(o){return o&&"svg"===o.elem?t("svg",Object.assign({},o.attrs),o.content.map(((o,i)=>t("path",Object.assign({key:i},o.attrs))))):null}render(){return console.log("active tab",this.activeTabIndex),t("div",{key:"2b5cd6ddd163ddef49cc7fa95dab7f4a9911939e",class:"header-bar"},t("div",{key:"0b74461e94c2263eb92a1faf4e2783eda26a29da",class:"title-section"},t("unity-typography",{key:"0a21709957bdb4de3dcd85b882946b960caa7447",variant:"h4"},this.title)),this.tabs&&t("div",{key:"1b224383283f2e875e4e4bec85f97d548078f256",class:"tabs"},t("udp-tabs",{key:"3f2af545b1af466bf376e248ddadda48fceebb4d"},t("button",{key:"7ba0d458d14def7c1fb1c32852e89097a85a07c2",class:0===this.activeTabIndex?"active":"",slot:"tab-title",onClick:()=>this.selectTab(0)},"Demo Grid"),t("button",{key:"7dec1019d203c03c6ab9485c0aa83008b7970cdc",class:1===this.activeTabIndex?"active":"",slot:"tab-title",onClick:()=>this.selectTab(1)},"Other Content"))),t("div",{key:"f2a2f4e44fbc245ef82f8f3fe125cde71c3cc37e",class:"button-section"},this.defaultActionButtons.map((o=>{const i=this.getIconComponent(o.icon,o.customIcon);return!this.hiddenActionButtons.includes(o.label)&&o.visible?t("stencil-icon-button",{secondary:o.secondary,onClick:t=>{o.clickHandler?o.clickHandler(t):console.log(`${o.label} Clicked but no custom handler defined`)},tooltip:o.tooltip},this.renderIcon(i),!this.hiddenLabels.includes(o.label)&&o.showLabel&&t("span",null,o.label)):null})),!this.actionButtonLabel&&t("div",{key:"6cd80a675dab2d514a8ddfa819162ed2219d41c1",class:"right-margin"}),this.actionButtonLabel&&t("udp-button",{key:"0c714349e245f2554667b03de3bdb0e66d44581d",variant:"contained",color:"secondary",onClick:o=>this.primaryActionClick(o)},this.actionButtonLabel)))}};a.style=":host{display:block;font-family:var(--font-family-base, sans-serif);background-color:var(--primary-action-header-background, #ffffff);color:var(--primary-action-header-text-color, rgba(0, 0, 0, 0.87));box-shadow:var(--primary-action-header-shadow, 0px 2px 4px -1px rgba(0,0,0,0.2));height:var(--primary-action-header-height, 48px);padding:var(--primary-action-header-padding, 0 var(--spacing-04));box-sizing:border-box}.header-bar{display:flex;justify-content:space-between;align-items:center;width:100%;height:100%}.title-section{flex-shrink:0;margin-right:var(--spacing-md, 16px)}.tabs{flex-grow:1;display:flex;justify-content:center;align-items:stretch;min-width:0}.tabs udp-tabs{width:100%;display:flex;justify-content:center}.tabs udp-tabs::part(tab-list){}.tabs udp-tabs button{padding:0 16px;margin:0 var(--spacing-xxs, 4px);height:100%;border:none;background-color:transparent;cursor:pointer;font-size:var(--font-size-sm, 0.875rem);color:var(--text-color-secondary, rgba(0, 0, 0, 0.6));text-transform:uppercase;font-weight:var(--font-weight-medium, 500);border-bottom:2px solid transparent;transition:color 0.3s ease, border-bottom-color 0.3s ease}.tabs udp-tabs button:hover{color:var(--primary-color-hover, var(--primary-color, #1976d2))}.tabs udp-tabs button.active{color:var(--primary-color, #1976d2);border-bottom:2px solid var(--primary-color, #1976d2)}.button-section{display:flex;align-items:center;flex-shrink:0;gap:var(--spacing-sm, 8px)}.button-section stencil-icon-button{color:var(--primary-action-header-icon-color, var(--text-color-primary, rgba(0, 0, 0, 0.54)))}.button-section stencil-icon-button:hover{background-color:rgba(0,0,0,0.04)}.button-section custom-button{}";const n=class{constructor(t){o(this,t),this.udpTabChange=i(this,"udpTabChange",7),this.variant="fill",this.tabs=[],this.internalActiveTab=0,this.tabDetails=[],this.sliderStyle={width:"0",transform:"translateX(0)"},this.showScrollLeft=!1,this.showScrollRight=!1,this.slottedTabs=[],this.buttonRefs=[]}get isControlled(){return null!=this.value}get useTabsProp(){return this.tabs&&this.tabs.length>0}get activeTab(){return this.isControlled?this.value:this.internalActiveTab}handleSlotChange(){this.useTabsProp||this.initializeTabs()}handleResize(){requestAnimationFrame((()=>{this.updateSliderPosition(),this.checkScroll()}))}componentDidLoad(){this.initializeTabs()}onActiveTabChange(o){this.updateActiveTabs(),this.updateSliderPosition(),this.scrollTabIntoView(o)}onValueChange(o){this.updateActiveTabs(),this.updateSliderPosition(),this.scrollTabIntoView(o)}onTabsPropChange(){this.initializeTabs()}onVariantChange(){requestAnimationFrame((()=>{this.updateSliderPosition(),this.checkScroll()}))}initializeTabs(){var o,t;if(this.buttonRefs=[],this.useTabsProp?(this.tabDetails=this.tabs.map((o=>Object.assign({},o))),this.slottedTabs=[]):(this.slottedTabs=Array.from(this.el.children).filter((o=>"udp-tab"===o.tagName.toLowerCase())),this.tabDetails=this.slottedTabs.map((o=>({label:o.label,icon:o.icon,iconPlacement:o.iconPlacement,hidden:o.hidden,disabled:o.disabled})))),!this.isControlled&&((null===(o=this.tabDetails[this.internalActiveTab])||void 0===o?void 0:o.hidden)||(null===(t=this.tabDetails[this.internalActiveTab])||void 0===t?void 0:t.disabled))){const o=this.tabDetails.findIndex((o=>!o.hidden&&!o.disabled));this.internalActiveTab=o>-1?o:0}this.updateActiveTabs(),requestAnimationFrame((()=>{this.updateSliderPosition(),this.checkScroll()}))}updateActiveTabs(){if(!this.useTabsProp){const o=this.activeTab;this.slottedTabs.forEach(((t,i)=>{t.active=i===o}))}}updateSliderPosition(){const o=this.buttonRefs[this.activeTab];this.sliderStyle=o?{width:`${o.offsetWidth}px`,transform:`translateX(${o.offsetLeft}px)`}:{width:"0px",transform:"translateX(0px)"}}checkScroll(){if(!this.scrollContainerRef)return;const{scrollLeft:o,scrollWidth:t,clientWidth:i}=this.scrollContainerRef,e=t>i;this.showScrollLeft=e&&o>1,this.showScrollRight=e&&o<t-i-1}tabClicked(o){var t;(null===(t=this.tabDetails[o])||void 0===t?void 0:t.disabled)||(this.isControlled?this.udpTabChange.emit(o):this.internalActiveTab=o)}scrollTabIntoView(o){const t=this.buttonRefs[o],i=this.scrollContainerRef;if(!t||!i)return;const{scrollLeft:e,clientWidth:r}=i,a=t.offsetLeft,n=a+t.offsetWidth,s=e+r-70;a<e+70?i.scrollTo({left:a-70,behavior:"smooth"}):n>s&&i.scrollTo({left:n-r+70,behavior:"smooth"})}scrollToStart(){this.scrollContainerRef&&this.scrollContainerRef.scrollTo({left:0,behavior:"smooth"})}scrollToEnd(){if(!this.scrollContainerRef)return;const o=this.scrollContainerRef,{scrollWidth:t,clientWidth:i}=o;o.scrollTo({left:t-i,behavior:"smooth"})}render(){const o=this.activeTab;return t("div",{key:"df21c243de60c14f45558ccae50480eaa4cd8bb7",class:"tab-container"},t("div",{key:"ea937d700c5c60026bb7782e718c717f5d64bed6",class:`tab-header ${this.variant}`},this.showScrollLeft&&t("button",{key:"3e6df1c7ad7f9e56506793d2f1677fdb3f16f3cf",class:"scroll-arrow left",onClick:()=>this.scrollToStart(),"aria-label":"Scroll to first tab"},t("udp-icon",{key:"b42700d6add6b079417b254ab18e75c51a09d00f",iconName:"chevronLeft16",color:"inherit"})),this.showScrollLeft&&t("div",{key:"cfdb8c9639dca0a6d5453097900758cd0d2fffe0",class:"scroll-fade left"}),t("div",{key:"ad6a860db4b74383cdf5e2eec2fbd2dbd73eda51",class:"tab-scroll-container",ref:o=>this.scrollContainerRef=o,onScroll:()=>this.checkScroll()},this.tabDetails.map(((i,e)=>{if(i.hidden)return null;const r=i.icon?t("udp-icon",{iconName:i.icon,color:"inherit"}):null,a=t("span",null,i.label);return t("button",{class:{active:e===o,"has-icon":!!i.icon,[`icon-${i.iconPlacement}`]:!!i.icon,disabled:i.disabled},disabled:i.disabled,onClick:()=>this.tabClicked(e),role:"tab","aria-selected":e===o?"true":"false","aria-disabled":i.disabled?"true":"false",ref:o=>this.buttonRefs[e]=o},r,a)})),t("div",{key:"da7a7d703e4d727c809a094f0be21861682295e8",class:"slider",style:this.sliderStyle})),this.showScrollRight&&t("div",{key:"72306b3afe78506147ffd8d34d62ce97ce6640eb",class:"scroll-fade right"}),this.showScrollRight&&t("button",{key:"931a3ed42216f077cef73866abdf59eb7bb54b01",class:"scroll-arrow right",onClick:()=>this.scrollToEnd(),"aria-label":"Scroll to last tab"},t("udp-icon",{key:"952b579182dfae443a06d6bc8cc14c73ec039e4d",iconName:"chevronRight16",color:"inherit"}))),!this.isControlled&&!this.useTabsProp&&t("div",{key:"d90c6893772a451666dd7962b77b18e1a5b36296"},t("slot",{key:"2f7b4c59a97796a40c898fdcffc93d185777369e"})))}get el(){return e(this)}static get watchers(){return{internalActiveTab:[{onActiveTabChange:0}],value:[{onValueChange:0}],tabs:[{onTabsPropChange:0}],variant:[{onVariantChange:0}]}}};n.style=".tab-container{display:flex;flex-direction:column}.tab-header{background-color:#ffffff;position:relative;display:flex;align-items:center}.tab-scroll-container{display:flex;position:relative;overflow-x:auto;overflow-y:hidden;flex:1;min-width:0}.tab-scroll-container::-webkit-scrollbar{height:4px}.tab-scroll-container::-webkit-scrollbar-track{background:transparent}.tab-scroll-container::-webkit-scrollbar-thumb{background-color:rgba(0, 0, 0, 0.2);border-radius:4px}.tab-scroll-container::-webkit-scrollbar-thumb:hover{background-color:rgba(0, 0, 0, 0.3)}.tab-header::after{content:'';position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--divider-color, #e0e0e0)}.tab-header button{padding:16px;font-size:14px;text-align:center;border:none;background:none;cursor:pointer;outline:none;transition:all 0.22s ease;color:#555555;font-weight:600;opacity:0.9;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:8px}.tab-header.fill .tab-scroll-container{width:100%}.tab-header.fill .tab-scroll-container button{flex-grow:1}.tab-header button.active{color:var(--secondary-color, #344861);opacity:1.0}.tab-header button.scroll-arrow{position:absolute;top:0;bottom:0;display:flex;align-items:center;justify-content:center;width:40px;padding:0;background:#ffffff;cursor:pointer;font-size:16px;font-weight:bold;color:#757575;z-index:2;transition:color 0.2s ease;flex-shrink:0;opacity:1;gap:0}.tab-header button.scroll-arrow:hover{color:#000}.tab-header button.scroll-arrow.left{left:0}.tab-header button.scroll-arrow.right{right:0}.scroll-fade{position:absolute;top:0;bottom:0;width:30px;z-index:1;pointer-events:none}.scroll-fade.left{left:40px;background:linear-gradient( to right, #ffffff, rgba(255, 255, 255, 0) )}.scroll-fade.right{right:40px;background:linear-gradient( to left, #ffffff, rgba(255, 255, 255, 0) )}.tab-header button udp-icon{font-size:1.2em;line-height:1}.tab-header button.icon-start{flex-direction:row}.tab-header button.icon-end{flex-direction:row-reverse}.tab-header button.icon-top{flex-direction:column;gap:4px}.tab-header button.icon-bottom{flex-direction:column-reverse;gap:4px}.slider{position:absolute;bottom:0;left:0;height:2px;background-color:var(--secondary-color, #344861);transition:transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), width 0.22s cubic-bezier(0.4, 0, 0.2, 1);z-index:1}.tab-header button.disabled{opacity:0.5;cursor:not-allowed}.tab-header button.disabled.active{color:#757575;opacity:0.5}";export{a as primary_action_header,n as udp_tabs}
|
|
1
|
+
import{r as o,h as t,c as i,a as e}from"./index-Cgpvu-iV.js";import{i as r}from"./iconMapping-C3k5yilV.js";import"@carbon/icons/es/add/16";import"@carbon/icons/es/add/32";import"@carbon/icons/es/add--alt/16";import"@carbon/icons/es/add--filled/16";import"@carbon/icons/es/arrows--horizontal/16";import"@carbon/icons/es/attachment/16";import"@carbon/icons/es/batch-job/16";import"@carbon/icons/es/box/16";import"@carbon/icons/es/close/16";import"@carbon/icons/es/close/24";import"@carbon/icons/es/close/32";import"@carbon/icons/es/close--filled/16";import"@carbon/icons/es/close--outline/16";import"@carbon/icons/es/checkmark/16";import"@carbon/icons/es/checkmark/24";import"@carbon/icons/es/checkmark/32";import"@carbon/icons/es/chevron--left/16";import"@carbon/icons/es/chevron--right/16";import"@carbon/icons/es/chevron--down/16";import"@carbon/icons/es/data-enrichment/16";import"@carbon/icons/es/document/16";import"@carbon/icons/es/document--add/16";import"@carbon/icons/es/document--attachment/16";import"@carbon/icons/es/document--pdf/16";import"@carbon/icons/es/document--video/16";import"@carbon/icons/es/document--audio/16";import"@carbon/icons/es/draggable/16";import"@carbon/icons/es/edit/16";import"@carbon/icons/es/export/16";import"@carbon/icons/es/flag/16";import"@carbon/icons/es/information/16";import"@carbon/icons/es/information/32";import"@carbon/icons/es/link/16";import"@carbon/icons/es/location/16";import"@carbon/icons/es/overflow-menu--vertical/16";import"@carbon/icons/es/overflow-menu--vertical/32";import"@carbon/icons/es/return/16";import"@carbon/icons/es/save/16";import"@carbon/icons/es/settings/16";import"@carbon/icons/es/subtract/16";import"@carbon/icons/es/subtract--alt/16";import"@carbon/icons/es/subtract--filled/16";import"@carbon/icons/es/trash-can/16";import"@carbon/icons/es/user/16";import"@carbon/icons/es/view/16";import"@carbon/icons/es/warning/16";import"@carbon/icons/es/warning/32";import"@carbon/icons/es/warning--alt/16";import"@carbon/icons/es/warning--alt/32";import"@carbon/icons/es/product/16";import"@carbon/icons/es/workspace/16";import"@carbon/icons/es/arrow--up/16";import"@carbon/icons/es/arrow--down/16";import"@carbon/icons/es/arrow--right/16";import"@carbon/icons/es/arrow--left/16";import"@carbon/icons/es/copy/16";import"@carbon/icons/es/star/16";import"@carbon/icons/es/data-table/16";import"@carbon/icons/es/fit-to-width/16";import"@carbon/icons/es/search--advanced/16";import"@carbon/icons/es/reset/16";import"@carbon/icons/es/column/16";import"@carbon/icons/es/column--delete/16";import"@carbon/icons/es/watson-health/rotate--360/16";import"@carbon/icons/es/filter/16";import"@carbon/icons/es/app-connectivity/16";import"@carbon/icons/es/text--font/16";import"@carbon/icons/es/text--long-paragraph/16";import"@carbon/icons/es/character--whole-number/16";import"@carbon/icons/es/checkbox--checked/16";import"@carbon/icons/es/radio-button--checked/16";import"@carbon/icons/es/event--schedule/16";import"@carbon/icons/es/view--off/16";import"@carbon/icons/es/time/16";import"@carbon/icons/es/calendar/16";import"@carbon/icons/es/list--checked/16";import"@carbon/icons/es/list--bulleted/16";import"@carbon/icons/es/cloud--upload/16";import"@carbon/icons/es/locked/16";import"@carbon/icons/es/pause/16";import"@carbon/icons/es/unlocked/16";import"@carbon/icons/es/send/16";import"@carbon/icons/es/email/16";import"@carbon/icons/es/checkmark--outline/16";import"@carbon/icons/es/migrate--alt/16";import"@carbon/icons/es/checkbox--checked--filled/16";import"@carbon/icons/es/checkbox/16";import"@carbon/icons/es/ZIP/16";import"@carbon/icons/es/image/16";import"@carbon/icons/es/PPT/16";import"@carbon/icons/es/XLS/16";import"@carbon/icons/es/ibm--elo--method-composer/16";import"@carbon/icons/es/undo/16";import"@carbon/icons/es/catalog/16";import"@carbon/icons/es/table--split/16";const a=class{constructor(t){o(this,t),this.hiddenActionButtons=[],this.hiddenLabels=[],this.actionButtons=[],this.defaultActionButtons=[],this.tabs=!0,this.actionButtonLabel=""}getIconComponent(o,t){return t||("string"==typeof o?r[o]:o)}renderIcon(o){return o&&"svg"===o.elem?t("svg",Object.assign({},o.attrs),o.content.map(((o,i)=>t("path",Object.assign({key:i},o.attrs))))):null}render(){return console.log("active tab",this.activeTabIndex),t("div",{key:"05d8066fbaf0ee676b208450d3f349ca34dfd0db",class:"header-bar"},t("div",{key:"6c51873109274bd2b18c39887ef3b8e1acdcabb2",class:"title-section"},t("unity-typography",{key:"568f098a0188713135a4f4dcff8fa7a5f84ee609",variant:"h4"},this.title)),this.tabs&&t("div",{key:"656269ec12df3265460024a722d8837c86c383f8",class:"tabs"},t("udp-tabs",{key:"1d778ec3ec9a3f9728bf54cbcf7dbf1ec2ab7d87"},t("button",{key:"c4be42317f73d2a1b51fd25850e503fb99a03036",class:0===this.activeTabIndex?"active":"",slot:"tab-title",onClick:()=>this.selectTab(0)},"Demo Grid"),t("button",{key:"72e86c2d0a67b3317efdb89c3b665ea86f3c7567",class:1===this.activeTabIndex?"active":"",slot:"tab-title",onClick:()=>this.selectTab(1)},"Other Content"))),t("div",{key:"6fa2b14fa417ad95360467e1750e29d0be79b198",class:"button-section"},this.defaultActionButtons.map((o=>{const i=this.getIconComponent(o.icon,o.customIcon);return!this.hiddenActionButtons.includes(o.label)&&o.visible?t("stencil-icon-button",{secondary:o.secondary,onClick:t=>{o.clickHandler?o.clickHandler(t):console.log(`${o.label} Clicked but no custom handler defined`)},tooltip:o.tooltip},this.renderIcon(i),!this.hiddenLabels.includes(o.label)&&o.showLabel&&t("span",null,o.label)):null})),!this.actionButtonLabel&&t("div",{key:"5cc2c6c671cb3a41be30ddb785c5e8db168d6270",class:"right-margin"}),this.actionButtonLabel&&t("udp-button",{key:"3db6428edb10929c445e72b348c965ba0b459e75",variant:"contained",color:"secondary",onClick:o=>this.primaryActionClick(o)},this.actionButtonLabel)))}};a.style=":host{display:block;font-family:var(--font-family-base, sans-serif);background-color:var(--primary-action-header-background, #ffffff);color:var(--primary-action-header-text-color, rgba(0, 0, 0, 0.87));box-shadow:var(--primary-action-header-shadow, 0px 2px 4px -1px rgba(0,0,0,0.2));height:var(--primary-action-header-height, 48px);padding:var(--primary-action-header-padding, 0 var(--spacing-04));box-sizing:border-box}.header-bar{display:flex;justify-content:space-between;align-items:center;width:100%;height:100%}.title-section{flex-shrink:0;margin-right:var(--spacing-md, 16px)}.tabs{flex-grow:1;display:flex;justify-content:center;align-items:stretch;min-width:0}.tabs udp-tabs{width:100%;display:flex;justify-content:center}.tabs udp-tabs::part(tab-list){}.tabs udp-tabs button{padding:0 16px;margin:0 var(--spacing-xxs, 4px);height:100%;border:none;background-color:transparent;cursor:pointer;font-size:var(--font-size-sm, 0.875rem);color:var(--text-color-secondary, rgba(0, 0, 0, 0.6));text-transform:uppercase;font-weight:var(--font-weight-medium, 500);border-bottom:2px solid transparent;transition:color 0.3s ease, border-bottom-color 0.3s ease}.tabs udp-tabs button:hover{color:var(--primary-color-hover, var(--primary-color, #1976d2))}.tabs udp-tabs button.active{color:var(--primary-color, #1976d2);border-bottom:2px solid var(--primary-color, #1976d2)}.button-section{display:flex;align-items:center;flex-shrink:0;gap:var(--spacing-sm, 8px)}.button-section stencil-icon-button{color:var(--primary-action-header-icon-color, var(--text-color-primary, rgba(0, 0, 0, 0.54)))}.button-section stencil-icon-button:hover{background-color:rgba(0,0,0,0.04)}.button-section custom-button{}";const n=class{constructor(t){o(this,t),this.udpTabChange=i(this,"udpTabChange",7),this.variant="fill",this.tabs=[],this.internalActiveTab=0,this.tabDetails=[],this.sliderStyle={width:"0",transform:"translateX(0)"},this.showScrollLeft=!1,this.showScrollRight=!1,this.slottedTabs=[],this.buttonRefs=[]}get isControlled(){return null!=this.value}get useTabsProp(){return this.tabs&&this.tabs.length>0}get activeTab(){return this.isControlled?this.value:this.internalActiveTab}handleSlotChange(){this.useTabsProp||this.initializeTabs()}handleResize(){requestAnimationFrame((()=>{this.updateSliderPosition(),this.checkScroll()}))}componentDidLoad(){this.initializeTabs()}onActiveTabChange(o){this.updateActiveTabs(),this.updateSliderPosition(),this.scrollTabIntoView(o)}onValueChange(o){this.updateActiveTabs(),this.updateSliderPosition(),this.scrollTabIntoView(o)}onTabsPropChange(){this.initializeTabs()}onVariantChange(){requestAnimationFrame((()=>{this.updateSliderPosition(),this.checkScroll()}))}initializeTabs(){var o,t;if(this.buttonRefs=[],this.useTabsProp?(this.tabDetails=this.tabs.map((o=>Object.assign({},o))),this.slottedTabs=[]):(this.slottedTabs=Array.from(this.el.children).filter((o=>"udp-tab"===o.tagName.toLowerCase())),this.tabDetails=this.slottedTabs.map((o=>({label:o.label,icon:o.icon,iconPlacement:o.iconPlacement,hidden:o.hidden,disabled:o.disabled})))),!this.isControlled&&((null===(o=this.tabDetails[this.internalActiveTab])||void 0===o?void 0:o.hidden)||(null===(t=this.tabDetails[this.internalActiveTab])||void 0===t?void 0:t.disabled))){const o=this.tabDetails.findIndex((o=>!o.hidden&&!o.disabled));this.internalActiveTab=o>-1?o:0}this.updateActiveTabs(),requestAnimationFrame((()=>{this.updateSliderPosition(),this.checkScroll()}))}updateActiveTabs(){if(!this.useTabsProp){const o=this.activeTab;this.slottedTabs.forEach(((t,i)=>{t.active=i===o}))}}updateSliderPosition(){const o=this.buttonRefs[this.activeTab];this.sliderStyle=o?{width:`${o.offsetWidth}px`,transform:`translateX(${o.offsetLeft}px)`}:{width:"0px",transform:"translateX(0px)"}}checkScroll(){if(!this.scrollContainerRef)return;const{scrollLeft:o,scrollWidth:t,clientWidth:i}=this.scrollContainerRef,e=t>i;this.showScrollLeft=e&&o>1,this.showScrollRight=e&&o<t-i-1}tabClicked(o){var t;(null===(t=this.tabDetails[o])||void 0===t?void 0:t.disabled)||(this.isControlled?this.udpTabChange.emit(o):this.internalActiveTab=o)}scrollTabIntoView(o){const t=this.buttonRefs[o],i=this.scrollContainerRef;if(!t||!i)return;const{scrollLeft:e,clientWidth:r}=i,a=t.offsetLeft,n=a+t.offsetWidth,s=e+r-70;a<e+70?i.scrollTo({left:a-70,behavior:"smooth"}):n>s&&i.scrollTo({left:n-r+70,behavior:"smooth"})}scrollToStart(){this.scrollContainerRef&&this.scrollContainerRef.scrollTo({left:0,behavior:"smooth"})}scrollToEnd(){if(!this.scrollContainerRef)return;const o=this.scrollContainerRef,{scrollWidth:t,clientWidth:i}=o;o.scrollTo({left:t-i,behavior:"smooth"})}render(){const o=this.activeTab;return t("div",{key:"29b0423ac240ba56f7f9942ba9f1341e19084b59",class:"tab-container"},t("div",{key:"593122dad4d70a2b89963419f653aa022d256602",class:`tab-header ${this.variant}`},this.showScrollLeft&&t("button",{key:"814e5f8e29491e2e0c18ab48766c7366d949d507",class:"scroll-arrow left",onClick:()=>this.scrollToStart(),"aria-label":"Scroll to first tab"},t("udp-icon",{key:"83c59c7d10f5b986ec7451b7341c289fccb99ff6",iconName:"chevronLeft16",color:"inherit"})),this.showScrollLeft&&t("div",{key:"a3f1636b808842a4f8d2cf5af85bb9c617558868",class:"scroll-fade left"}),t("div",{key:"6c7ec90c21402fdb4ad0e5878a813e1255de34f8",class:"tab-scroll-container",ref:o=>this.scrollContainerRef=o,onScroll:()=>this.checkScroll()},this.tabDetails.map(((i,e)=>{if(i.hidden)return null;const r=i.icon?t("udp-icon",{iconName:i.icon,color:"inherit"}):null,a=t("span",null,i.label);return t("button",{class:{active:e===o,"has-icon":!!i.icon,[`icon-${i.iconPlacement}`]:!!i.icon,disabled:i.disabled},disabled:i.disabled,onClick:()=>this.tabClicked(e),role:"tab","aria-selected":e===o?"true":"false","aria-disabled":i.disabled?"true":"false",ref:o=>this.buttonRefs[e]=o},r,a)})),t("div",{key:"3269205055ead814dbff78d2a18eb7e1fad6fabf",class:"slider",style:this.sliderStyle})),this.showScrollRight&&t("div",{key:"6c560b17fa23f771324a17dd459e53aec82f71fa",class:"scroll-fade right"}),this.showScrollRight&&t("button",{key:"9aa89b9a9358452928d2dbca5dc4d084e21f3d8e",class:"scroll-arrow right",onClick:()=>this.scrollToEnd(),"aria-label":"Scroll to last tab"},t("udp-icon",{key:"4980fb079c41a56a873afc88cc7fd9f4f411f64c",iconName:"chevronRight16",color:"inherit"}))),!this.isControlled&&!this.useTabsProp&&t("div",{key:"1e72007ccc47ac1c06765cabe9eb8e47d82087fa"},t("slot",{key:"9dafd14a5bff09c982f56f51f623d616f8ae300b"})))}get el(){return e(this)}static get watchers(){return{internalActiveTab:[{onActiveTabChange:0}],value:[{onValueChange:0}],tabs:[{onTabsPropChange:0}],variant:[{onVariantChange:0}]}}};n.style=".tab-container{display:flex;flex-direction:column}.tab-header{background-color:#ffffff;position:relative;display:flex;align-items:center}.tab-scroll-container{display:flex;position:relative;overflow-x:auto;overflow-y:hidden;flex:1;min-width:0}.tab-scroll-container::-webkit-scrollbar{height:4px}.tab-scroll-container::-webkit-scrollbar-track{background:transparent}.tab-scroll-container::-webkit-scrollbar-thumb{background-color:rgba(0, 0, 0, 0.2);border-radius:4px}.tab-scroll-container::-webkit-scrollbar-thumb:hover{background-color:rgba(0, 0, 0, 0.3)}.tab-header::after{content:'';position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--divider-color, #e0e0e0)}.tab-header button{padding:16px;font-size:14px;text-align:center;border:none;background:none;cursor:pointer;outline:none;transition:all 0.22s ease;color:#555555;font-weight:600;opacity:0.9;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:8px}.tab-header.fill .tab-scroll-container{width:100%}.tab-header.fill .tab-scroll-container button{flex-grow:1}.tab-header button.active{color:var(--secondary-color, #344861);opacity:1.0}.tab-header button.scroll-arrow{position:absolute;top:0;bottom:0;display:flex;align-items:center;justify-content:center;width:40px;padding:0;background:#ffffff;cursor:pointer;font-size:16px;font-weight:bold;color:#757575;z-index:2;transition:color 0.2s ease;flex-shrink:0;opacity:1;gap:0}.tab-header button.scroll-arrow:hover{color:#000}.tab-header button.scroll-arrow.left{left:0}.tab-header button.scroll-arrow.right{right:0}.scroll-fade{position:absolute;top:0;bottom:0;width:30px;z-index:1;pointer-events:none}.scroll-fade.left{left:40px;background:linear-gradient( to right, #ffffff, rgba(255, 255, 255, 0) )}.scroll-fade.right{right:40px;background:linear-gradient( to left, #ffffff, rgba(255, 255, 255, 0) )}.tab-header button udp-icon{font-size:1.2em;line-height:1}.tab-header button.icon-start{flex-direction:row}.tab-header button.icon-end{flex-direction:row-reverse}.tab-header button.icon-top{flex-direction:column;gap:4px}.tab-header button.icon-bottom{flex-direction:column-reverse;gap:4px}.slider{position:absolute;bottom:0;left:0;height:2px;background-color:var(--secondary-color, #344861);transition:transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), width 0.22s cubic-bezier(0.4, 0, 0.2, 1);z-index:1}.tab-header button.disabled{opacity:0.5;cursor:not-allowed}.tab-header button.disabled.active{color:#757575;opacity:0.5}";export{a as primary_action_header,n as udp_tabs}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i,c as o,H as t,a as s}from"./index-Cgpvu-iV.js";import{q as c,d as a}from"./udp-forms-builder-question-template-6SrycAP3.js";import{a as n}from"./enums-Bn8TXZfi.js";import{g as r}from"./iconUtils-BzY-c9Op.js";import"./iconMapping-C3k5yilV.js";import"@carbon/icons/es/add/16";import"@carbon/icons/es/add/32";import"@carbon/icons/es/add--alt/16";import"@carbon/icons/es/add--filled/16";import"@carbon/icons/es/arrows--horizontal/16";import"@carbon/icons/es/attachment/16";import"@carbon/icons/es/batch-job/16";import"@carbon/icons/es/box/16";import"@carbon/icons/es/close/16";import"@carbon/icons/es/close/24";import"@carbon/icons/es/close/32";import"@carbon/icons/es/close--filled/16";import"@carbon/icons/es/close--outline/16";import"@carbon/icons/es/checkmark/16";import"@carbon/icons/es/checkmark/24";import"@carbon/icons/es/checkmark/32";import"@carbon/icons/es/chevron--left/16";import"@carbon/icons/es/chevron--right/16";import"@carbon/icons/es/chevron--down/16";import"@carbon/icons/es/data-enrichment/16";import"@carbon/icons/es/document/16";import"@carbon/icons/es/document--add/16";import"@carbon/icons/es/document--attachment/16";import"@carbon/icons/es/document--pdf/16";import"@carbon/icons/es/document--video/16";import"@carbon/icons/es/document--audio/16";import"@carbon/icons/es/draggable/16";import"@carbon/icons/es/edit/16";import"@carbon/icons/es/export/16";import"@carbon/icons/es/flag/16";import"@carbon/icons/es/information/16";import"@carbon/icons/es/information/32";import"@carbon/icons/es/link/16";import"@carbon/icons/es/location/16";import"@carbon/icons/es/overflow-menu--vertical/16";import"@carbon/icons/es/overflow-menu--vertical/32";import"@carbon/icons/es/return/16";import"@carbon/icons/es/save/16";import"@carbon/icons/es/settings/16";import"@carbon/icons/es/subtract/16";import"@carbon/icons/es/subtract--alt/16";import"@carbon/icons/es/subtract--filled/16";import"@carbon/icons/es/trash-can/16";import"@carbon/icons/es/user/16";import"@carbon/icons/es/view/16";import"@carbon/icons/es/warning/16";import"@carbon/icons/es/warning/32";import"@carbon/icons/es/warning--alt/16";import"@carbon/icons/es/warning--alt/32";import"@carbon/icons/es/product/16";import"@carbon/icons/es/workspace/16";import"@carbon/icons/es/arrow--up/16";import"@carbon/icons/es/arrow--down/16";import"@carbon/icons/es/arrow--right/16";import"@carbon/icons/es/arrow--left/16";import"@carbon/icons/es/copy/16";import"@carbon/icons/es/star/16";import"@carbon/icons/es/data-table/16";import"@carbon/icons/es/fit-to-width/16";import"@carbon/icons/es/search--advanced/16";import"@carbon/icons/es/reset/16";import"@carbon/icons/es/column/16";import"@carbon/icons/es/column--delete/16";import"@carbon/icons/es/watson-health/rotate--360/16";import"@carbon/icons/es/filter/16";import"@carbon/icons/es/app-connectivity/16";import"@carbon/icons/es/text--font/16";import"@carbon/icons/es/text--long-paragraph/16";import"@carbon/icons/es/character--whole-number/16";import"@carbon/icons/es/checkbox--checked/16";import"@carbon/icons/es/radio-button--checked/16";import"@carbon/icons/es/event--schedule/16";import"@carbon/icons/es/view--off/16";import"@carbon/icons/es/time/16";import"@carbon/icons/es/calendar/16";import"@carbon/icons/es/list--checked/16";import"@carbon/icons/es/list--bulleted/16";import"@carbon/icons/es/cloud--upload/16";import"@carbon/icons/es/locked/16";import"@carbon/icons/es/pause/16";import"@carbon/icons/es/unlocked/16";import"@carbon/icons/es/send/16";import"@carbon/icons/es/email/16";import"@carbon/icons/es/checkmark--outline/16";import"@carbon/icons/es/migrate--alt/16";import"@carbon/icons/es/checkbox--checked--filled/16";import"@carbon/icons/es/checkbox/16";import"@carbon/icons/es/ZIP/16";import"@carbon/icons/es/image/16";import"@carbon/icons/es/PPT/16";import"@carbon/icons/es/XLS/16";import"@carbon/icons/es/ibm--elo--method-composer/16";import"@carbon/icons/es/undo/16";import"@carbon/icons/es/catalog/16";import"@carbon/icons/es/table--split/16";const d=class{constructor(i){e(this,i),this.isFollowUpFormConfigOn=!1,this.isCommentingConfigOn=!1,this.getHandler=(e,i)=>{var o;const t=c.find((i=>i.fieldTypeId===e));return null===(o=null==t?void 0:t.handlers)||void 0===o?void 0:o[i]}}get question(){var e,i;return null===(i=null===(e=this.formSectionsDraft)||void 0===e?void 0:e[this.sIndex].formQuestions)||void 0===i?void 0:i[this.qIndex]}render(){var e;const o=c.find((e=>e.fieldTypeId===this.question.fieldTypeId)),t=!(o&&o.questionTextOptional);return i("div",{key:"d2772dd681a8b4aacaeed761ba9c965a1b1a4d22",class:"generic-configs-container"},i("div",{key:"90b6b09574a19b8f0ead25386a76ac3951a67ad7",class:"question-configs-header"},i("unity-typography",{key:"7804dad70aec41bb93be9ce92373c006fb0c9625",variant:"h6"},this.question.questionTypeName," Question"),i("div",{key:"1c6aabc296ace7193bb68a39937164bb4b42939d"},!this.question.fieldProperties.ignoreRequiredConfig&&i("stencil-toggle",{key:"a26355eba84f9ca62f3d9cfab181709ae88a229d",label:"Required",disabled:this.isViewOnly,checked:!0===this.question.required,onToggledChange:()=>{const e=!this.question.required,i=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(e,this.formSectionsDraft,this.sIndex,this.qIndex,"required");this.onFormSectionsDraftChange(i)},labelPosition:"right"}))),i("text-area",{key:"1750414482561a59ebde43b977c6e2baf589f9cd",label:"Question Text",value:this.question.questionText,disabled:this.isViewOnly,placeholder:"Enter the question text here",rows:2,maxRows:5,required:t,fullWidth:!0,margin:"dense",onInput:e=>{const i=e.target.value,o=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(i,this.formSectionsDraft,this.sIndex,this.qIndex,"questionText");this.onFormSectionsDraftChange(o)}}),i("text-area",{key:"9f1eaeeb3794f9cf6388952a0a6af7eb326f0c0e",label:"Helper Text",value:this.question.helperText,disabled:this.isViewOnly,placeholder:"Enter the question's helper text here",rows:2,maxRows:4,fullWidth:!0,margin:"dense",onInput:e=>{const i=e.target.value,o=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(i,this.formSectionsDraft,this.sIndex,this.qIndex,"helperText");this.onFormSectionsDraftChange(o)}}),i("text-field",{key:"a00923cb586dd53ea7fefe24d64f2fe1d50def84",label:"Reference Code",value:null!==(e=this.question.referenceCode)&&void 0!==e?e:"",disabled:this.isViewOnly,placeholder:"Enter an optional reference code (32 character limit)",required:!1,margin:"dense",maxCharacter:32,onInput:e=>{const i=e.target.value.trim(),o=i.length>0?i:null,t=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(o,this.formSectionsDraft,this.sIndex,this.qIndex,"referenceCode");this.onFormSectionsDraftChange(t)}}),i("question-specific-configs-renderer",{key:"60cf9158b12fab3029854c8bfcf359ac6718a179",formSectionsDraft:this.formSectionsDraft,sIndex:this.sIndex,qIndex:this.qIndex,isViewOnly:this.isViewOnly,onFormSectionsDraftChange:this.onFormSectionsDraftChange,lookupOptions:this.lookupOptions}),i("div",{key:"4dd24f55f514851d9354ded050884d03025c0736"},i("stencil-toggle",{key:"e969af30a8d2bd19a41b542978f0df5a3745b45f",label:"Read Only",disabled:this.isViewOnly,checked:!0===this.question.fieldProperties.readOnly,onToggledChange:()=>{if(this.isViewOnly)return;const e=this.getHandler(this.question.fieldTypeId,"handleFieldPropertyBooleanToggle")(this.formSectionsDraft,this.sIndex,this.qIndex,"readOnly");this.onFormSectionsDraftChange(e)},labelPosition:"right"})),this.isCommentingConfigOn&&i("div",{key:"ffdea6b6e7786b63be709372ce1e4fb48114b032"},i("stencil-toggle",{key:"b834aeb9e10ad18f209ddbe1f22e32dbe3149dc0",label:"Allow Comments",disabled:this.isViewOnly,checked:!0===this.question.fieldProperties.allowComments,onToggledChange:()=>{if(this.isViewOnly)return;const e=this.getHandler(this.question.fieldTypeId,"handleFieldPropertyBooleanToggle")(this.formSectionsDraft,this.sIndex,this.qIndex,"allowComments");this.onFormSectionsDraftChange(e)},labelPosition:"right"})),this.formType==n.Standard&&this.isFollowUpFormConfigOn&&i("div",{key:"bdc8390ce90567c42cce400310c3b00cd9ce3981"},i("stencil-toggle",{key:"3d2574c20080e12825bc72017f0fb2e8346459f9",label:"Allow Follow Up Forms",disabled:this.isViewOnly,checked:!0===this.question.fieldProperties.allowFollowUpForms,onToggledChange:()=>{if(this.isViewOnly)return;const e=this.getHandler(this.question.fieldTypeId,"handleFieldPropertyBooleanToggle")(this.formSectionsDraft,this.sIndex,this.qIndex,"allowFollowUpForms");this.onFormSectionsDraftChange(e)},labelPosition:"right"})))}};d.style=".generic-configs-container{display:flex;flex-direction:column;}.question-configs-header{display:flex;justify-content:space-between;align-items:center}";const l=class{constructor(i){e(this,i)}get section(){var e;return null===(e=this.formSectionsDraft)||void 0===e?void 0:e[this.sIndex]}handleSectionFieldChange(e,i,o){const t=a(this.formSectionsDraft),s=Object.assign(Object.assign({},t[e]),{[i]:o});return t[e]=s,t}handleSectionRepeatablePropertyChange(e,i){const o=a(this.formSectionsDraft),t=Object.assign({},o[e]),s=Object.assign(Object.assign({},t.sectionProperties),{isRepeatable:i}),c=Object.assign(Object.assign({},t),{sectionProperties:s});return o[e]=c,o}render(){var e,o;return i("div",{key:"e92b6ec51b4a0fcfadb4f4debe5134b598790a6e",class:"generic-configs-container"},i("text-area",{key:"12c7c8183ca5448c9c0e86ac2452459d56d17c84",label:"Title",value:this.section.title||"",disabled:this.isViewOnly,placeholder:"Enter the section title here",rows:2,maxRows:5,fullWidth:!0,onInput:e=>{const i=this.handleSectionFieldChange(this.sIndex,"title",e.target.value);this.onFormSectionsDraftChange(i)}}),i("text-field",{key:"166ea825159c78dbd0684f13716eff09e9193756",label:"Reference Code",value:null!==(e=this.section.referenceCode)&&void 0!==e?e:"",disabled:this.isViewOnly,placeholder:"Enter an optional reference code (32 character limit)",maxCharacter:32,onInput:e=>{const i=e.target.value.trim(),o=this.handleSectionFieldChange(this.sIndex,"referenceCode",i.length>0?i:null);this.onFormSectionsDraftChange(o)}}),i("text-area",{key:"f844eb102f024bd5917bcae59f3ad2a6ab3c0460",label:"Section Text",value:this.section.sectionText||"",disabled:this.isViewOnly,placeholder:"Enter the section text here",rows:2,maxRows:4,fullWidth:!0,onInput:e=>{const i=this.handleSectionFieldChange(this.sIndex,"sectionText",e.target.value);this.onFormSectionsDraftChange(i)}}),i("stencil-toggle",{key:"fcd1aca8c693e982b698d92ffa7536fccee20609",label:"Repeatable",disabled:this.isViewOnly,checked:!0===(null===(o=this.section.sectionProperties)||void 0===o?void 0:o.isRepeatable)||!1,onToggledChange:()=>{const e=this.handleSectionRepeatablePropertyChange(this.sIndex,!this.section.sectionProperties.isRepeatable);this.onFormSectionsDraftChange(e)},labelPosition:"right"}))}};l.style=".generic-configs-container{display:flex;flex-direction:column}";const b=class{constructor(i){e(this,i),this.addSection=o(this,"addSection",7),this.addQuestion=o(this,"addQuestion",7),this.cancelClick=o(this,"cancelClick",7),this.questionsTemplate=[]}render(){return[i("div",{key:"b9a6e10ed11c15018fb6862954674e24527e83db",class:"menu-header-container"},i("unity-typography",{key:"938119e467ad133f4d5a7f780ba28ad339f3181c",variant:"body1"},"Choose a Question Type"),i("stencil-icon-button",{key:"08a6f1af7d1cab0f2bbef8c5517e7f4e3917837b",icon:r("close16"),onClick:()=>this.cancelClick.emit()})),i("div",{key:"39b6cef83986a02d05a7e74f1163d26f71574e77",class:"menu-options-container"},this.questionsTemplate.map((e=>i("udp-button",{variant:"contained",color:"primary",onClick:()=>this.addQuestion.emit(e),startIcon:i("udp-icon",{iconName:e.icon,color:"inherit"})},e.questionTypeName))))]}};b.style=":host{display:flex;flex-direction:column;gap:var(--spacing-05, 24px);border:1px dashed var(--primary-color);padding:var(--spacing-05, 24px);box-sizing:border-box;background-color:var(--card-background-color, #fff);}.menu-options-container{display:flex;flex:row;flex-wrap:wrap;gap:var(--spacing-03, 8px)}.menu-header-container{display:flex;align-items:center;justify-content:space-between}";const h=class{constructor(i){e(this,i),this.hasPrimaryTextSlot=!1,this.hasSecondaryTextSlot=!1,this.hasActionsSlot=!1,this.hasStatusChipSlot=!1,this.avatarBackgroundColor="info",this.avatarVariant="rounded",this.clickable=!1,this.handleKeyPress=e=>{!this.clickable||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.onClick(e))}}componentWillLoad(){this.hasPrimaryTextSlot=!!this.hostEl.querySelector('[slot="primary-text"]'),this.hasSecondaryTextSlot=!!this.hostEl.querySelector('[slot="secondary-text"]'),this.hasActionsSlot=!!this.hostEl.querySelector('[slot="actions"]'),this.hasStatusChipSlot=!!this.hostEl.querySelector('[slot="status-chip"]')}render(){const e=this.primaryText||this.hasPrimaryTextSlot,o=this.secondaryText||this.hasSecondaryTextSlot;return i(t,{key:"0cd58e77eac6870bb70696573beaeca167cda636"},i("div",{key:"8b4e6d228822e330086ab06b128712272e976fea",class:{"list-item":!0,clickable:this.clickable},onClick:this.onClick,onKeyPress:this.handleKeyPress,role:this.clickable?"button":void 0,tabindex:this.clickable?0:-1},i("div",{key:"a10fcb962378192864bce6c55ee5ab0f7fa60d55",class:"upload-container"},i("slot",{key:"587dbe02a9cce0209b97f2ca9960be31ff31146a",name:"drag-and-drop"})),this.iconName&&i("div",{key:"637d1c70413914880ec524a289606fd44c3fdf65",class:"avatar-container"},i("udp-avatar",{key:"44b4f780c08236ae1524ccfbc9e51a7936bd3f38",iconName:this.iconName,variant:this.avatarVariant,color:this.avatarBackgroundColor})),i("div",{key:"05310d88d15f00ff5d952b7ba9a75620aaa322fd",class:"text-container"},e&&i("div",{key:"3e13a99f04af917edf094f369d7f0d4f200b5238",class:"primary-text",title:this.primaryText},i("slot",{key:"ce03787a8b975e1b5095a178224ba22585380da5",name:"primary-text"},i("unity-typography",{key:"2a66b8e64c5f715938d8c0201dbe5595ec8ce5d7",variant:"body"},this.primaryText))),o&&i("div",{key:"9030617decb4bfc353c01984aaa03348dfda65b9",class:"secondary-text",title:this.secondaryText},i("slot",{key:"44ce967d88bd8a2a4403c252efe11dfea433a81d",name:"secondary-text"},i("unity-typography",{key:"e41941512d3699d98c2a97e9fa6ea3fe8f2758a0",variant:"body",color:"textSecondary"},this.secondaryText)))),this.hasStatusChipSlot&&i("div",{key:"55cfd338797016cea846d6b319ab17a5129b5668",class:"status-chip-container"},i("slot",{key:"5a65c926f22fdd6d5c1fca4f17afdd5a56e8a34c",name:"status-chip"})),this.hasActionsSlot&&i("div",{key:"488b3023fbe934b9635ceff6dcc4b53303d24f34",class:"actions-container"},i("slot",{key:"d20c64dcee68cdfe3a25c14f56b58de2857664c6",name:"actions"}))))}get hostEl(){return s(this)}};h.style=".list-item{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-4, 16px);padding:var(--spacing-3, 12px) var(--spacing-4, 16px);border-bottom:1px solid var(--border-color, #e0e0e0);background-color:var(--card-background-color, #FFF);transition:background-color 0.1s}.list-item.clickable{cursor:grab}.list-item.clickable:hover{background-color:var(--primary-color-alpha-15, #f5f5f5)}.avatar-container{align-items:center}.text-container{flex-grow:1;min-width:0;display:flex;flex-direction:column;gap:4px}.primary-text,.secondary-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.primary-text{font-weight:500}.status-chip-container{display:flex;align-items:center;flex-shrink:0}.actions-container{display:flex;flex-shrink:0}";export{d as question_configs_renderer,l as section_configs_renderer,b as udp_forms_builder_menu,h as udp_forms_builder_question_item}
|
|
1
|
+
import{r as e,h as i,c as o,H as t,a as s}from"./index-Cgpvu-iV.js";import{q as c,d as n}from"./udp-forms-builder-question-template-6SrycAP3.js";import{a}from"./enums-Bn8TXZfi.js";import{g as r}from"./iconUtils-BzY-c9Op.js";import"./iconMapping-C3k5yilV.js";import"@carbon/icons/es/add/16";import"@carbon/icons/es/add/32";import"@carbon/icons/es/add--alt/16";import"@carbon/icons/es/add--filled/16";import"@carbon/icons/es/arrows--horizontal/16";import"@carbon/icons/es/attachment/16";import"@carbon/icons/es/batch-job/16";import"@carbon/icons/es/box/16";import"@carbon/icons/es/close/16";import"@carbon/icons/es/close/24";import"@carbon/icons/es/close/32";import"@carbon/icons/es/close--filled/16";import"@carbon/icons/es/close--outline/16";import"@carbon/icons/es/checkmark/16";import"@carbon/icons/es/checkmark/24";import"@carbon/icons/es/checkmark/32";import"@carbon/icons/es/chevron--left/16";import"@carbon/icons/es/chevron--right/16";import"@carbon/icons/es/chevron--down/16";import"@carbon/icons/es/data-enrichment/16";import"@carbon/icons/es/document/16";import"@carbon/icons/es/document--add/16";import"@carbon/icons/es/document--attachment/16";import"@carbon/icons/es/document--pdf/16";import"@carbon/icons/es/document--video/16";import"@carbon/icons/es/document--audio/16";import"@carbon/icons/es/draggable/16";import"@carbon/icons/es/edit/16";import"@carbon/icons/es/export/16";import"@carbon/icons/es/flag/16";import"@carbon/icons/es/information/16";import"@carbon/icons/es/information/32";import"@carbon/icons/es/link/16";import"@carbon/icons/es/location/16";import"@carbon/icons/es/overflow-menu--vertical/16";import"@carbon/icons/es/overflow-menu--vertical/32";import"@carbon/icons/es/return/16";import"@carbon/icons/es/save/16";import"@carbon/icons/es/settings/16";import"@carbon/icons/es/subtract/16";import"@carbon/icons/es/subtract--alt/16";import"@carbon/icons/es/subtract--filled/16";import"@carbon/icons/es/trash-can/16";import"@carbon/icons/es/user/16";import"@carbon/icons/es/view/16";import"@carbon/icons/es/warning/16";import"@carbon/icons/es/warning/32";import"@carbon/icons/es/warning--alt/16";import"@carbon/icons/es/warning--alt/32";import"@carbon/icons/es/product/16";import"@carbon/icons/es/workspace/16";import"@carbon/icons/es/arrow--up/16";import"@carbon/icons/es/arrow--down/16";import"@carbon/icons/es/arrow--right/16";import"@carbon/icons/es/arrow--left/16";import"@carbon/icons/es/copy/16";import"@carbon/icons/es/star/16";import"@carbon/icons/es/data-table/16";import"@carbon/icons/es/fit-to-width/16";import"@carbon/icons/es/search--advanced/16";import"@carbon/icons/es/reset/16";import"@carbon/icons/es/column/16";import"@carbon/icons/es/column--delete/16";import"@carbon/icons/es/watson-health/rotate--360/16";import"@carbon/icons/es/filter/16";import"@carbon/icons/es/app-connectivity/16";import"@carbon/icons/es/text--font/16";import"@carbon/icons/es/text--long-paragraph/16";import"@carbon/icons/es/character--whole-number/16";import"@carbon/icons/es/checkbox--checked/16";import"@carbon/icons/es/radio-button--checked/16";import"@carbon/icons/es/event--schedule/16";import"@carbon/icons/es/view--off/16";import"@carbon/icons/es/time/16";import"@carbon/icons/es/calendar/16";import"@carbon/icons/es/list--checked/16";import"@carbon/icons/es/list--bulleted/16";import"@carbon/icons/es/cloud--upload/16";import"@carbon/icons/es/locked/16";import"@carbon/icons/es/pause/16";import"@carbon/icons/es/unlocked/16";import"@carbon/icons/es/send/16";import"@carbon/icons/es/email/16";import"@carbon/icons/es/checkmark--outline/16";import"@carbon/icons/es/migrate--alt/16";import"@carbon/icons/es/checkbox--checked--filled/16";import"@carbon/icons/es/checkbox/16";import"@carbon/icons/es/ZIP/16";import"@carbon/icons/es/image/16";import"@carbon/icons/es/PPT/16";import"@carbon/icons/es/XLS/16";import"@carbon/icons/es/ibm--elo--method-composer/16";import"@carbon/icons/es/undo/16";import"@carbon/icons/es/catalog/16";import"@carbon/icons/es/table--split/16";const d=class{constructor(i){e(this,i),this.isFollowUpFormConfigOn=!1,this.isCommentingConfigOn=!1,this.getHandler=(e,i)=>{var o;const t=c.find((i=>i.fieldTypeId===e));return null===(o=null==t?void 0:t.handlers)||void 0===o?void 0:o[i]}}get question(){var e,i;return null===(i=null===(e=this.formSectionsDraft)||void 0===e?void 0:e[this.sIndex].formQuestions)||void 0===i?void 0:i[this.qIndex]}render(){var e;const o=c.find((e=>e.fieldTypeId===this.question.fieldTypeId)),t=!(o&&o.questionTextOptional);return i("div",{key:"600777fb9d46819ca072bea547585c221e9c1ad7",class:"generic-configs-container"},i("div",{key:"05ef650bef28cf7f3fe164a89a3a0cbdb0e7fd40",class:"question-configs-header"},i("unity-typography",{key:"eb26e4f98548b80fd1d7f872bec4a90ce7eed55b",variant:"h6"},this.question.questionTypeName," Question"),i("div",{key:"6404191df6a717b3dfc64268eec44f3772897b13"},!this.question.fieldProperties.ignoreRequiredConfig&&i("stencil-toggle",{key:"454767a854087655c9f72060593dfeb6c7aebb88",label:"Required",disabled:this.isViewOnly,checked:!0===this.question.required,onToggledChange:()=>{const e=!this.question.required,i=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(e,this.formSectionsDraft,this.sIndex,this.qIndex,"required");this.onFormSectionsDraftChange(i)},labelPosition:"right"}))),i("text-area",{key:"4226a9ebd2a596b1be11ac6988d10a7934ee4bc5",label:"Question Text",value:this.question.questionText,disabled:this.isViewOnly,placeholder:"Enter the question text here",rows:2,maxRows:5,required:t,fullWidth:!0,margin:"dense",onInput:e=>{const i=e.target.value,o=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(i,this.formSectionsDraft,this.sIndex,this.qIndex,"questionText");this.onFormSectionsDraftChange(o)}}),i("text-area",{key:"ebc617119b5c7e65148bd86223a8c05fe30874b5",label:"Helper Text",value:this.question.helperText,disabled:this.isViewOnly,placeholder:"Enter the question's helper text here",rows:2,maxRows:4,fullWidth:!0,margin:"dense",onInput:e=>{const i=e.target.value,o=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(i,this.formSectionsDraft,this.sIndex,this.qIndex,"helperText");this.onFormSectionsDraftChange(o)}}),i("text-field",{key:"a81d180677ded40c03900eda13d0ee1ee1564794",label:"Reference Code",value:null!==(e=this.question.referenceCode)&&void 0!==e?e:"",disabled:this.isViewOnly,placeholder:"Enter an optional reference code (32 character limit)",required:!1,margin:"dense",maxCharacter:32,onInput:e=>{const i=e.target.value.trim(),o=i.length>0?i:null,t=this.getHandler(this.question.fieldTypeId,"handleGenericProperty")(o,this.formSectionsDraft,this.sIndex,this.qIndex,"referenceCode");this.onFormSectionsDraftChange(t)}}),i("question-specific-configs-renderer",{key:"bed907dfe360ea9ee55b4b60c76d6324229f5fc6",formSectionsDraft:this.formSectionsDraft,sIndex:this.sIndex,qIndex:this.qIndex,isViewOnly:this.isViewOnly,onFormSectionsDraftChange:this.onFormSectionsDraftChange,lookupOptions:this.lookupOptions}),i("div",{key:"baf9fe1f2296d614ed4a43917abc2fd45cca8209"},i("stencil-toggle",{key:"0b9bee6daa1445e58556a8a665677cd631181364",label:"Read Only",disabled:this.isViewOnly,checked:!0===this.question.fieldProperties.readOnly,onToggledChange:()=>{if(this.isViewOnly)return;const e=this.getHandler(this.question.fieldTypeId,"handleFieldPropertyBooleanToggle")(this.formSectionsDraft,this.sIndex,this.qIndex,"readOnly");this.onFormSectionsDraftChange(e)},labelPosition:"right"})),this.isCommentingConfigOn&&i("div",{key:"933950767a9656820c187d2d9ac003b5a86851d0"},i("stencil-toggle",{key:"848fd4bf8abc7aa91c5e889499a77d4ed849ba18",label:"Allow Comments",disabled:this.isViewOnly,checked:!0===this.question.fieldProperties.allowComments,onToggledChange:()=>{if(this.isViewOnly)return;const e=this.getHandler(this.question.fieldTypeId,"handleFieldPropertyBooleanToggle")(this.formSectionsDraft,this.sIndex,this.qIndex,"allowComments");this.onFormSectionsDraftChange(e)},labelPosition:"right"})),this.formType==a.Standard&&this.isFollowUpFormConfigOn&&i("div",{key:"0ee173a1e2d179e0ae9d55c98c680a0b771cb172"},i("stencil-toggle",{key:"4e1f50f4dc0c172e409b33e15235ba5cf2a2c29e",label:"Allow Follow Up Forms",disabled:this.isViewOnly,checked:!0===this.question.fieldProperties.allowFollowUpForms,onToggledChange:()=>{if(this.isViewOnly)return;const e=this.getHandler(this.question.fieldTypeId,"handleFieldPropertyBooleanToggle")(this.formSectionsDraft,this.sIndex,this.qIndex,"allowFollowUpForms");this.onFormSectionsDraftChange(e)},labelPosition:"right"})))}};d.style=".generic-configs-container{display:flex;flex-direction:column;}.question-configs-header{display:flex;justify-content:space-between;align-items:center}";const l=class{constructor(i){e(this,i)}get section(){var e;return null===(e=this.formSectionsDraft)||void 0===e?void 0:e[this.sIndex]}handleSectionFieldChange(e,i,o){const t=n(this.formSectionsDraft),s=Object.assign(Object.assign({},t[e]),{[i]:o});return t[e]=s,t}handleSectionRepeatablePropertyChange(e,i){const o=n(this.formSectionsDraft),t=Object.assign({},o[e]),s=Object.assign(Object.assign({},t.sectionProperties),{isRepeatable:i}),c=Object.assign(Object.assign({},t),{sectionProperties:s});return o[e]=c,o}render(){var e,o;return i("div",{key:"e669b10c9aac0daf63dc90c78b246772b9eaf4d7",class:"generic-configs-container"},i("text-area",{key:"9c85a3af7ce557b7b39db48134ee4322edcdce5d",label:"Title",value:this.section.title||"",disabled:this.isViewOnly,placeholder:"Enter the section title here",rows:2,maxRows:5,fullWidth:!0,onInput:e=>{const i=this.handleSectionFieldChange(this.sIndex,"title",e.target.value);this.onFormSectionsDraftChange(i)}}),i("text-field",{key:"87c24ec88c990424516f4ff7372a3ce9dd04a465",label:"Reference Code",value:null!==(e=this.section.referenceCode)&&void 0!==e?e:"",disabled:this.isViewOnly,placeholder:"Enter an optional reference code (32 character limit)",maxCharacter:32,onInput:e=>{const i=e.target.value.trim(),o=this.handleSectionFieldChange(this.sIndex,"referenceCode",i.length>0?i:null);this.onFormSectionsDraftChange(o)}}),i("text-area",{key:"0335dc12467e8b1d2e319811152496029a18948a",label:"Section Text",value:this.section.sectionText||"",disabled:this.isViewOnly,placeholder:"Enter the section text here",rows:2,maxRows:4,fullWidth:!0,onInput:e=>{const i=this.handleSectionFieldChange(this.sIndex,"sectionText",e.target.value);this.onFormSectionsDraftChange(i)}}),i("stencil-toggle",{key:"4d4cf9c887499755ab6b415454b2d00e03833ac2",label:"Repeatable",disabled:this.isViewOnly,checked:!0===(null===(o=this.section.sectionProperties)||void 0===o?void 0:o.isRepeatable)||!1,onToggledChange:()=>{const e=this.handleSectionRepeatablePropertyChange(this.sIndex,!this.section.sectionProperties.isRepeatable);this.onFormSectionsDraftChange(e)},labelPosition:"right"}))}};l.style=".generic-configs-container{display:flex;flex-direction:column}";const b=class{constructor(i){e(this,i),this.addSection=o(this,"addSection",7),this.addQuestion=o(this,"addQuestion",7),this.cancelClick=o(this,"cancelClick",7),this.questionsTemplate=[]}render(){return[i("div",{key:"5257b15592b040e364ace597f48184f971947175",class:"menu-header-container"},i("unity-typography",{key:"97ea505539e98a2e12c2a46f88bd10ae4fdaf904",variant:"body1"},"Choose a Question Type"),i("stencil-icon-button",{key:"2f385bb9f121f585d46a2fce6227ba7a9dbb2612",icon:r("close16"),onClick:()=>this.cancelClick.emit()})),i("div",{key:"f9500b2c9ea04f5068de54db6dc6580aacb3046c",class:"menu-options-container"},this.questionsTemplate.map((e=>i("udp-button",{variant:"contained",color:"primary",onClick:()=>this.addQuestion.emit(e),startIcon:i("udp-icon",{iconName:e.icon,color:"inherit"})},e.questionTypeName))))]}};b.style=":host{display:flex;flex-direction:column;gap:var(--spacing-05, 24px);border:1px dashed var(--primary-color);padding:var(--spacing-05, 24px);box-sizing:border-box;background-color:var(--card-background-color, #fff);}.menu-options-container{display:flex;flex:row;flex-wrap:wrap;gap:var(--spacing-03, 8px)}.menu-header-container{display:flex;align-items:center;justify-content:space-between}";const h=class{constructor(i){e(this,i),this.hasPrimaryTextSlot=!1,this.hasSecondaryTextSlot=!1,this.hasActionsSlot=!1,this.hasStatusChipSlot=!1,this.avatarBackgroundColor="info",this.avatarVariant="rounded",this.clickable=!1,this.handleKeyPress=e=>{!this.clickable||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.onClick(e))}}componentWillLoad(){this.hasPrimaryTextSlot=!!this.hostEl.querySelector('[slot="primary-text"]'),this.hasSecondaryTextSlot=!!this.hostEl.querySelector('[slot="secondary-text"]'),this.hasActionsSlot=!!this.hostEl.querySelector('[slot="actions"]'),this.hasStatusChipSlot=!!this.hostEl.querySelector('[slot="status-chip"]')}render(){const e=this.primaryText||this.hasPrimaryTextSlot,o=this.secondaryText||this.hasSecondaryTextSlot;return i(t,{key:"f5ee6b816c97ecf2e7703f7bc8000c6c932ef6c8"},i("div",{key:"0ae65e301bf1b23ea6465d3b8eb046b7ed025538",class:{"list-item":!0,clickable:this.clickable},onClick:this.onClick,onKeyPress:this.handleKeyPress,role:this.clickable?"button":void 0,tabindex:this.clickable?0:-1},i("div",{key:"6dc8146f85c5276ea378254e384fe5563eaea625",class:"upload-container"},i("slot",{key:"1087cbd99ec86d743648df714b9d4b9ffb4368db",name:"drag-and-drop"})),this.iconName&&i("div",{key:"dbcbe5a4f99ac7bf2118f4d28cb976bbf152d0df",class:"avatar-container"},i("udp-avatar",{key:"f3b693a3d08b3dabcc5476bd6a8fa65cca90e743",iconName:this.iconName,variant:this.avatarVariant,color:this.avatarBackgroundColor})),i("div",{key:"36934390d81898b355fec16dfd8f7441c7cd8ba4",class:"text-container"},e&&i("div",{key:"96db18efc967162c1f5a7b74d4ef8ae88632f762",class:"primary-text",title:this.primaryText},i("slot",{key:"fddf10f951886779e3243d206088a23873e504e4",name:"primary-text"},i("unity-typography",{key:"ca27a07e94882485c2bc4186bcc67d69fd6ebdb4",variant:"body"},this.primaryText))),o&&i("div",{key:"9a4925f392ca5e031ac06d3d4ef4c905ec745ef6",class:"secondary-text",title:this.secondaryText},i("slot",{key:"729d87514f09a4c7cc69e4640d94dbb61b831876",name:"secondary-text"},i("unity-typography",{key:"35fe4b439aa8016503d0084e550d7b1c6f1a5219",variant:"body",color:"textSecondary"},this.secondaryText)))),this.hasStatusChipSlot&&i("div",{key:"3bad9ca488ea4bafbb753496fc519a15efc8284e",class:"status-chip-container"},i("slot",{key:"0ab0c0eca33fd0a65eac6418330376b0adcda0af",name:"status-chip"})),this.hasActionsSlot&&i("div",{key:"6d6887efa717baf2bb4c6c36bc723b23faf87b8b",class:"actions-container"},i("slot",{key:"60c596dec942575d2cc3786dd410fea78af9207e",name:"actions"}))))}get hostEl(){return s(this)}};h.style=".list-item{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-4, 16px);padding:var(--spacing-3, 12px) var(--spacing-4, 16px);border-bottom:1px solid var(--border-color, #e0e0e0);background-color:var(--card-background-color, #FFF);transition:background-color 0.1s}.list-item.clickable{cursor:grab}.list-item.clickable:hover{background-color:var(--primary-color-alpha-15, #f5f5f5)}.avatar-container{align-items:center}.text-container{flex-grow:1;min-width:0;display:flex;flex-direction:column;gap:4px}.primary-text,.secondary-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.primary-text{font-weight:500}.status-chip-container{display:flex;align-items:center;flex-shrink:0}.actions-container{display:flex;flex-shrink:0}";export{d as question_configs_renderer,l as section_configs_renderer,b as udp_forms_builder_menu,h as udp_forms_builder_question_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,a as i}from"./index-Cgpvu-iV.js";class r{init(e){this.eGui=document.createElement("div"),this.eGui.classList.add("custom-header");const t=new Date(e.column.colDef.pivotKeys[0]),i=t.toLocaleString(void 0,{weekday:"short"}),r=t.toLocaleString(void 0,{month:"short",day:"numeric"}),o=document.createElement("div");o.classList.add("header-group");const s=document.createElement("div");s.classList.add("title"),s.textContent=i,o.appendChild(s);const l=document.createElement("div");l.classList.add("sub-title"),l.textContent=r,o.appendChild(l),this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}const o=class{constructor(t){e(this,t),this.rowData=[],this.gridBarTitle="",this.subTitle="",this.dateKey="",this.columnDefs=[],this.additionalGridOptions={},this.subtitleStatusMappingClasses={},this.showRowTotals=!0,this.dataLoading=!1,this.convertDatesFromUTC=!1,this.showLockedIcon=!1,this.rowGroupPanelShow="never",this.gridFunctions=[],this.filledRowData=[],this.formattedColumnDefs=[],this.externalFilterText="",this.handleGridApi=e=>{this.gridApi=e,this.gridApiCallback(e),this.gridApi.toggleLoadingOverlay(this.dataLoading)}}getDates(e,t){let i=[],r=new Date(e);for(;r<=t;)i.push(new Date(r)),r.setDate(r.getDate()+1);return i}fillInEmptyDates(e,t){let i=[...e];return t.forEach((e=>{i.push({[this.dateKey]:e.toISOString().split(".")[0],isDateRangePlaceholder:!0})})),i}updateRowData(){if(this.rowData&&this.startDate&&this.endDate){let e=this.getDates(new Date(this.startDate),new Date(this.endDate));const t=this.fillInEmptyDates(this.rowData,e);this.filledRowData=t}}dateCompare(e,t){const i=new Date(e);i.setHours(0,0,0,0);const r=new Date(t);return r.setHours(0,0,0,0),i.getTime()-r.getTime()}createColumnDefs(){let e=[...this.columnDefs];e.push({field:this.dateKey,pivot:!0,pivotComparator:this.dateCompare,suppressFiltersToolPanel:!0,valueGetter:e=>{let t="";return t=this.convertDatesFromUTC?new Date(e.data[this.dateKey]+"Z").toLocaleDateString("en-US"):new Date(e.data[this.dateKey]).toLocaleDateString("en-US"),t}}),this.formattedColumnDefs=e}toggleDataLoading(){var e;this.dataLoading?null===(e=this.gridApi)||void 0===e||e.toggleLoadingOverlay(!0):requestAnimationFrame((()=>{var e;this.dataLoading||null===(e=this.gridApi)||void 0===e||e.toggleLoadingOverlay(!1)}))}getGridFunctions(){return this.gridFunctions.map((e=>"quickFilter"!==e.name?e:Object.assign(Object.assign({},e),{params:Object.assign(Object.assign({},e.params),{callback:t=>{var i,r,o;this.externalFilterText=t,null===(i=this.gridApi)||void 0===i||i.onFilterChanged(),null===(o=null===(r=e.params)||void 0===r?void 0:r.callback)||void 0===o||o.call(r,t)}})})))}componentDidLoad(){this.createColumnDefs(),this.updateRowData()}render(){const e=(new Date).toLocaleDateString("en-US");return t("div",{key:"
|
|
1
|
+
import{r as e,h as t,a as i}from"./index-Cgpvu-iV.js";class r{init(e){this.eGui=document.createElement("div"),this.eGui.classList.add("custom-header");const t=new Date(e.column.colDef.pivotKeys[0]),i=t.toLocaleString(void 0,{weekday:"short"}),r=t.toLocaleString(void 0,{month:"short",day:"numeric"}),o=document.createElement("div");o.classList.add("header-group");const s=document.createElement("div");s.classList.add("title"),s.textContent=i,o.appendChild(s);const l=document.createElement("div");l.classList.add("sub-title"),l.textContent=r,o.appendChild(l),this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}const o=class{constructor(t){e(this,t),this.rowData=[],this.gridBarTitle="",this.subTitle="",this.dateKey="",this.columnDefs=[],this.additionalGridOptions={},this.subtitleStatusMappingClasses={},this.showRowTotals=!0,this.dataLoading=!1,this.convertDatesFromUTC=!1,this.showLockedIcon=!1,this.rowGroupPanelShow="never",this.gridFunctions=[],this.filledRowData=[],this.formattedColumnDefs=[],this.externalFilterText="",this.handleGridApi=e=>{this.gridApi=e,this.gridApiCallback(e),this.gridApi.toggleLoadingOverlay(this.dataLoading)}}getDates(e,t){let i=[],r=new Date(e);for(;r<=t;)i.push(new Date(r)),r.setDate(r.getDate()+1);return i}fillInEmptyDates(e,t){let i=[...e];return t.forEach((e=>{i.push({[this.dateKey]:e.toISOString().split(".")[0],isDateRangePlaceholder:!0})})),i}updateRowData(){if(this.rowData&&this.startDate&&this.endDate){let e=this.getDates(new Date(this.startDate),new Date(this.endDate));const t=this.fillInEmptyDates(this.rowData,e);this.filledRowData=t}}dateCompare(e,t){const i=new Date(e);i.setHours(0,0,0,0);const r=new Date(t);return r.setHours(0,0,0,0),i.getTime()-r.getTime()}createColumnDefs(){let e=[...this.columnDefs];e.push({field:this.dateKey,pivot:!0,pivotComparator:this.dateCompare,suppressFiltersToolPanel:!0,valueGetter:e=>{let t="";return t=this.convertDatesFromUTC?new Date(e.data[this.dateKey]+"Z").toLocaleDateString("en-US"):new Date(e.data[this.dateKey]).toLocaleDateString("en-US"),t}}),this.formattedColumnDefs=e}toggleDataLoading(){var e;this.dataLoading?null===(e=this.gridApi)||void 0===e||e.toggleLoadingOverlay(!0):requestAnimationFrame((()=>{var e;this.dataLoading||null===(e=this.gridApi)||void 0===e||e.toggleLoadingOverlay(!1)}))}getGridFunctions(){return this.gridFunctions.map((e=>"quickFilter"!==e.name?e:Object.assign(Object.assign({},e),{params:Object.assign(Object.assign({},e.params),{callback:t=>{var i,r,o;this.externalFilterText=t,null===(i=this.gridApi)||void 0===i||i.onFilterChanged(),null===(o=null===(r=e.params)||void 0===r?void 0:r.callback)||void 0===o||o.call(r,t)}})})))}componentDidLoad(){this.createColumnDefs(),this.updateRowData()}render(){const e=(new Date).toLocaleDateString("en-US");return t("div",{key:"9859ba3a357e5ff6b3af2ca610bd745e2dfcefd0",class:"resource-timeline-calendar"},t("resource-timeline-primary-bar",{key:"1e88673b1eccab14147b8634e9ec04a24563afe4",gridBarTitle:this.gridBarTitle,subTitle:this.subTitle,primaryAction:this.primaryAction,secondaryAction:this.secondaryAction,clickBackward:this.handleClickBackward,clickForward:this.handleClickForward,clickToday:this.handleClickToday,subtitleStatus:this.subtitleStatus,subtitleStatusMappingClasses:this.subtitleStatusMappingClasses,disableHeaderActions:this.disableHeaderActions,showLockedIcon:this.showLockedIcon},t("slot",{key:"b759f14475440172ead2f675303e0beff9f6bf7a",name:"inline",slot:"inline"})),t("client-side-grid",{key:"d23b3a3f70d9e100a7195c04cb3fc0e61b0966dc",rowData:this.filledRowData,columnDefs:this.formattedColumnDefs,gridFunctions:this.getGridFunctions(),gridId:this.gridId,gridOptions:Object.assign(Object.assign({},this.additionalGridOptions),{components:{resourceTimelineCalendarHeader:r},processPivotResultColDef:t=>{if(t.suppressHeaderContextMenu=!0,!t.pivotTotalColumnIds&&t.pivotKeys){const i=t.pivotKeys[0],r=new Date(i).getDay();let o=[];i===e&&(o.push("today-header"),t.cellClass="today-column-border"),0!==r&&6!==r||o.push("weekend-header"),o.length>0&&(t.headerClass=o),t.headerComponent="resourceTimelineCalendarHeader",t.minWidth=70,t.resizable=!1}this.processPivotResultColDef&&this.processPivotResultColDef(t)},getRowHeight:e=>{var t,i,r;return e.node.group&&!0===(null===(r=null===(i=null===(t=e.node.allLeafChildren)||void 0===t?void 0:t[0])||void 0===i?void 0:i.data)||void 0===r?void 0:r.isDateRangePlaceholder)?0:null},rowClassRules:{"placeholder-group-row":e=>{var t,i,r;return e.node.group&&!0===(null===(r=null===(i=null===(t=e.node.allLeafChildren)||void 0===t?void 0:t[0])||void 0===i?void 0:i.data)||void 0===r?void 0:r.isDateRangePlaceholder)}},pivotMode:!0,alwaysPassFilter:e=>{var t;return!0===(null===(t=e.data)||void 0===t?void 0:t.isDateRangePlaceholder)},quickFilterMatcher:()=>!0,isExternalFilterPresent:()=>this.externalFilterText.length>0,doesExternalFilterPass:e=>{var t,i;if(null===(t=e.data)||void 0===t?void 0:t.isDateRangePlaceholder)return!0;const r=this.externalFilterText.toLowerCase();return Object.values(null!==(i=e.data)&&void 0!==i?i:{}).some((e=>null!=e&&("object"==typeof e?Object.values(e).some((e=>"string"==typeof e&&e.toLowerCase().includes(r))):"string"==typeof e&&e.toLowerCase().includes(r))))},removePivotHeaderRowWhenSingleValueColumn:!0,suppressAggFuncInHeader:!0,pivotRowTotals:"after",suppressMovableColumns:!0,enableStrictPivotColumnOrder:!0,rowGroupPanelShow:this.rowGroupPanelShow,sideBar:{toolPanels:[{id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},{id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel",toolPanelParams:{suppressPivotMode:!0,suppressRowGroups:!0,suppressValues:!0,suppressPivots:!0,suppressColumnSelectAll:!0,suppressColumnExpandAll:!0}}],defaultToolPanel:""}}),gridApiCallback:this.handleGridApi}))}get el(){return i(this)}static get watchers(){return{rowData:[{updateRowData:0}],columnDefs:[{createColumnDefs:0}],dataLoading:[{toggleDataLoading:0}]}}};o.style='.resource-timeline-calendar{.header-group{display:flex;flex-direction:column;align-items:center}.header-group .title{color:var(--colorNeutralForeground3)}.custom-header{font-size:12px}.ag-header-cell,.ag-cell{border-right:1px solid var(--colorNeutralStroke3)}.ag-header-cell:last-of-type,.ag-cell:last-of-type{border-right:none}.ag-cell-wrapper{align-items:center;height:100%}.ag-group-value{height:100%}.today-header{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent);border-top:1px solid var(--colorPaletteBlueBorderActive)}.weekend-header{background-color:var(--colorNeutralBackground1Hover)}.ag-cell[col-id*="pivot"]{font-size:12px}.ag-header-cell-comp-wrapper{justify-content:center}.placeholder-group-row{overflow:hidden;border:none}}';export{o as resource_timeline_calendar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i}from"./index-Cgpvu-iV.js";const
|
|
1
|
+
import{r as e,h as i}from"./index-Cgpvu-iV.js";const t={primary:"brand",secondary:"informative",error:"danger",success:"success",warning:"warning",info:"informative",monochrome:"subtle",gray:"subtle"},a=class{constructor(i){e(this,i),this.subtitleStatusMappingClasses={}}render(){var e,a,n,d;const s=(null===(e=this.primaryAction)||void 0===e?void 0:e.onClick)?Object.assign(Object.assign({},this.primaryAction),{label:null!==(a=this.primaryAction.label)&&void 0!==a?a:"",disabled:this.primaryAction.disabled||this.disableHeaderActions}):void 0,o=(null===(n=this.secondaryAction)||void 0===n?void 0:n.onClick)?[Object.assign(Object.assign({},this.secondaryAction),{label:null!==(d=this.secondaryAction.label)&&void 0!==d?d:"",disabled:this.secondaryAction.disabled||this.disableHeaderActions})]:[];return i("udp-primary-action-header",{key:"684c299e5526ad20fb1c0d0feae08a92c8d01f06",primaryAction:s,secondaryActions:o},i("span",{key:"1e6453e230c55672c3ba71c8273ccaa61a773107",slot:"title"},null!=this.gridBarTitle?i("udp-text",{variant:"subtitle1",block:!1},this.gridBarTitle):i("udp-skeleton-loading",{width:"200px"})),i("span",{key:"e32e399fdff02beed30f1a8e241a983eebbd0583",slot:"subtitle"},null!=this.subTitle?i("udp-text",{variant:"caption1"},this.subTitle):i("udp-skeleton-loading",{width:"200px"})),i("span",{key:"281deb6e2678e3729bd7419708cb1c44879d9c07",slot:"inline",class:"inline-status"},i("slot",{key:"254cb0922383349d7c347180f9728229368fa9c4",name:"inline"}),this.subtitleStatus&&i("udp-fluent-badge",{key:"1ecec25eb1db822b5bf827f3c3fdd5d8603cdb96",appearance:"outline",color:t[this.subtitleStatusMappingClasses[this.subtitleStatus]]},this.subtitleStatus),this.showLockedIcon&&i("udp-fluent-icon-button",{key:"2d592f9d535ad9a721291263e67d4d04d2200e51",iconName:"lock",appearance:"outline",size:"small",disabled:!0,ariaLabel:"Locked"})),this.clickBackward&&i("div",{key:"d44e7b3f5927c54c7256c460427285e3db1bdc18",slot:"actions",class:"date-navigation"},i("udp-fluent-icon-button",{key:"e8eb8c16f9c535020f59779f59948c55b109e2b2",ariaLabel:"Previous period",iconName:"chevron-left",appearance:"subtle",shape:"rounded",disabled:this.disableHeaderActions,onClick:this.clickBackward}),this.clickToday&&i("udp-fluent-button",{key:"2505791f7bbb106c8c2ea7f5011d2f2f888f9741",appearance:"subtle",disabled:this.disableHeaderActions,onClick:this.clickToday},"Today"),i("udp-fluent-icon-button",{key:"a840bd59bb111da4228c7bf50c7946190404bfb1",ariaLabel:"Next period",iconName:"chevron-right",appearance:"subtle",shape:"rounded",disabled:this.disableHeaderActions,onClick:this.clickForward})))}};a.style=".inline-status{display:flex;align-items:center;gap:4px}.date-navigation{display:flex;align-items:center;border-radius:var(--borderRadiusMedium);border:1px solid var(--colorNeutralStroke1);overflow:hidden}.date-navigation udp-fluent-icon-button{position:relative;z-index:1;margin:0 -4px}.date-navigation udp-fluent-button{position:relative;z-index:0}";export{a as resource_timeline_primary_bar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as r}from"./index-Cgpvu-iV.js";import{r as o}from"./apiUtils-oxtMm00a.js";import{L as l,S as i,a as n,d as s}from"./searchObject-CDJVsMG_.js";import{p as a}from"./lookupHelper-Bx-mQ_IX.js";import{m as u}from"./makeApiCall-B-daVutk.js";import{C as c}from"./configService-DgYnEcjx.js";import d from"lodash-es/isEqual";import"deep-equal";import"@stencil/store";import"./tenantUtils-Basdb1b1.js";import"axios";const h={equals:n.EQUALS,contains:n.LIKE,notEqual:n.NOT_EQUALS,greaterThan:n.GREATER_THAN,lessThan:n.LESS_THAN,greaterThanOrEqual:n.GREATER_THAN_OR_EQUAL,lessThanOrEqual:n.LESS_THAN_OR_EQUAL,between:n.BETWEEN,inRange:n.BETWEEN,blank:n.NULL,notBlank:n.NOT_NULL,startsWith:n.STARTSWITH,endsWith:n.ENDSWITH};function p(t){return t.charAt(0).toUpperCase()+t.slice(1)}const v=class{constructor(r){t(this,r),this.gridReady=e(this,"gridReady",7),this.columnDefs=[],this.gridFunctions=[]}handleGridReady(t){this.gridApi=t.detail,this.setDatasource(),this.setGridModel()}handleSearchMethodUpdate(t,e){d(t,e)||(this.setDatasource(),this.setGridModel())}setDatasource(){var t;if(!this.searchMethodConfig||!this.gridApi)return;const{apiMethodId:e,customSearchObject:r,requestUrl:d}=this.searchMethodConfig;r&&(null==r?void 0:r.pageSize)&&this.gridApi.setGridOption("cacheBlockSize",null==r?void 0:r.pageSize),(e||d)&&(this.dataSource=(t=>{const{apiMethodId:e,requestUrl:r,externalSearchObject:d={}}=t;return{async getRows(t){var v,f,g,m,O,b;const{startRow:j,endRow:I,filterModel:S,sortModel:w,rowGroupCols:C,groupKeys:x,valueCols:G}=t.request;let M=1;const y=null!=j?j:0,D=(null!=I?I:y+100)-y;let q={pageNumber:Math.floor(y/D)+1,pageSize:D,orderElements:[],filterElements:[],filterGroups:[],groupProperty:[],groupOperationList:[],groupingType:"",eagerLoad:!1,logicalSearchOperator:l.AND};d&&(q=Object.assign(Object.assign(Object.assign({},q),structuredClone(d)),{filterElements:[...null!==(v=q.filterElements)&&void 0!==v?v:[],...null!==(f=d.filterElements)&&void 0!==f?f:[]],filterGroups:[...null!==(g=q.filterGroups)&&void 0!==g?g:[],...null!==(m=d.filterGroups)&&void 0!==m?m:[]]})),(null==w?void 0:w.length)&&function(t,e){var r;t.orderElements=[...null!==(r=t.orderElements)&&void 0!==r?r:[],...e.map((t=>({sortColumn:p(t.colId),sortDirection:t.sort.toUpperCase()})))]}(q,w),S&&Object.keys(S).length&&(M=function(t,e,r=null,o){if(!e)return o;if(t.filterElements||(t.filterElements=[]),t.filterGroups||(t.filterGroups=[]),!e.filterType){const t=e;for(const e of Object.keys(t))i(t[e],null,e);return o}function i(e,r,a){var u,c,d,v,f,g,m;if(!e)return-1;if("join"===e.filterType&&Array.isArray(e.conditions)){const n=o++;t.filterGroups.push({groupId:n,logicalSearchOperator:"AND"===e.type?l.AND:l.OR,parentGroupId:r});for(const t of e.conditions)i(t,n);return n}if(e.conditions){const n=o++;t.filterGroups.push({groupId:n,logicalSearchOperator:"AND"===e.operator?l.AND:l.OR,parentGroupId:r});for(const t of e.conditions)i(t,n,a);return-1}if("text"===e.filterType||"number"===e.filterType)if("true"===e.type||"false"===e.type){const o={searchField:p(null!==(u=null!=a?a:e.colId)&&void 0!==u?u:""),searchValue:e.type,searchOperator:n.EQUALS,groupId:r};t.filterElements.push(o)}else{const o={searchField:p(null!==(c=null!=a?a:e.colId)&&void 0!==c?c:""),searchValue:`${e.filter}${e.filterTo?`,${e.filterTo}`:""}`,searchOperator:h[null!==(d=e.type)&&void 0!==d?d:""],groupId:r};t.filterElements.push(o)}if("date"===e.filterType){const o={searchField:p(null!==(v=null!=a?a:e.colId)&&void 0!==v?v:""),searchValue:`${e.dateFrom}${e.dateTo?`,${e.dateTo}`:""}`,searchOperator:h[null!==(f=e.type)&&void 0!==f?f:""],groupId:r};t.filterElements.push(o)}if("set"===e.filterType){const o=null!==(m=null===(g=e.values)||void 0===g?void 0:g.slice(0,s.IN_CLAUSE_MAX_ELEMENTS))&&void 0!==m?m:[],l={searchField:p(null!=a?a:""),searchValue:o.join(),searchOperator:n.IN,groupId:r};t.filterElements.push(l)}return-1}return i(e,r),o}(q,S,null,M));const E=(null==C?void 0:C.length)>0&&x.length<C.length;(null==C?void 0:C.length)>0&&function(t,e,r){var o,l,i;const s=r.length;if(!(s>=e.length)){const r=p(e[s].field);t.groupProperty=[r],(null===(o=t.orderElements)||void 0===o?void 0:o.some((t=>t.sortColumn===r)))||(t.orderElements=[...null!==(l=t.orderElements)&&void 0!==l?l:[],{sortColumn:r,sortDirection:"ASC"}])}if(r.length>0){const o=r.map(((t,r)=>{var o,l;return{searchField:p(null!==(l=null===(o=e[r])||void 0===o?void 0:o.field)&&void 0!==l?l:""),searchOperator:n.EQUALS,searchValue:t,groupId:null}}));t.filterElements=[...null!==(i=t.filterElements)&&void 0!==i?i:[],...o]}}(q,C,x),E&&((null==G?void 0:G.length)>0?(q.groupingType=i.Aggregate,q.groupOperationList=G.map((t=>{var e,r;return{operation:(null!==(e=t.aggFunc)&&void 0!==e?e:"count").toUpperCase(),property:p(null!==(r=t.field)&&void 0!==r?r:t.id)}}))):q.groupingType=i.Distinct),t.api.setGridOption("context",Object.assign(Object.assign({},t.api.getGridOption("context")),{searchObject:q}));try{let l;if(r?l=await u("POST",r,q):e?l=await o(q,e,c.config.UNITY_API_DOMAIN+c.integrationV1ApiUrl,!1):(console.error("No apiMethodId or url provided to search grid"),t.fail()),null===(O=null==l?void 0:l.pageList)||void 0===O?void 0:O.length){let e;if(E){const t=null===(b=C[x.length])||void 0===b?void 0:b.field;e=l.pageList.map((e=>({[t]:e[t]})))}else{const r=t.api.getColumnDefs();e=await a(l.pageList,r)}t.success({rowData:e,rowCount:Number(l.total)})}else t.success({rowData:[],rowCount:0});t.api.setGridOption("context",Object.assign(Object.assign({},t.api.getGridOption("context")),{rowCount:Number(l.total)}))}catch(e){console.error("Failed to fetch data:",e),t.fail()}}}})({apiMethodId:e,requestUrl:d,externalSearchObject:r?{filterElements:r.filterElements,filterGroups:r.filterGroups,logicalSearchOperator:r.logicalSearchOperator,eagerLoad:null!==(t=r.eagerLoad)&&void 0!==t&&t,getAll:r.getAll}:void 0}))}setGridModel(){if(!this.searchMethodConfig||!this.gridApi)return;const{customSearchObject:t}=this.searchMethodConfig;if(t){const e=function(t){var e,r,o;const l=[];return(null===(e=null==t?void 0:t.orderElements)||void 0===e?void 0:e.length)&&l.push(...t.orderElements.map(((t,e)=>({colId:t.sortColumn,sort:t.sortDirection.toLowerCase(),sortIndex:e})))),(null===(r=null==t?void 0:t.groupProperty)||void 0===r?void 0:r.length)&&l.push(...t.groupProperty.map(((t,e)=>({colId:t,rowGroup:!0,rowGroupIndex:e})))),(null===(o=null==t?void 0:t.groupOperationList)||void 0===o?void 0:o.length)&&l.push(...t.groupOperationList.map((t=>({colId:t.property,aggFunc:t.operation.toLowerCase()})))),l}(t);this.gridApi.applyColumnState({state:e,defaultState:{sort:null,rowGroup:!1,aggFunc:null}})}}render(){return r("server-side-grid",{key:"
|
|
1
|
+
import{r as t,c as e,h as r}from"./index-Cgpvu-iV.js";import{r as o}from"./apiUtils-oxtMm00a.js";import{L as l,S as i,a as n,d as s}from"./searchObject-CDJVsMG_.js";import{p as a}from"./lookupHelper-Bx-mQ_IX.js";import{m as u}from"./makeApiCall-B-daVutk.js";import{C as c}from"./configService-DgYnEcjx.js";import d from"lodash-es/isEqual";import"deep-equal";import"@stencil/store";import"./tenantUtils-Basdb1b1.js";import"axios";const h={equals:n.EQUALS,contains:n.LIKE,notEqual:n.NOT_EQUALS,greaterThan:n.GREATER_THAN,lessThan:n.LESS_THAN,greaterThanOrEqual:n.GREATER_THAN_OR_EQUAL,lessThanOrEqual:n.LESS_THAN_OR_EQUAL,between:n.BETWEEN,inRange:n.BETWEEN,blank:n.NULL,notBlank:n.NOT_NULL,startsWith:n.STARTSWITH,endsWith:n.ENDSWITH};function p(t){return t.charAt(0).toUpperCase()+t.slice(1)}const v=class{constructor(r){t(this,r),this.gridReady=e(this,"gridReady",7),this.columnDefs=[],this.gridFunctions=[]}handleGridReady(t){this.gridApi=t.detail,this.setDatasource(),this.setGridModel()}handleSearchMethodUpdate(t,e){d(t,e)||(this.setDatasource(),this.setGridModel())}setDatasource(){var t;if(!this.searchMethodConfig||!this.gridApi)return;const{apiMethodId:e,customSearchObject:r,requestUrl:d}=this.searchMethodConfig;r&&(null==r?void 0:r.pageSize)&&this.gridApi.setGridOption("cacheBlockSize",null==r?void 0:r.pageSize),(e||d)&&(this.dataSource=(t=>{const{apiMethodId:e,requestUrl:r,externalSearchObject:d={}}=t;return{async getRows(t){var v,f,g,m,O,b;const{startRow:j,endRow:I,filterModel:S,sortModel:w,rowGroupCols:C,groupKeys:x,valueCols:G}=t.request;let M=1;const y=null!=j?j:0,D=(null!=I?I:y+100)-y;let q={pageNumber:Math.floor(y/D)+1,pageSize:D,orderElements:[],filterElements:[],filterGroups:[],groupProperty:[],groupOperationList:[],groupingType:"",eagerLoad:!1,logicalSearchOperator:l.AND};d&&(q=Object.assign(Object.assign(Object.assign({},q),structuredClone(d)),{filterElements:[...null!==(v=q.filterElements)&&void 0!==v?v:[],...null!==(f=d.filterElements)&&void 0!==f?f:[]],filterGroups:[...null!==(g=q.filterGroups)&&void 0!==g?g:[],...null!==(m=d.filterGroups)&&void 0!==m?m:[]]})),(null==w?void 0:w.length)&&function(t,e){var r;t.orderElements=[...null!==(r=t.orderElements)&&void 0!==r?r:[],...e.map((t=>({sortColumn:p(t.colId),sortDirection:t.sort.toUpperCase()})))]}(q,w),S&&Object.keys(S).length&&(M=function(t,e,r=null,o){if(!e)return o;if(t.filterElements||(t.filterElements=[]),t.filterGroups||(t.filterGroups=[]),!e.filterType){const t=e;for(const e of Object.keys(t))i(t[e],null,e);return o}function i(e,r,a){var u,c,d,v,f,g,m;if(!e)return-1;if("join"===e.filterType&&Array.isArray(e.conditions)){const n=o++;t.filterGroups.push({groupId:n,logicalSearchOperator:"AND"===e.type?l.AND:l.OR,parentGroupId:r});for(const t of e.conditions)i(t,n);return n}if(e.conditions){const n=o++;t.filterGroups.push({groupId:n,logicalSearchOperator:"AND"===e.operator?l.AND:l.OR,parentGroupId:r});for(const t of e.conditions)i(t,n,a);return-1}if("text"===e.filterType||"number"===e.filterType)if("true"===e.type||"false"===e.type){const o={searchField:p(null!==(u=null!=a?a:e.colId)&&void 0!==u?u:""),searchValue:e.type,searchOperator:n.EQUALS,groupId:r};t.filterElements.push(o)}else{const o={searchField:p(null!==(c=null!=a?a:e.colId)&&void 0!==c?c:""),searchValue:`${e.filter}${e.filterTo?`,${e.filterTo}`:""}`,searchOperator:h[null!==(d=e.type)&&void 0!==d?d:""],groupId:r};t.filterElements.push(o)}if("date"===e.filterType){const o={searchField:p(null!==(v=null!=a?a:e.colId)&&void 0!==v?v:""),searchValue:`${e.dateFrom}${e.dateTo?`,${e.dateTo}`:""}`,searchOperator:h[null!==(f=e.type)&&void 0!==f?f:""],groupId:r};t.filterElements.push(o)}if("set"===e.filterType){const o=null!==(m=null===(g=e.values)||void 0===g?void 0:g.slice(0,s.IN_CLAUSE_MAX_ELEMENTS))&&void 0!==m?m:[],l={searchField:p(null!=a?a:""),searchValue:o.join(),searchOperator:n.IN,groupId:r};t.filterElements.push(l)}return-1}return i(e,r),o}(q,S,null,M));const E=(null==C?void 0:C.length)>0&&x.length<C.length;(null==C?void 0:C.length)>0&&function(t,e,r){var o,l,i;const s=r.length;if(!(s>=e.length)){const r=p(e[s].field);t.groupProperty=[r],(null===(o=t.orderElements)||void 0===o?void 0:o.some((t=>t.sortColumn===r)))||(t.orderElements=[...null!==(l=t.orderElements)&&void 0!==l?l:[],{sortColumn:r,sortDirection:"ASC"}])}if(r.length>0){const o=r.map(((t,r)=>{var o,l;return{searchField:p(null!==(l=null===(o=e[r])||void 0===o?void 0:o.field)&&void 0!==l?l:""),searchOperator:n.EQUALS,searchValue:t,groupId:null}}));t.filterElements=[...null!==(i=t.filterElements)&&void 0!==i?i:[],...o]}}(q,C,x),E&&((null==G?void 0:G.length)>0?(q.groupingType=i.Aggregate,q.groupOperationList=G.map((t=>{var e,r;return{operation:(null!==(e=t.aggFunc)&&void 0!==e?e:"count").toUpperCase(),property:p(null!==(r=t.field)&&void 0!==r?r:t.id)}}))):q.groupingType=i.Distinct),t.api.setGridOption("context",Object.assign(Object.assign({},t.api.getGridOption("context")),{searchObject:q}));try{let l;if(r?l=await u("POST",r,q):e?l=await o(q,e,c.config.UNITY_API_DOMAIN+c.integrationV1ApiUrl,!1):(console.error("No apiMethodId or url provided to search grid"),t.fail()),null===(O=null==l?void 0:l.pageList)||void 0===O?void 0:O.length){let e;if(E){const t=null===(b=C[x.length])||void 0===b?void 0:b.field;e=l.pageList.map((e=>({[t]:e[t]})))}else{const r=t.api.getColumnDefs();e=await a(l.pageList,r)}t.success({rowData:e,rowCount:Number(l.total)})}else t.success({rowData:[],rowCount:0});t.api.setGridOption("context",Object.assign(Object.assign({},t.api.getGridOption("context")),{rowCount:Number(l.total)}))}catch(e){console.error("Failed to fetch data:",e),t.fail()}}}})({apiMethodId:e,requestUrl:d,externalSearchObject:r?{filterElements:r.filterElements,filterGroups:r.filterGroups,logicalSearchOperator:r.logicalSearchOperator,eagerLoad:null!==(t=r.eagerLoad)&&void 0!==t&&t,getAll:r.getAll}:void 0}))}setGridModel(){if(!this.searchMethodConfig||!this.gridApi)return;const{customSearchObject:t}=this.searchMethodConfig;if(t){const e=function(t){var e,r,o;const l=[];return(null===(e=null==t?void 0:t.orderElements)||void 0===e?void 0:e.length)&&l.push(...t.orderElements.map(((t,e)=>({colId:t.sortColumn,sort:t.sortDirection.toLowerCase(),sortIndex:e})))),(null===(r=null==t?void 0:t.groupProperty)||void 0===r?void 0:r.length)&&l.push(...t.groupProperty.map(((t,e)=>({colId:t,rowGroup:!0,rowGroupIndex:e})))),(null===(o=null==t?void 0:t.groupOperationList)||void 0===o?void 0:o.length)&&l.push(...t.groupOperationList.map((t=>({colId:t.property,aggFunc:t.operation.toLowerCase()})))),l}(t);this.gridApi.applyColumnState({state:e,defaultState:{sort:null,rowGroup:!1,aggFunc:null}})}}render(){return r("server-side-grid",{key:"d9791249ca416802fab3863cc60a327c4ed5b2f0",onGridReady:t=>this.handleGridReady(t),dataSource:this.dataSource,gridFunctions:this.gridFunctions,columnDefs:this.columnDefs,gridOptions:this.gridOptions,gridHeaderConfig:this.gridHeaderConfig,gridId:this.gridId,entityName:this.entityName,gridHeight:this.gridHeight,gridApiCallback:this.gridApiCallback})}static get watchers(){return{searchMethodConfig:[{handleSearchMethodUpdate:0}]}}};export{v as search_method_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as e,c as t,h as i}from"./index-Cgpvu-iV.js";const s=class{constructor(i){e(this,i),this.gridReady=t(this,"gridReady",7),this.gridFunctions=[],this.gridOptions={}}handleGridReady(e){this.gridApi=e.detail,this.updateDataSource()}updateDataSource(){this.gridApi&&this.dataSource&&this.gridApi.setGridOption("serverSideDatasource",this.dataSource)}componentWillLoad(){this.serverSideConfig=Object.assign(Object.assign({paginationAutoPageSize:!0,suppressSetFilterByDefault:!0},this.gridOptions),{rowModelType:"serverSide"})}render(){return i("ag-grid-base",{key:"c49a157e5e1de23659e323e29eb04b4395bcec96",columnDefs:this.columnDefs,gridOptions:this.serverSideConfig,headerConfig:this.gridHeaderConfig,onGridReady:e=>this.handleGridReady(e),gridFunctions:this.gridFunctions,gridId:this.gridId,entityName:this.entityName,gridHeight:this.gridHeight,gridApiCallback:this.gridApiCallback})}static get watchers(){return{dataSource:[{updateDataSource:0}]}}};export{s as server_side_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o}from"./index-Cgpvu-iV.js";const r=class{constructor(o){e(this,o),this.padding=!0}render(){return o("div",{key:"
|
|
1
|
+
import{r as e,h as o}from"./index-Cgpvu-iV.js";const r=class{constructor(o){e(this,o),this.padding=!0}render(){return o("div",{key:"0fd652935bed287b128cf31e97472dccb7e969f1",class:"container",style:this.padding?{padding:"16px"}:{}},o("slot",{key:"cdf8b0f52fc827de12638da760b8afc01bcdb53e"}))}};r.style=".container{width:100%;height:100%;background-color:#f2f2f2;overflow:auto;scrollbar-width:none;-ms-overflow-style:none;::-webkit-scrollbar{display:none}}";export{r as side_sheet_container}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r
|
|
1
|
+
import{r,h as d}from"./index-Cgpvu-iV.js";const c=class{constructor(d){r(this,d)}render(){return d("div",{key:"c12d035421c4e8c1adfd38dfcd8fdc973f522ef2",class:"card"},d("slot",{key:"4f2afab983bd22ee3b2cab99dfdf196e248e034f"}))}};c.style=".card{border:1px solid #ccc;border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);padding:20px;background-color:#fff;}.card h2{font-size:1.5rem;margin-top:0}.card p{margin-bottom:0}";export{c as simple_card}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,n){return!!t.querySelector(`[slot="${n}"]`)}export{t as h}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t}from"./index-Cgpvu-iV.js";import r from"@carbon/icons/es/add/16";import n from"@carbon/icons/es/chevron--down/16";import c from"@carbon/icons/es/view/16";import s from"@carbon/icons/es/trash-can/16";import e from"@carbon/icons/es/star/16";import a from"@carbon/icons/es/star--filled/16";import i from"@carbon/icons/es/edit/16";const d=class{constructor(t){o(this,t),this.statusClasses={},this.dense=!1}statusValueWatcher(o){const t="boolean"==typeof o?o.toString():o;this.internalStatusClass=this.statusClasses&&this.statusClasses[t]?this.statusClasses[t]:"default"}componentWillLoad(){this.statusValueWatcher(this.statusValue)}render(){return t("div",{key:"
|
|
1
|
+
import{r as o,h as t}from"./index-Cgpvu-iV.js";import r from"@carbon/icons/es/add/16";import n from"@carbon/icons/es/chevron--down/16";import c from"@carbon/icons/es/view/16";import s from"@carbon/icons/es/trash-can/16";import e from"@carbon/icons/es/star/16";import a from"@carbon/icons/es/star--filled/16";import i from"@carbon/icons/es/edit/16";const d=class{constructor(t){o(this,t),this.statusClasses={},this.dense=!1}statusValueWatcher(o){const t="boolean"==typeof o?o.toString():o;this.internalStatusClass=this.statusClasses&&this.statusClasses[t]?this.statusClasses[t]:"default"}componentWillLoad(){this.statusValueWatcher(this.statusValue)}render(){return t("div",{key:"a14e56dc4033f23273a5725dc30a411437c27e30",class:`chip ${this.internalStatusClass} ${this.dense?"dense":""}`},t("p",{key:"e32cef92b10ef706015bc359a73f3064e0d99c0d"},t("slot",{key:"7bd87fb34dd1393b7e450aba448bbe03206a50a5"})," "))}static get watchers(){return{statusValue:[{statusValueWatcher:0}]}}};d.style=".chip{padding:0.3em 1em;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;transition:background-color 0.3s, color 0.3s;max-width:100%;max-height:100%}.success{background-color:#4caf50;color:white}.warning{background-color:#ffeb3b;color:#212121;}.error{background-color:#f44336;color:white}.info{background-color:rgb(52, 120, 176);color:white}.default{background-color:rgb(207, 207, 207);color:black;}.dense{padding-top:0;padding-bottom:0}p{margin-top:0;margin-bottom:0}";const b=class{constructor(t){o(this,t),this.expand=!1,this.view=!1,this.add=!1,this.edit=!1,this.delete=!1,this.isDefault=!1,this.noBackground=!1}renderIcon(){let o,d={};return this.delete?(o=s,d={padding:"5px"}):this.view?(o=c,d={padding:"5px"}):this.isDefault?(o=a,d={padding:"5px"}):this.add?(o=r,d={padding:"5px"}):this.edit?(o=i,d={padding:"5px"}):this.expand?(o=n,d={padding:"5px",color:"black"}):(o=e,d={padding:"5px"}),t("svg",Object.assign({},o.attrs,{style:d}),o.content.map(((o,r)=>"path"===o.elem?t("path",Object.assign({},o.attrs,{key:r})):null)))}render(){return t("button",{key:"27566e8c707b85d1e6082ea939ce2737bfc8154d",class:this.noBackground?"udp-btn no-bg":"udp-btn"},t("span",{key:"b6bed34a6dff6fd097b2950669672df6fdf6a122",class:"btn-content"},this.renderIcon()))}};b.style=".udp-btn{border:0;border-radius:50%;padding:1px 3px;cursor:pointer;background-color:var(--accent-color-three);transition:background-color 0.3s}.udp-btn.no-bg{background-color:transparent;}.udp-btn:hover{background-color:#f0f0f0}.btn-content{color:var(--accent-color-four)}.btn-content svg{fill:currentColor}";export{d as status_chip,b as udp_function_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./index-Cgpvu-iV.js";import s from"@carbon/icons/es/close/16";const r=class{constructor(i){t(this,i),this.onDelete=e(this,"onDelete",7),this.onToggle=e(this,"onToggle",7),this.udpChipClicked=e(this,"udpChipClicked",7),this.color="primary",this.level=0,this.defaultToggled=!1,this.showLeftIcon=!1,this.showDelete=!0,this.clickable=!0,this.handleClick=()=>{this.toggled=!this.toggled,this.udpChipClicked.emit(this.text)},this.handleDelete=t=>{t.stopPropagation(),this.onDelete.emit()}}externalStringChanged(t){t&&t===this.text&&this.toggleOff()}toggleOff(){this.toggled&&(this.toggled=!1,this.onToggle.emit(this.toggled))}componentWillLoad(){this.toggled=this.defaultToggled}getLightenedColor(t,e){const{hue:i,saturation:s,lightness:r}={primary:{hue:156,saturation:58,lightness:67},secondary:{hue:156,saturation:58,lightness:67}}[t];return`hsl(${(i+50*e)%360}, ${s}%, ${Math.min(100,r+15*e)}%)`}render(){const t=Object.assign(this.toggled?{backgroundColor:this.getLightenedColor(this.color,this.level),color:"#000",border:"1px solid var(--secondary-color)"}:{backgroundColor:"transparent",color:"#393939",border:"1px solid var(--secondary-color)"},this.showDelete?{}:{paddingRight:"8px"}),e=this.toggled?{backgroundColor:"#fff",color:"#333"}:{backgroundColor:"#d3d3d3",color:"#393939"},r=this.toggled?{backgroundColor:"#fff",color:"#333"}:{backgroundColor:"var(--primary-color)",color:"#fff"},o=this.leftIcon||s;return i("div",{key:"
|
|
1
|
+
import{r as t,c as e,h as i}from"./index-Cgpvu-iV.js";import s from"@carbon/icons/es/close/16";const r=class{constructor(i){t(this,i),this.onDelete=e(this,"onDelete",7),this.onToggle=e(this,"onToggle",7),this.udpChipClicked=e(this,"udpChipClicked",7),this.color="primary",this.level=0,this.defaultToggled=!1,this.showLeftIcon=!1,this.showDelete=!0,this.clickable=!0,this.handleClick=()=>{this.toggled=!this.toggled,this.udpChipClicked.emit(this.text)},this.handleDelete=t=>{t.stopPropagation(),this.onDelete.emit()}}externalStringChanged(t){t&&t===this.text&&this.toggleOff()}toggleOff(){this.toggled&&(this.toggled=!1,this.onToggle.emit(this.toggled))}componentWillLoad(){this.toggled=this.defaultToggled}getLightenedColor(t,e){const{hue:i,saturation:s,lightness:r}={primary:{hue:156,saturation:58,lightness:67},secondary:{hue:156,saturation:58,lightness:67}}[t];return`hsl(${(i+50*e)%360}, ${s}%, ${Math.min(100,r+15*e)}%)`}render(){const t=Object.assign(this.toggled?{backgroundColor:this.getLightenedColor(this.color,this.level),color:"#000",border:"1px solid var(--secondary-color)"}:{backgroundColor:"transparent",color:"#393939",border:"1px solid var(--secondary-color)"},this.showDelete?{}:{paddingRight:"8px"}),e=this.toggled?{backgroundColor:"#fff",color:"#333"}:{backgroundColor:"#d3d3d3",color:"#393939"},r=this.toggled?{backgroundColor:"#fff",color:"#333"}:{backgroundColor:"var(--primary-color)",color:"#fff"},o=this.leftIcon||s;return i("div",{key:"7862d43378407d1fe931b21edf1b5dd9d643ad52",class:"chip"+(this.clickable?"":" chip--unclickable"),style:t,onClick:this.clickable?this.handleClick:void 0},this.leftIcon&&i("span",{key:"88b684fa9b184ce962862f6e1269b68059295047",class:"left-icon",style:r},i("svg",Object.assign({key:"51bbce9d6d97569d65e4897af95ea98d798bc50f"},o.attrs,{fill:r.color}),o.content.map(((t,e)=>"path"===t.elem?i("path",Object.assign({},t.attrs,{key:e})):null)))),i("unity-typography",{key:"e4e008bb01e4e7d9a004f192338eee2cda965349",variant:"caption-text"},i("span",{key:"3febf17f8a3e0eb267a4aa67ff893e0f2a711898",class:"remove-height"},this.text)),this.showDelete&&i("button",{key:"294180018fb9c207f57ec23396585e4305e26059",class:"delete-button",style:e,onClick:this.handleDelete},i("svg",Object.assign({key:"3e1e40fa81c1f2e18b28baf09ef32870e9ba84b1"},s.attrs,{fill:e.color}),s.content.map(((t,e)=>"path"===t.elem?i("path",Object.assign({},t.attrs,{key:e})):null)))))}static get watchers(){return{externalToggleString:[{externalStringChanged:0}]}}};r.style=".chip{display:inline-flex;align-items:center;padding:3px;padding-left:8px;font-size:14px;border-radius:16px;color:#333;cursor:pointer;background-color:transparent;height:26px}.chip--unclickable{cursor:default}.delete-button{margin-left:12px;background-color:#fff;border:none;border-radius:50%;cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.delete-button svg{width:20px;height:20px;fill:#333;}.left-icon{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:24px;height:24px;margin-right:8px;}";export{r as stencil_chip}
|