@ganpatiinfo/gids-web-dom-reference 7.2.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/dist/components/GidsActivityGauge/GidsActivityGauge.d.ts +8 -0
- package/dist/components/GidsActivityGauge/GidsActivityGauge.d.ts.map +1 -0
- package/dist/components/GidsActivityGauge/GidsActivityGauge.js +17 -0
- package/dist/components/GidsActivityGauge/GidsActivityGauge.js.map +1 -0
- package/dist/components/GidsBarChart/GidsBarChart.d.ts +6 -0
- package/dist/components/GidsBarChart/GidsBarChart.d.ts.map +1 -0
- package/dist/components/GidsBarChart/GidsBarChart.js +19 -0
- package/dist/components/GidsBarChart/GidsBarChart.js.map +1 -0
- package/dist/components/GidsButton/GidsButton.d.ts +1 -1
- package/dist/components/GidsButton/GidsButton.d.ts.map +1 -1
- package/dist/components/GidsButton/GidsButton.js +2 -2
- package/dist/components/GidsButton/GidsButton.js.map +1 -1
- package/dist/components/GidsCalendar/GidsCalendar.d.ts +6 -0
- package/dist/components/GidsCalendar/GidsCalendar.d.ts.map +1 -0
- package/dist/components/GidsCalendar/GidsCalendar.js +36 -0
- package/dist/components/GidsCalendar/GidsCalendar.js.map +1 -0
- package/dist/components/GidsCalendarCell/GidsCalendarCell.d.ts +8 -0
- package/dist/components/GidsCalendarCell/GidsCalendarCell.d.ts.map +1 -0
- package/dist/components/GidsCalendarCell/GidsCalendarCell.js +55 -0
- package/dist/components/GidsCalendarCell/GidsCalendarCell.js.map +1 -0
- package/dist/components/GidsCalendarDayCell/GidsCalendarDayCell.d.ts +6 -0
- package/dist/components/GidsCalendarDayCell/GidsCalendarDayCell.d.ts.map +1 -0
- package/dist/components/GidsCalendarDayCell/GidsCalendarDayCell.js +17 -0
- package/dist/components/GidsCalendarDayCell/GidsCalendarDayCell.js.map +1 -0
- package/dist/components/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.d.ts +13 -0
- package/dist/components/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.d.ts.map +1 -0
- package/dist/components/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.js +45 -0
- package/dist/components/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.js.map +1 -0
- package/dist/components/GidsCalendarMonthList/GidsCalendarMonthList.d.ts +6 -0
- package/dist/components/GidsCalendarMonthList/GidsCalendarMonthList.d.ts.map +1 -0
- package/dist/components/GidsCalendarMonthList/GidsCalendarMonthList.js +19 -0
- package/dist/components/GidsCalendarMonthList/GidsCalendarMonthList.js.map +1 -0
- package/dist/components/GidsCalendarYearList/GidsCalendarYearList.d.ts +6 -0
- package/dist/components/GidsCalendarYearList/GidsCalendarYearList.d.ts.map +1 -0
- package/dist/components/GidsCalendarYearList/GidsCalendarYearList.js +34 -0
- package/dist/components/GidsCalendarYearList/GidsCalendarYearList.js.map +1 -0
- package/dist/components/GidsChart/GidsChart.d.ts +8 -0
- package/dist/components/GidsChart/GidsChart.d.ts.map +1 -0
- package/dist/components/GidsChart/GidsChart.js +16 -0
- package/dist/components/GidsChart/GidsChart.js.map +1 -0
- package/dist/components/GidsChartLegend/GidsChartLegend.d.ts +8 -0
- package/dist/components/GidsChartLegend/GidsChartLegend.d.ts.map +1 -0
- package/dist/components/GidsChartLegend/GidsChartLegend.js +13 -0
- package/dist/components/GidsChartLegend/GidsChartLegend.js.map +1 -0
- package/dist/components/GidsChartLegendItem/GidsChartLegendItem.d.ts +8 -0
- package/dist/components/GidsChartLegendItem/GidsChartLegendItem.d.ts.map +1 -0
- package/dist/components/GidsChartLegendItem/GidsChartLegendItem.js +14 -0
- package/dist/components/GidsChartLegendItem/GidsChartLegendItem.js.map +1 -0
- package/dist/components/GidsChevronButton/GidsChevronButton.d.ts +7 -0
- package/dist/components/GidsChevronButton/GidsChevronButton.d.ts.map +1 -0
- package/dist/components/GidsChevronButton/GidsChevronButton.js +18 -0
- package/dist/components/GidsChevronButton/GidsChevronButton.js.map +1 -0
- package/dist/components/GidsDot/GidsDot.d.ts +6 -0
- package/dist/components/GidsDot/GidsDot.d.ts.map +1 -0
- package/dist/components/GidsDot/GidsDot.js +19 -0
- package/dist/components/GidsDot/GidsDot.js.map +1 -0
- package/dist/components/GidsDropdown/GidsDropdown.d.ts +15 -0
- package/dist/components/GidsDropdown/GidsDropdown.d.ts.map +1 -0
- package/dist/components/GidsDropdown/GidsDropdown.js +62 -0
- package/dist/components/GidsDropdown/GidsDropdown.js.map +1 -0
- package/dist/components/GidsDropdownField/GidsDropdownField.d.ts +10 -0
- package/dist/components/GidsDropdownField/GidsDropdownField.d.ts.map +1 -0
- package/dist/components/GidsDropdownField/GidsDropdownField.js +38 -0
- package/dist/components/GidsDropdownField/GidsDropdownField.js.map +1 -0
- package/dist/components/GidsDropdownItem/GidsDropdownItem.d.ts +10 -0
- package/dist/components/GidsDropdownItem/GidsDropdownItem.d.ts.map +1 -0
- package/dist/components/GidsDropdownItem/GidsDropdownItem.js +34 -0
- package/dist/components/GidsDropdownItem/GidsDropdownItem.js.map +1 -0
- package/dist/components/GidsDropdownMenu/GidsDropdownMenu.d.ts +7 -0
- package/dist/components/GidsDropdownMenu/GidsDropdownMenu.d.ts.map +1 -0
- package/dist/components/GidsDropdownMenu/GidsDropdownMenu.js +24 -0
- package/dist/components/GidsDropdownMenu/GidsDropdownMenu.js.map +1 -0
- package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +7 -0
- package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts.map +1 -0
- package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.js +24 -0
- package/dist/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.js.map +1 -0
- package/dist/components/GidsDropdownPicker/GidsDropdownPicker.d.ts +20 -0
- package/dist/components/GidsDropdownPicker/GidsDropdownPicker.d.ts.map +1 -0
- package/dist/components/GidsDropdownPicker/GidsDropdownPicker.js +62 -0
- package/dist/components/GidsDropdownPicker/GidsDropdownPicker.js.map +1 -0
- package/dist/components/GidsEditButton/GidsEditButton.d.ts +8 -0
- package/dist/components/GidsEditButton/GidsEditButton.d.ts.map +1 -0
- package/dist/components/GidsEditButton/GidsEditButton.js +44 -0
- package/dist/components/GidsEditButton/GidsEditButton.js.map +1 -0
- package/dist/components/GidsLevelGauge/GidsLevelGauge.d.ts +6 -0
- package/dist/components/GidsLevelGauge/GidsLevelGauge.d.ts.map +1 -0
- package/dist/components/GidsLevelGauge/GidsLevelGauge.js +17 -0
- package/dist/components/GidsLevelGauge/GidsLevelGauge.js.map +1 -0
- package/dist/components/GidsLineChart/GidsLineChart.d.ts +6 -0
- package/dist/components/GidsLineChart/GidsLineChart.d.ts.map +1 -0
- package/dist/components/GidsLineChart/GidsLineChart.js +19 -0
- package/dist/components/GidsLineChart/GidsLineChart.js.map +1 -0
- package/dist/components/GidsListItem/GidsListItem.d.ts +11 -0
- package/dist/components/GidsListItem/GidsListItem.d.ts.map +1 -0
- package/dist/components/GidsListItem/GidsListItem.js +207 -0
- package/dist/components/GidsListItem/GidsListItem.js.map +1 -0
- package/dist/components/GidsMenu/GidsMenu.d.ts +7 -0
- package/dist/components/GidsMenu/GidsMenu.d.ts.map +1 -0
- package/dist/components/GidsMenu/GidsMenu.js +27 -0
- package/dist/components/GidsMenu/GidsMenu.js.map +1 -0
- package/dist/components/GidsMenuGroup/GidsMenuGroup.d.ts +7 -0
- package/dist/components/GidsMenuGroup/GidsMenuGroup.d.ts.map +1 -0
- package/dist/components/GidsMenuGroup/GidsMenuGroup.js +24 -0
- package/dist/components/GidsMenuGroup/GidsMenuGroup.js.map +1 -0
- package/dist/components/GidsPageTitle/GidsPageTitle.d.ts +9 -0
- package/dist/components/GidsPageTitle/GidsPageTitle.d.ts.map +1 -0
- package/dist/components/GidsPageTitle/GidsPageTitle.js +32 -0
- package/dist/components/GidsPageTitle/GidsPageTitle.js.map +1 -0
- package/dist/components/GidsPieChart/GidsPieChart.d.ts +8 -0
- package/dist/components/GidsPieChart/GidsPieChart.d.ts.map +1 -0
- package/dist/components/GidsPieChart/GidsPieChart.js +16 -0
- package/dist/components/GidsPieChart/GidsPieChart.js.map +1 -0
- package/dist/components/GidsPopover/GidsPopover.d.ts +7 -0
- package/dist/components/GidsPopover/GidsPopover.d.ts.map +1 -0
- package/dist/components/GidsPopover/GidsPopover.js +16 -0
- package/dist/components/GidsPopover/GidsPopover.js.map +1 -0
- package/dist/components/GidsProgressCircle/GidsProgressCircle.d.ts +6 -0
- package/dist/components/GidsProgressCircle/GidsProgressCircle.d.ts.map +1 -0
- package/dist/components/GidsProgressCircle/GidsProgressCircle.js +17 -0
- package/dist/components/GidsProgressCircle/GidsProgressCircle.js.map +1 -0
- package/dist/components/GidsTooltip/GidsTooltip.d.ts +6 -0
- package/dist/components/GidsTooltip/GidsTooltip.d.ts.map +1 -0
- package/dist/components/GidsTooltip/GidsTooltip.js +20 -0
- package/dist/components/GidsTooltip/GidsTooltip.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/childrenValidationUtils.d.ts +9 -0
- package/dist/utils/childrenValidationUtils.d.ts.map +1 -0
- package/dist/utils/childrenValidationUtils.js +27 -0
- package/dist/utils/childrenValidationUtils.js.map +1 -0
- package/package.json +45 -45
- package/src/components/GidsActivityGauge/GidsActivityGauge.ts +48 -0
- package/src/components/GidsBarChart/GidsBarChart.ts +47 -0
- package/src/components/GidsButton/GidsButton.ts +2 -1
- package/src/components/GidsCalendar/GidsCalendar.ts +72 -0
- package/src/components/GidsCalendarCell/GidsCalendarCell.ts +95 -0
- package/src/components/GidsCalendarDayCell/GidsCalendarDayCell.ts +29 -0
- package/src/components/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.ts +107 -0
- package/src/components/GidsCalendarMonthList/GidsCalendarMonthList.ts +56 -0
- package/src/components/GidsCalendarYearList/GidsCalendarYearList.ts +76 -0
- package/src/components/GidsChart/GidsChart.ts +41 -0
- package/src/components/GidsChartLegend/GidsChartLegend.ts +38 -0
- package/src/components/GidsChartLegendItem/GidsChartLegendItem.ts +40 -0
- package/src/components/GidsChevronButton/GidsChevronButton.ts +55 -0
- package/src/components/GidsDot/GidsDot.ts +42 -0
- package/src/components/GidsDropdown/GidsDropdown.ts +149 -0
- package/src/components/GidsDropdownField/GidsDropdownField.ts +106 -0
- package/src/components/GidsDropdownItem/GidsDropdownItem.ts +67 -0
- package/src/components/GidsDropdownMenu/GidsDropdownMenu.ts +43 -0
- package/src/components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.ts +46 -0
- package/src/components/GidsDropdownPicker/GidsDropdownPicker.ts +144 -0
- package/src/components/GidsEditButton/GidsEditButton.ts +71 -0
- package/src/components/GidsLevelGauge/GidsLevelGauge.ts +46 -0
- package/src/components/GidsLineChart/GidsLineChart.ts +50 -0
- package/src/components/GidsListItem/GidsListItem.ts +293 -0
- package/src/components/GidsMenu/GidsMenu.ts +56 -0
- package/src/components/GidsMenuGroup/GidsMenuGroup.ts +43 -0
- package/src/components/GidsPageTitle/GidsPageTitle.ts +60 -0
- package/src/components/GidsPieChart/GidsPieChart.ts +43 -0
- package/src/components/GidsPopover/GidsPopover.ts +32 -0
- package/src/components/GidsProgressCircle/GidsProgressCircle.ts +46 -0
- package/src/components/GidsTooltip/GidsTooltip.ts +37 -0
- package/src/index.ts +31 -0
- package/src/utils/childrenValidationUtils.ts +47 -0
package/dist/index.js
CHANGED
|
@@ -71,8 +71,39 @@ export * from './components/GidsAccordionItemHeader/GidsAccordionItemHeader.js';
|
|
|
71
71
|
export * from './components/GidsAccordionItemContent/GidsAccordionItemContent.js';
|
|
72
72
|
export * from './components/GidsAccordionItem/GidsAccordionItem.js';
|
|
73
73
|
export * from './components/GidsAccordion/GidsAccordion.js';
|
|
74
|
+
export * from './components/GidsTooltip/GidsTooltip.js';
|
|
75
|
+
export * from './components/GidsPopover/GidsPopover.js';
|
|
76
|
+
export * from './components/GidsEditButton/GidsEditButton.js';
|
|
77
|
+
export * from './components/GidsListItem/GidsListItem.js';
|
|
78
|
+
export * from './components/GidsMenu/GidsMenu.js';
|
|
79
|
+
export * from './components/GidsMenuGroup/GidsMenuGroup.js';
|
|
80
|
+
export * from './components/GidsDropdownItem/GidsDropdownItem.js';
|
|
81
|
+
export * from './components/GidsDropdownMenu/GidsDropdownMenu.js';
|
|
82
|
+
export * from './components/GidsDropdownMenuGroup/GidsDropdownMenuGroup.js';
|
|
83
|
+
export * from './components/GidsDropdown/GidsDropdown.js';
|
|
84
|
+
export * from './components/GidsChevronButton/GidsChevronButton.js';
|
|
85
|
+
export * from './components/GidsDropdownField/GidsDropdownField.js';
|
|
86
|
+
export * from './components/GidsCalendarCell/GidsCalendarCell.js';
|
|
87
|
+
export * from './components/GidsDot/GidsDot.js';
|
|
88
|
+
export * from './components/GidsCalendarDayCell/GidsCalendarDayCell.js';
|
|
89
|
+
export * from './components/GidsCalendarMonthList/GidsCalendarMonthList.js';
|
|
90
|
+
export * from './components/GidsCalendarYearList/GidsCalendarYearList.js';
|
|
91
|
+
export * from './components/GidsDropdownPicker/GidsDropdownPicker.js';
|
|
92
|
+
export * from './components/GidsCalendarHeaderPanel/GidsCalendarHeaderPanel.js';
|
|
93
|
+
export * from './components/GidsCalendar/GidsCalendar.js';
|
|
94
|
+
export * from './components/GidsPageTitle/GidsPageTitle.js';
|
|
95
|
+
export * from './components/GidsChartLegendItem/GidsChartLegendItem.js';
|
|
96
|
+
export * from './components/GidsChartLegend/GidsChartLegend.js';
|
|
97
|
+
export * from './components/GidsLineChart/GidsLineChart.js';
|
|
98
|
+
export * from './components/GidsBarChart/GidsBarChart.js';
|
|
99
|
+
export * from './components/GidsPieChart/GidsPieChart.js';
|
|
100
|
+
export * from './components/GidsLevelGauge/GidsLevelGauge.js';
|
|
101
|
+
export * from './components/GidsProgressCircle/GidsProgressCircle.js';
|
|
102
|
+
export * from './components/GidsActivityGauge/GidsActivityGauge.js';
|
|
103
|
+
export * from './components/GidsChart/GidsChart.js';
|
|
74
104
|
/**
|
|
75
105
|
* Utilities
|
|
76
106
|
*/
|
|
77
107
|
export * from './utils/domUtils.js';
|
|
108
|
+
export * from './utils/childrenValidationUtils.js';
|
|
78
109
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC;AAClD,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,0DAA0D,CAAC;AACzE,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC;AACrE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qEAAqE,CAAC;AACpF,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iCAAiC,CAAC;AAChD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uDAAuD,CAAC;AACtE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAA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E,cAAc,qCAAqC,CAAC;AAEpD;;GAEG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DomChildren } from './domUtils';
|
|
2
|
+
export interface TestDomChildrenValidity {
|
|
3
|
+
children?: DomChildren;
|
|
4
|
+
classNameToBeValidated?: string;
|
|
5
|
+
childrenNameToBeValidated?: string;
|
|
6
|
+
currentComponentName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const testDomChildrenValidity: ({ children, classNameToBeValidated, childrenNameToBeValidated, currentComponentName, }: TestDomChildrenValidity) => void;
|
|
9
|
+
//# sourceMappingURL=childrenValidationUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childrenValidationUtils.d.ts","sourceRoot":"","sources":["../../src/utils/childrenValidationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,GAAI,wFAKrC,uBAAuB,SAgCzB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const testDomChildrenValidity = ({ children, classNameToBeValidated, childrenNameToBeValidated, currentComponentName, }) => {
|
|
2
|
+
if (children !== undefined && children !== null) {
|
|
3
|
+
// --- STRICTOR DOM TYPE VALIDATION BLOCK ---
|
|
4
|
+
// Normalize children to an array to handle both single items and collections safely
|
|
5
|
+
const childrenArray = Array.isArray(children) ? children : [children];
|
|
6
|
+
for (const child of childrenArray) {
|
|
7
|
+
// 1. Ensure the child is a real DOM node/element (ignore raw strings if they aren't allowed)
|
|
8
|
+
if (child instanceof HTMLElement) {
|
|
9
|
+
// Standard Check A: Using a custom class list or dataset identifier if GidsListItem sets one
|
|
10
|
+
const isGidsListItem = child.classList.contains(classNameToBeValidated ?? '') ||
|
|
11
|
+
child.dataset.component === childrenNameToBeValidated;
|
|
12
|
+
// Standard Check B (Alternative): If GidsListItem returns a custom web component type instance
|
|
13
|
+
// const isGidsListItem = child.tagName.toLowerCase() === 'gids-list-item';
|
|
14
|
+
if (!isGidsListItem) {
|
|
15
|
+
throw new Error(`DOM Validation Error: ${currentComponentName} only accepts ${childrenNameToBeValidated} nodes as children. ` +
|
|
16
|
+
`Received an element with class layout: "${child.className}".`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
// If a string or a non-element node was passed illegally
|
|
21
|
+
throw new Error(`DOM Validation Error: Invalid type passed to children. Expected ${childrenNameToBeValidated} DOM elements.`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// --- END OF VALIDATION BLOCK ---
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=childrenValidationUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childrenValidationUtils.js","sourceRoot":"","sources":["../../src/utils/childrenValidationUtils.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACvC,QAAQ,EACR,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,GACK,EAAE,EAAE;IAC7B,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACjD,6CAA6C;QAC7C,oFAAoF;QACpF,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAEtE,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE,CAAC;YACnC,6FAA6F;YAC7F,IAAI,KAAK,YAAY,WAA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4
|
+
"private": false,
|
|
5
|
+
"description": "DOM for components reference implementations",
|
|
6
|
+
"homepage": "https://ganpatiinfo-design-system.onrender.com/",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "del-cli dist/*",
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"release:manually": "npm run build && npm publish --access public"
|
|
14
|
+
},
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Ganpatiinfo Design System",
|
|
17
|
+
"email": "ganpatiinfosysystem0@gmail.com",
|
|
18
|
+
"url": "https://ganpatiinfo-design-system.onrender.com/"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/ganpatiinfosystem/ganpatiinfo-design-system",
|
|
24
|
+
"directory": "packages/private/web-dom-reference"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@ganpatiinfo/gids-core-shared": "9.0.0",
|
|
28
|
+
"@ganpatiinfo/gids-web-shared": "9.0.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@ganpatiinfo/gids-web-theme-interface": "5.0.0",
|
|
32
|
+
"@jest/globals": "^30.2.0",
|
|
33
|
+
"@types/jasmine": "^5.1.15",
|
|
34
|
+
"expect": "^30.2.0"
|
|
35
|
+
},
|
|
36
|
+
"peerDependenciesMeta": {
|
|
37
|
+
"@jest/globals": {
|
|
38
|
+
"optional": true
|
|
39
|
+
},
|
|
40
|
+
"expect": {
|
|
41
|
+
"optional": true
|
|
42
|
+
},
|
|
43
|
+
"@types/jasmine": {
|
|
44
|
+
"optional": true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
47
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsActivityGaugeWebProps,
|
|
3
|
+
GidsActivityGaugeWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
|
|
6
|
+
const { getGidsActivityGaugeClassNames } = GidsActivityGaugeWebUtils;
|
|
7
|
+
|
|
8
|
+
type GidsActivityGaugeBaseWebProps = GidsActivityGaugeWebProps;
|
|
9
|
+
|
|
10
|
+
type GidsActivityGaugeElement = HTMLElement & GidsActivityGaugeBaseWebProps;
|
|
11
|
+
|
|
12
|
+
export interface GidsActivityGaugeDomProps extends GidsActivityGaugeBaseWebProps {
|
|
13
|
+
extraClasses?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const GidsActivityGaugeDom = ({
|
|
17
|
+
label,
|
|
18
|
+
chartData = [],
|
|
19
|
+
legend = 'none',
|
|
20
|
+
breakpoint = 'desktop',
|
|
21
|
+
chartLoading = false,
|
|
22
|
+
chartLoaderSize,
|
|
23
|
+
chartLoadingSupportingText,
|
|
24
|
+
chartLoadingTitle,
|
|
25
|
+
size = 'xxs',
|
|
26
|
+
extraClasses,
|
|
27
|
+
}: GidsActivityGaugeDomProps): HTMLElement => {
|
|
28
|
+
const activityGauge = document.createElement(
|
|
29
|
+
'gids-activity-gauge',
|
|
30
|
+
) as GidsActivityGaugeElement;
|
|
31
|
+
|
|
32
|
+
activityGauge.breakpoint = breakpoint;
|
|
33
|
+
activityGauge.size = size;
|
|
34
|
+
activityGauge.legend = legend;
|
|
35
|
+
activityGauge.label = label;
|
|
36
|
+
activityGauge.chartData = chartData;
|
|
37
|
+
activityGauge.chartLoading = chartLoading;
|
|
38
|
+
activityGauge.chartLoaderSize = chartLoaderSize;
|
|
39
|
+
activityGauge.chartLoadingTitle = chartLoadingTitle;
|
|
40
|
+
activityGauge.chartLoadingSupportingText = chartLoadingSupportingText;
|
|
41
|
+
|
|
42
|
+
activityGauge.className = getGidsActivityGaugeClassNames(
|
|
43
|
+
{ breakpoint },
|
|
44
|
+
extraClasses,
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
return activityGauge;
|
|
48
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsBarChartWebProps,
|
|
3
|
+
GidsBarChartWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
|
|
6
|
+
const { getGidsBarChartClassNames } = GidsBarChartWebUtils;
|
|
7
|
+
|
|
8
|
+
type GidsBarChartElement = HTMLElement & GidsBarChartWebProps;
|
|
9
|
+
|
|
10
|
+
export interface GidsBarChartDomProps extends GidsBarChartWebProps {
|
|
11
|
+
extraClasses?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const GidsBarChartDom = ({
|
|
15
|
+
breakpoint = 'desktop',
|
|
16
|
+
legend = 'none',
|
|
17
|
+
chartData = [],
|
|
18
|
+
yAxisVisible = false,
|
|
19
|
+
xAxisLabel,
|
|
20
|
+
yAxisLabel,
|
|
21
|
+
dataPoints,
|
|
22
|
+
chartLoading,
|
|
23
|
+
chartLoaderSize,
|
|
24
|
+
chartLoadingTitle,
|
|
25
|
+
chartLoadingSupportingText,
|
|
26
|
+
extraClasses,
|
|
27
|
+
}: GidsBarChartDomProps): HTMLElement => {
|
|
28
|
+
const barChart = document.createElement(
|
|
29
|
+
'gids-bar-chart',
|
|
30
|
+
) as GidsBarChartElement;
|
|
31
|
+
|
|
32
|
+
barChart.breakpoint = breakpoint;
|
|
33
|
+
barChart.legend = legend;
|
|
34
|
+
barChart.chartData = chartData;
|
|
35
|
+
barChart.yAxisVisible = yAxisVisible;
|
|
36
|
+
barChart.xAxisLabel = xAxisLabel;
|
|
37
|
+
barChart.yAxisLabel = yAxisLabel;
|
|
38
|
+
barChart.dataPoints = dataPoints;
|
|
39
|
+
barChart.chartLoading = chartLoading;
|
|
40
|
+
barChart.chartLoaderSize = chartLoaderSize;
|
|
41
|
+
barChart.chartLoadingTitle = chartLoadingTitle;
|
|
42
|
+
barChart.chartLoadingSupportingText = chartLoadingSupportingText;
|
|
43
|
+
|
|
44
|
+
barChart.className = getGidsBarChartClassNames({ breakpoint }, extraClasses);
|
|
45
|
+
|
|
46
|
+
return barChart;
|
|
47
|
+
};
|
|
@@ -25,6 +25,7 @@ export const GidsButtonDom = <
|
|
|
25
25
|
size,
|
|
26
26
|
disabled,
|
|
27
27
|
destructive,
|
|
28
|
+
positive,
|
|
28
29
|
loading,
|
|
29
30
|
width,
|
|
30
31
|
children,
|
|
@@ -41,7 +42,7 @@ export const GidsButtonDom = <
|
|
|
41
42
|
) as ButtonElement extends 'button' ? HTMLButtonElement : HTMLAnchorElement;
|
|
42
43
|
|
|
43
44
|
button.className = getGidsButtonClassNames(
|
|
44
|
-
{ appearance, size, width, destructive, loading },
|
|
45
|
+
{ appearance, size, width, destructive, loading, positive },
|
|
45
46
|
!children && nonEmpty(leadingIcon) && !nonEmpty(trailingIcon),
|
|
46
47
|
);
|
|
47
48
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsCalendarWebProps,
|
|
3
|
+
GidsCalendarWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
|
|
6
|
+
const { getGidsCalendarClassNames } = GidsCalendarWebUtils;
|
|
7
|
+
|
|
8
|
+
type GidsCalendarElement = HTMLElement & GidsCalendarWebProps;
|
|
9
|
+
|
|
10
|
+
export interface GidsCalendarDomProps extends GidsCalendarWebProps {
|
|
11
|
+
extraClasses?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const GidsCalendarDom = ({
|
|
15
|
+
width = 'intrinsic',
|
|
16
|
+
activeMonthNumber,
|
|
17
|
+
activeYear,
|
|
18
|
+
panelActionsAppearance,
|
|
19
|
+
selectedDate,
|
|
20
|
+
dotVisibleDates = [],
|
|
21
|
+
endYear,
|
|
22
|
+
startYear,
|
|
23
|
+
monthPickerDisabled,
|
|
24
|
+
nextDisabled,
|
|
25
|
+
panelDisabled,
|
|
26
|
+
previousDisabled,
|
|
27
|
+
yearPickerDisabled,
|
|
28
|
+
onNextChange,
|
|
29
|
+
onPreviousChange,
|
|
30
|
+
onPanelMonthChange,
|
|
31
|
+
onPanelYearChange,
|
|
32
|
+
onSelectionCalendarCell,
|
|
33
|
+
extraClasses,
|
|
34
|
+
}: GidsCalendarDomProps): HTMLElement => {
|
|
35
|
+
const calendar = document.createElement(
|
|
36
|
+
'gids-calendar',
|
|
37
|
+
) as GidsCalendarElement;
|
|
38
|
+
|
|
39
|
+
calendar.width = width;
|
|
40
|
+
calendar.activeMonthNumber = activeMonthNumber;
|
|
41
|
+
calendar.activeYear = activeYear;
|
|
42
|
+
calendar.panelActionsAppearance = panelActionsAppearance;
|
|
43
|
+
calendar.selectedDate = selectedDate;
|
|
44
|
+
calendar.dotVisibleDates = dotVisibleDates;
|
|
45
|
+
calendar.startYear = startYear;
|
|
46
|
+
calendar.endYear = endYear;
|
|
47
|
+
calendar.monthPickerDisabled = monthPickerDisabled;
|
|
48
|
+
calendar.yearPickerDisabled = yearPickerDisabled;
|
|
49
|
+
calendar.nextDisabled = nextDisabled;
|
|
50
|
+
calendar.panelDisabled = panelDisabled;
|
|
51
|
+
calendar.previousDisabled = previousDisabled;
|
|
52
|
+
|
|
53
|
+
calendar.className = getGidsCalendarClassNames({ width }, extraClasses);
|
|
54
|
+
|
|
55
|
+
if (onNextChange) {
|
|
56
|
+
calendar.onNextChange = onNextChange;
|
|
57
|
+
}
|
|
58
|
+
if (onPreviousChange) {
|
|
59
|
+
calendar.onPreviousChange = onPreviousChange;
|
|
60
|
+
}
|
|
61
|
+
if (onPanelMonthChange) {
|
|
62
|
+
calendar.onPanelMonthChange = onPanelMonthChange;
|
|
63
|
+
}
|
|
64
|
+
if (onPanelYearChange) {
|
|
65
|
+
calendar.onPanelYearChange = onPanelYearChange;
|
|
66
|
+
}
|
|
67
|
+
if (onSelectionCalendarCell) {
|
|
68
|
+
calendar.onSelectionCalendarCell = onSelectionCalendarCell;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return calendar;
|
|
72
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsCalendarCellWebProps,
|
|
3
|
+
GidsCalendarCellWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
import {
|
|
6
|
+
GidsCalendarCellSelectEventDetail,
|
|
7
|
+
GidsDotAppearance,
|
|
8
|
+
} from '@ganpatiinfo/gids-core-shared';
|
|
9
|
+
import { GidsDotDom } from '../GidsDot/GidsDot';
|
|
10
|
+
|
|
11
|
+
const { getGidsCalendarCellClassNames } = GidsCalendarCellWebUtils;
|
|
12
|
+
|
|
13
|
+
export interface GidsCalendarCellDomProps extends GidsCalendarCellWebProps {
|
|
14
|
+
onPressCalendarCell?: (
|
|
15
|
+
event: CustomEvent<GidsCalendarCellSelectEventDetail>,
|
|
16
|
+
) => void;
|
|
17
|
+
extraClasses?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const GidsCalendarCellDom = ({
|
|
21
|
+
id,
|
|
22
|
+
name,
|
|
23
|
+
label,
|
|
24
|
+
dot,
|
|
25
|
+
disabled = false,
|
|
26
|
+
selected,
|
|
27
|
+
today,
|
|
28
|
+
onPressCalendarCell,
|
|
29
|
+
extraClasses,
|
|
30
|
+
cellType = 'effective',
|
|
31
|
+
}: GidsCalendarCellDomProps): HTMLButtonElement => {
|
|
32
|
+
const calendarCell = document.createElement('button');
|
|
33
|
+
calendarCell.type = 'button';
|
|
34
|
+
calendarCell.className = getGidsCalendarCellClassNames(
|
|
35
|
+
{ disabled, selected, today, cellType, dot },
|
|
36
|
+
extraClasses,
|
|
37
|
+
);
|
|
38
|
+
calendarCell.setAttribute('role', 'gridcell');
|
|
39
|
+
calendarCell.setAttribute('aria-selected', selected ? 'true' : 'false');
|
|
40
|
+
calendarCell.disabled = disabled;
|
|
41
|
+
if (id) {
|
|
42
|
+
calendarCell.setAttribute('id', id);
|
|
43
|
+
}
|
|
44
|
+
if (name) {
|
|
45
|
+
calendarCell.name = name;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (label) {
|
|
49
|
+
const childrenLabel = document.createElement('span');
|
|
50
|
+
childrenLabel.textContent = label;
|
|
51
|
+
calendarCell.appendChild(childrenLabel);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (dot) {
|
|
55
|
+
let dotAppearance: GidsDotAppearance = 'subtle';
|
|
56
|
+
if (selected && !disabled) {
|
|
57
|
+
dotAppearance = 'static-inverse';
|
|
58
|
+
}
|
|
59
|
+
calendarCell.appendChild(
|
|
60
|
+
GidsDotDom({
|
|
61
|
+
appearance: dotAppearance,
|
|
62
|
+
disabled,
|
|
63
|
+
size: 'xs',
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const hasPressableContent = !disabled && cellType === 'effective';
|
|
69
|
+
|
|
70
|
+
calendarCell.addEventListener('click', (event: MouseEvent) => {
|
|
71
|
+
if (event.defaultPrevented || disabled || !hasPressableContent) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const customEvent = new CustomEvent<GidsCalendarCellSelectEventDetail>(
|
|
75
|
+
'onPressCalendarCell',
|
|
76
|
+
{
|
|
77
|
+
bubbles: true,
|
|
78
|
+
composed: true,
|
|
79
|
+
detail: {
|
|
80
|
+
cellValue: label,
|
|
81
|
+
selected,
|
|
82
|
+
disabled,
|
|
83
|
+
dot,
|
|
84
|
+
today,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
if (onPressCalendarCell) {
|
|
90
|
+
onPressCalendarCell(customEvent);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return calendarCell;
|
|
95
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type GidsCalendarDayCellWebProps,
|
|
3
|
+
GidsCalendarDayCellWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
import { GidsCalendarCellDom } from '../GidsCalendarCell/GidsCalendarCell';
|
|
6
|
+
|
|
7
|
+
const { getGidsCalendarDayCellClassNames } = GidsCalendarDayCellWebUtils;
|
|
8
|
+
|
|
9
|
+
export interface GidsCalendarDayCellDomProps extends GidsCalendarDayCellWebProps {
|
|
10
|
+
extraClasses?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const GidsCalendarDayCellDom = ({
|
|
14
|
+
label,
|
|
15
|
+
id,
|
|
16
|
+
extraClasses,
|
|
17
|
+
}: GidsCalendarDayCellDomProps): HTMLButtonElement => {
|
|
18
|
+
return GidsCalendarCellDom({
|
|
19
|
+
id,
|
|
20
|
+
name: label,
|
|
21
|
+
label,
|
|
22
|
+
dot: false,
|
|
23
|
+
disabled: false,
|
|
24
|
+
selected: false,
|
|
25
|
+
today: false,
|
|
26
|
+
cellType: 'non-effective',
|
|
27
|
+
extraClasses: getGidsCalendarDayCellClassNames(extraClasses),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsCalendarHeaderPanelWebProps,
|
|
3
|
+
GidsCalendarHeaderPanelWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
|
|
6
|
+
const { getGidsCalendarHeaderPanelClassNames } =
|
|
7
|
+
GidsCalendarHeaderPanelWebUtils;
|
|
8
|
+
|
|
9
|
+
export interface GidsCalendarHeaderPanelToggleEventDetail {
|
|
10
|
+
expandedMonthPicker: boolean;
|
|
11
|
+
expandedYearPicker: boolean;
|
|
12
|
+
originalEvent?: Event;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type GidsCalendarHeaderPanelElement = HTMLElement &
|
|
16
|
+
GidsCalendarHeaderPanelWebProps;
|
|
17
|
+
|
|
18
|
+
export interface GidsCalendarHeaderPanelDomProps extends GidsCalendarHeaderPanelWebProps {
|
|
19
|
+
onToggleMonthPicker?: (
|
|
20
|
+
detail: GidsCalendarHeaderPanelToggleEventDetail,
|
|
21
|
+
) => void;
|
|
22
|
+
onToggleYearPicker?: (
|
|
23
|
+
detail: GidsCalendarHeaderPanelToggleEventDetail,
|
|
24
|
+
) => void;
|
|
25
|
+
extraClasses?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const GidsCalendarHeaderPanelDom = ({
|
|
29
|
+
appearance = 'primary',
|
|
30
|
+
selectedMonthNumber,
|
|
31
|
+
startYear,
|
|
32
|
+
endYear,
|
|
33
|
+
selectedYear,
|
|
34
|
+
monthPickerDisabled = false,
|
|
35
|
+
yearPickerDisabled = false,
|
|
36
|
+
panelDisabled = false,
|
|
37
|
+
previousDisabled = false,
|
|
38
|
+
nextDisabled = false,
|
|
39
|
+
expandedMonthPicker = false,
|
|
40
|
+
expandedYearPicker = false,
|
|
41
|
+
onNextChange,
|
|
42
|
+
onPreviousChange,
|
|
43
|
+
onPanelMonthChange,
|
|
44
|
+
onPanelYearChange,
|
|
45
|
+
onToggleMonthPicker,
|
|
46
|
+
onToggleYearPicker,
|
|
47
|
+
extraClasses,
|
|
48
|
+
}: GidsCalendarHeaderPanelDomProps): HTMLElement => {
|
|
49
|
+
const calendarHeaderPanel = document.createElement(
|
|
50
|
+
'gids-calendar-header-panel',
|
|
51
|
+
) as GidsCalendarHeaderPanelElement;
|
|
52
|
+
|
|
53
|
+
calendarHeaderPanel.appearance = appearance;
|
|
54
|
+
calendarHeaderPanel.selectedMonthNumber = selectedMonthNumber;
|
|
55
|
+
calendarHeaderPanel.selectedYear = selectedYear;
|
|
56
|
+
calendarHeaderPanel.monthPickerDisabled = monthPickerDisabled;
|
|
57
|
+
calendarHeaderPanel.yearPickerDisabled = yearPickerDisabled;
|
|
58
|
+
calendarHeaderPanel.panelDisabled = panelDisabled;
|
|
59
|
+
calendarHeaderPanel.previousDisabled = previousDisabled;
|
|
60
|
+
calendarHeaderPanel.nextDisabled = nextDisabled;
|
|
61
|
+
calendarHeaderPanel.expandedMonthPicker = expandedMonthPicker;
|
|
62
|
+
calendarHeaderPanel.expandedYearPicker = expandedYearPicker;
|
|
63
|
+
calendarHeaderPanel.startYear = startYear;
|
|
64
|
+
calendarHeaderPanel.endYear = endYear;
|
|
65
|
+
|
|
66
|
+
calendarHeaderPanel.className =
|
|
67
|
+
getGidsCalendarHeaderPanelClassNames(extraClasses);
|
|
68
|
+
|
|
69
|
+
if (onPanelMonthChange) {
|
|
70
|
+
calendarHeaderPanel.onPanelMonthChange = onPanelMonthChange;
|
|
71
|
+
}
|
|
72
|
+
if (onPanelYearChange) {
|
|
73
|
+
calendarHeaderPanel.onPanelYearChange = onPanelYearChange;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (onNextChange) {
|
|
77
|
+
calendarHeaderPanel.onNextChange = onNextChange;
|
|
78
|
+
}
|
|
79
|
+
if (onPreviousChange) {
|
|
80
|
+
calendarHeaderPanel.onPreviousChange = onPreviousChange;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (onToggleMonthPicker) {
|
|
84
|
+
calendarHeaderPanel.addEventListener(
|
|
85
|
+
'gidsCalendarHeaderPanelMonthToggle',
|
|
86
|
+
(event: Event) => {
|
|
87
|
+
onToggleMonthPicker(
|
|
88
|
+
(event as CustomEvent<GidsCalendarHeaderPanelToggleEventDetail>)
|
|
89
|
+
.detail,
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
if (onToggleYearPicker) {
|
|
95
|
+
calendarHeaderPanel.addEventListener(
|
|
96
|
+
'gidsCalendarHeaderPanelYearToggle',
|
|
97
|
+
(event: Event) => {
|
|
98
|
+
onToggleYearPicker(
|
|
99
|
+
(event as CustomEvent<GidsCalendarHeaderPanelToggleEventDetail>)
|
|
100
|
+
.detail,
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return calendarHeaderPanel;
|
|
107
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsCalendarMonthListWebProps,
|
|
3
|
+
GidsCalendarMonthListWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
import {
|
|
6
|
+
GidsCalendarMonthListItemSelectEventDetail,
|
|
7
|
+
GidsMenuGroupType,
|
|
8
|
+
} from '@ganpatiinfo/gids-core-shared';
|
|
9
|
+
|
|
10
|
+
const { getGidsCalendarMonthListClassNames } = GidsCalendarMonthListWebUtils;
|
|
11
|
+
|
|
12
|
+
type GidsCalendarMonthListElement = HTMLElement & {
|
|
13
|
+
type?: GidsMenuGroupType;
|
|
14
|
+
noOptionsText?: string;
|
|
15
|
+
disabledIndices?: number[];
|
|
16
|
+
selectedMonthNumber?: number;
|
|
17
|
+
divider?: boolean;
|
|
18
|
+
onSelectionMonthChange?: (
|
|
19
|
+
detail: GidsCalendarMonthListItemSelectEventDetail,
|
|
20
|
+
) => void;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface GidsCalendarMonthListDomProps extends GidsCalendarMonthListWebProps {
|
|
24
|
+
extraClasses?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const GidsCalendarMonthListDom = ({
|
|
28
|
+
type = 'default',
|
|
29
|
+
noOptionsText,
|
|
30
|
+
onSelectionMonthChange,
|
|
31
|
+
disabledIndices = [],
|
|
32
|
+
divider = false,
|
|
33
|
+
selectedMonthNumber,
|
|
34
|
+
extraClasses,
|
|
35
|
+
}: GidsCalendarMonthListDomProps): HTMLElement => {
|
|
36
|
+
const calendarMonthList = document.createElement(
|
|
37
|
+
'gids-calendar-month-list',
|
|
38
|
+
) as GidsCalendarMonthListElement;
|
|
39
|
+
|
|
40
|
+
calendarMonthList.type = type;
|
|
41
|
+
if (noOptionsText) {
|
|
42
|
+
calendarMonthList.noOptionsText = noOptionsText;
|
|
43
|
+
}
|
|
44
|
+
calendarMonthList.disabledIndices = disabledIndices;
|
|
45
|
+
calendarMonthList.divider = divider;
|
|
46
|
+
calendarMonthList.selectedMonthNumber = selectedMonthNumber;
|
|
47
|
+
|
|
48
|
+
calendarMonthList.className =
|
|
49
|
+
getGidsCalendarMonthListClassNames(extraClasses);
|
|
50
|
+
|
|
51
|
+
if (onSelectionMonthChange) {
|
|
52
|
+
calendarMonthList.onSelectionMonthChange = onSelectionMonthChange;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return calendarMonthList;
|
|
56
|
+
};
|