@ganpatiinfo/gids-core-web 16.0.0 → 17.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/gids-profile-menu.js +1 -1
- package/dist/gids-profile.js +1 -1
- package/dist/p-BAs2-lhK.js +1 -0
- package/dist/types/components/webComponents/GidsProfile/GidsProfile.d.ts +4 -0
- package/dist/types/components/webComponents/GidsProfileMenu/GidsProfileMenu.d.ts +4 -0
- package/dist/types/components.d.ts +3 -0
- package/dist-bundled/es/gids-profile-menu.js +4 -4
- package/dist-bundled/es/gids-profile.js +37 -31
- package/dist-bundled/es/p-BAs2-lhK-31X-j6-3.js +82 -0
- package/dist-bundled/umd/gids-profile-menu.umd.js +2 -2
- package/dist-bundled/umd/gids-profile.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +4 -4
- package/package.json +4 -4
- package/dist/p-CcpdJCql.js +0 -1
- package/dist-bundled/es/p-CcpdJCql-CkEW2RAp.js +0 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ganpatiinfo/gids-core-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a core web package contains html components",
|
|
6
6
|
"homepage": "https://ganpatiinfo-design-system.onrender.com/",
|
|
@@ -475,8 +475,8 @@
|
|
|
475
475
|
"dependencies": {
|
|
476
476
|
"@floating-ui/dom": "1.7.6",
|
|
477
477
|
"clsx": "^2.1.1",
|
|
478
|
-
"@ganpatiinfo/gids-core-shared": "^
|
|
479
|
-
"@ganpatiinfo/gids-web-shared": "^13.1.
|
|
478
|
+
"@ganpatiinfo/gids-core-shared": "^15.0.0",
|
|
479
|
+
"@ganpatiinfo/gids-web-shared": "^13.1.1",
|
|
480
480
|
"composed-offset-position": "^0.0.6"
|
|
481
481
|
},
|
|
482
482
|
"devDependencies": {
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
"@ganpatiinfo/gids-liquid-renderer": "^6.0.0",
|
|
487
487
|
"@ganpatiinfo/gids-storybook-theme": "^9.0.0",
|
|
488
488
|
"@ganpatiinfo/gids-storybook-utilities": "^6.0.0",
|
|
489
|
-
"@ganpatiinfo/gids-web-dom-reference": "^
|
|
489
|
+
"@ganpatiinfo/gids-web-dom-reference": "^15.0.0",
|
|
490
490
|
"@ganpatiinfo/gids-web-theme-ganpatiinfo": "^8.0.0",
|
|
491
491
|
"@jest/globals": "^30.2.0",
|
|
492
492
|
"@stencil/core": "^4.43.2",
|
package/dist/p-CcpdJCql.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as i,H as t,h as s,d}from"./p-Bf3p-DY2.js";import{GidsProfileMenuWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{a as n,b as a}from"./p-BrYLEey4.js";import{G as o,a as h}from"./p-Bs8TP3Rb.js";import{d as l}from"./p-oJFgjzK5.js";const{getGidsProfileMenuClassNames:m}=r,p=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.headerVisible=!1,this.listSectionDividerVisible=!1,this.headerDividerVisible=!0,this.profileMenuItems=[],this.selectedProfileMenuItem=void 0,this.onListItemPress=({event:e,sectionIndex:i,itemIndex:t,item:s})=>{const d={...s,sectionIndex:i,itemIndex:t};this.onProfileMenuItemPress&&!this.isItemAlreadySelected(d)&&this.onProfileMenuItemPress({originalEvent:e,id:s.id,sectionIndex:i,itemIndex:t,leadingLabel:s?.leadingLabel,leadingSupport:s?.leadingSupport,trailingLabel:s?.trailingLabel,trailingSupport:s?.trailingSupport}),this.profileMenuItemSelection(d)},this.profileMenuItemSelection=e=>{e?.id&&(this.isItemAlreadySelected(e)||(this.selectedProfileMenuItem=e))},this.isItemAlreadySelected=e=>e.id===this?.selectedProfileMenuItem?.id&&e?.sectionIndex===this?.selectedProfileMenuItem?.sectionIndex&&e?.itemIndex===this?.selectedProfileMenuItem?.itemIndex,this.isThisItemSelected=e=>e?.id===this?.selectedProfileMenuItem?.id&&e?.sectionIndex===this?.selectedProfileMenuItem?.sectionIndex&&e?.itemIndex===this?.selectedProfileMenuItem?.itemIndex,this.hasHeaderItem=()=>{const e=this?.headerItem,i=this?.headerVisible;return!(!i||!(e?.avatarVisible||e?.avatarProps&&Object.keys(e).length>0||e?.headerSupportingText||e?.headerTitle))},this.hasProfileMenuItems=()=>{const e=this?.profileMenuItems??[];return!!(e.length>0&&e[0]?.items&&e[0].items.length>0||this.hasHeaderItem())}}headerItemChanged(e){this.headerItem=e}headerVisibleChanged(e){this.headerVisible=e}profileMenuItemsChanged(e){this.profileMenuItems=e}connectedCallback(){}render(){const e=this?.headerItem,i=this?.headerVisible,t=this?.headerDividerVisible,r=this?.listSectionDividerVisible,l=this?.profileMenuItems??[],p=m();return s(d,{key:"407f61b49299da79647d4896ae4aa5b5e1e47646",class:p},s(o,{key:"6fb114148ee80d37e707f6c7fe74670b6f9b5fd2",type:this.hasProfileMenuItems()?"default":"no-options"},i?s("div",{class:"gids-profile-menu__header-container"},s("gids-profile-menu-header",{...e,onHeaderAvatarPress:this.onHeaderAvatarPress,onHeaderTitlePress:this.onHeaderTitlePress,onHeaderSupportingTextPress:this.onHeaderSupportingTextPress})):void 0,t&&this.hasHeaderItem()?s("div",{class:"gids-profile-menu__header-divider-container"},s(n,null)):void 0,l.map(((e,i)=>s(h,{key:`${i+1}`,sectionLabel:e?.sectionLabel??""},(e?.items??[]).map(((e,t)=>s(a,{...e,key:`${t+1}`,id:e.id,index:t,onPressListItem:s=>this.onListItemPress({event:s,sectionIndex:i,itemIndex:t,item:e}),selected:this.isThisItemSelected({...e,sectionIndex:i,itemIndex:t})},e?.leadingLabel))),i<l.length-1&&r?s(n,null):void 0)))))}get hostElement(){return this}static get watchers(){return{headerItem:[{headerItemChanged:0}],headerVisible:[{headerVisibleChanged:0}],profileMenuItems:[{profileMenuItemsChanged:0}]}}static get style(){return".gids-profile-menu .gids-divider{width:100%}.gids-profile-menu__header-divider-container{width:100%;padding-bottom:var(--gids-padding-vertical-edge-to-element-200)}.gids-profile-menu__header-container{display:flex;width:100%;padding:var(--gids-padding-vertical-edge-to-element-150) 0px}"}},[0,"gids-profile-menu",{headerItem:[16],headerVisible:[4,"header-visible"],listSectionDividerVisible:[4,"list-section-divider-visible"],headerDividerVisible:[4,"header-divider-visible"],profileMenuItems:[16],onHeaderAvatarPress:[16],onHeaderTitlePress:[16],onHeaderSupportingTextPress:[16],onProfileMenuItemPress:[16],selectedProfileMenuItem:[32]},void 0,{headerItem:[{headerItemChanged:0}],headerVisible:[{headerVisibleChanged:0}],profileMenuItems:[{profileMenuItemsChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-profile-menu","gids-profile-menu-header"].forEach((i=>{switch(i){case"gids-profile-menu":customElements.get(e(i))||customElements.define(e(i),p);break;case"gids-profile-menu-header":customElements.get(e(i))||l()}}))}c();export{p as G,c as d}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { q as h, L as I, u as f, D as s, P as p } from "./p-Bf3p-DY2-CPqEc-vc.js";
|
|
2
|
-
import { b as c, v as g } from "./p-BrYLEey4-DuajY4uD.js";
|
|
3
|
-
import { i as b, a as v } from "./p-Bs8TP3Rb-BdcS7d5q.js";
|
|
4
|
-
import { u as P } from "./p-oJFgjzK5-CzagP1qD.js";
|
|
5
|
-
import { c as M } from "./clsx-OuTLNxxd.js";
|
|
6
|
-
const x = (i) => M("gids-profile-menu", i), S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7
|
-
__proto__: null,
|
|
8
|
-
getGidsProfileMenuClassNames: x
|
|
9
|
-
}, Symbol.toStringTag, { value: "Module" })), { getGidsProfileMenuClassNames: V } = S, y = I(class extends f {
|
|
10
|
-
constructor(i) {
|
|
11
|
-
super(), i !== !1 && this.__registerHost(), this.headerVisible = !1, this.listSectionDividerVisible = !1, this.headerDividerVisible = !0, this.profileMenuItems = [], this.selectedProfileMenuItem = void 0, this.onListItemPress = ({ event: e, sectionIndex: r, itemIndex: n, item: t }) => {
|
|
12
|
-
const l = { ...t, sectionIndex: r, itemIndex: n };
|
|
13
|
-
this.onProfileMenuItemPress && !this.isItemAlreadySelected(l) && this.onProfileMenuItemPress({ originalEvent: e, id: t.id, sectionIndex: r, itemIndex: n, leadingLabel: t?.leadingLabel, leadingSupport: t?.leadingSupport, trailingLabel: t?.trailingLabel, trailingSupport: t?.trailingSupport }), this.profileMenuItemSelection(l);
|
|
14
|
-
}, this.profileMenuItemSelection = (e) => {
|
|
15
|
-
e?.id && (this.isItemAlreadySelected(e) || (this.selectedProfileMenuItem = e));
|
|
16
|
-
}, this.isItemAlreadySelected = (e) => e.id === this?.selectedProfileMenuItem?.id && e?.sectionIndex === this?.selectedProfileMenuItem?.sectionIndex && e?.itemIndex === this?.selectedProfileMenuItem?.itemIndex, this.isThisItemSelected = (e) => e?.id === this?.selectedProfileMenuItem?.id && e?.sectionIndex === this?.selectedProfileMenuItem?.sectionIndex && e?.itemIndex === this?.selectedProfileMenuItem?.itemIndex, this.hasHeaderItem = () => {
|
|
17
|
-
const e = this?.headerItem;
|
|
18
|
-
return !(!this?.headerVisible || !(e?.avatarVisible || e?.avatarProps && Object.keys(e).length > 0 || e?.headerSupportingText || e?.headerTitle));
|
|
19
|
-
}, this.hasProfileMenuItems = () => {
|
|
20
|
-
const e = this?.profileMenuItems ?? [];
|
|
21
|
-
return !!(e.length > 0 && e[0]?.items && e[0].items.length > 0 || this.hasHeaderItem());
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
headerItemChanged(i) {
|
|
25
|
-
this.headerItem = i;
|
|
26
|
-
}
|
|
27
|
-
headerVisibleChanged(i) {
|
|
28
|
-
this.headerVisible = i;
|
|
29
|
-
}
|
|
30
|
-
profileMenuItemsChanged(i) {
|
|
31
|
-
this.profileMenuItems = i;
|
|
32
|
-
}
|
|
33
|
-
connectedCallback() {
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
const i = this?.headerItem, e = this?.headerVisible, r = this?.headerDividerVisible, n = this?.listSectionDividerVisible, t = this?.profileMenuItems ?? [], l = V();
|
|
37
|
-
return s(p, { key: "407f61b49299da79647d4896ae4aa5b5e1e47646", class: l }, s(b, { key: "6fb114148ee80d37e707f6c7fe74670b6f9b5fd2", type: this.hasProfileMenuItems() ? "default" : "no-options" }, e ? s("div", { class: "gids-profile-menu__header-container" }, s("gids-profile-menu-header", { ...i, onHeaderAvatarPress: this.onHeaderAvatarPress, onHeaderTitlePress: this.onHeaderTitlePress, onHeaderSupportingTextPress: this.onHeaderSupportingTextPress })) : void 0, r && this.hasHeaderItem() ? s("div", { class: "gids-profile-menu__header-divider-container" }, s(c, null)) : void 0, t.map(((m, a) => s(v, { key: `${a + 1}`, sectionLabel: m?.sectionLabel ?? "" }, (m?.items ?? []).map(((d, o) => s(g, { ...d, key: `${o + 1}`, id: d.id, index: o, onPressListItem: (u) => this.onListItemPress({ event: u, sectionIndex: a, itemIndex: o, item: d }), selected: this.isThisItemSelected({ ...d, sectionIndex: a, itemIndex: o }) }, d?.leadingLabel))), a < t.length - 1 && n ? s(c, null) : void 0)))));
|
|
38
|
-
}
|
|
39
|
-
get hostElement() {
|
|
40
|
-
return this;
|
|
41
|
-
}
|
|
42
|
-
static get watchers() {
|
|
43
|
-
return { headerItem: [{ headerItemChanged: 0 }], headerVisible: [{ headerVisibleChanged: 0 }], profileMenuItems: [{ profileMenuItemsChanged: 0 }] };
|
|
44
|
-
}
|
|
45
|
-
static get style() {
|
|
46
|
-
return ".gids-profile-menu .gids-divider{width:100%}.gids-profile-menu__header-divider-container{width:100%;padding-bottom:var(--gids-padding-vertical-edge-to-element-200)}.gids-profile-menu__header-container{display:flex;width:100%;padding:var(--gids-padding-vertical-edge-to-element-150) 0px}";
|
|
47
|
-
}
|
|
48
|
-
}, [0, "gids-profile-menu", { headerItem: [16], headerVisible: [4, "header-visible"], listSectionDividerVisible: [4, "list-section-divider-visible"], headerDividerVisible: [4, "header-divider-visible"], profileMenuItems: [16], onHeaderAvatarPress: [16], onHeaderTitlePress: [16], onHeaderSupportingTextPress: [16], onProfileMenuItemPress: [16], selectedProfileMenuItem: [32] }, void 0, { headerItem: [{ headerItemChanged: 0 }], headerVisible: [{ headerVisibleChanged: 0 }], profileMenuItems: [{ profileMenuItemsChanged: 0 }] }]);
|
|
49
|
-
function _() {
|
|
50
|
-
typeof customElements < "u" && ["gids-profile-menu", "gids-profile-menu-header"].forEach(((i) => {
|
|
51
|
-
switch (i) {
|
|
52
|
-
case "gids-profile-menu":
|
|
53
|
-
customElements.get(h(i)) || customElements.define(h(i), y);
|
|
54
|
-
break;
|
|
55
|
-
case "gids-profile-menu-header":
|
|
56
|
-
customElements.get(h(i)) || P();
|
|
57
|
-
}
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
_();
|
|
61
|
-
export {
|
|
62
|
-
_ as c,
|
|
63
|
-
y as p
|
|
64
|
-
};
|