@ganpatiinfo/gids-core-web 10.3.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/index.css +374 -107
- package/dist/css/index.css.map +1 -1
- package/dist/gids-action-bar.js +1 -1
- package/dist/gids-activity-gauge.js +1 -1
- package/dist/gids-bar-chart.js +1 -1
- package/dist/gids-calendar-header-panel.js +1 -1
- package/dist/gids-calendar-month-list.js +1 -1
- package/dist/gids-calendar-year-list.js +1 -1
- package/dist/gids-calendar.js +1 -1
- package/dist/gids-chart-legend-item.js +1 -1
- package/dist/gids-chart-legend.js +1 -1
- package/dist/gids-chart.js +1 -1
- package/dist/gids-chevron-button.js +1 -1
- package/dist/gids-dot.js +1 -1
- package/dist/gids-dropdown-field.js +1 -1
- package/dist/gids-dropdown-picker.js +1 -1
- package/dist/gids-dropdown.js +1 -1
- package/dist/gids-expansion-body-list-item.js +1 -1
- package/dist/gids-expansion-body-list.js +1 -1
- package/dist/gids-expansion-group.js +1 -1
- package/dist/gids-expansion.js +1 -1
- package/dist/gids-field.js +1 -1
- package/dist/gids-filter.js +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-line-chart.js +1 -1
- package/dist/gids-md-table.d.ts +11 -0
- package/dist/gids-md-table.js +1 -0
- package/dist/gids-overflow-container.js +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-pie-chart.js +1 -1
- package/dist/gids-popover.js +1 -1
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-tab-item.js +1 -1
- package/dist/gids-tab.js +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/gids-tooltip.js +1 -1
- package/dist/p-4lN1OdcA.js +1 -0
- package/dist/{p-CD_BHkBE.js → p-6APCjBEI.js} +1 -1
- package/dist/p-BCVFQSjK.js +1 -0
- package/dist/{p-DfrYaprq.js → p-BSbOhfLZ.js} +1 -1
- package/dist/{p-DA_atCAU.js → p-BVAtja26.js} +1 -1
- package/dist/{p-BeP2XcqY.js → p-C2O_pGky.js} +1 -1
- package/dist/p-C2POfZhu.js +1 -0
- package/dist/{p-3Ni1-UuQ.js → p-C3We7Q8Q.js} +1 -1
- package/dist/{p-C4yEV6pT.js → p-C3w3wdCt.js} +1 -1
- package/dist/{p-BQCMjWpK.js → p-C3xv7tfs.js} +1 -1
- package/dist/{p-Ditd1zV7.js → p-C56G7JRy.js} +1 -1
- package/dist/p-CI-sN9Lr.js +1 -0
- package/dist/{p-WHI6NO_h.js → p-COHuQEfZ.js} +1 -1
- package/dist/{p-CkydANOS.js → p-Chqeexny.js} +1 -1
- package/dist/{p-C2PfO9h9.js → p-DO0MyFf4.js} +1 -1
- package/dist/p-DUojHltk.js +1 -0
- package/dist/p-_SIWct9h.js +1 -0
- package/dist/{p-qIkbfIF3.js → p-pSb81aE0.js} +1 -1
- package/dist/{p-BE2G21MT.js → p-ub0GuVHb.js} +1 -1
- package/dist/types/components/html/GidsBasicTableBody/GidsBasicTableBody.d.ts +7 -0
- package/dist/types/components/html/GidsBasicTableCell/GidsBasicTableCell.d.ts +5 -0
- package/dist/types/components/html/GidsBasicTableHead/GidsBasicTableHead.d.ts +11 -0
- package/dist/types/components/html/GidsBasicTableHeader/GidsBasicTableHeader.d.ts +5 -0
- package/dist/types/components/html/GidsBasicTableRow/GidsBasicTableRow.d.ts +5 -0
- package/dist/types/components/html/GidsBsTable/GidsBsTable.d.ts +12 -0
- package/dist/types/components/webComponents/GidsActionBar/GidsActionBar.d.ts +15 -2
- package/dist/types/components/webComponents/GidsExpansionBodyList/GidsExpansionBodyList.d.ts +5 -4
- package/dist/types/components/webComponents/GidsFilter/GidsFilter.d.ts +5 -0
- package/dist/types/components/webComponents/GidsMdTable/GidsMdTable.d.ts +42 -0
- package/dist/types/components.d.ts +199 -12
- package/dist-bundled/es/gids-action-bar.js +168 -126
- package/dist-bundled/es/gids-activity-gauge.js +4 -4
- package/dist-bundled/es/gids-bar-chart.js +1 -1
- package/dist-bundled/es/gids-calendar-header-panel.js +4 -4
- package/dist-bundled/es/gids-calendar-month-list.js +1 -1
- package/dist-bundled/es/gids-calendar-year-list.js +4 -4
- package/dist-bundled/es/gids-calendar.js +7 -7
- package/dist-bundled/es/gids-chart-legend-item.js +4 -4
- package/dist-bundled/es/gids-chart-legend.js +4 -4
- package/dist-bundled/es/gids-chart.js +18 -18
- package/dist-bundled/es/gids-chevron-button.js +2 -2
- package/dist-bundled/es/gids-dot.js +1 -1
- package/dist-bundled/es/gids-dropdown-field.js +5 -5
- package/dist-bundled/es/gids-dropdown-picker.js +2 -2
- package/dist-bundled/es/gids-dropdown.js +4 -4
- package/dist-bundled/es/gids-expansion-body-list-item.js +3 -3
- package/dist-bundled/es/gids-expansion-body-list.js +35 -35
- package/dist-bundled/es/gids-expansion-group.js +5 -5
- package/dist-bundled/es/gids-expansion.js +4 -4
- package/dist-bundled/es/gids-field.js +1 -1
- package/dist-bundled/es/gids-filter.js +2 -2
- package/dist-bundled/es/gids-icon.js +4 -4
- package/dist-bundled/es/gids-input.js +1 -1
- package/dist-bundled/es/gids-line-chart.js +4 -4
- package/dist-bundled/es/gids-md-table.js +170 -0
- package/dist-bundled/es/gids-overflow-container.js +1 -1
- package/dist-bundled/es/gids-overlay-provider.js +2 -2
- package/dist-bundled/es/gids-password-field.js +24 -24
- package/dist-bundled/es/gids-pie-chart.js +1 -1
- package/dist-bundled/es/gids-popover.js +1 -1
- package/dist-bundled/es/gids-scrim.js +6 -6
- package/dist-bundled/es/gids-tab-item.js +6 -6
- package/dist-bundled/es/gids-tab.js +4 -4
- package/dist-bundled/es/gids-text-field.js +16 -16
- package/dist-bundled/es/gids-toggle-button.js +1 -1
- package/dist-bundled/es/gids-tooltip.js +4 -4
- package/dist-bundled/es/{p-DlI2raNo-5V-p1A9Z.js → p-4lN1OdcA-xYP8gbDc.js} +17 -34
- package/dist-bundled/es/{p-CD_BHkBE-DX2546yK.js → p-6APCjBEI-BREg63Xr.js} +5 -5
- package/dist-bundled/es/{p-Cn-t3SGc-CwvvOdlK.js → p-BCVFQSjK-CKrYrI4b.js} +15 -15
- package/dist-bundled/es/{p-DfrYaprq-CeZqb0rn.js → p-BSbOhfLZ-BdEHhmFM.js} +3 -3
- package/dist-bundled/es/{p-DA_atCAU-KdxJYYDE.js → p-BVAtja26-C16IjShX.js} +8 -8
- package/dist-bundled/es/{p-BeP2XcqY-DMXmX4Mc.js → p-C2O_pGky-CP4PN55D.js} +10 -10
- package/dist-bundled/es/p-C2POfZhu-DzG_JxV6.js +24 -0
- package/dist-bundled/es/{p-3Ni1-UuQ-CPn15cat.js → p-C3We7Q8Q-2EoDLj5m.js} +2 -2
- package/dist-bundled/es/{p-C4yEV6pT-8IjLINXB.js → p-C3w3wdCt-BTH-jYlI.js} +6 -6
- package/dist-bundled/es/{p-BQCMjWpK-CLxPNItn.js → p-C3xv7tfs-DHsjc3Ns.js} +4 -4
- package/dist-bundled/es/{p-Ditd1zV7-DdQjXthS.js → p-C56G7JRy-BCGZG2-3.js} +2 -2
- package/dist-bundled/es/{p-DVVJrKxO-Bdl0HX_u.js → p-CI-sN9Lr-BvWzRJw-.js} +20 -19
- package/dist-bundled/es/{p-WHI6NO_h-DHNy0JzV.js → p-COHuQEfZ-DcUxD9TI.js} +11 -11
- package/dist-bundled/es/{p-CkydANOS-CzTX9wng.js → p-Chqeexny-BuJ-PhNi.js} +6 -6
- package/dist-bundled/es/{p-D4Pimu_8-DfEGRQGf.js → p-D4Pimu_8-ARSuGBs4.js} +0 -1
- package/dist-bundled/es/{p-D6lxqcxP-DWrZi1Xi.js → p-D6lxqcxP-C6BOC0kV.js} +1 -1
- package/dist-bundled/es/{p-C2PfO9h9-H_toZwKo.js → p-DO0MyFf4-Ddg5sVMx.js} +5 -5
- package/dist-bundled/es/p-DUojHltk-BQ0ryfLD.js +172 -0
- package/dist-bundled/es/{p-UxDcM-C5-Dr5d_WpJ.js → p-UxDcM-C5-BJO4X0jM.js} +1 -1
- package/dist-bundled/es/{p-KaaOtnwV-D7HTbhvI.js → p-_SIWct9h-jMYFZ-VO.js} +12 -12
- package/dist-bundled/es/{p-qIkbfIF3-B7NovGEi.js → p-pSb81aE0-WzAszFOQ.js} +2 -2
- package/dist-bundled/es/{p-BE2G21MT-WGW-ehxu.js → p-ub0GuVHb-C9vrhXyF.js} +2 -2
- package/dist-bundled/umd/gids-action-bar.umd.js +3 -3
- package/dist-bundled/umd/gids-activity-gauge.umd.js +1 -1
- package/dist-bundled/umd/gids-bar-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-header-panel.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-month-list.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar-year-list.umd.js +1 -1
- package/dist-bundled/umd/gids-calendar.umd.js +1 -1
- package/dist-bundled/umd/gids-chart-legend-item.umd.js +1 -1
- package/dist-bundled/umd/gids-chart-legend.umd.js +1 -1
- package/dist-bundled/umd/gids-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-chevron-button.umd.js +1 -1
- package/dist-bundled/umd/gids-dot.umd.js +1 -1
- package/dist-bundled/umd/gids-dropdown-field.umd.js +2 -2
- package/dist-bundled/umd/gids-dropdown-picker.umd.js +1 -1
- package/dist-bundled/umd/gids-dropdown.umd.js +2 -2
- package/dist-bundled/umd/gids-expansion-body-list-item.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion-body-list.umd.js +2 -2
- package/dist-bundled/umd/gids-expansion-group.umd.js +1 -1
- package/dist-bundled/umd/gids-expansion.umd.js +1 -1
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-filter.umd.js +3 -3
- package/dist-bundled/umd/gids-icon.umd.js +1 -1
- package/dist-bundled/umd/gids-input.umd.js +1 -1
- package/dist-bundled/umd/gids-line-chart.umd.js +2 -2
- package/dist-bundled/umd/gids-md-table.umd.js +5 -0
- package/dist-bundled/umd/gids-overflow-container.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +1 -1
- package/dist-bundled/umd/gids-password-field.umd.js +2 -2
- package/dist-bundled/umd/gids-pie-chart.umd.js +1 -1
- package/dist-bundled/umd/gids-popover.umd.js +1 -1
- package/dist-bundled/umd/gids-scrim.umd.js +1 -1
- package/dist-bundled/umd/gids-tab-item.umd.js +2 -2
- package/dist-bundled/umd/gids-tab.umd.js +1 -1
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd/gids-tooltip.umd.js +1 -1
- package/dist-bundled/umd-complete/gids-core-web.umd.js +8 -8
- package/package.json +17 -9
- package/dist/p-2wB6zkno.js +0 -1
- package/dist/p-Cn-t3SGc.js +0 -1
- package/dist/p-DVVJrKxO.js +0 -1
- package/dist/p-DlI2raNo.js +0 -1
- package/dist/p-KaaOtnwV.js +0 -1
- package/dist-bundled/es/p-2wB6zkno-57WAxATm.js +0 -152
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as i,H as e,h as s}from"./p-Bf3p-DY2.js";import{GidsDropdownWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{G as o}from"./p-D4Pimu_8.js";import{d}from"./p-BVAtja26.js";const{getGidsDropdownClassNames:a,getGidsChevronButtonControlClassNames:h}=n,r="gids-dropdown-item--active",c=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.appearance="default",this.expanded=!1,this.filterValue="",this.isFilterEditing=!1,this.hasLeadingIcon=!1,this.hasLeadingAccessory=!1,this.activeIndex=-1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.hasDocumentListeners=!1,this.hasPendingControlRevalidation=!1,this.handleDropdownItemSelect=t=>{const{value:i,title:e,disabled:s,id:n,isPlaceholderItem:o}=t.detail;s||"string"!=typeof i||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:n,value:i,title:e,disabled:!1,originalEvent:t,isPlaceholderItem:o}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const i=t.target;if(!(i instanceof Element))return;const e=i.closest(".gids-dropdown-item");if(!e||!this.hostElement.contains(e))return;if(e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))return;const s=e instanceof HTMLButtonElement?e.value:e.getAttribute("value")||"";if("string"!=typeof s||0===s.length)return;const n=e instanceof HTMLButtonElement?e.id:e.getAttribute("id")??"";if("string"!=typeof n||0===n.length)return;const o=e.getAttribute("is-placeholder-item")??"";let d=e.textContent?.trim()??"";d.endsWith("checkmark")&&(d=d.slice(0,-9).trim()),console.log("cleanTitle",d),this.applySelection({id:n,value:s,title:d.trim(),disabled:!1,originalEvent:t,isPlaceholderItem:!(!o||"true"!==o)})},this.handleFilterInput=t=>{const i=t.target;this.filterValue=i?.value??"",this.isFilterEditing=!0,this.clearActive(),this.expanded||this.setExpandedState(!0,t),this.applyFilter()},this.handleInputKeyDown=t=>{if(!this.isInteractive())return;const i=t.key,e="ArrowDown"===i;if((e||"ArrowUp"===i)&&!t.metaKey&&!t.ctrlKey)return t.preventDefault(),this.expanded||this.setExpandedState(!0,t),void this.moveActive(e?1:-1);if("Home"===i&&this.expanded)return t.preventDefault(),void this.setActiveByIndex(0);if("End"===i&&this.expanded)return t.preventDefault(),void this.setActiveByIndex(this.getVisibleEnabledItems().length-1);if("Enter"===i){if(!this.expanded)return t.preventDefault(),this.setExpandedState(!0,t),void this.setActiveByIndex(0);this.selectActive()&&t.preventDefault()}},this.handleTriggerToggle=t=>{this.isInteractive()&&this.setExpandedState(!this.expanded,t)},this.handleInputFocusAndBlur=t=>{this.hostElement.dispatchEvent(new FocusEvent(t.type,{relatedTarget:t.relatedTarget}))},this.handleInputClickToggle=t=>{t.defaultPrevented||this.handleTriggerToggle(t)},this.handleChevronClickToggle=t=>{t.defaultPrevented||(t.stopPropagation(),this.handleTriggerToggle(t))},this.handleDocumentPointerDown=t=>{2!==t.button&&this.expanded&&(("function"==typeof t.composedPath?t.composedPath():[]).includes(this.hostElement)||this.hostElement.contains(t.target)||this.setExpandedState(!1,t))},this.handleDocumentKeyDown=t=>{if(!this.expanded)return;const i=t.key;if("Escape"===i||"Esc"===i)return t.preventDefault(),void this.setExpandedState(!1,t);"Tab"===i&&this.setExpandedState(!1,t)},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=void 0,this.isFilterEditing=!1,this.filterValue="",this.setExpandedState(!1)}}handleExpandedChange(t){t&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}connectedCallback(){this.initialValue=this.value,this.attachItemListener(),this.attachDocumentListeners(),this.attachFormListener()}disconnectedCallback(){this.detachItemListener(),this.detachDocumentListeners(),this.detachFormListener()}componentWillLoad(){this.checkSlots()}componentWillUpdate(){this.checkSlots()}checkSlots(){this.hasLeadingIcon=!!this.hostElement.querySelector('[slot="leadingIconDropdown"]'),this.hasLeadingAccessory=!!this.hostElement.querySelector('[slot="leadingAccessoryDropdown"]')}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}getVisibleEnabledItems(){return this.getItemElements().filter((t=>"none"!==t.style.display&&!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled")))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleDropdownItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleDropdownItemSelect),this.hasItemListener=!1)}applySelection(t){this.value=t.value,this.selectedItemTitle="string"==typeof t.title?t.title:void 0,this.isFilterEditing=!1,this.filterValue="",this.clearActive(),this.emitNativeSelectionEvents(this.selectedItemTitle??""),this.setExpandedState(!1,this.coerceEvent(t.originalEvent)),this.onSelectionChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownChange",{bubbles:!0,composed:!0,detail:t}))}getInputControl(){return this.hostElement.querySelector(".gids-input__control")}emitNativeSelectionEvents(t){const i=this.getInputControl();i&&(i.value=t,i.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),i.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}clearActive(){this.activeIndex=-1,this.getItemElements().forEach((t=>t.classList.remove(r))),this.setActiveDescendant(void 0)}setActiveByIndex(t){const i=this.getVisibleEnabledItems();if(this.getItemElements().forEach((t=>t.classList.remove(r))),0===i.length)return this.activeIndex=-1,void this.setActiveDescendant(void 0);const e=Math.max(0,Math.min(t,i.length-1)),s=i[e];if(!s)return this.activeIndex=-1,void this.setActiveDescendant(void 0);this.activeIndex=e,s.classList.add(r),s.scrollIntoView({block:"nearest"}),this.setActiveDescendant(s.id||void 0)}moveActive(t){const i=this.getVisibleEnabledItems();0!==i.length?this.setActiveByIndex(-1===this.activeIndex?t>0?0:i.length-1:(this.activeIndex+t+i.length)%i.length):this.clearActive()}selectActive(){const t=this.getVisibleEnabledItems();if(0===t.length)return!1;const i=this.activeIndex>=0?t[this.activeIndex]:t[0];return!!i&&(i.click(),this.getInputControl()?.focus(),!0)}applyFilter(){const t=this.filterValue.trim().toLowerCase();this.getItemElements().forEach((i=>{const e=(i.textContent??"").toLowerCase(),s=0===t.length||e.includes(t);i.style.display=s?"":"none"}))}setActiveDescendant(t){const i=this.getInputControl();i&&(t?i.setAttribute("aria-activedescendant",t):i.removeAttribute("aria-activedescendant"))}setExpandedState(t,i){const e=Boolean(t);e&&!this.isInteractive()||this.expanded!==e&&(this.expanded=e,e||(this.isFilterEditing=!1,this.filterValue="",this.clearActive(),this.applyFilter(),this.syncInputDisplayValue()),this.hostElement.dispatchEvent(new CustomEvent("gidsDropdownToggle",{bubbles:!0,composed:!0,detail:{expanded:e,originalEvent:i}})))}syncInputDisplayValue(){const t=this.getInputControl();t&&t.value!==(this.selectedItemTitle??"")&&(t.value=this.selectedItemTitle??"")}attachDocumentListeners(){this.hasDocumentListeners||"undefined"==typeof document||(document.addEventListener("pointerdown",this.handleDocumentPointerDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!0)}detachDocumentListeners(){this.hasDocumentListeners&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",this.handleDocumentPointerDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.hasDocumentListeners=!1)}attachFormListener(){const t=this.hostElement.closest("form");this.patternForm!==t&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=t??void 0,this.patternForm?.addEventListener("reset",this.handleFormReset))}detachFormListener(){this.patternForm&&(this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=void 0)}get form(){return this.getInputControl()?.form??this.patternForm??null}get validity(){return this.getInputControl()?.validity??{}}get validationMessage(){return this.getInputControl()?.validationMessage??""}get willValidate(){return this.getInputControl()?.willValidate??!1}async checkValidity(){return this.getInputControl()?.checkValidity()??!0}async reportValidity(){return this.getInputControl()?.reportValidity()??!0}async setCustomValidity(t){return this.getInputControl()?.setCustomValidity(t)}isInteractive(){return!(this.disabled||this.readOnly)}coerceEvent(t){if("undefined"!=typeof Event&&null!==t)return t instanceof Event?t:void 0}scheduleControlRevalidation(){if(this.hasPendingControlRevalidation)return;this.hasPendingControlRevalidation=!0;const t=()=>{this.hasPendingControlRevalidation=!1,this.checkValidity()};"function"!=typeof requestAnimationFrame?t():requestAnimationFrame(t)}getEnhancedInputProps(){const t={...this.inputProps??{}};"string"==typeof t.autoComplete&&0!==t?.autoComplete?.trim?.()?.length||(t.autoComplete="off");const i=t.onInput;t.onInput=t=>{i?.(t),this.handleFilterInput(t)};const e=t.onBlur;t.onBlur=t=>{e?.(t),this.scheduleControlRevalidation()};const s=t.onKeyDown;return t.onKeyDown=t=>{s?.(t),t.defaultPrevented||this.handleInputKeyDown(t)},t}render(){const t=this.expanded&&this.isInteractive(),i=a({expanded:t}),e=this.getEnhancedInputProps(),n="string"==typeof e.id?e.id:void 0,d=n?`${n}__menu`:void 0;e.role="combobox",e["aria-expanded"]=t?"true":"false",e["aria-haspopup"]="listbox",e["aria-autocomplete"]="list",d&&(e["aria-controls"]=d);const r=this.isFilterEditing?this.filterValue:this.selectedItemTitle??this.value??"",c=t?"true":"false",l=s("button",{key:"3c948278bf289c4fd943e4bff51c8e44e73ba6c9",class:h({size:"lg"}),slot:"trailingAccessory",type:"button",onClick:this.handleChevronClickToggle,"aria-label":t?"Collapse options":"Expanded options","aria-expanded":c,"aria-haspopup":"listbox","aria-controls":d,disabled:this.disabled||this.readOnly,tabIndex:-1},s("span",{key:"284f2a2141baa75624fcd9eeee21e6c98fd1e86e",class:"gids-button__content"},s(o,{key:"1e6567b3d5aefedfef1697f59d79de1a0635f86b",name:"chevron-vertical",alt:""})));return s("div",{key:"82b234b661a97f00fbfb69b1c24d3b1f468521dc",class:i},s("gids-input",{key:"6068c25be9fc8533a26525083c6082bfdfffbbfa",appearance:this.appearance,loading:this.loading,disabled:this.disabled,readOnly:this.readOnly,required:this.required,value:r,name:this.name,inputProps:e,onClick:this.handleInputClickToggle,onFocus:this.handleInputFocusAndBlur,onBlur:this.handleInputFocusAndBlur},this.hasLeadingIcon&&s("slot",{key:"8230d44f492a98c05c5830fa984270122f0963ca",name:"leadingIconDropdown",slot:"leadingIcon"}),this.hasLeadingAccessory&&s("slot",{key:"3a80369ad171bc0e37dfccbb9661d0db93dd55c1",name:"leadingAccessoryDropdown",slot:"leadingAccessory"}),l),s("div",{key:"2cad6d5213802acf9b673971a748bd16c06b986a",class:"gids-dropdown__menu",id:d,role:"listbox",onClick:this.handleMenuClick},s("slot",{key:"90e9298103623d8a87677470c0f7e9b8655be880"})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],readOnly:[{handleInteractivityChange:0}]}}static get style(){return'@charset "UTF-8";.gids-dropdown{position:relative}.gids-dropdown__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;min-height:55px;max-height:20rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg)}.gids-dropdown__menu>*{flex-shrink:0}.gids-dropdown--expanded .gids-dropdown__menu{display:flex}.gids-dropdown__leading-icon{display:flex;align-items:center}.gids-dropdown__accessory{display:flex;align-items:center}'}},[260,"gids-dropdown",{appearance:[1],expanded:[1540],inputProps:[16],disabled:[516],readOnly:[516,"read-only"],loading:[516],value:[513],name:[1],onSelectionChange:[16],required:[4],filterValue:[32],isFilterEditing:[32],selectedItemTitle:[32],hasLeadingIcon:[32],hasLeadingAccessory:[32],checkValidity:[64],reportValidity:[64],setCustomValidity:[64]},void 0,{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],readOnly:[{handleInteractivityChange:0}]}]);function l(){"undefined"!=typeof customElements&&["gids-dropdown","gids-input"].forEach((i=>{switch(i){case"gids-dropdown":customElements.get(t(i))||customElements.define(t(i),c);break;case"gids-input":customElements.get(t(i))||d()}}))}l();export{c as G,l as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarMonthListWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{a as d,b as o,c as h}from"./p-D6lxqcxP.js";const{getGidsCalendarMonthListClassNames:
|
|
1
|
+
import{t,p as e,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarMonthListWebUtils as n}from"@ganpatiinfo/gids-web-shared";import{a as d,b as o,c as h}from"./p-D6lxqcxP.js";const{getGidsCalendarMonthListClassNames:a,getGidsCalendarMonthListMonths:r}=n,c=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.type="default",this.disabledIndices=[],this.divider=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.handleCalendarMenuItemSelect=t=>{const{title:e,value:s,selectedIndex:i,disabled:n,id:d}=t.detail;n||"string"!=typeof e||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:d,month:e,monthInNumber:Number(s),disabled:!1,selectedIndex:i}))},this.handleMenuClick=t=>{if(this.suppressNextMenuClickSelection)return;const e=t?.detail;this.applySelection({id:e.id,monthInNumber:Number(e.value),month:e.title,disabled:!1,selectedIndex:e.selectedIndex})},this.monthsList=()=>r(),this.getSelectedItem=()=>{const t=this.selectedMonthNumber,e=this.monthsList(),s=e.findIndex((e=>e.value===t));let i;return null!=s&&-1!==s&&(i=e[s]),{foundItem:i,foundIndex:s}},this.isItemSelected=t=>{const{foundIndex:e}=this.getSelectedItem();return e===t}}connectedCallback(){this.attachItemListener()}disconnectedCallback(){this.detachItemListener()}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!1)}applySelection(t){this.clearActive(),this.onSelectionMonthChange?.(t),this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarMonthChange",{bubbles:!0,composed:!0,detail:t}))}clearActive(){this.getItemElements().forEach((t=>t.classList.remove("gids-dropdown-item--active")))}render(){const t=a();return i("div",{key:"03c81c7b6d2fb6a1439f4a51a91817661b208175",class:t},i(d,{key:"218015b22be3ab5dc1257ab99710759fcc91a60f",type:this.type,supportingText:this.noOptionsText},i(o,{key:"63be7405e6ec2c1e658429832c3a484aa149880b",sectionLabel:"Months"},this.monthsList().map(((t,e)=>{const s=`${e+1}`,n=this.disabledIndices?.includes(e);return i(h,{title:t.title,value:`${t.value}`,key:`${e.toString()}`,index:e,id:s,selected:this.isItemSelected(e),onPressDropdownItem:this.handleMenuClick,disabled:n,divider:this.divider,isPlaceholderItem:!1})})))))}get hostElement(){return this}},[0,"gids-calendar-month-list",{type:[1],noOptionsText:[1,"no-options-text"],disabledIndices:[16],divider:[4],selectedMonthNumber:[2,"selected-month-number"],onSelectionMonthChange:[16]}]);function l(){"undefined"!=typeof customElements&&["gids-calendar-month-list"].forEach((e=>{"gids-calendar-month-list"===e&&(customElements.get(t(e))||customElements.define(t(e),c))}))}l();export{c as G,l as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarYearListWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{a as r,b as
|
|
1
|
+
import{t as e,p as t,H as s,h as i}from"./p-Bf3p-DY2.js";import{GidsCalendarYearListWebUtils as a}from"@ganpatiinfo/gids-web-shared";import{a as r,b as n,c as d}from"./p-D6lxqcxP.js";const{getGidsCalendarYearListClassNames:h,getGidsCalendarYearListYears:o,isValidFourDigitYear:c}=a,l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.type="default",this.disabledIndices=[],this.divider=!1,this.newStartYear=(new Date).getFullYear(),this.newEndYear=(new Date).getFullYear()+100,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.handleCalendarMenuItemSelect=e=>{const{title:t,value:s,selectedIndex:i,disabled:a,id:r}=e.detail;a||"string"!=typeof t||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:r,year:Number(s),disabled:!1,selectedIndex:i,startYear:this.newStartYear,endYear:this.newEndYear}))},this.handleMenuClick=e=>{if(this.suppressNextMenuClickSelection)return;const t=e?.detail;this.applySelection({id:t.id,year:Number(t.value),disabled:!1,selectedIndex:t.selectedIndex,startYear:this.newStartYear,endYear:this.newEndYear})},this.yearsList=()=>o({startYear:this.newStartYear,endYear:this.newEndYear}),this.getSelectedItem=()=>{const e=this.selectedYear,t=this.yearsList(),s=t.findIndex((t=>t.value===e));let i;return null!=s&&-1!==s&&(i=t[s]),{foundItem:i,foundIndex:s}},this.isItemSelected=e=>{const{foundIndex:t}=this.getSelectedItem();return t===e}}connectedCallback(){this.attachItemListener(),this.handleStartAndEndYear()}disconnectedCallback(){this.detachItemListener()}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleCalendarMenuItemSelect),this.hasItemListener=!1)}handleStartAndEndYear(){const e=this.startYear,t=this.endYear;return this.newStartYear=e&&e>0&&c(e)?e:(new Date).getFullYear(),this.newEndYear=t&&t>0&&c(t)?t:this.newStartYear+100,{newStartYear:this.newStartYear,newEndYear:this.newEndYear}}applySelection(e){this.clearActive(),this.onSelectionYearChange?.(e),this.hostElement.dispatchEvent(new CustomEvent("gidsCalendarYearChange",{bubbles:!0,composed:!0,detail:e}))}clearActive(){this.getItemElements().forEach((e=>e.classList.remove("gids-dropdown-item--active")))}render(){const e=h();return i("div",{key:"af9ef0437dbeba878bb5d09b0dcb4339ab819efd",class:e},i(r,{key:"8083aa3b6a0160923f514bf067475cc835c3256b",type:this.type,supportingText:this.noOptionsText},i(n,{key:"d9c7ec1df68bd2e67e236e7135927f27dd7bc328",sectionLabel:"Years"},this.yearsList().map(((e,t)=>{const s=`${t+1}`,a=this.disabledIndices?.includes(e.value);return i(d,{title:e.title,value:`${e.value}`,key:`${t.toString()}`,index:t,id:s,selected:this.isItemSelected(t),onPressDropdownItem:this.handleMenuClick,disabled:a,divider:this.divider,isPlaceholderItem:!1})})))))}get hostElement(){return this}},[0,"gids-calendar-year-list",{type:[1],noOptionsText:[1,"no-options-text"],disabledIndices:[16],divider:[4],selectedYear:[2,"selected-year"],startYear:[2,"start-year"],endYear:[2,"end-year"],onSelectionYearChange:[16],newStartYear:[32],newEndYear:[32]}]);function u(){"undefined"!=typeof customElements&&["gids-calendar-year-list"].forEach((t=>{"gids-calendar-year-list"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}u();export{l as G,u as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsBarChartWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{G as s}from"./p-DMNS1d8v.js";import{d as l}from"./p-
|
|
1
|
+
import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsBarChartWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{G as s}from"./p-DMNS1d8v.js";import{d as l}from"./p-BCVFQSjK.js";import{d as n}from"./p-C3xv7tfs.js";const{getGidsBarChartClassNames:o}=r,d=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.legend="none",this.chartData=[],this.yAxisVisible=!1,this.dataPoints=[],this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}dataPointsChanged(t){this.dataPoints=t}legendChanged(t){this.legend=t}yAxisVisibilityChanged(t){this.yAxisVisible=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:300}render(){if(this.chartLoading)return e("div",{class:"gids-bar-chart__no-data"},e(s,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this?.chartData?.[0]?.data?.map((t=>t.label))??[],a=t.length,i=Array(a).fill(0);this.chartData.forEach((t=>{Array.isArray(t?.data)&&t.data.forEach(((t,e)=>{e<a&&(i[e]=(i[e]??0)+(t?.value||0))}))}));const r=i.length>0?Math.max(...i):10,l=Math.pow(10,Math.floor(Math.log10(r||1)));let n=l;r/l<=2?n=l/5:r/l<=5&&(n=l/2);const d=Math.ceil(r/n)*n,g=[];if(Array.isArray(this.dataPoints)&&this.dataPoints.length>0){const t=[...this.dataPoints].sort(((t,a)=>t-a)),a=t.length>1?(t[1]??200)-(t[0]??0):200,e=Math.max(...t,d,...i),r=Math.ceil(e/(a||1));for(let t=0;t<=r;t++)g.push(t*a)}else{const t=5,a=d/(t-1);for(let i=0;i<t;i++)g.push(Math.round(0+i*a))}const h=Math.max(...g)-0||1,c=o({breakpoint:this.breakpoint});let b=!1,p=!1;"mobile"===this.breakpoint?"none"!==this.legend&&(b=!0):"top"===this.legend?b=!0:"right"===this.legend&&(p=!0);const _=100/a,y=.4*_;return e("div",{class:c},b?e("div",{class:"gids-bar-chart__header"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null,e("div",{class:"gids-bar-chart__main-container"},e("div",{class:"gids-bar-chart__grid-layout"},e("span",{class:"gids-bar-chart__y-axis-label"},this.yAxisLabel),e("div",{class:"gids-bar-chart__chart-stage-container"},this.yAxisVisible?e("div",{class:"gids-bar-chart__y-axis-scale-container"},g.map((t=>e("span",{class:"gids-bar-chart__scale-text gids-bar-chart__y-axis-scale-value",key:t,style:{bottom:(t-0)/h*100+"%"}},t)))):null,e("div",{class:"gids-bar-chart__chart-stage"},e("svg",{viewBox:"0 0 100 100",class:"gids-bar-chart__chart-vector",preserveAspectRatio:"none"},g.map((t=>{const a=100-(t-0)/h*100;return e("line",{x1:"0",y1:a,x2:"100",y2:a,class:"gids-bar-chart__grid-line",key:t})})),t.map(((t,a)=>{const i=a*_+(_-y)/2;let r=0;const s=[...this.chartData.map(((t,i)=>{if(!Array.isArray(t.data))return null;const e=t.data[a];if(!e)return null;const s=(e.value||0)/h*100,l=100-s-r;return r+=s,{seriesIdx:i,crownY:l,height:s}})).filter((t=>null!==t&&t.height>0))].sort(((t,a)=>a.seriesIdx-t.seriesIdx));return e("g",{key:a},s.map((t=>{const a=.3*y,r=`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tM ${i},${t.crownY+a}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tQ ${i},${t.crownY} ${i+a},${t.crownY}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tH ${i+y-a}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tQ ${i+y},${t.crownY} ${i+y},${t.crownY+a}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tV 100\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tH ${i}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tZ\n\t\t\t\t\t\t\t\t\t\t\t\t\t`.replace(/\s+/g," ").trim();return e("path",{key:t.seriesIdx,d:r,class:`gids-bar-chart__bar gids-bar-chart__series-bar-${t.seriesIdx+1}`})})))}))))),e("div",{class:"gids-bar-chart__x-axis-scale-container"},t.map(((t,a)=>e("span",{class:"gids-bar-chart__scale-text",key:a},t)))),e("span",{class:"gids-bar-chart__x-axis-label"},this.xAxisLabel)),p?e("gids-chart-legend",{orientation:"vertical"},this.chartData.map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label)))):null))}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],dataPoints:[{dataPointsChanged:0}],legend:[{legendChanged:0}],yAxisVisible:[{yAxisVisibilityChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-bar-chart{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.gids-bar-chart--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-bar-chart__main-container{display:flex;gap:var(--gids-gap-200)}.gids-bar-chart__header{display:flex;justify-content:flex-end;align-items:center;width:100%;margin-bottom:var(--gids-padding-vertical-edge-to-element-200)}.gids-bar-chart__grid-layout{display:grid;grid-template-columns:auto 1fr;grid-template-rows:minmax(180px, 280px) auto auto;flex:1;width:100%;height:100%;box-sizing:border-box}.gids-bar-chart__y-axis-label{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:center;margin-right:var(--gids-padding-horizontal-edge-to-element-150);font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}.gids-bar-chart__chart-stage-container{grid-column:2;grid-row:1;position:relative;width:100%;height:100%;padding-left:var(--gids-container-padding-desktop);box-sizing:border-box}.gids-bar-chart__y-axis-scale-container{position:absolute;top:0;bottom:0;left:0;width:calc(var(--gids-container-padding-desktop) - var(--gids-padding-horizontal-edge-to-element-100));pointer-events:none}.gids-bar-chart__y-axis-scale-value{position:absolute;right:0;transform:translateY(50%)}.gids-bar-chart__chart-stage{position:relative;width:100%;height:100%;border-bottom:var(--gids-border-width-thin) solid var(--gids-color-border-default);box-sizing:border-box}.gids-bar-chart__chart-vector{display:block;width:100%;height:100%;overflow:visible}.gids-bar-chart__grid-line{stroke:var(--gids-color-border-default);stroke-width:0.5;fill:none}.gids-bar-chart{}.gids-bar-chart__bar{vector-effect:non-scaling-stroke;}.gids-bar-chart__bar.gids-bar-chart__series-bar-1{fill:var(--gids-color-icon-subtle)}.gids-bar-chart__bar.gids-bar-chart__series-bar-2{fill:var(--gids-color-icon-warning)}.gids-bar-chart__bar.gids-bar-chart__series-bar-3{fill:var(--gids-color-icon-danger)}.gids-bar-chart{}.gids-bar-chart__x-axis-scale-container{display:flex;grid-column:2;grid-row:2;justify-content:space-around;align-items:center;padding-left:var(--gids-container-padding-desktop);padding-top:var(--gids-padding-vertical-edge-to-element-100);box-sizing:border-box}.gids-bar-chart__x-axis-label{grid-column:2;grid-row:3;display:flex;justify-content:center;align-items:center;padding-top:var(--gids-padding-vertical-edge-to-element-100);font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);white-space:nowrap}.gids-bar-chart__scale-text{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit);color:var(--gids-color-text-subtlest);user-select:none;white-space:nowrap}.gids-bar-chart__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-bar-chart",{breakpoint:[1],legend:[1],chartData:[16],yAxisVisible:[4,"y-axis-visible"],xAxisLabel:[1,"x-axis-label"],yAxisLabel:[1,"y-axis-label"],dataPoints:[16],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],dataPoints:[{dataPointsChanged:0}],legend:[{legendChanged:0}],yAxisVisible:[{yAxisVisibilityChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["gids-bar-chart","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-bar-chart":customElements.get(t(a))||customElements.define(t(a),d);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||n()}}))}g();export{d as G,g as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,h as i,t as s}from"./p-Bf3p-DY2.js";import{GidsFilterWebUtils as l}from"@ganpatiinfo/gids-web-shared";import{G as n}from"./p-D4Pimu_8.js";import{d}from"./p-_SIWct9h.js";const{getGidsFilterClassNames:h}=l,r=e(class e extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.expanded=!1,this.type="none",this.filterItemType="primary",this.filterSelected=!1,this.filterDefaultSelected=!1,this.disabled=!1,this.size="sm",this.loading=!1,this.filterIndex=0,this.hasSlottedMenu=!1,this.hasItemListener=!1,this.suppressNextMenuClickSelection=!1,this.setupDefaultSelctedFilterEmission=()=>{this.setupDefaultSelectedNoneAllFilterEmission()},this.setupDefaultSelectedNoneAllFilterEmission=()=>{const t=`${this.filterId||"default"}_${this.value}`;if(this.filterDefaultSelected&&!e.emittedValuesTracker.has(t)&&("none"===this.type&&"secondary"===this.filterItemType||"all"===this.type)){e.emittedValuesTracker.add(t);const i={id:"1",filterId:this.filterId,value:this.value,title:this.value,disabled:this.disabled,selectedFilterMenuIndex:void 0,filterType:this.type,filterItemType:this.filterItemType,filterTitle:this.value,filterIndex:this.filterIndex,originalEvent:void 0,filterSelected:!0,filterDefaultSelected:this.filterDefaultSelected,hasFilterMenu:!1,isPlaceholderItem:!1};setTimeout((()=>{this.onFilterMenuItemChange?.(i)}),0)}},this.handleFilterPickerItemSelect=e=>{const{value:t,title:i,disabled:s,id:l,selectedIndex:n,isPlaceholderItem:d,defaultSelected:h}=e.detail;s||"string"!=typeof t||(this.suppressNextMenuClickSelection=!0,queueMicrotask((()=>{this.suppressNextMenuClickSelection=!1})),this.applySelection({id:l,filterId:this?.filterId,value:t,title:i,disabled:!1,selectedFilterMenuIndex:n,defaultSelected:h,filterType:this.type,filterItemType:this.filterItemType,filterTitle:i,filterIndex:this.filterIndex,hasFilterMenu:!0,originalEvent:e,filterSelected:!d,isPlaceholderItem:d||!1}))},this.handleMenuClick=e=>{if(this.suppressNextMenuClickSelection)return;const t=e.target;if(!(t instanceof Element))return;const i=t.closest(".gids-dropdown-item");if(!i||!this.hostElement.contains(i))return;if(i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;const s=i instanceof HTMLButtonElement?i.value:i.getAttribute("value")??"";if("string"!=typeof s||0===s.length)return;const l=i instanceof HTMLButtonElement?i.id:i.getAttribute("id")??"";if("string"!=typeof l||0===l.length)return;const n=i instanceof HTMLButtonElement?i.tabIndex:i.getAttribute("tabIndex")??"",d=i.getAttribute("is-placeholder-item")??"",h=i.querySelector(".gids-dropdown-item__label")||i.querySelector("span"),r=h?h.textContent?.trim():i.firstChild?.textContent?.trim()||s,a=!(!d||"true"!==d);this.applySelection({id:l,filterId:this.filterId,value:s,title:r,disabled:!1,selectedFilterMenuIndex:Number(n),defaultSelected:this.filterDefaultSelected,filterType:this.type,filterItemType:this.filterItemType,filterTitle:r,filterIndex:this.filterIndex,hasFilterMenu:!0,originalEvent:e,filterSelected:!a,isPlaceholderItem:a})},this.handleTriggerToggle=e=>{this.isInteractive()&&this.setExpandedState(!this.expanded,e)},this.handleFilterButtonClickToggle=e=>{if(!e.defaultPrevented)if(e.stopPropagation(),this.isMenuToggler())this.handleTriggerToggle(e);else{this.filterSelected=e.detail,!1===e?.detail&&this.handleFormReset(),this.applySelection({id:"1",filterId:this.filterId,value:this.value,title:this.value,disabled:this.disabled,selectedFilterMenuIndex:void 0,filterType:this.type,filterItemType:this.filterItemType,filterTitle:this.value,filterIndex:this.filterIndex,originalEvent:e,filterSelected:e.detail,filterDefaultSelected:this.filterDefaultSelected,hasFilterMenu:!1,isPlaceholderItem:!1});const t={expanded:!1,originalEvent:e};this.onToggle?.(t)}},this.handleFormReset=()=>{this.value=this.initialValue,this.selectedItemTitle=this.initialValue,this.filterSelected=!1,this.isMenuToggler()?this.setExpandedState(!1):this.expanded=!1},this.setFilterDropdownPosition=()=>{if(!this.hostElement)return;const e=this.hostElement.querySelector(".gids-filter__menu");if(!e)return;const t=window.innerWidth/2,i=this.hostElement.getBoundingClientRect();i.left+i.width/2>t?e.classList.add("gids-filter__menu--align-right"):e.classList.remove("gids-filter__menu--align-right")}}static{this.emittedValuesTracker=new Set}handleExpandedChange(e){e&&!this.isInteractive()&&(this.expanded=!1)}handleInteractivityChange(){!this.isInteractive()&&this.expanded&&this.setExpandedState(!1)}handleFilterTypeChange(e){this.type=e}handleFilterIdArrival(e){null!=e&&this.setupDefaultSelctedFilterEmission()}handleFilterSelectedChange(e){this.filterSelected=e}handleFilterDefaultSelectedChange(t){const i=`${this.filterId||"default"}_${this.value}`;t?(e.emittedValuesTracker.delete(i),this.setupDefaultSelctedFilterEmission()):e.emittedValuesTracker.delete(i)}connectedCallback(){this.attachItemListener(),this.attachFormListener()}componentDidLoad(){this.initialValue=this.value,this.evaluateSlottedMenuExistence(),null!=this.filterId&&this.setupDefaultSelctedFilterEmission()}disconnectedCallback(){this.detachItemListener(),this.detachFormListener()}getFilterButtonControl(){return this.hostElement.querySelector(".gids-button")}getItemElements(){return Array.from(this.hostElement.querySelectorAll(".gids-dropdown-item"))}evaluateSlottedMenuExistence(){const e=this.hostElement.querySelector(".gids-filter__menu");if(!e)return void(this.hasSlottedMenu=!1);const t=Array.from(e.childNodes).filter((e=>e.nodeType!==Node.COMMENT_NODE&&!(e.nodeType===Node.TEXT_NODE&&!e.textContent?.trim())));this.hasSlottedMenu=t.length>0}attachItemListener(){this.hasItemListener||(this.hostElement.addEventListener("onPressDropdownItem",this.handleFilterPickerItemSelect),this.hasItemListener=!0)}detachItemListener(){this.hasItemListener&&(this.hostElement.removeEventListener("onPressDropdownItem",this.handleFilterPickerItemSelect),this.hasItemListener=!1)}applySelection(e){this.value=e.value,this.selectedItemTitle="string"==typeof e.title?e.title:void 0,this.clearActive(),this.isMenuToggler()?this.setExpandedState(!1,this.coerceEvent(e.originalEvent)):this.expanded=!1,this.onFilterMenuItemChange?.(e),this.hostElement.dispatchEvent(new CustomEvent("gidsFilterPickerChange",{bubbles:!0,composed:!0,detail:e}))}clearActive(){this.getItemElements().forEach((e=>e.classList.remove("gids-dropdown-item--active")))}setExpandedState(e,t){const i=Boolean(e);if(this.setFilterDropdownPosition(),i&&!this.isInteractive())return;if(this.expanded===i)return;this.expanded=i,i||(this.clearActive(),this.syncFilterDisplayValue());const s={expanded:i,originalEvent:t};this.onToggle?.(s)}syncFilterDisplayValue(){const e=this.getFilterButtonControl();e&&e.value!==(this.selectedItemTitle??"")&&(e.value=this.selectedItemTitle??"")}attachFormListener(){const e=this.hostElement.closest("form");this.patternForm!==e&&(this.patternForm&&this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=e??void 0,this.patternForm?.addEventListener("reset",this.handleFormReset))}detachFormListener(){this.patternForm&&(this.patternForm.removeEventListener("reset",this.handleFormReset),this.patternForm=void 0)}isInteractive(){return!this.disabled}coerceEvent(e){if("undefined"!=typeof Event&&null!==e)return e instanceof Event?e:void 0}isMenuToggler(){return("none"===this.type||"more"===this.type)&&this.hasSlottedMenu}handleWindowClick(e){this.expanded&&(e.composedPath().includes(this.hostElement)||this.setExpandedState(!1,e))}render(){const e=this.expanded&&this.isInteractive(),t=h({expanded:e}),s=this.isMenuToggler(),l="string"==typeof this.filterPickerId?this.filterPickerId:void 0,d=l?`${l}__menu`:void 0,r=this.selectedItemTitle??this.value??"",a="more"===this.type,o="all"===this.type,c="none"===this.type;return i("div",{key:"0c7e5ffe45a9e1053e3c248801ff315e96afb70c",class:t,"aria-control":d??""},i("gids-toggle-button",{key:"7afda6023027219c4d1585bf535327b6ed1d0dee",id:l,name:this.name,expanded:e,value:r,disabled:this.disabled,size:this.size,loading:this.loading,tabIndex:this.filterIndex,defaultSelected:this.filterDefaultSelected,selected:this.filterSelected,onSelect:this.handleFilterButtonClickToggle},a||o?i(n,{name:a?"options":"filter",size:this.size,appearance:"regular",alt:"",slot:"leadingIcon"}):void 0,c||o?r:void 0,s&&!a?i(n,{name:"chevron-down",size:this.size,appearance:"regular",alt:"",slot:"trailingIcon"}):void 0),i("div",{key:"f4ded16cd2c432b4361c32de414af31b4c7d44c5",class:"gids-filter__menu",id:d,role:"pickerbox",onClick:this.handleMenuClick},i("slot",{key:"593ed13b9dab21531b9888534697f92e39bbed95",onSlotchange:()=>this.evaluateSlottedMenuExistence()})))}get hostElement(){return this}static get watchers(){return{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],type:[{handleFilterTypeChange:0}],filterId:[{handleFilterIdArrival:0}],filterSelected:[{handleFilterSelectedChange:0}],filterDefaultSelected:[{handleFilterDefaultSelectedChange:0}]}}static get style(){return".gids-filter{position:relative}.gids-filter__menu{position:absolute;inset-inline:0;top:calc(100% + var(--gids-gap-050));z-index:3;display:none;flex-direction:column;align-self:stretch;min-width:var(--gids-width-2-xs);min-height:55px;max-height:15rem;overflow-x:hidden;overflow-y:auto;background-color:var(--gids-elevation-surface-overlay-default);box-shadow:var(--gids-elevation-shadow-overlay);border-radius:var(--gids-border-radius-lg);left:0;right:auto}.gids-filter__menu--align-right{left:auto !important;right:0 !important}.gids-filter__menu>*{flex-shrink:0}.gids-filter--expanded .gids-filter__menu{display:flex}"}},[260,"gids-filter",{name:[1],filterId:[1025,"filter-id"],filterPickerId:[1,"filter-picker-id"],expanded:[4],type:[1],filterItemType:[1,"filter-item-type"],value:[1],filterSelected:[1540,"filter-selected"],filterDefaultSelected:[4,"filter-default-selected"],disabled:[4],size:[1],loading:[4],filterIndex:[2,"filter-index"],onFilterMenuItemChange:[16],onToggle:[16],selectedItemTitle:[32],hasSlottedMenu:[32]},[[8,"click","handleWindowClick"]],{expanded:[{handleExpandedChange:0}],disabled:[{handleInteractivityChange:0}],type:[{handleFilterTypeChange:0}],filterId:[{handleFilterIdArrival:0}],filterSelected:[{handleFilterSelectedChange:0}],filterDefaultSelected:[{handleFilterDefaultSelectedChange:0}]}]);function a(){"undefined"!=typeof customElements&&["gids-filter","gids-toggle-button"].forEach((e=>{switch(e){case"gids-filter":customElements.get(s(e))||customElements.define(s(e),r);break;case"gids-toggle-button":customElements.get(s(e))||d()}}))}a();export{r as G,a as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as s,c as i,h as n,d}from"./p-Bf3p-DY2.js";import{G as a}from"./p-UVmSPzTd.js";import{g as c}from"./p-B2zUuNXz.js";const l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.select=i(this,"select"),this._toggle=this._toggle.bind(this)}handleSelctedChange(e){this.selected!==e&&(this.selected=e)}connectedCallback(){const e=c();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e),this.selected=e}render(){return n(d,{key:"510886303fd853bf5c24fb5f38fd8485f831e72c"},n("style",{key:"8e431f50396bf87f0475788e2cd3615d28cc24c7"},`:host {\n display: ${"full"===this.width?"block":"inline-block"}\n }`),n(a,{key:"e2292ad4d60014b8d412157fdb36e5a2fa9cfd79",appearance:this.appearance,size:this.size,width:this.width,disabled:this.disabled,onClick:this._toggle,"aria-pressed":this.selected?"true":"false",leadingIcon:n("slot",{name:"leadingIcon"}),trailingIcon:n("slot",{name:"trailingIcon"}),forceIconOnly:this._onlyHasLeadingIcon()},n("slot",{key:"0f805e868de82ad388f4781bacf36e860395f3fa"})))}_onlyHasLeadingIcon(){const e=this._el.childNodes;return 1===e.length&&e[0]instanceof window.Element&&"leadingIcon"===e[0].slot}get _el(){return this}static get watchers(){return{selected:[{handleSelctedChange:0}]}}},[257,"gids-toggle-button",{disabled:[516],appearance:[513],size:[513],width:[513],defaultSelected:[516,"default-selected"],selected:[1540]},void 0,{selected:[{handleSelctedChange:0}]}]);function o(){"undefined"!=typeof customElements&&["gids-toggle-button"].forEach((t=>{"gids-toggle-button"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}o();export{l as G,o as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsActivityGaugeWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as g}from"./p-DMNS1d8v.js";import{d as l}from"./p-Cn-t3SGc.js";import{d as r}from"./p-BQCMjWpK.js";const{getGidsActivityGaugeClassNames:n}=s,o=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.chartData=[],this.label="",this.size="xs",this.legend="none",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendChanged(t){this.legend=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:240}render(){if(this.chartLoading)return e("div",{class:"gids-activity-gauge__no-data"},e(g,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.map((t=>t.value||0)),a=t.length>0?Math.max(...t):0,i=Math.max(1e3,a),s=i.toLocaleString(),l=n({breakpoint:this.breakpoint}),r=[{radius:42,strokeWidth:5.5},{radius:34,strokeWidth:5.5},{radius:26,strokeWidth:5.5}],o="xxs"===this.size,d="string"==typeof this.label&&""!==this.label.trim(),h=this.legend&&"right"===this.legend&&"mobile"!==this.breakpoint,p=this.legend&&("bottom"===this.legend||"mobile"===this.breakpoint);return e("div",{class:l},e("div",{class:"gids-activity-gauge__main-container"},e("div",{class:"gids-activity-gauge__chart-stage-container"},e("div",{class:`gids-activity-gauge__svg-wrapper gids-activity-gauge--size-${this.size}`},e("svg",{viewBox:"0 0 100 100",class:"gids-activity-gauge__chart-vector"},this.chartData.slice(0,3).map(((t,a)=>{const s=r[a]||r[0]||{radius:26,strokeWidth:5.5},g=i>0?Math.min(Math.max((t.value||0)/i,0),1):0,l=2*Math.PI*s.radius,n=`${g*l} ${l}`;return e("g",{key:t.label||a},e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:"gids-activity-gauge__track-background"}),e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:`gids-activity-gauge__segment gids-activity-gauge__segment-series-${a+1}`,"stroke-dasharray":n,"stroke-dashoffset":"0",transform:"rotate(-90 50 50)"}))}))),e("div",{class:"gids-activity-gauge__center-content"},d&&!o?e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label):null,e("span",{class:`gids-activity-gauge__value-common gids-activity-gauge__value-${this.size}`},s)))),h?e("div",{class:"gids-activity-gauge__sidebar"},e("gids-chart-legend",{orientation:"vertical"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label))))):null),o&&d?e("div",{class:"gids-activity-gauge__bottom-content"},e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label)):null,p?e("div",{class:"gids-activity-gauge__legend-container gids-activity-gauge__legend-container--bottom"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null)}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-activity-gauge__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-activity-gauge__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-activity-gauge--size-xxs{width:180px;height:180px}.gids-activity-gauge--size-xs{width:220px;height:220px}.gids-activity-gauge--size-sm{width:260px;height:260px}.gids-activity-gauge--size-md{width:300px;height:300px}.gids-activity-gauge--size-lg{width:340px;height:340px}.gids-activity-gauge__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-activity-gauge__chart-vector{display:block;width:100%;height:100%}.gids-activity-gauge__track-background{fill:none;stroke:var(--gids-color-background-brand-subtlest-default);stroke-linecap:round}.gids-activity-gauge__segment{fill:none;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-1{stroke:var(--gids-color-icon-subtle)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-2{stroke:var(--gids-color-icon-warning)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-3{stroke:var(--gids-color-icon-danger)}.gids-activity-gauge__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-activity-gauge__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-md{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-lg{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-common{color:var(--gids-color-text-subtlest)}.gids-activity-gauge__value-xxs{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__value-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-common{color:var(--gids-color-text-default)}.gids-activity-gauge__bottom-content{display:flex;justify-content:center;align-items:center;text-align:center}.gids-activity-gauge__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-activity-gauge",{breakpoint:[1],chartData:[16],label:[1],size:[1],legend:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-activity-gauge","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-activity-gauge":customElements.get(t(a))||customElements.define(t(a),o);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||r()}}))}d();export{o as G,d}
|
|
1
|
+
import{t,p as a,H as i,h as e}from"./p-Bf3p-DY2.js";import{GidsActivityGaugeWebUtils as s}from"@ganpatiinfo/gids-web-shared";import{G as g}from"./p-DMNS1d8v.js";import{d as l}from"./p-BCVFQSjK.js";import{d as r}from"./p-C3xv7tfs.js";const{getGidsActivityGaugeClassNames:n}=s,o=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.breakpoint="desktop",this.chartData=[],this.label="",this.size="xs",this.legend="none",this.chartLoaderSize="lg",this.chartLoading=!1,this.width=0,this.height=0}chartDataChanged(){this.updateDimensions()}legendChanged(t){this.legend=t}componentDidLoad(){this.updateDimensions(),this.resizeObserver=new ResizeObserver((()=>this.updateDimensions())),this.hostElement.parentElement&&this.resizeObserver.observe(this.hostElement.parentElement)}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}updateDimensions(){const t=this.hostElement.getBoundingClientRect();this.width=t.width,this.height=t.height>0?t.height:240}render(){if(this.chartLoading)return e("div",{class:"gids-activity-gauge__no-data"},e(g,{label:this.chartLoadingTitle,supportingText:this.chartLoadingSupportingText,size:this?.chartLoaderSize??"lg"}));const t=this.chartData.map((t=>t.value||0)),a=t.length>0?Math.max(...t):0,i=Math.max(1e3,a),s=i.toLocaleString(),l=n({breakpoint:this.breakpoint}),r=[{radius:42,strokeWidth:5.5},{radius:34,strokeWidth:5.5},{radius:26,strokeWidth:5.5}],o="xxs"===this.size,d="string"==typeof this.label&&""!==this.label.trim(),h=this.legend&&"right"===this.legend&&"mobile"!==this.breakpoint,p=this.legend&&("bottom"===this.legend||"mobile"===this.breakpoint);return e("div",{class:l},e("div",{class:"gids-activity-gauge__main-container"},e("div",{class:"gids-activity-gauge__chart-stage-container"},e("div",{class:`gids-activity-gauge__svg-wrapper gids-activity-gauge--size-${this.size}`},e("svg",{viewBox:"0 0 100 100",class:"gids-activity-gauge__chart-vector"},this.chartData.slice(0,3).map(((t,a)=>{const s=r[a]||r[0]||{radius:26,strokeWidth:5.5},g=i>0?Math.min(Math.max((t.value||0)/i,0),1):0,l=2*Math.PI*s.radius,n=`${g*l} ${l}`;return e("g",{key:t.label||a},e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:"gids-activity-gauge__track-background"}),e("circle",{cx:"50",cy:"50",r:s.radius,"stroke-width":s.strokeWidth,class:`gids-activity-gauge__segment gids-activity-gauge__segment-series-${a+1}`,"stroke-dasharray":n,"stroke-dashoffset":"0",transform:"rotate(-90 50 50)"}))}))),e("div",{class:"gids-activity-gauge__center-content"},d&&!o?e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label):null,e("span",{class:`gids-activity-gauge__value-common gids-activity-gauge__value-${this.size}`},s)))),h?e("div",{class:"gids-activity-gauge__sidebar"},e("gids-chart-legend",{orientation:"vertical"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"vertical"},t.label))))):null),o&&d?e("div",{class:"gids-activity-gauge__bottom-content"},e("span",{class:`gids-activity-gauge__label-common gids-activity-gauge__label-${this.size}`},this.label)):null,p?e("div",{class:"gids-activity-gauge__legend-container gids-activity-gauge__legend-container--bottom"},e("gids-chart-legend",{orientation:"horizontal"},this.chartData.slice(0,3).map(((t,a)=>e("gids-chart-legend-item",{key:t.label,seriesType:`${a+1}`,orientation:"horizontal"},t.label))))):null)}get hostElement(){return this}static get watchers(){return{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}}static get style(){return":host{display:block;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;box-sizing:border-box}.gids-activity-gauge--breakpoint-mobile{max-width:var(--gids-width-xs)}.gids-activity-gauge__main-container{display:inline-flex;justify-content:center;gap:var(--gids-gap-200);width:100%;height:100%}.gids-activity-gauge__svg-wrapper{position:relative;display:block;flex-shrink:0}.gids-activity-gauge--size-xxs{width:180px;height:180px}.gids-activity-gauge--size-xs{width:220px;height:220px}.gids-activity-gauge--size-sm{width:260px;height:260px}.gids-activity-gauge--size-md{width:300px;height:300px}.gids-activity-gauge--size-lg{width:340px;height:340px}.gids-activity-gauge__chart-stage-container{display:flex;justify-content:center;align-items:center}.gids-activity-gauge__chart-vector{display:block;width:100%;height:100%}.gids-activity-gauge__track-background{fill:none;stroke:var(--gids-color-background-brand-subtlest-default);stroke-linecap:round}.gids-activity-gauge__segment{fill:none;stroke-linecap:round;transition:stroke-dasharray 0.4s ease-out}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-1{stroke:var(--gids-color-icon-subtle)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-2{stroke:var(--gids-color-icon-warning)}.gids-activity-gauge__segment.gids-activity-gauge__segment-series-3{stroke:var(--gids-color-icon-danger)}.gids-activity-gauge__center-content{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}.gids-activity-gauge__label-xxs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-xs{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-sm{font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}.gids-activity-gauge__label-md{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-lg{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__label-common{color:var(--gids-color-text-subtlest)}.gids-activity-gauge__value-xxs{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit)}.gids-activity-gauge__value-xs{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-sm{font-family:var(--gids-typography-display-x-small__font-family);font-size:var(--gids-typography-display-x-small__font-size);font-weight:var(--gids-typography-display-x-small__font-weight);letter-spacing:var(--gids-typography-display-x-small__letter-spacing);line-height:var(--gids-typography-display-x-small__line-height);text-transform:var(--gids-typography-display-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-x-small__font-variant-caps, inherit)}.gids-activity-gauge__value-md{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-lg{font-family:var(--gids-typography-display-small__font-family);font-size:var(--gids-typography-display-small__font-size);font-weight:var(--gids-typography-display-small__font-weight);letter-spacing:var(--gids-typography-display-small__letter-spacing);line-height:var(--gids-typography-display-small__line-height);text-transform:var(--gids-typography-display-small__text-transform, inherit);font-variant-caps:var(--gids-typography-display-small__font-variant-caps, inherit)}.gids-activity-gauge__value-common{color:var(--gids-color-text-default)}.gids-activity-gauge__bottom-content{display:flex;justify-content:center;align-items:center;text-align:center}.gids-activity-gauge__no-data{display:flex;align-items:center;justify-content:center;padding:var(--gids-padding-vertical-edge-to-element-300) var(--gids-padding-horizontal-edge-to-element-100);width:100%;height:100%;min-height:200px;color:var(--gids-color-text-subtlest);border:var(--gids-border-width-thin) dashed var(--gids-color-border-default);border-radius:var(--gids-border-radius-md)}"}},[0,"gids-activity-gauge",{breakpoint:[1],chartData:[16],label:[1],size:[1],legend:[1],chartLoaderSize:[1,"chart-loader-size"],chartLoading:[4,"chart-loading"],chartLoadingTitle:[1,"chart-loading-title"],chartLoadingSupportingText:[1,"chart-loading-supporting-text"],width:[32],height:[32]},void 0,{chartData:[{chartDataChanged:0}],legend:[{legendChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-activity-gauge","gids-chart-legend","gids-chart-legend-item"].forEach((a=>{switch(a){case"gids-activity-gauge":customElements.get(t(a))||customElements.define(t(a),o);break;case"gids-chart-legend":customElements.get(t(a))||l();break;case"gids-chart-legend-item":customElements.get(t(a))||r()}}))}d();export{o as G,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as s,h as e,d as a}from"./p-Bf3p-DY2.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-D4Pimu_8.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"57aae828a0cdd8ac1044cdafab34dc0f76731814"},e("div",{key:"3455d9ff33bf012679e0c25869cbdcf43ea40742",class:l()},e("div",{key:"ca6948c95470527551c40ef14ae5af5e40a0e301",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"caac19c05af1b41de4e6301c3c7060bbb995cb5c",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"9151fef3965568bd2f9e7fc9971b56791b681de6",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"b2e41f4ccb83f9c3b2f310250a28f68758689649",class:"gids-field__control"},e("slot",{key:"faad5db257df90576e73fb7383c20ecc796c3b43",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"e4bc41ccde6d8713e599d6595aceeb7d60a833ed",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
|
|
1
|
+
import{t,p as i,H as s,h as e,d as a}from"./p-Bf3p-DY2.js";import{GidsFieldWebUtils as o}from"@ganpatiinfo/gids-web-shared";import{G as r}from"./p-D4Pimu_8.js";import{g as n}from"./p-B2zUuNXz.js";const{getGidsFieldClassNames:l}=o,d=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.status="implicit",this._hasLabel=!1,this._controlListenerTargets=[],this._controlTouched=!1,this._handleLabelSlotChange=()=>{this._hasLabel=(this._labelSlot?.assignedElements()?.length??0)>0},this._setLabelSlot=t=>{this._labelSlot=t??void 0,this._handleLabelSlotChange()},this._setControlSlot=t=>{this._controlSlot=t??void 0,this._handleControlSlotChange()},this._handleControlSlotChange=()=>{const t=this._controlSlot?.assignedNodes({flatten:!0})??[],i=this._findTextControl(t);this._attachControlElement(i)},this._handleControlValueInput=t=>{if(!this._controlTouched){const i=t.target;i instanceof HTMLInputElement&&("checkbox"===i.type||"radio"===i.type)&&(this._controlTouched=!0)}this._updateControlValidationState()},this._handleControlBlur=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleControlInvalid=()=>{this._controlTouched=!0,this._updateControlValidationState()},this._handleFormReset=()=>{this._controlTouched=!1,this._updateControlValidationState()},this._handleFormSubmit=()=>{this._controlTouched=!0,this._updateControlValidationState()}}_handleStatusChange(){this._isImplicitStatus()||void 0===this._controlValidationMessage?this._updateControlValidationState():this._controlValidationMessage=void 0}connectedCallback(){const t=n();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){setTimeout((()=>{this._handleControlSlotChange(),this._handleLabelSlotChange()}))}async reScanControl(){this._handleControlSlotChange()}disconnectedCallback(){this._detachControlElement(),this._detachFormListeners()}render(){const t=this._hasStatusText(),i=void 0!==this._controlValidationMessage?this._controlValidationMessage:this._shouldRenderExplicitStatusText()?this.statusText:void 0,s=this._getCurrentStatus(),o=["gids-field__status-text"];if(t){const t=this._getStatusModifierClass(s,"gids-field__status-text");null!=t&&o.push(t)}return e(a,{key:"b4c75ae8db2c6a526bca9abbdefa794697f79d6e"},e("div",{key:"7f1d56122271224e78b84482bbd1aa31dee0d6b5",class:l()},e("div",{key:"21986a7bc03029da85eeef02af059b175c208bb9",class:"gids-field__header",hidden:!this._hasLabelContent()},e("slot",{key:"2c3e7e5e7ebc8b5b30157e755422267cffeb9333",ref:this._setLabelSlot,name:"label",onSlotchange:this._handleControlSlotChange}),e("div",{key:"db267881b537d312154b4b7b51c0816595b5c064",class:"gids-field__count","aria-live":"polite"},this.count)),e("div",{key:"34ee7450b5bce2c5ae58d151a6503f1079fdfc7e",class:"gids-field__control"},e("slot",{key:"d5a7c20818abf658fd1651d90bc7fe552ff4366e",ref:this._setControlSlot,onSlotchange:this._handleControlSlotChange})),e("p",{key:"2859a75cb1f15eb4b998a8c9d0642b3a260967bc",class:"gids-field__supporting-text",hidden:!this._shouldShowHelperText()},this.helperText),t?e("p",{class:o.join(" "),role:"status","aria-live":"polite"},this._renderStatusIcon(s),void 0!==i?e("span",null,i):null):null))}_hasLabelContent(){return this._hasLabel}_hasHelperText(){return this._hasText(this.helperText)}_shouldShowHelperText(){return!!this._hasHelperText()&&!this._hasStatusText()}_hasStatusText(){return this._isImplicitStatus()?void 0!==this._controlValidationMessage:this._shouldRenderExplicitStatusText()}_shouldRenderExplicitStatusText(){return!this._isImplicitStatus()&&"default"!==this.status&&this._hasText(this.statusText)}_renderStatusIcon(t){if(!this._hasStatusText())return;const i=this._getStatusIconName(t);if(void 0===i)return;const s=["gids-field__status-icon"],a=this._getStatusModifierClass(t,"gids-field__status-icon");null!=a&&s.push(a);let o=t;return"error"===t&&(o="danger"),"success"===t&&(o="positive"),e(r,{appearance:"filled",size:"sm",alt:"",name:i,class:s.join(" "),style:{"--gidsIcon-color":`var(--gids-color-icon-${o})`}})}_getCurrentStatus(){return this._isImplicitStatus()&&null!=this._controlValidationMessage?"error":this.status??"implicit"}_getStatusIconName(t){if("implicit"!==t)return"success"===t?"positive":"error"===t?"danger":void 0}_isImplicitStatus(){return"implicit"===this.status||void 0===this.status}_hasText(t){return"string"==typeof t&&t.trim().length>0}_getStatusModifierClass(t,i){if("implicit"!==t)return`${i}--${t}`}_attachControlElement(t){if(this._controlElement===t)return this._updateControlValidationState(),void this._attachFormListeners(t?.form??this._el.closest("form"));if(this._detachControlElement(),this._controlElement=t,this._resetControlValidationState(),this._controlListenerTargets=[],t){const i=this._getControlListenerTargets(t);this._controlListenerTargets=i,i.forEach((t=>{t.addEventListener("input",this._handleControlValueInput),t.addEventListener("change",this._handleControlValueInput),t.addEventListener("blur",this._handleControlBlur,!0),t.addEventListener("invalid",this._handleControlInvalid)})),this._attachFormListeners(t.form??this._el.closest("form"))}this._updateControlValidationState()}_detachControlElement(){this._controlListenerTargets.length>0&&(this._controlListenerTargets?.forEach((t=>{t.removeEventListener("input",this._handleControlValueInput),t.removeEventListener("change",this._handleControlValueInput),t.removeEventListener("blur",this._handleControlBlur,!0),t.removeEventListener("invalid",this._handleControlInvalid)})),this._controlListenerTargets=[]),this._controlElement=null,this._resetControlValidationState(),this._detachFormListeners()}_getControlListenerTargets(t){return t instanceof HTMLInputElement&&"radio"===t.type&&null!=t.name?this._getRadioGroupControls(t):[t]}_getRadioGroupControls(t){const i=t.form;if(i&&null!=t.name){const s=i.elements.namedItem(t.name);if(s instanceof RadioNodeList){const t=Array.from(s).filter((t=>t instanceof HTMLInputElement&&"radio"===t.type&&this._el.contains(t)));if(t.length>0)return t}}if(null!=t.name){const i=`input[type="radio"][name="${CSS.escape(t.name)}"]`,s=Array.from(this._el.querySelectorAll(i));if(s.length>0)return s}return[t]}_attachFormListeners(t){void 0!==t&&(null!==t?t!==this._formElement&&(this._detachFormListeners(),this._formElement=t,this._formElement.addEventListener("reset",this._handleFormReset),this._formElement.addEventListener("submit",this._handleFormSubmit)):this._detachFormListeners())}_detachFormListeners(){this._formElement&&(this._formElement.removeEventListener("reset",this._handleFormReset),this._formElement.removeEventListener("submit",this._handleFormSubmit),this._formElement=null)}_findTextControl(t){for(const i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;const t=i,s=this._asTextControl(t);if(null!==s)return s;const e=t.querySelector("input, textarea");if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e}return null}_asTextControl(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}_resetControlValidationState(){this._controlTouched=!1,void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}_updateControlValidationState(){if(!this._isImplicitStatus())return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const t=this._controlElement;if(!t||t.disabled)return void(void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0));const i=t.validationMessage?.trim()??"";this._controlTouched&&t.matches(":user-invalid")&&i.length>0?this._controlValidationMessage!==i&&(this._controlValidationMessage=i):void 0!==this._controlValidationMessage&&(this._controlValidationMessage=void 0)}get _el(){return this}static get watchers(){return{status:[{_handleStatusChange:0}]}}static get style(){return".gids-field{display:flex;flex-direction:column;gap:var(--gids-gap-075)}.gids-field__header{display:flex;gap:var(--gids-gap-100);align-items:flex-start}.gids-field__header[hidden]{display:none}.gids-field__count{margin-left:auto;color:var(--gids-color-text-subtle);text-align:right;white-space:nowrap;font-family:var(--gids-typography-label-x-small__font-family);font-size:var(--gids-typography-label-x-small__font-size);font-weight:var(--gids-typography-label-x-small__font-weight);letter-spacing:var(--gids-typography-label-x-small__letter-spacing);line-height:var(--gids-typography-label-x-small__line-height);text-transform:var(--gids-typography-label-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-x-small__font-variant-caps, inherit)}:host([disabled]) .gids-field__count{color:var(--gids-color-text-disabled)}.gids-field__control{display:flex;flex-direction:column;gap:var(--gids-gap-050)}.gids-field__supporting-text,.gids-field__status-text{margin:0;padding-top:var(--gids-padding-vertical-edge-to-element-050);font-family:var(--gids-typography-paragraph-x-small__font-family);font-size:var(--gids-typography-paragraph-x-small__font-size);font-weight:var(--gids-typography-paragraph-x-small__font-weight);letter-spacing:var(--gids-typography-paragraph-x-small__letter-spacing);line-height:var(--gids-typography-paragraph-x-small__line-height);text-transform:var(--gids-typography-paragraph-x-small__text-transform, inherit);font-variant-caps:var(--gids-typography-paragraph-x-small__font-variant-caps, inherit)}.gids-field__supporting-text{color:var(--gids-color-text-subtlest)}.gids-field__status-text{display:flex;align-items:flex-start;gap:var(--gids-gap-050)}.gids-field__status-text .gids-field__status-icon{margin-top:max(0px, -1 * (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-text>span{margin-top:max(0px, (var(--gids-size-160) - var(--gids-typograpy-paragraph-x-small__line-height) * var(--gids-typograpy-paragraph-x-small__font-size)) / 2)}.gids-field__status-icon{flex-shrink:0}.gids-field__status-text--information{color:var(--gids-color-text-information);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--information{--gidsIcon-color:$icon-color}.gids-field__status-text--success{color:var(--gids-color-text-positive);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--success{--gidsIcon-color:$icon-color}.gids-field__status-text--warning{color:var(--gids-color-text-warning);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--warning{--gidsIcon-color:$icon-color}.gids-field__status-text--error{color:var(--gids-color-text-danger);--gids-field-status-icon-color:$icon-color}.gids-field__status-icon--error{--gidsIcon-color:$icon-color}"}},[257,"gids-field",{disabled:[516],count:[513],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],_controlValidationMessage:[32],_hasLabel:[32],reScanControl:[64]},void 0,{status:[{_handleStatusChange:0}]}]);function h(){"undefined"!=typeof customElements&&["gids-field"].forEach((i=>{"gids-field"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}h();export{d as G,h as d}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsBasicTableBodyWebProps, GidsBasicTableCellTypographyStyle } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
4
|
+
type GidsBasicTableBodyBaseWebProps = GidsBasicTableBodyWebProps<GidsBasicTableCellTypographyStyle, IconName, IconAppearance> & Omit<JSXBase.IntrinsicElements['tbody'], 'children'>;
|
|
5
|
+
export type GidsBasicTableBodyProps = GidsBasicTableBodyBaseWebProps;
|
|
6
|
+
export declare const GidsBasicTableBody: ({ width, tableBodyData, tableBorders, rowAppearance, rowLabelTypography, rowTextAlignment, class: className, }: GidsBasicTableBodyProps) => any;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GidsBasicTableCellTypographyStyle, type GidsBasicTableCellWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
4
|
+
export type GidsBasicTableCellProps = GidsBasicTableCellWebProps<GidsBasicTableCellTypographyStyle, IconName, IconAppearance> & Omit<JSXBase.IntrinsicElements['td'] & JSXBase.IntrinsicElements['th'], 'children'>;
|
|
5
|
+
export declare const GidsBasicTableCell: ({ id, uniqueKey, extraData, label, cellDataType, displayTags, width, appearance, borderSides, borderRadiusSides, textAlignment, labelTypography, isHeaderCell, class: className, ...restProps }: GidsBasicTableCellProps) => any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { type GidsBasicTableHeadWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
4
|
+
import { GidsSearchBarProps } from '../GidsSearchBar/GidsSearchBar';
|
|
5
|
+
import { ClassValue } from 'clsx';
|
|
6
|
+
type GidsBasicTableHeadBaseWebProps = Omit<GidsBasicTableHeadWebProps<VNode, Event, VNode, Omit<JSXBase.IntrinsicElements['input'], 'ref'>>, 'children'> & Pick<GidsSearchBarProps, 'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'onGidsSearchBarClear'>;
|
|
7
|
+
export interface GidsBasicTableHeadProps extends GidsBasicTableHeadBaseWebProps {
|
|
8
|
+
className?: ClassValue;
|
|
9
|
+
}
|
|
10
|
+
export declare const GidsBasicTableHead: ({ actionGroup, allFiltersTabVisible, moreFiltersTabVisible, clearAllFiltersVisible, clearAllFiltersButtonAppearance, primaryFilters, secondaryFilters, filterSize, filterAllIsDefaultSelected, dropdownDividerVisible, onToggleActionBarAllFilter, onToggleActionBarDropdownFilter, onToggleActionBarMoreFilter, onToggleActionBarNoneFilter, onDropdownSelectionActionBarFilterChange, onMoreSelectionActionBarFilterChange, onClearAllFiltersButton, actionBarDisabled, searchDisabled, allFiltersData, moreFiltersData, searchVisible, filtersVisible, childrenPosition, tabVisible, tabProps, borderSides, borderRadiusSides, leadingIcon, leadingLabel, trailingLabel, loading, readOnly, onGidsSearchBarClear, onChange, onInput, onFocus, onBlur, value, inputProps, className, headAppearance, ...restProps }: GidsBasicTableHeadProps, children: VNode) => any;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsBasicTableCellTypographyStyle, GidsBasicTableHeaderWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
4
|
+
export type GidsBasicTableHeaderProps = GidsBasicTableHeaderWebProps<GidsBasicTableCellTypographyStyle, IconName, IconAppearance> & Omit<JSXBase.IntrinsicElements['thead'], 'children'>;
|
|
5
|
+
export declare const GidsBasicTableHeader: ({ width, headerCells, appearance, labelTypography, textAlignment, layout, class: className, ...restProps }: GidsBasicTableHeaderProps) => any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
2
|
+
import { GidsBasicTableCellTypographyStyle, type GidsBasicTableRowWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
4
|
+
export type GidsBasicTableRowProps = GidsBasicTableRowWebProps<GidsBasicTableCellTypographyStyle, IconName, IconAppearance> & Omit<JSXBase.IntrinsicElements['tr'], 'children'>;
|
|
5
|
+
export declare const GidsBasicTableRow: ({ width, layout, rows, isHeaderRow, class: className, ...restProps }: GidsBasicTableRowProps) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VNode } from '../../../stencil-public-runtime';
|
|
2
|
+
import { JSXBase } from '../../../stencil-public-runtime';
|
|
3
|
+
import { GidsBasicTableCellTypographyStyle, GidsBsTableWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
4
|
+
import { GidsBasicTableHeadProps } from '../GidsBasicTableHead/GidsBasicTableHead';
|
|
5
|
+
import { ClassValue } from 'clsx';
|
|
6
|
+
import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
7
|
+
type GidsBsTableBaseWebProps = Omit<GidsBsTableWebProps<GidsBasicTableCellTypographyStyle, IconName, IconAppearance, VNode, Event, VNode, Omit<JSXBase.IntrinsicElements['input'], 'ref'>>, 'children'> & GidsBasicTableHeadProps;
|
|
8
|
+
export interface GidsBsTableProps extends GidsBsTableBaseWebProps {
|
|
9
|
+
className?: ClassValue;
|
|
10
|
+
}
|
|
11
|
+
export declare const GidsBsTable: ({ topHeaderCells, tableBody, width, isTopHeaderVisible, isHeadVisible, topHeaderAppearance, topHeaderLabelTypography, topHeaderTextAlignment, rowAppearance, rowLabelTypography, rowTextAlignment, tableBorders, tableBorderRadius, tableBodyMaxHeight, className, actionGroup, allFiltersTabVisible, moreFiltersTabVisible, clearAllFiltersVisible, clearAllFiltersButtonAppearance, primaryFilters, secondaryFilters, filterSize, filterAllIsDefaultSelected, dropdownDividerVisible, onToggleActionBarAllFilter, onToggleActionBarDropdownFilter, onToggleActionBarMoreFilter, onToggleActionBarNoneFilter, onDropdownSelectionActionBarFilterChange, onMoreSelectionActionBarFilterChange, onClearAllFiltersButton, actionBarDisabled, searchDisabled, allFiltersData, moreFiltersData, searchVisible, filtersVisible, childrenPosition, tabVisible, tabProps, headBorderSides, headBorderRadiusSides, leadingIcon, leadingLabel, trailingLabel, loading, readOnly, onGidsSearchBarClear, onChange, onInput, onFocus, onBlur, headValue, inputProps, headAppearance, ...restProps }: GidsBsTableProps, children: VNode) => HTMLDivElement;
|
|
12
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { GidsActionBarFilterToggleEventDetail, GidsButtonSize, GidsActionBarFilterSelectEventDetail, GidsActionBarPrimaryFilters, GidsActionBarSecondaryFilters, GidsActionBarMoreFilters, GidsActionBarAllFilters, GidsButtonAppearance } from '@ganpatiinfo/gids-core-shared';
|
|
1
|
+
import type { GidsActionBarFilterToggleEventDetail, GidsButtonSize, GidsActionBarFilterSelectEventDetail, GidsActionBarPrimaryFilters, GidsActionBarSecondaryFilters, GidsActionBarMoreFilters, GidsActionBarAllFilters, GidsButtonAppearance, GidsActionBarClearFiltersEventDetail } from '@ganpatiinfo/gids-core-shared';
|
|
2
2
|
import { type GidsActionBarWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
3
|
export declare class GidsActionBar implements GidsActionBarWebProps<Event> {
|
|
4
4
|
actionGroup?: boolean;
|
|
5
5
|
allFiltersTabVisible?: boolean;
|
|
6
6
|
moreFiltersTabVisible?: boolean;
|
|
7
7
|
clearAllFiltersVisible?: boolean;
|
|
8
|
+
filterAllIsDefaultSelected?: boolean;
|
|
8
9
|
clearAllFiltersButtonAppearance?: GidsButtonAppearance;
|
|
9
10
|
primaryFilters?: GidsActionBarPrimaryFilters[];
|
|
10
11
|
secondaryFilters?: GidsActionBarSecondaryFilters[];
|
|
@@ -19,9 +20,10 @@ export declare class GidsActionBar implements GidsActionBarWebProps<Event> {
|
|
|
19
20
|
onToggleActionBarNoneFilter?: (detail: GidsActionBarFilterSelectEventDetail) => void;
|
|
20
21
|
onDropdownSelectionActionBarFilterChange?: (detail: GidsActionBarFilterSelectEventDetail) => void;
|
|
21
22
|
onMoreSelectionActionBarFilterChange?: (detail: GidsActionBarFilterSelectEventDetail) => void;
|
|
22
|
-
onClearAllFiltersButton?: (
|
|
23
|
+
onClearAllFiltersButton?: (detail: GidsActionBarClearFiltersEventDetail) => void;
|
|
23
24
|
private selectedFilters?;
|
|
24
25
|
private activeExpandedFilterId?;
|
|
26
|
+
private tempFilterAll;
|
|
25
27
|
protected handleFilterSizeChange(next: GidsButtonSize): void;
|
|
26
28
|
protected handleDropdownDividerVisibilityChange(next: boolean): void;
|
|
27
29
|
protected handlePrimaryFiltersChange(next: GidsActionBarPrimaryFilters[]): void;
|
|
@@ -30,18 +32,27 @@ export declare class GidsActionBar implements GidsActionBarWebProps<Event> {
|
|
|
30
32
|
protected handleMoreFiltersValueChange(next: GidsActionBarMoreFilters): void;
|
|
31
33
|
protected handleDisabilityChange(next: boolean): void;
|
|
32
34
|
protected handleActionGroupChange(next: boolean): void;
|
|
35
|
+
protected handleFilterAllIsDefaultSelectedChange(next: boolean): void;
|
|
33
36
|
protected handleClearAllFiltersButtonAppearanceChange(next: GidsButtonAppearance): void;
|
|
34
37
|
connectedCallback(): void;
|
|
38
|
+
componentDidLoad(): void;
|
|
35
39
|
private handleAllFilterClick;
|
|
36
40
|
private applyAllToggleSelection;
|
|
37
41
|
private handleSecondaryFilterClick;
|
|
38
42
|
private applySecondaryFilterToggleSelection;
|
|
43
|
+
private calculateWhenNormalFilterFound;
|
|
39
44
|
private applyNormalFiltersSelectedStateChange;
|
|
40
45
|
private toggleDropdownFilter;
|
|
41
46
|
private handleDropdownFilterMenuItemClick;
|
|
42
47
|
private applyDropdownFilterMenuItemSelection;
|
|
43
48
|
private applyDropdownFiltersSelectedStateChange;
|
|
49
|
+
private clearingFilters;
|
|
44
50
|
private handleClearAllFiltersClick;
|
|
51
|
+
private selectedFiltersHasFilterAll;
|
|
52
|
+
private filterAllCanBeRemove;
|
|
53
|
+
private removeFilterAll;
|
|
54
|
+
private selectedFiltersStateStatus;
|
|
55
|
+
private selectedFiltersHasLastFilterAll;
|
|
45
56
|
private isMoreFilterVisible;
|
|
46
57
|
private isAllFilterVisible;
|
|
47
58
|
private isAllFiltersTabDisabled;
|
|
@@ -55,5 +66,7 @@ export declare class GidsActionBar implements GidsActionBarWebProps<Event> {
|
|
|
55
66
|
private isDropdownFilterSelected;
|
|
56
67
|
private getSelectedFilterPickerData;
|
|
57
68
|
private setFilterPickerExpandedState;
|
|
69
|
+
private getAllFilterId;
|
|
70
|
+
private getMoreFilterId;
|
|
58
71
|
render(): any;
|
|
59
72
|
}
|
package/dist/types/components/webComponents/GidsExpansionBodyList/GidsExpansionBodyList.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { GidsExpansionBodyListItemCommonProps,
|
|
1
|
+
import { GidsExpansionBodyListEvent, GidsExpansionBodyListItemCommonProps, GidsExpansionBodyListItems } from '@ganpatiinfo/gids-core-shared';
|
|
2
2
|
import { type GidsExpansionBodyListWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
3
3
|
export declare class GidsExpansionBodyList implements GidsExpansionBodyListWebProps {
|
|
4
4
|
private hostElement;
|
|
5
|
-
expansionBodyListItems?:
|
|
6
|
-
onExpansionBodyListSubtitlePress?:
|
|
7
|
-
onExpansionBodyListSupportingTextPress?:
|
|
5
|
+
expansionBodyListItems?: GidsExpansionBodyListItems[];
|
|
6
|
+
onExpansionBodyListSubtitlePress?: GidsExpansionBodyListEvent;
|
|
7
|
+
onExpansionBodyListSupportingTextPress?: GidsExpansionBodyListEvent;
|
|
8
8
|
private hasExpansionBodyListSubtitleItemListener;
|
|
9
9
|
private hasExpansionBodyListSupportingTextItemListener;
|
|
10
|
+
private selectedExpansionListItem;
|
|
10
11
|
protected handleExpansionBodyListItemsChange(next: GidsExpansionBodyListItemCommonProps[]): void;
|
|
11
12
|
connectedCallback(): void;
|
|
12
13
|
disconnectedCallback(): void;
|
|
@@ -23,13 +23,18 @@ export declare class GidsFilter implements Omit<GidsFilterWebProps<never>, 'chil
|
|
|
23
23
|
private suppressNextMenuClickSelection;
|
|
24
24
|
private patternForm?;
|
|
25
25
|
private initialValue?;
|
|
26
|
+
private static emittedValuesTracker;
|
|
26
27
|
protected handleExpandedChange(next: boolean): void;
|
|
27
28
|
protected handleInteractivityChange(): void;
|
|
28
29
|
protected handleFilterTypeChange(next: GidsFilterType): void;
|
|
30
|
+
protected handleFilterIdArrival(nextId: string): void;
|
|
29
31
|
handleFilterSelectedChange(newValue: boolean): void;
|
|
32
|
+
protected handleFilterDefaultSelectedChange(next: boolean): void;
|
|
30
33
|
connectedCallback(): void;
|
|
31
34
|
componentDidLoad(): void;
|
|
32
35
|
disconnectedCallback(): void;
|
|
36
|
+
private setupDefaultSelctedFilterEmission;
|
|
37
|
+
private setupDefaultSelectedNoneAllFilterEmission;
|
|
33
38
|
private getFilterButtonControl;
|
|
34
39
|
private getItemElements;
|
|
35
40
|
private evaluateSlottedMenuExistence;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GidsBasicTableCellTypographyStyle, GidsMdTableWebProps } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
import { GidsBasicTableHeaderCellItem, GidsMdTableBody, GidsTableBordersWithNoneSharedType } from '@ganpatiinfo/gids-core-shared';
|
|
3
|
+
import { GidsTableCellAppearanceSharedType, GidsTableCellBorderRadiusSideSharedType, GidsTableCellTextAlignmentSharedType, GidsTableWidthSharedType } from '@ganpatiinfo/gids-core-shared/dist/shared/GidsTableSharedTypes';
|
|
4
|
+
import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
|
|
5
|
+
export declare class GidsMdTable implements GidsMdTableWebProps<GidsBasicTableCellTypographyStyle, IconName, IconAppearance> {
|
|
6
|
+
private hostElement;
|
|
7
|
+
isTopHeaderVisible?: boolean;
|
|
8
|
+
isSideHeaderVisible?: boolean;
|
|
9
|
+
width?: GidsTableWidthSharedType;
|
|
10
|
+
topHeaderAppearance?: GidsTableCellAppearanceSharedType;
|
|
11
|
+
sideHeaderAppearance?: GidsTableCellAppearanceSharedType;
|
|
12
|
+
rowAppearance?: GidsTableCellAppearanceSharedType;
|
|
13
|
+
tableBorders?: GidsTableBordersWithNoneSharedType;
|
|
14
|
+
tableBorderRadius?: GidsTableCellBorderRadiusSideSharedType[];
|
|
15
|
+
topHeaderLabelTypography?: GidsBasicTableCellTypographyStyle;
|
|
16
|
+
sideHeaderLabelTypography?: GidsBasicTableCellTypographyStyle;
|
|
17
|
+
rowLabelTypography?: GidsBasicTableCellTypographyStyle;
|
|
18
|
+
topHeaderTextAlignment?: GidsTableCellTextAlignmentSharedType;
|
|
19
|
+
sideHeaderTextAlignment?: GidsTableCellTextAlignmentSharedType;
|
|
20
|
+
rowTextAlignment?: GidsTableCellTextAlignmentSharedType;
|
|
21
|
+
topHeaderCells?: GidsBasicTableHeaderCellItem<GidsBasicTableCellTypographyStyle, IconName, IconAppearance>[];
|
|
22
|
+
tableBody?: GidsMdTableBody<GidsBasicTableCellTypographyStyle, IconName, IconAppearance>[];
|
|
23
|
+
private constructedTableBodyData?;
|
|
24
|
+
protected handleTopHeaderVisibilityChange(next: boolean): void;
|
|
25
|
+
protected handleSideHeaderVisibilityChange(next: boolean): void;
|
|
26
|
+
protected handleTableBordersChange(next: GidsTableBordersWithNoneSharedType): void;
|
|
27
|
+
protected handleTableBorderRadiusChange(next: GidsTableCellBorderRadiusSideSharedType[]): void;
|
|
28
|
+
protected handleTopHeaderCellsChange(next: GidsBasicTableHeaderCellItem<GidsBasicTableCellTypographyStyle, IconName, IconAppearance>[]): void;
|
|
29
|
+
protected handleTableBodyChange(next: GidsMdTableBody<GidsBasicTableCellTypographyStyle, IconName, IconAppearance>[]): void;
|
|
30
|
+
componentDidLoad(): void;
|
|
31
|
+
private makeTableBodyData;
|
|
32
|
+
private getRowBorderSides;
|
|
33
|
+
private getSideHeaderBorderSides;
|
|
34
|
+
private getTableClasses;
|
|
35
|
+
private addBorderRadiusDirectlyToTable;
|
|
36
|
+
private getTopHeaderCells;
|
|
37
|
+
private applyTableOuterBorders;
|
|
38
|
+
private applyTableInternalBorders;
|
|
39
|
+
private applyTableAllBorders;
|
|
40
|
+
private applyTableTopHeaderBorders;
|
|
41
|
+
render(): any;
|
|
42
|
+
}
|