@aura360/aura-nine-dot-menu 1.3.1 → 1.4.1
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/index.es.js +24 -21
- package/dist/index.umd.js +2 -2
- package/dist/react/AuraNineDotMenu.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -36,7 +36,7 @@ const yt = (r) => new ct(typeof r == "string" ? r : r + "", void 0, K), j = (r,
|
|
|
36
36
|
for (const s of t.cssRules) e += s.cssText;
|
|
37
37
|
return yt(e);
|
|
38
38
|
})(r) : r;
|
|
39
|
-
const { is: bt, defineProperty: At, getOwnPropertyDescriptor: xt, getOwnPropertyNames: wt, getOwnPropertySymbols: Et, getPrototypeOf: St } = Object, z = globalThis, st = z.trustedTypes, Pt = st ? st.emptyScript : "", Ct = z.reactiveElementPolyfillSupport, P = (r, t) => r,
|
|
39
|
+
const { is: bt, defineProperty: At, getOwnPropertyDescriptor: xt, getOwnPropertyNames: wt, getOwnPropertySymbols: Et, getPrototypeOf: St } = Object, z = globalThis, st = z.trustedTypes, Pt = st ? st.emptyScript : "", Ct = z.reactiveElementPolyfillSupport, P = (r, t) => r, D = { toAttribute(r, t) {
|
|
40
40
|
switch (t) {
|
|
41
41
|
case Boolean:
|
|
42
42
|
r = r ? Pt : null;
|
|
@@ -64,7 +64,7 @@ const { is: bt, defineProperty: At, getOwnPropertyDescriptor: xt, getOwnProperty
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return e;
|
|
67
|
-
} }, Z = (r, t) => !bt(r, t), it = { attribute: !0, type: String, converter:
|
|
67
|
+
} }, Z = (r, t) => !bt(r, t), it = { attribute: !0, type: String, converter: D, reflect: !1, useDefault: !1, hasChanged: Z };
|
|
68
68
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), z.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
69
69
|
let b = class extends HTMLElement {
|
|
70
70
|
static addInitializer(t) {
|
|
@@ -163,14 +163,14 @@ let b = class extends HTMLElement {
|
|
|
163
163
|
_$ET(t, e) {
|
|
164
164
|
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
|
165
165
|
if (i !== void 0 && s.reflect === !0) {
|
|
166
|
-
const n = (s.converter?.toAttribute !== void 0 ? s.converter :
|
|
166
|
+
const n = (s.converter?.toAttribute !== void 0 ? s.converter : D).toAttribute(e, s.type);
|
|
167
167
|
this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
_$AK(t, e) {
|
|
171
171
|
const s = this.constructor, i = s._$Eh.get(t);
|
|
172
172
|
if (i !== void 0 && this._$Em !== i) {
|
|
173
|
-
const n = s.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter :
|
|
173
|
+
const n = s.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : D;
|
|
174
174
|
this._$Em = i;
|
|
175
175
|
const h = o.fromAttribute(e, n.type);
|
|
176
176
|
this[i] = h ?? this._$Ej?.get(i) ?? h, this._$Em = null;
|
|
@@ -248,7 +248,7 @@ let b = class extends HTMLElement {
|
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
250
|
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[P("elementProperties")] = /* @__PURE__ */ new Map(), b[P("finalized")] = /* @__PURE__ */ new Map(), Ct?.({ ReactiveElement: b }), (z.reactiveElementVersions ??= []).push("2.1.2");
|
|
251
|
-
const F = globalThis, rt = (r) => r,
|
|
251
|
+
const F = globalThis, rt = (r) => r, k = F.trustedTypes, nt = k ? k.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, dt = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + $, Ot = `<${ut}>`, v = document, C = () => v.createComment(""), O = (r) => r === null || typeof r != "object" && typeof r != "function", J = Array.isArray, Rt = (r) => J(r) || typeof r?.[Symbol.iterator] == "function", q = `[
|
|
252
252
|
\f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, at = />/g, m = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
|
|
253
253
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), ht = /'/g, lt = /"/g, ft = /^(?:script|style|textarea|title)$/i, Ut = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), A = Ut(1), x = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), pt = /* @__PURE__ */ new WeakMap(), y = v.createTreeWalker(v, 129);
|
|
254
254
|
function $t(r, t) {
|
|
@@ -281,12 +281,12 @@ class R {
|
|
|
281
281
|
if (i.nodeType === 1) {
|
|
282
282
|
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(dt)) {
|
|
283
283
|
const u = d[o++], f = i.getAttribute(l).split($), H = /([.?@])?(.*)/.exec(u);
|
|
284
|
-
a.push({ type: 1, index: n, name: H[2], strings: f, ctor: H[1] === "." ? Ht : H[1] === "?" ? Nt : H[1] === "@" ?
|
|
284
|
+
a.push({ type: 1, index: n, name: H[2], strings: f, ctor: H[1] === "." ? Ht : H[1] === "?" ? Nt : H[1] === "@" ? Dt : B }), i.removeAttribute(l);
|
|
285
285
|
} else l.startsWith($) && (a.push({ type: 6, index: n }), i.removeAttribute(l));
|
|
286
286
|
if (ft.test(i.tagName)) {
|
|
287
287
|
const l = i.textContent.split($), u = l.length - 1;
|
|
288
288
|
if (u > 0) {
|
|
289
|
-
i.textContent =
|
|
289
|
+
i.textContent = k ? k.emptyScript : "";
|
|
290
290
|
for (let f = 0; f < u; f++) i.append(l[f], C()), y.nextNode(), a.push({ type: 2, index: ++n });
|
|
291
291
|
i.append(l[u], C());
|
|
292
292
|
}
|
|
@@ -327,7 +327,7 @@ class Mt {
|
|
|
327
327
|
for (; a !== void 0; ) {
|
|
328
328
|
if (o === a.index) {
|
|
329
329
|
let p;
|
|
330
|
-
a.type === 2 ? p = new M(n, n.nextSibling, this, t) : a.type === 1 ? p = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (p = new
|
|
330
|
+
a.type === 2 ? p = new M(n, n.nextSibling, this, t) : a.type === 1 ? p = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (p = new kt(n, this, t)), this._$AV.push(p), a = s[++h];
|
|
331
331
|
}
|
|
332
332
|
o !== a?.index && (n = y.nextNode(), o++);
|
|
333
333
|
}
|
|
@@ -438,7 +438,7 @@ class Nt extends B {
|
|
|
438
438
|
this.element.toggleAttribute(this.name, !!t && t !== c);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
class
|
|
441
|
+
class Dt extends B {
|
|
442
442
|
constructor(t, e, s, i, n) {
|
|
443
443
|
super(t, e, s, i, n), this.type = 5;
|
|
444
444
|
}
|
|
@@ -451,7 +451,7 @@ class kt extends B {
|
|
|
451
451
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
class
|
|
454
|
+
class kt {
|
|
455
455
|
constructor(t, e, s) {
|
|
456
456
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
457
457
|
}
|
|
@@ -505,7 +505,7 @@ const I = (r) => (t, e) => {
|
|
|
505
505
|
customElements.define(r, t);
|
|
506
506
|
}) : customElements.define(r, t);
|
|
507
507
|
};
|
|
508
|
-
const Bt = { attribute: !0, type: String, converter:
|
|
508
|
+
const Bt = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: Z }, It = (r = Bt, t, e) => {
|
|
509
509
|
const { kind: s, metadata: i } = e;
|
|
510
510
|
let n = globalThis.litPropertyMetadata.get(i);
|
|
511
511
|
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), s === "accessor") {
|
|
@@ -542,7 +542,7 @@ var qt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, W = (r, t,
|
|
|
542
542
|
};
|
|
543
543
|
let E = class extends g {
|
|
544
544
|
constructor() {
|
|
545
|
-
super(...arguments), this.data = [], this.theme = "
|
|
545
|
+
super(...arguments), this.data = [], this.theme = "light", this.open = !1, this.toggle = (t) => {
|
|
546
546
|
t.stopPropagation(), this.open = !this.open, this.open ? this.updateComplete.then(() => {
|
|
547
547
|
this.positionPanel(), document.addEventListener("click", this.handleOutsideClick), window.addEventListener("resize", this.handleResize);
|
|
548
548
|
}) : this.cleanupListeners();
|
|
@@ -873,18 +873,21 @@ L = gt([
|
|
|
873
873
|
], L);
|
|
874
874
|
const se = ({
|
|
875
875
|
data: r,
|
|
876
|
-
|
|
877
|
-
|
|
876
|
+
theme: t = "light",
|
|
877
|
+
position: e = "top-right",
|
|
878
|
+
onItemClick: s
|
|
878
879
|
}) => {
|
|
879
|
-
const
|
|
880
|
+
const i = mt(null);
|
|
880
881
|
return X(() => {
|
|
881
|
-
|
|
882
|
-
}, [r, t]), X(() => {
|
|
883
|
-
const
|
|
884
|
-
|
|
882
|
+
i.current && (i.current.data = r, i.current.theme = t, i.current.position = e);
|
|
883
|
+
}, [r, t, e]), X(() => {
|
|
884
|
+
const n = i.current;
|
|
885
|
+
if (!n) return;
|
|
886
|
+
const o = (h) => {
|
|
887
|
+
s?.(h.detail);
|
|
885
888
|
};
|
|
886
|
-
return
|
|
887
|
-
}, [
|
|
889
|
+
return n.addEventListener("item-click", o), () => n.removeEventListener("item-click", o);
|
|
890
|
+
}, [s]), _t.createElement("aura-nine-dot-menu", { ref: i });
|
|
888
891
|
};
|
|
889
892
|
export {
|
|
890
893
|
se as AuraNineDotMenu
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(y,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],f):(y=typeof globalThis<"u"?globalThis:y||self,f(y.AuraNineDotMenu={},y.React))})(this,(function(y,f){"use strict";const D=globalThis,K=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol(),et=new WeakMap;let st=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Z)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(K&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=et.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&et.set(e,t))}return t}toString(){return this.cssText}};const mt=r=>new st(typeof r=="string"?r:r+"",void 0,Z),k=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new st(e,r,Z)},yt=(r,t)=>{if(K)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=D.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},it=K?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return mt(e)})(r):r;const{is:vt,defineProperty:bt,getOwnPropertyDescriptor:At,getOwnPropertyNames:xt,getOwnPropertySymbols:wt,getPrototypeOf:Et}=Object,L=globalThis,rt=L.trustedTypes,St=rt?rt.emptyScript:"",Pt=L.reactiveElementPolyfillSupport,C=(r,t)=>r,j={toAttribute(r,t){switch(t){case Boolean:r=r?St:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},F=(r,t)=>!vt(r,t),nt={attribute:!0,type:String,converter:j,reflect:!1,useDefault:!1,hasChanged:F};Symbol.metadata??=Symbol("metadata"),L.litPropertyMetadata??=new WeakMap;let x=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=nt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&bt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=At(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const h=i?.call(this);n?.call(this,o),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??nt}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;const t=Et(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){const e=this.properties,s=[...xt(e),...wt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(it(i))}else t!==void 0&&e.push(it(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:j).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:j;this._$Em=i;const h=o.fromAttribute(e,n.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(t,e,s,i=!1,n){if(t!==void 0){const o=this.constructor;if(i===!1&&(n=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??F)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:o}=n,h=this[i];o!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,n,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[C("elementProperties")]=new Map,x[C("finalized")]=new Map,Pt?.({ReactiveElement:x}),(L.reactiveElementVersions??=[]).push("2.1.2");const J=globalThis,ot=r=>r,z=J.trustedTypes,at=z?z.createPolicy("lit-html",{createHTML:r=>r}):void 0,ht="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,lt="?"+$,Ct=`<${lt}>`,v=document,O=()=>v.createComment(""),T=r=>r===null||typeof r!="object"&&typeof r!="function",Y=Array.isArray,Ot=r=>Y(r)||typeof r?.[Symbol.iterator]=="function",G=`[
|
|
2
2
|
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,ct=/>/g,b=RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),dt=/'/g,ut=/"/g,ft=/^(?:script|style|textarea|title)$/i,Tt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),w=Tt(1),E=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),$t=new WeakMap,A=v.createTreeWalker(v,129);function gt(r,t){if(!Y(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return at!==void 0?at.createHTML(t):t}const Ut=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=U;for(let h=0;h<e;h++){const a=r[h];let c,d,l=-1,u=0;for(;u<a.length&&(o.lastIndex=u,d=o.exec(a),d!==null);)u=o.lastIndex,o===U?d[1]==="!--"?o=pt:d[1]!==void 0?o=ct:d[2]!==void 0?(ft.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=b):d[3]!==void 0&&(o=b):o===b?d[0]===">"?(o=i??U,l=-1):d[1]===void 0?l=-2:(l=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?b:d[3]==='"'?ut:dt):o===ut||o===dt?o=b:o===pt||o===ct?o=U:(o=b,i=void 0);const m=o===b&&r[h+1].startsWith("/>")?" ":"";n+=o===U?a+Ct:l>=0?(s.push(c),a.slice(0,l)+ht+a.slice(l)+$+m):a+$+(l===-2?h:m)}return[gt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class M{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const h=t.length-1,a=this.parts,[c,d]=Ut(t,e);if(this.el=M.createElement(c,s),A.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=A.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(ht)){const u=d[o++],m=i.getAttribute(l).split($),V=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:V[2],strings:m,ctor:V[1]==="."?Rt:V[1]==="?"?Ht:V[1]==="@"?Nt:B}),i.removeAttribute(l)}else l.startsWith($)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(ft.test(i.tagName)){const l=i.textContent.split($),u=l.length-1;if(u>0){i.textContent=z?z.emptyScript:"";for(let m=0;m<u;m++)i.append(l[m],O()),A.nextNode(),a.push({type:2,index:++n});i.append(l[u],O())}}}else if(i.nodeType===8)if(i.data===lt)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf($,l+1))!==-1;)a.push({type:7,index:n}),l+=$.length-1}n++}}static createElement(t,e){const s=v.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){if(t===E)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl;const n=T(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}class Mt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??v).importNode(e,!0);A.currentNode=i;let n=A.nextNode(),o=0,h=0,a=s[0];for(;a!==void 0;){if(o===a.index){let c;a.type===2?c=new R(n,n.nextSibling,this,t):a.type===1?c=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(c=new Dt(n,this,t)),this._$AV.push(c),a=s[++h]}o!==a?.index&&(n=A.nextNode(),o++)}return A.currentNode=v,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),T(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ot(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(gt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const n=new Mt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=$t.get(t.strings);return e===void 0&&$t.set(t.strings,e=new M(t)),e}k(t){Y(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new R(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const s=ot(t).nextSibling;ot(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class B{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!T(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const h=t;let a,c;for(t=n[0],a=0;a<n.length-1;a++)c=S(this,h[s+a],e,a),c===E&&(c=this._$AH[a]),o||=!T(c)||c!==this._$AH[a],c===p?t=p:t!==p&&(t+=(c??"")+n[a+1]),this._$AH[a]=c}o&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Rt extends B{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Ht extends B{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Nt extends B{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??p)===E)return;const s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Dt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const kt=J.litHtmlPolyfillSupport;kt?.(M,R),(J.litHtmlVersions??=[]).push("3.3.2");const Lt=(r,t,e)=>{const s=e?.renderBefore??t;let i=s._$litPart$;if(i===void 0){const n=e?.renderBefore??null;s._$litPart$=i=new R(t.insertBefore(O(),n),n,void 0,e??{})}return i._$AI(r),i};const Q=globalThis;class g extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}}g._$litElement$=!0,g.finalized=!0,Q.litElementHydrateSupport?.({LitElement:g});const jt=Q.litElementPolyfillSupport;jt?.({LitElement:g}),(Q.litElementVersions??=[]).push("4.2.2");const I=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};const zt={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:F},Bt=(r=zt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(o,a,r,!0,h)},init(h){return h!==void 0&&this.C(o,void 0,r,h),h}}}if(s==="setter"){const{name:o}=e;return function(h){const a=this[o];t.call(this,h),this.requestUpdate(o,a,r,!0,h)}}throw Error("Unsupported decorator location: "+s)};function _(r){return(t,e)=>typeof e=="object"?Bt(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}function It(r){return _({...r,state:!0,attribute:!1})}var Wt=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,W=(r,t,e,s)=>{for(var i=s>1?void 0:s?qt(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Wt(t,e,i),i};let P=class extends g{constructor(){super(...arguments),this.data=[],this.theme="
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),dt=/'/g,ut=/"/g,ft=/^(?:script|style|textarea|title)$/i,Tt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),w=Tt(1),E=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),$t=new WeakMap,A=v.createTreeWalker(v,129);function gt(r,t){if(!Y(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return at!==void 0?at.createHTML(t):t}const Ut=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=U;for(let h=0;h<e;h++){const a=r[h];let c,d,l=-1,u=0;for(;u<a.length&&(o.lastIndex=u,d=o.exec(a),d!==null);)u=o.lastIndex,o===U?d[1]==="!--"?o=pt:d[1]!==void 0?o=ct:d[2]!==void 0?(ft.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=b):d[3]!==void 0&&(o=b):o===b?d[0]===">"?(o=i??U,l=-1):d[1]===void 0?l=-2:(l=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?b:d[3]==='"'?ut:dt):o===ut||o===dt?o=b:o===pt||o===ct?o=U:(o=b,i=void 0);const m=o===b&&r[h+1].startsWith("/>")?" ":"";n+=o===U?a+Ct:l>=0?(s.push(c),a.slice(0,l)+ht+a.slice(l)+$+m):a+$+(l===-2?h:m)}return[gt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class M{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const h=t.length-1,a=this.parts,[c,d]=Ut(t,e);if(this.el=M.createElement(c,s),A.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=A.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(ht)){const u=d[o++],m=i.getAttribute(l).split($),V=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:V[2],strings:m,ctor:V[1]==="."?Rt:V[1]==="?"?Ht:V[1]==="@"?Nt:B}),i.removeAttribute(l)}else l.startsWith($)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(ft.test(i.tagName)){const l=i.textContent.split($),u=l.length-1;if(u>0){i.textContent=z?z.emptyScript:"";for(let m=0;m<u;m++)i.append(l[m],O()),A.nextNode(),a.push({type:2,index:++n});i.append(l[u],O())}}}else if(i.nodeType===8)if(i.data===lt)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf($,l+1))!==-1;)a.push({type:7,index:n}),l+=$.length-1}n++}}static createElement(t,e){const s=v.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){if(t===E)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl;const n=T(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}class Mt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??v).importNode(e,!0);A.currentNode=i;let n=A.nextNode(),o=0,h=0,a=s[0];for(;a!==void 0;){if(o===a.index){let c;a.type===2?c=new R(n,n.nextSibling,this,t):a.type===1?c=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(c=new Dt(n,this,t)),this._$AV.push(c),a=s[++h]}o!==a?.index&&(n=A.nextNode(),o++)}return A.currentNode=v,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),T(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ot(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(gt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const n=new Mt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=$t.get(t.strings);return e===void 0&&$t.set(t.strings,e=new M(t)),e}k(t){Y(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new R(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const s=ot(t).nextSibling;ot(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class B{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!T(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const h=t;let a,c;for(t=n[0],a=0;a<n.length-1;a++)c=S(this,h[s+a],e,a),c===E&&(c=this._$AH[a]),o||=!T(c)||c!==this._$AH[a],c===p?t=p:t!==p&&(t+=(c??"")+n[a+1]),this._$AH[a]=c}o&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Rt extends B{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Ht extends B{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Nt extends B{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??p)===E)return;const s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Dt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const kt=J.litHtmlPolyfillSupport;kt?.(M,R),(J.litHtmlVersions??=[]).push("3.3.2");const Lt=(r,t,e)=>{const s=e?.renderBefore??t;let i=s._$litPart$;if(i===void 0){const n=e?.renderBefore??null;s._$litPart$=i=new R(t.insertBefore(O(),n),n,void 0,e??{})}return i._$AI(r),i};const Q=globalThis;class g extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}}g._$litElement$=!0,g.finalized=!0,Q.litElementHydrateSupport?.({LitElement:g});const jt=Q.litElementPolyfillSupport;jt?.({LitElement:g}),(Q.litElementVersions??=[]).push("4.2.2");const I=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};const zt={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:F},Bt=(r=zt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(o,a,r,!0,h)},init(h){return h!==void 0&&this.C(o,void 0,r,h),h}}}if(s==="setter"){const{name:o}=e;return function(h){const a=this[o];t.call(this,h),this.requestUpdate(o,a,r,!0,h)}}throw Error("Unsupported decorator location: "+s)};function _(r){return(t,e)=>typeof e=="object"?Bt(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}function It(r){return _({...r,state:!0,attribute:!1})}var Wt=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,W=(r,t,e,s)=>{for(var i=s>1?void 0:s?qt(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Wt(t,e,i),i};let P=class extends g{constructor(){super(...arguments),this.data=[],this.theme="light",this.open=!1,this.toggle=t=>{t.stopPropagation(),this.open=!this.open,this.open?this.updateComplete.then(()=>{this.positionPanel(),document.addEventListener("click",this.handleOutsideClick),window.addEventListener("resize",this.handleResize)}):this.cleanupListeners()},this.handleOutsideClick=t=>{this.contains(t.target)||(this.open=!1,this.cleanupListeners())},this.handleResize=()=>{this.open&&this.positionPanel()},this.handleKeyDown=t=>{t.key==="Escape"&&(this.open=!1,this.cleanupListeners())}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),this.cleanupListeners()}render(){return w`
|
|
4
4
|
<div class="trigger" @click=${this.toggle}
|
|
5
5
|
${t=>this.triggerRef=t}>
|
|
6
6
|
<div class="dots">
|
|
@@ -214,4 +214,4 @@
|
|
|
214
214
|
text-align: center;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
`,_t([_()],q.prototype,"label",2),q=_t([I("aura-app-text")],q);const Gt=({data:r,
|
|
217
|
+
`,_t([_()],q.prototype,"label",2),q=_t([I("aura-app-text")],q);const Gt=({data:r,theme:t="light",position:e="top-right",onItemClick:s})=>{const i=f.useRef(null);return f.useEffect(()=>{i.current&&(i.current.data=r,i.current.theme=t,i.current.position=e)},[r,t,e]),f.useEffect(()=>{const n=i.current;if(!n)return;const o=h=>{s?.(h.detail)};return n.addEventListener("item-click",o),()=>n.removeEventListener("item-click",o)},[s]),f.createElement("aura-nine-dot-menu",{ref:i})};y.AuraNineDotMenu=Gt,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
|