@silexlabs/grapesjs-notifications 0.2.0 → 0.2.1-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/README.md CHANGED
@@ -55,6 +55,13 @@ editor.runCommand('notifications:add', {
55
55
  message: 'Hello world!',
56
56
  })
57
57
 
58
+ // Add a notification with a unique id (will replace itself if triggered again)
59
+ editor.runCommand('notifications:add', {
60
+ id: 'unique-notif',
61
+ type: 'info',
62
+ message: 'This notification will not duplicate!',
63
+ })
64
+
58
65
  // Listen to events
59
66
  editor.on('notifications:changed', (notifications) => {
60
67
  console.log('Notifications have changed', notifications)
@@ -141,6 +148,11 @@ editor.on(NOTIFICATION_CHANGED, () => { /* ... */ })
141
148
 
142
149
  ```ts
143
150
  export interface NotificationOptions {
151
+ /**
152
+ * Optional unique id for the notification.
153
+ * If provided, notifications with the same id will be replaced instead of duplicated.
154
+ */
155
+ id?: string
144
156
  message: string
145
157
  group?: string
146
158
  timeout?: number
@@ -160,6 +172,7 @@ export interface NotificationOptions {
160
172
  | Option | Description | Type | Default |
161
173
  |-|-|-|-
162
174
  | `timeout` | Default timeout for the notification in ms | `number` | No timeout |
175
+ | `id` | Unique id for the notification. If set, notifications with the same id will be replaced instead of duplicated | `string` | No id (notifications will stack) |
163
176
  | `container` | Container for the notifications | `HTMLElement` | `document.body` |
164
177
  | `storeKey` | Store notifications in local storage under this key | `string` | No storage |
165
178
  | `icons` | Icons for the notification types | `object` | `{error: '\u2716', warning: '\u26A0', success: '\u2714', info: '\u2139'}` |
@@ -1,5 +1,6 @@
1
1
  import { Editor } from 'grapesjs';
2
2
  export interface NotificationOptions {
3
+ id?: string;
3
4
  message: string;
4
5
  group?: string;
5
6
  timeout?: number;
@@ -14,6 +15,7 @@ export interface NotificationOptions {
14
15
  }
15
16
  export declare class Notification {
16
17
  protected editor: Editor;
18
+ id: string | null;
17
19
  componentId: string | null;
18
20
  group: string | null;
19
21
  timeoutRef: NodeJS.Timeout | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../src/Notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAE,MAAM,UAAU,CAAA;AAElD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED,qBAAa,YAAY;IAUX,SAAS,CAAC,MAAM,EAAE,MAAM;IATpC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAC3B,UAAU,6BAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAC9C,OAAO,EAAE,mBAAmB,CAAA;IACrB,KAAK,EAAE,GAAG,CAAA;IACjB,OAAO,CAAC,cAAc,CAAC,CAAsC;gBAEvC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI;IAa/H,MAAM;IAoBN,MAAM;IAYN,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIhC,OAAO,CAAC,iBAAiB;IAezB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,uBAAuB;CAIhC"}
1
+ {"version":3,"file":"Notification.d.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IhC"}
@@ -1,6 +1,9 @@
1
1
  import { Editor } from "grapesjs";
2
- import { Notification, NotificationOptions } from "./Notification";
2
+ import { Notification, NotificationOptions as BaseNotificationOptions } from "./Notification";
3
3
  import { StyleInfo } from "lit/directives/style-map";
4
+ export interface NotificationOptions extends BaseNotificationOptions {
5
+ id?: string;
6
+ }
4
7
  export declare const NOTIFICATION_CHANGED = "notifications:changed";
5
8
  export declare const NOTIFICATION_ADDED = "notifications:added";
6
9
  export declare const NOTIFICATION_REMOVED = "notifications:removed";
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationManager.d.ts","sourceRoot":"","sources":["../src/NotificationManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAGpD,eAAO,MAAM,oBAAoB,0BAA0B,CAAA;AAC3D,eAAO,MAAM,kBAAkB,wBAAwB,CAAA;AACvD,eAAO,MAAM,oBAAoB,0BAA0B,CAAA;AAC3D,eAAO,MAAM,oBAAoB,0BAA0B,CAAA;AAE3D,MAAM,WAAW,0BAA0B;IACzC,KAAK,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3B,SAAS,EAAE,WAAW,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED;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C,EAAE,GAAG,CAAA;IACV,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAGW,SAAS,CAAC,MAAM,EAAE,MAAM;IAAE,SAAS,CAAC,OAAO,EAAE,0BAA0B;IAFhH,OAAO,CAAC,aAAa,CAAqB;gBAE9B,oBAAoB,EAAE,GAAG,EAAE,EAAY,MAAM,EAAE,MAAM,EAAY,OAAO,EAAE,0BAA0B;IAWhH;;OAEG;IACH,MAAM,IAAI,YAAY,EAAE;IAIxB;;OAEG;IACH,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAevC;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,GAAG,GAAG,IAAI;IAS9C;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd"}
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! @silexlabs/grapesjs-notifications - 0.2.0 */
2
- !function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["@silexlabs/grapesjs-notifications"]=e():t["@silexlabs/grapesjs-notifications"]=e()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var s in n)t.o(n,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:n[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})}},e={};t.r(e),t.d(e,{NOTIFICATION_ADD:()=>Dt,NOTIFICATION_ADDED:()=>a,NOTIFICATION_CHANGED:()=>r,NOTIFICATION_CLEAR:()=>Lt,NOTIFICATION_CLEARED:()=>c,NOTIFICATION_REMOVE:()=>zt,NOTIFICATION_REMOVED:()=>l,Notification:()=>i,default:()=>Kt});const n={'@silexlabs/grapesjs-notifications':{Close:'✖ Dismiss',CloseAll:'✖ Dismiss all',Select:'✓ Select component',Show:'↓ Show'}};var s=void 0&&(void 0).__assign||function(){return s=Object.assign||function(t){for(var e,n=1,s=arguments.length;n<s;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)},i=function(){function t(t,e,n){var s=this;this.editor=t,this.componentId=null,this.group=null,this.options=this.getDefaultOptions(e),this.removeCallback=n,this.options.timeout&&(this.timeoutRef=setTimeout((function(){return s.remove()}),this.options.timeout)),this.message=this.options.message,this.type=this.options.type,this.componentId=e.componentId||null,this.group=e.group||null,this.model={attributes:e}}return t.prototype.select=function(){var t=this;if(this.options.componentId){var e=this.getAllComponents(this.editor).find((function(e){var n=e.component;e.page;return n.getId()===t.options.componentId}))||null;if(e){var n=e.component,s=e.page;this.editor.Pages.select(s),this.editor.select(n),this.editor.Canvas.scrollTo(n)}else console.error("Component with ID ".concat(this.options.componentId," not found")),this.editor.runCommand('notifications:add',{message:"Component with ID ".concat(this.options.componentId," not found"),type:'error'})}},t.prototype.remove=function(){this.removeCallback?this.removeCallback(this):this.editor.runCommand('notifications:remove',{notification:this}),this.timeoutRef&&clearTimeout(this.timeoutRef)},t.prototype.getSvgIcon=function(t){var e;return null===(e=this.options.icons)||void 0===e?void 0:e[t]},t.prototype.getDefaultOptions=function(t){return s({icons:s({info:"🚧",warning:"⚠",error:"🚫",success:"✅",group:"📌"},t.icons)},t)},t.prototype.getAllComponents=function(t){var e=this;return t.Pages.getAll().map((function(t){return e.getAllComponentInPage(t)})).flat()},t.prototype.getAllComponentInPage=function(t){var e=t.getMainComponent();return[{component:e,page:t}].concat(this.getAllChildrenComponent(e).map((function(e){return{component:e,page:t}})))},t.prototype.getAllChildrenComponent=function(t){var e=this,n=Array.from(t.components().models);return n.concat(n.map((function(t){return e.getAllChildrenComponent(t)})).flat())},t}(),o=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var s,i=0,o=e.length;i<o;i++)!s&&i in e||(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},r='notifications:changed',a='notifications:added',l='notifications:removed',c='notifications:cleared',h=function(){function t(t,e,n){var s=this;this.editor=e,this.options=n,this.notifications=[],this.notifications=t.map((function(t){if('object'==typeof t&&t.message){return new i(s.editor,t,(function(t){return s.remove(t)}))}return t})).filter(Boolean)}return t.prototype.getAll=function(){return o([],this.notifications,!0)},t.prototype.add=function(t){var e=this,n=new i(this.editor,t,(function(t){return e.remove(t)}));this.notifications.push(n),this.editor.trigger(a,n),this.editor.trigger(r,this.getAll())},t.prototype.remove=function(t){var e=this.notifications.findIndex((function(e){return e===t||e.model===t}));if(e>-1){var n=this.notifications.splice(e,1)[0];this.editor.trigger(l,n),this.editor.trigger(r,this.getAll())}},t.prototype.reset=function(){this.notifications=[],this.editor.trigger(c),this.editor.trigger(r,this.getAll())},t}();const p=globalThis,d=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u=Symbol(),f=new WeakMap;class g{constructor(t,e,n){if(this._$cssResult$=!0,n!==u)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(d&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=f.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&f.set(e,t))}return t}toString(){return this.cssText}}const m=(t,e)=>{if(d)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),s=p.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=n.cssText,t.appendChild(e)}},_=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new g("string"==typeof t?t:t+"",void 0,u))(e)})(t):t,{is:y,defineProperty:$,getOwnPropertyDescriptor:v,getOwnPropertyNames:A,getOwnPropertySymbols:b,getPrototypeOf:E}=Object,C=globalThis,S=C.trustedTypes,j=S?S.emptyScript:"",w=C.reactiveElementPolyfillSupport,x=(t,e)=>t,O={toAttribute(t,e){switch(e){case Boolean:t=t?j:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},P=(t,e)=>!y(t,e),I={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:P};Symbol.metadata??=Symbol("metadata"),C.litPropertyMetadata??=new WeakMap;class T 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=I){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 n=Symbol(),s=this.getPropertyDescriptor(t,n,e);void 0!==s&&$(this.prototype,t,s)}}static getPropertyDescriptor(t,e,n){const{get:s,set:i}=v(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??I}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=E(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...A(t),...b(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(_(t))}else void 0!==t&&e.push(_(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return m(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,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,n);if(void 0!==s&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:O).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(s):this.setAttribute(s,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,s=n._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=n.getPropertyOptions(s),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:O;this._$Em=s,this[s]=i.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const s=this.constructor,i=this[t];if(n??=s.getPropertyOptions(t),!((n.hasChanged??P)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:s,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&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[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,n,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[x("elementProperties")]=new Map,T[x("finalized")]=new Map,w?.({ReactiveElement:T}),(C.reactiveElementVersions??=[]).push("2.1.0");const N=globalThis,M=N.trustedTypes,U=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,H="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,k="?"+R,D=`<${k}>`,z=document,L=()=>z.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,K=Array.isArray,F=t=>K(t)||"function"==typeof t?.[Symbol.iterator],V="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,J=/>/g,Z=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,X=/^(?:script|style|textarea|title)$/i,Y=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),tt=Y(1),et=(Y(2),Y(3),Symbol.for("lit-noChange")),nt=Symbol.for("lit-nothing"),st=new WeakMap,it=z.createTreeWalker(z,129);function ot(t,e){if(!K(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==U?U.createHTML(e):e}const rt=(t,e)=>{const n=t.length-1,s=[];let i,o=2===e?"<svg>":3===e?"<math>":"",r=W;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,h=0;for(;h<n.length&&(r.lastIndex=h,l=r.exec(n),null!==l);)h=r.lastIndex,r===W?"!--"===l[1]?r=q:void 0!==l[1]?r=J:void 0!==l[2]?(X.test(l[2])&&(i=RegExp("</"+l[2],"g")),r=Z):void 0!==l[3]&&(r=Z):r===Z?">"===l[0]?(r=i??W,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Z:'"'===l[3]?Q:G):r===Q||r===G?r=Z:r===q||r===J?r=W:(r=Z,i=void 0);const p=r===Z&&t[e+1].startsWith("/>")?" ":"";o+=r===W?n+D:c>=0?(s.push(a),n.slice(0,c)+H+n.slice(c)+R+p):n+R+(-2===c?e:p)}return[ot(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class at{constructor({strings:t,_$litType$:e},n){let s;this.parts=[];let i=0,o=0;const r=t.length-1,a=this.parts,[l,c]=rt(t,e);if(this.el=at.createElement(l,n),it.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=it.nextNode())&&a.length<r;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(H)){const e=c[o++],n=s.getAttribute(t).split(R),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:r[2],strings:n,ctor:"."===r[1]?dt:"?"===r[1]?ut:"@"===r[1]?ft:pt}),s.removeAttribute(t)}else t.startsWith(R)&&(a.push({type:6,index:i}),s.removeAttribute(t));if(X.test(s.tagName)){const t=s.textContent.split(R),e=t.length-1;if(e>0){s.textContent=M?M.emptyScript:"";for(let n=0;n<e;n++)s.append(t[n],L()),it.nextNode(),a.push({type:2,index:++i});s.append(t[e],L())}}}else if(8===s.nodeType)if(s.data===k)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=s.data.indexOf(R,t+1));)a.push({type:7,index:i}),t+=R.length-1}i++}}static createElement(t,e){const n=z.createElement("template");return n.innerHTML=t,n}}function lt(t,e,n=t,s){if(e===et)return e;let i=void 0!==s?n._$Co?.[s]:n._$Cl;const o=B(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,s)),void 0!==s?(n._$Co??=[])[s]=i:n._$Cl=i),void 0!==i&&(e=lt(t,i._$AS(t,e.values),i,s)),e}class ct{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:n}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);it.currentNode=s;let i=it.nextNode(),o=0,r=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new ht(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new gt(i,this,t)),this._$AV.push(e),a=n[++r]}o!==a?.index&&(i=it.nextNode(),o++)}return it.currentNode=z,s}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class ht{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,s){this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=lt(this,t,e),B(t)?t===nt||null==t||""===t?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):F(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!==nt&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=at.createElement(ot(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new ct(s,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new at(t)),e}k(t){K(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,s=0;for(const i of t)s===e.length?e.push(n=new ht(this.O(L()),this.O(L()),this,this.options)):n=e[s],n._$AI(i),s++;s<e.length&&(this._$AR(n&&n._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class pt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,s,i){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=nt}_$AI(t,e=this,n,s){const i=this.strings;let o=!1;if(void 0===i)t=lt(this,t,e,0),o=!B(t)||t!==this._$AH&&t!==et,o&&(this._$AH=t);else{const s=t;let r,a;for(t=i[0],r=0;r<i.length-1;r++)a=lt(this,s[n+r],e,r),a===et&&(a=this._$AH[r]),o||=!B(a)||a!==this._$AH[r],a===nt?t=nt:t!==nt&&(t+=(a??"")+i[r+1]),this._$AH[r]=a}o&&!s&&this.j(t)}j(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class dt extends pt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nt?void 0:t}}class ut extends pt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class ft extends pt{constructor(t,e,n,s,i){super(t,e,n,s,i),this.type=5}_$AI(t,e=this){if((t=lt(this,t,e,0)??nt)===et)return;const n=this._$AH,s=t===nt&&n!==nt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==nt&&(n===nt||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class gt{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){lt(this,t)}}const mt=N.litHtmlPolyfillSupport;mt?.(at,ht),(N.litHtmlVersions??=[]).push("3.3.0");const _t=(t,e,n)=>{const s=n?.renderBefore??e;let i=s._$litPart$;if(void 0===i){const t=n?.renderBefore??null;s._$litPart$=i=new ht(e.insertBefore(L(),t),t,void 0,n??{})}return i._$AI(t),i},yt=globalThis;class $t extends T{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=_t(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}}$t._$litElement$=!0,$t["finalized"]=!0,yt.litElementHydrateSupport?.({LitElement:$t});const vt=yt.litElementPolyfillSupport;vt?.({LitElement:$t});(yt.litElementVersions??=[]).push("4.2.0");const At=1,bt=2,Et=t=>(...e)=>({_$litDirective$:t,values:e});class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const St=Et(class extends Ct{constructor(t){if(super(t),t.type!==At||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const n=t.element.classList;for(const t of this.st)t in e||(n.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(n.add(t),this.st.add(t)):(n.remove(t),this.st.delete(t)))}return et}});class jt extends Ct{constructor(t){if(super(t),this.it=nt,t.type!==bt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===nt||null==t)return this._t=void 0,this.it=t;if(t===et)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}jt.directiveName="unsafeHTML",jt.resultType=1;const wt=Et(jt);var xt,Ot,Pt,It,Tt,Nt=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Mt=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var s,i=0,o=e.length;i<o;i++)!s&&i in e||(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};function Ut(t,e,n,s){var i=Mt([],n,!0);s.reverse&&i.reverse();var o=function(t){var e={},n=[];return t.forEach((function(t){t.group&&!e[t.group]?(e[t.group]=!0,n.push(t.group)):t.group||n.push(t)})),n}(i).slice(0,s.maxNotifications||i.length);_t(tt(xt||(xt=Nt(["\n <style>\n .gjs-notification {\n top: 10px;\n right: 10px;\n max-width: 300px;\n z-index: 9999;\n list-style: none;\n padding: 10px;\n margin: 10px;\n font-family: var(--gjs-main-font);\n font-size: var(--gjs-font-size);\n max-height: 80vh;\n overflow-y: auto;\n }\n .gjs-notification details summary {\n list-style: none;\n }\n .gjs-notification li {\n border-radius: 5px;\n margin: 10px 0;\n padding: 10px;\n list-style: none;\n }\n .gjs-notification ul {\n padding: 0;\n }\n </style>\n <ul class=\"gjs-notification\">\n ","\n </ul>\n "],["\n <style>\n .gjs-notification {\n top: 10px;\n right: 10px;\n max-width: 300px;\n z-index: 9999;\n list-style: none;\n padding: 10px;\n margin: 10px;\n font-family: var(--gjs-main-font);\n font-size: var(--gjs-font-size);\n max-height: 80vh;\n overflow-y: auto;\n }\n .gjs-notification details summary {\n list-style: none;\n }\n .gjs-notification li {\n border-radius: 5px;\n margin: 10px 0;\n padding: 10px;\n list-style: none;\n }\n .gjs-notification ul {\n padding: 0;\n }\n </style>\n <ul class=\"gjs-notification\">\n ","\n </ul>\n "])),o.map((function(e){return'string'==typeof e?function(t,e,n,s){return tt(Pt||(Pt=Nt(["\n <li class=\"gjs-sm gjs-one-bg gjs-two-color gjs-notification__group\">\n <details class=\"gjs-sm gjs-one-bg gjs-two-color\">\n <summary class=\"gjs-sm-header gjs-label\">\n <div>📌 ","</div>\n <button @click="," class=\"gjs-btn-prim\">","</button>\n <button\n @click=","\n class=\"gjs-btn-prim\"\n >","</button>\n </summary>\n <ul>\n ","\n </ul>\n </details>\n </li>\n "],["\n <li class=\"gjs-sm gjs-one-bg gjs-two-color gjs-notification__group\">\n <details class=\"gjs-sm gjs-one-bg gjs-two-color\">\n <summary class=\"gjs-sm-header gjs-label\">\n <div>\\u{1F4CC} ","</div>\n <button @click="," class=\"gjs-btn-prim\">","</button>\n <button\n @click=","\n class=\"gjs-btn-prim\"\n >","</button>\n </summary>\n <ul>\n ","\n </ul>\n </details>\n </li>\n "])),n,(function(){return s.forEach((function(t){return t.remove()}))}),t.I18n.t('@silexlabs/grapesjs-notifications.CloseAll'),(function(t){return t.currentTarget.closest('details').toggleAttribute('open')}),t.I18n.t('@silexlabs/grapesjs-notifications.Show'),s.slice(0,e.maxNotifications||s.length).map((function(e){return tt(Ot||(Ot=Nt(["\n ","\n "],["\n ","\n "])),Ht(t,e))})))}(t,s,e,i.filter((function(t){return t.group===e}))):Ht(t,e)}))),function(t){if('string'==typeof t)return document.querySelector(t);return t}(e))}function Ht(t,e){return tt(Tt||(Tt=Nt(["\n <li class=",">\n <header class=\"gjs-sm-header gjs-label\">\n <span>","</span>\n <span class=\"gjs-sm-header\">","</span>\n </header>\n <footer class=\"gjs-sm-footer\">\n <button @click="," class=\"gjs-btn-prim\">","</button>\n ","\n </footer>\n </li>\n "],["\n <li class=",">\n <header class=\"gjs-sm-header gjs-label\">\n <span>","</span>\n <span class=\"gjs-sm-header\">","</span>\n </header>\n <footer class=\"gjs-sm-footer\">\n <button @click="," class=\"gjs-btn-prim\">","</button>\n ","\n </footer>\n </li>\n "])),St({'gjs-sm':!0,'gjs-one-bg':!0,'gjs-two-color':!0,'gjs-notification__item':!0,'gjs-notification__info':'info'===e.type,'gjs-notification__warning':'warning'===e.type,'gjs-notification__error':'error'===e.type,'gjs-notification__success':'success'===e.type}),e.getSvgIcon(e.type),wt(e.message),(function(){return e.remove()}),t.I18n.t('@silexlabs/grapesjs-notifications.Close'),e.componentId?tt(It||(It=Nt(["\n <button @click="," class=\"gjs-btn-prim\">","</button>\n "],["\n <button @click="," class=\"gjs-btn-prim\">","</button>\n "])),(function(){return e.select()}),t.I18n.t('@silexlabs/grapesjs-notifications.Select')):'')}var Rt=function(){function t(t){this.storeKey=t}return t.prototype.getAll=function(){return this.storeKey?JSON.parse(localStorage.getItem(this.storeKey)||'[]'):[]},t.prototype.save=function(t){this.storeKey&&localStorage.setItem(this.storeKey,JSON.stringify(t.map((function(t){var e;return{message:t.message,type:t.type,componentId:t.componentId,group:t.group,timeout:null===(e=t.options)||void 0===e?void 0:e.timeout}}))))},t}(),kt=void 0&&(void 0).__assign||function(){return kt=Object.assign||function(t){for(var e,n=1,s=arguments.length;n<s;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},kt.apply(this,arguments)},Dt='notifications:add',zt='notifications:remove',Lt='notifications:clear';function Bt(t){if(t)return t;var e=document.createElement('ul');return e.style.position='fixed',e.style.bottom='10px',e.style.zIndex='9999',document.body.appendChild(e),e}const Kt=function(t,e){void 0===e&&(e={});var s=kt({i18n:{},container:Bt(e.container),storeKey:void 0,maxNotifications:50,reverse:!1},e);t.I18n&&t.I18n.addMessages(kt({en:n},s.i18n));var i=s.storeKey?new Rt(s.storeKey):null,o=new h((null==i?void 0:i.getAll())||[],t,s);return t.Commands.add(Dt,{run:function(t,e,n){o.add(n)}}),t.Commands.add(zt,{run:function(t,e,n){var s=(null==n?void 0:n.notification)||n;o.remove(s)}}),t.Commands.add(Lt,{run:function(t){o.reset()}}),t.on(r,(function(e){var n=e||o.getAll();null==i||i.save(n),Ut(t,s.container,n,s)})),{getAll:function(){return o.getAll()},add:function(e){return t.runCommand(Dt,e)},remove:function(e){return t.runCommand(zt,e)},clear:function(){return t.runCommand(Lt)}}};return e})()));
1
+ /*! @silexlabs/grapesjs-notifications - 0.2.1-0 */
2
+ !function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["@silexlabs/grapesjs-notifications"]=e():t["@silexlabs/grapesjs-notifications"]=e()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})}},e={};t.r(e),t.d(e,{NOTIFICATION_ADD:()=>Dt,NOTIFICATION_ADDED:()=>a,NOTIFICATION_CHANGED:()=>r,NOTIFICATION_CLEAR:()=>Lt,NOTIFICATION_CLEARED:()=>c,NOTIFICATION_REMOVE:()=>zt,NOTIFICATION_REMOVED:()=>l,Notification:()=>s,default:()=>Kt});const n={'@silexlabs/grapesjs-notifications':{Close:'✖ Dismiss',CloseAll:'✖ Dismiss all',Select:'✓ Select component',Show:'↓ Show'}};var i=void 0&&(void 0).__assign||function(){return i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},i.apply(this,arguments)},s=function(){function t(t,e,n){var i=this;this.editor=t,this.id=null,this.componentId=null,this.group=null,this.options=this.getDefaultOptions(e),this.removeCallback=n,this.options.timeout&&(this.timeoutRef=setTimeout((function(){return i.remove()}),this.options.timeout)),this.id=e.id||null,this.message=this.options.message,this.type=this.options.type,this.componentId=e.componentId||null,this.group=e.group||null,this.model={attributes:e}}return t.prototype.select=function(){var t=this;if(this.options.componentId){var e=this.getAllComponents(this.editor).find((function(e){var n=e.component;e.page;return n.getId()===t.options.componentId}))||null;if(e){var n=e.component,i=e.page;this.editor.Pages.select(i),this.editor.select(n),this.editor.Canvas.scrollTo(n)}else console.error("Component with ID ".concat(this.options.componentId," not found")),this.editor.runCommand('notifications:add',{message:"Component with ID ".concat(this.options.componentId," not found"),type:'error'})}},t.prototype.remove=function(){this.removeCallback?this.removeCallback(this):this.editor.runCommand('notifications:remove',{notification:this}),this.timeoutRef&&clearTimeout(this.timeoutRef)},t.prototype.getSvgIcon=function(t){var e;return null===(e=this.options.icons)||void 0===e?void 0:e[t]},t.prototype.getDefaultOptions=function(t){return i({icons:i({info:"🚧",warning:"⚠",error:"🚫",success:"✅",group:"📌"},t.icons)},t)},t.prototype.getAllComponents=function(t){var e=this;return t.Pages.getAll().map((function(t){return e.getAllComponentInPage(t)})).flat()},t.prototype.getAllComponentInPage=function(t){var e=t.getMainComponent();return[{component:e,page:t}].concat(this.getAllChildrenComponent(e).map((function(e){return{component:e,page:t}})))},t.prototype.getAllChildrenComponent=function(t){var e=this,n=Array.from(t.components().models);return n.concat(n.map((function(t){return e.getAllChildrenComponent(t)})).flat())},t}(),o=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var i,s=0,o=e.length;s<o;s++)!i&&s in e||(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return t.concat(i||Array.prototype.slice.call(e))},r='notifications:changed',a='notifications:added',l='notifications:removed',c='notifications:cleared',h=function(){function t(t,e,n){var i=this;this.editor=e,this.options=n,this.notifications=[],this.notifications=t.map((function(t){if('object'==typeof t&&t.message){return new s(i.editor,t,(function(t){return i.remove(t)}))}return t})).filter(Boolean)}return t.prototype.getAll=function(){return o([],this.notifications,!0)},t.prototype.add=function(t){var e=this;if(t.id){var n=this.notifications.find((function(e){return e.options.id===t.id}));n&&this.remove(n)}var i=new s(this.editor,t,(function(t){return e.remove(t)}));this.notifications.push(i),this.editor.trigger(a,i),this.editor.trigger(r,this.getAll())},t.prototype.remove=function(t){var e=this.notifications.findIndex((function(e){return e===t||e.model===t}));if(e>-1){var n=this.notifications.splice(e,1)[0];this.editor.trigger(l,n),this.editor.trigger(r,this.getAll())}},t.prototype.reset=function(){this.notifications=[],this.editor.trigger(c),this.editor.trigger(r,this.getAll())},t}();const d=globalThis,p=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u=Symbol(),f=new WeakMap;class g{constructor(t,e,n){if(this._$cssResult$=!0,n!==u)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(p&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=f.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&f.set(e,t))}return t}toString(){return this.cssText}}const m=(t,e)=>{if(p)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),i=d.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=n.cssText,t.appendChild(e)}},_=p?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new g("string"==typeof t?t:t+"",void 0,u))(e)})(t):t,{is:y,defineProperty:$,getOwnPropertyDescriptor:v,getOwnPropertyNames:A,getOwnPropertySymbols:b,getPrototypeOf:E}=Object,C=globalThis,S=C.trustedTypes,j=S?S.emptyScript:"",w=C.reactiveElementPolyfillSupport,x=(t,e)=>t,O={toAttribute(t,e){switch(e){case Boolean:t=t?j:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},P=(t,e)=>!y(t,e),I={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:P};Symbol.metadata??=Symbol("metadata"),C.litPropertyMetadata??=new WeakMap;class T 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=I){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 n=Symbol(),i=this.getPropertyDescriptor(t,n,e);void 0!==i&&$(this.prototype,t,i)}}static getPropertyDescriptor(t,e,n){const{get:i,set:s}=v(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const o=i?.call(this);s?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??I}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=E(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...A(t),...b(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(_(t))}else void 0!==t&&e.push(_(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return m(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,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(void 0!==i&&!0===n.reflect){const s=(void 0!==n.converter?.toAttribute?n.converter:O).toAttribute(e,n.type);this._$Em=t,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){const n=this.constructor,i=n._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=n.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:O;this._$Em=i,this[i]=s.fromAttribute(e,t.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const i=this.constructor,s=this[t];if(n??=i.getPropertyOptions(t),!((n.hasChanged??P)(s,e)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==s||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&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[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,n,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[x("elementProperties")]=new Map,T[x("finalized")]=new Map,w?.({ReactiveElement:T}),(C.reactiveElementVersions??=[]).push("2.1.0");const N=globalThis,M=N.trustedTypes,U=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,H="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,k="?"+R,D=`<${k}>`,z=document,L=()=>z.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,K=Array.isArray,F=t=>K(t)||"function"==typeof t?.[Symbol.iterator],V="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,J=/>/g,Z=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,X=/^(?:script|style|textarea|title)$/i,Y=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),tt=Y(1),et=(Y(2),Y(3),Symbol.for("lit-noChange")),nt=Symbol.for("lit-nothing"),it=new WeakMap,st=z.createTreeWalker(z,129);function ot(t,e){if(!K(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==U?U.createHTML(e):e}const rt=(t,e)=>{const n=t.length-1,i=[];let s,o=2===e?"<svg>":3===e?"<math>":"",r=W;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,h=0;for(;h<n.length&&(r.lastIndex=h,l=r.exec(n),null!==l);)h=r.lastIndex,r===W?"!--"===l[1]?r=q:void 0!==l[1]?r=J:void 0!==l[2]?(X.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=Z):void 0!==l[3]&&(r=Z):r===Z?">"===l[0]?(r=s??W,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Z:'"'===l[3]?Q:G):r===Q||r===G?r=Z:r===q||r===J?r=W:(r=Z,s=void 0);const d=r===Z&&t[e+1].startsWith("/>")?" ":"";o+=r===W?n+D:c>=0?(i.push(a),n.slice(0,c)+H+n.slice(c)+R+d):n+R+(-2===c?e:d)}return[ot(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class at{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let s=0,o=0;const r=t.length-1,a=this.parts,[l,c]=rt(t,e);if(this.el=at.createElement(l,n),st.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=st.nextNode())&&a.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(H)){const e=c[o++],n=i.getAttribute(t).split(R),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:r[2],strings:n,ctor:"."===r[1]?pt:"?"===r[1]?ut:"@"===r[1]?ft:dt}),i.removeAttribute(t)}else t.startsWith(R)&&(a.push({type:6,index:s}),i.removeAttribute(t));if(X.test(i.tagName)){const t=i.textContent.split(R),e=t.length-1;if(e>0){i.textContent=M?M.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],L()),st.nextNode(),a.push({type:2,index:++s});i.append(t[e],L())}}}else if(8===i.nodeType)if(i.data===k)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(R,t+1));)a.push({type:7,index:s}),t+=R.length-1}s++}}static createElement(t,e){const n=z.createElement("template");return n.innerHTML=t,n}}function lt(t,e,n=t,i){if(e===et)return e;let s=void 0!==i?n._$Co?.[i]:n._$Cl;const o=B(e)?void 0:e._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),void 0===o?s=void 0:(s=new o(t),s._$AT(t,n,i)),void 0!==i?(n._$Co??=[])[i]=s:n._$Cl=s),void 0!==s&&(e=lt(t,s._$AS(t,e.values),s,i)),e}class ct{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:n}=this._$AD,i=(t?.creationScope??z).importNode(e,!0);st.currentNode=i;let s=st.nextNode(),o=0,r=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new ht(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new gt(s,this,t)),this._$AV.push(e),a=n[++r]}o!==a?.index&&(s=st.nextNode(),o++)}return st.currentNode=z,i}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class ht{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=lt(this,t,e),B(t)?t===nt||null==t||""===t?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):F(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!==nt&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,i="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=at.createElement(ot(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new ct(i,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new at(t)),e}k(t){K(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const s of t)i===e.length?e.push(n=new ht(this.O(L()),this.O(L()),this,this.options)):n=e[i],n._$AI(s),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class dt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,s){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=nt}_$AI(t,e=this,n,i){const s=this.strings;let o=!1;if(void 0===s)t=lt(this,t,e,0),o=!B(t)||t!==this._$AH&&t!==et,o&&(this._$AH=t);else{const i=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=lt(this,i[n+r],e,r),a===et&&(a=this._$AH[r]),o||=!B(a)||a!==this._$AH[r],a===nt?t=nt:t!==nt&&(t+=(a??"")+s[r+1]),this._$AH[r]=a}o&&!i&&this.j(t)}j(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class pt extends dt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nt?void 0:t}}class ut extends dt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class ft extends dt{constructor(t,e,n,i,s){super(t,e,n,i,s),this.type=5}_$AI(t,e=this){if((t=lt(this,t,e,0)??nt)===et)return;const n=this._$AH,i=t===nt&&n!==nt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==nt&&(n===nt||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class gt{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){lt(this,t)}}const mt=N.litHtmlPolyfillSupport;mt?.(at,ht),(N.litHtmlVersions??=[]).push("3.3.0");const _t=(t,e,n)=>{const i=n?.renderBefore??e;let s=i._$litPart$;if(void 0===s){const t=n?.renderBefore??null;i._$litPart$=s=new ht(e.insertBefore(L(),t),t,void 0,n??{})}return s._$AI(t),s},yt=globalThis;class $t extends T{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=_t(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}}$t._$litElement$=!0,$t["finalized"]=!0,yt.litElementHydrateSupport?.({LitElement:$t});const vt=yt.litElementPolyfillSupport;vt?.({LitElement:$t});(yt.litElementVersions??=[]).push("4.2.0");const At=1,bt=2,Et=t=>(...e)=>({_$litDirective$:t,values:e});class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const St=Et(class extends Ct{constructor(t){if(super(t),t.type!==At||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const n=t.element.classList;for(const t of this.st)t in e||(n.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(n.add(t),this.st.add(t)):(n.remove(t),this.st.delete(t)))}return et}});class jt extends Ct{constructor(t){if(super(t),this.it=nt,t.type!==bt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===nt||null==t)return this._t=void 0,this.it=t;if(t===et)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}jt.directiveName="unsafeHTML",jt.resultType=1;const wt=Et(jt);var xt,Ot,Pt,It,Tt,Nt=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Mt=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var i,s=0,o=e.length;s<o;s++)!i&&s in e||(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return t.concat(i||Array.prototype.slice.call(e))};function Ut(t,e,n,i){var s=Mt([],n,!0);i.reverse&&s.reverse();var o=function(t){var e={},n=[];return t.forEach((function(t){t.group&&!e[t.group]?(e[t.group]=!0,n.push(t.group)):t.group||n.push(t)})),n}(s).slice(0,i.maxNotifications||s.length);_t(tt(xt||(xt=Nt(["\n <style>\n .gjs-notification {\n top: 10px;\n right: 10px;\n max-width: 300px;\n z-index: 9999;\n list-style: none;\n padding: 10px;\n margin: 10px;\n font-family: var(--gjs-main-font);\n font-size: var(--gjs-font-size);\n max-height: 80vh;\n overflow-y: auto;\n }\n .gjs-notification details summary {\n list-style: none;\n }\n .gjs-notification li {\n border-radius: 5px;\n margin: 10px 0;\n padding: 10px;\n list-style: none;\n }\n .gjs-notification ul {\n padding: 0;\n }\n </style>\n <ul class=\"gjs-notification\">\n ","\n </ul>\n "],["\n <style>\n .gjs-notification {\n top: 10px;\n right: 10px;\n max-width: 300px;\n z-index: 9999;\n list-style: none;\n padding: 10px;\n margin: 10px;\n font-family: var(--gjs-main-font);\n font-size: var(--gjs-font-size);\n max-height: 80vh;\n overflow-y: auto;\n }\n .gjs-notification details summary {\n list-style: none;\n }\n .gjs-notification li {\n border-radius: 5px;\n margin: 10px 0;\n padding: 10px;\n list-style: none;\n }\n .gjs-notification ul {\n padding: 0;\n }\n </style>\n <ul class=\"gjs-notification\">\n ","\n </ul>\n "])),o.map((function(e){return'string'==typeof e?function(t,e,n,i){return tt(Pt||(Pt=Nt(["\n <li class=\"gjs-sm gjs-one-bg gjs-two-color gjs-notification__group\">\n <details class=\"gjs-sm gjs-one-bg gjs-two-color\">\n <summary class=\"gjs-sm-header gjs-label\">\n <div>📌 ","</div>\n <button @click="," class=\"gjs-btn-prim\">","</button>\n <button\n @click=","\n class=\"gjs-btn-prim\"\n >","</button>\n </summary>\n <ul>\n ","\n </ul>\n </details>\n </li>\n "],["\n <li class=\"gjs-sm gjs-one-bg gjs-two-color gjs-notification__group\">\n <details class=\"gjs-sm gjs-one-bg gjs-two-color\">\n <summary class=\"gjs-sm-header gjs-label\">\n <div>\\u{1F4CC} ","</div>\n <button @click="," class=\"gjs-btn-prim\">","</button>\n <button\n @click=","\n class=\"gjs-btn-prim\"\n >","</button>\n </summary>\n <ul>\n ","\n </ul>\n </details>\n </li>\n "])),n,(function(){return i.forEach((function(t){return t.remove()}))}),t.I18n.t('@silexlabs/grapesjs-notifications.CloseAll'),(function(t){return t.currentTarget.closest('details').toggleAttribute('open')}),t.I18n.t('@silexlabs/grapesjs-notifications.Show'),i.slice(0,e.maxNotifications||i.length).map((function(e){return tt(Ot||(Ot=Nt(["\n ","\n "],["\n ","\n "])),Ht(t,e))})))}(t,i,e,s.filter((function(t){return t.group===e}))):Ht(t,e)}))),function(t){if('string'==typeof t)return document.querySelector(t);return t}(e))}function Ht(t,e){return tt(Tt||(Tt=Nt(["\n <li class=",">\n <header class=\"gjs-sm-header gjs-label\">\n <span>","</span>\n <span class=\"gjs-sm-header\">","</span>\n </header>\n <footer class=\"gjs-sm-footer\">\n <button @click="," class=\"gjs-btn-prim\">","</button>\n ","\n </footer>\n </li>\n "],["\n <li class=",">\n <header class=\"gjs-sm-header gjs-label\">\n <span>","</span>\n <span class=\"gjs-sm-header\">","</span>\n </header>\n <footer class=\"gjs-sm-footer\">\n <button @click="," class=\"gjs-btn-prim\">","</button>\n ","\n </footer>\n </li>\n "])),St({'gjs-sm':!0,'gjs-one-bg':!0,'gjs-two-color':!0,'gjs-notification__item':!0,'gjs-notification__info':'info'===e.type,'gjs-notification__warning':'warning'===e.type,'gjs-notification__error':'error'===e.type,'gjs-notification__success':'success'===e.type}),e.getSvgIcon(e.type),wt(e.message),(function(){return e.remove()}),t.I18n.t('@silexlabs/grapesjs-notifications.Close'),e.componentId?tt(It||(It=Nt(["\n <button @click="," class=\"gjs-btn-prim\">","</button>\n "],["\n <button @click="," class=\"gjs-btn-prim\">","</button>\n "])),(function(){return e.select()}),t.I18n.t('@silexlabs/grapesjs-notifications.Select')):'')}var Rt=function(){function t(t){this.storeKey=t}return t.prototype.getAll=function(){return this.storeKey?JSON.parse(localStorage.getItem(this.storeKey)||'[]'):[]},t.prototype.save=function(t){this.storeKey&&localStorage.setItem(this.storeKey,JSON.stringify(t.map((function(t){var e;return{message:t.message,type:t.type,componentId:t.componentId,group:t.group,timeout:null===(e=t.options)||void 0===e?void 0:e.timeout}}))))},t}(),kt=void 0&&(void 0).__assign||function(){return kt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},kt.apply(this,arguments)},Dt='notifications:add',zt='notifications:remove',Lt='notifications:clear';function Bt(t){if(t)return t;var e=document.createElement('ul');return e.style.position='fixed',e.style.bottom='10px',e.style.zIndex='9999',document.body.appendChild(e),e}const Kt=function(t,e){void 0===e&&(e={});var i=kt({i18n:{},container:Bt(e.container),storeKey:void 0,maxNotifications:50,reverse:!1},e);t.I18n&&t.I18n.addMessages(kt({en:n},i.i18n));var s=i.storeKey?new Rt(i.storeKey):null,o=new h((null==s?void 0:s.getAll())||[],t,i);return t.Commands.add(Dt,{run:function(t,e,n){o.add(n)}}),t.Commands.add(zt,{run:function(t,e,n){var i=(null==n?void 0:n.notification)||n;o.remove(i)}}),t.Commands.add(Lt,{run:function(t){o.reset()}}),t.on(r,(function(e){var n=e||o.getAll();null==s||s.save(n),Ut(t,i.container,n,i)})),{getAll:function(){return o.getAll()},add:function(e){return t.runCommand(Dt,e)},remove:function(e){return t.runCommand(zt,e)},clear:function(){return t.runCommand(Lt)}}};return e})()));
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAQ,qCAAuCD,IAE/CD,EAAK,qCAAuCC,GAC7C,CATD,CASyB,oBAAfK,WAA6BA,WAAgC,oBAAXC,OAAyBA,OAASC,MAAO,I,mBCRrG,IAAIC,EAAsB,CCA1BA,EAAwB,CAACP,EAASQ,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBP,IACH,oBAAXoB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeZ,EAASoB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX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ifications/webpack/universalModuleDefinition","webpack://@silexlabs/grapesjs-notifications/webpack/bootstrap","webpack://@silexlabs/grapesjs-notifications/webpack/runtime/define property getters","webpack://@silexlabs/grapesjs-notifications/webpack/runtime/hasOwnProperty shorthand","webpack://@silexlabs/grapesjs-notifications/webpack/runtime/make namespace object","webpack://@silexlabs/grapesjs-notifications/./src/locale/en.js","webpack://@silexlabs/grapesjs-notifications/./src/Notification.ts","webpack://@silexlabs/grapesjs-notifications/./src/NotificationManager.ts","webpack://@silexlabs/grapesjs-notifications/./node_modules/@lit/reactive-element/css-tag.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/@lit/reactive-element/reactive-element.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/lit-html.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-element/lit-element.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/directive.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/directives/class-map.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/directives/unsafe-html.js","webpack://@silexlabs/grapesjs-notifications/./src/view.ts","webpack://@silexlabs/grapesjs-notifications/./src/Storage.ts","webpack://@silexlabs/grapesjs-notifications/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@silexlabs/grapesjs-notifications\"] = factory();\n\telse\n\t\troot[\"@silexlabs/grapesjs-notifications\"] = factory();\n})(typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : this), () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default {\n '@silexlabs/grapesjs-notifications': {\n 'Close': '\\u2716 Dismiss',\n 'CloseAll': '\\u2716 Dismiss all',\n 'Select': '\\u2713 Select component',\n 'Show': '\\u2193 Show',\n },\n};","import { Component, Page, Editor } from 'grapesjs'\n\nexport interface NotificationOptions {\n message: string\n group?: string\n timeout?: number\n componentId?: string\n type: 'info' | 'warning' | 'error' | 'success'\n icons: {\n info: string\n warning: string\n error: string\n success: string\n }\n}\n\nexport class Notification {\n componentId: string | null = null\n group: string | null = null\n timeoutRef\n message: string\n type: 'info' | 'warning' | 'error' | 'success'\n options: NotificationOptions\n public model: any // For compatibility\n private removeCallback?: (notification: Notification) => void\n\n constructor(protected editor: Editor, options: NotificationOptions | any, removeCallback?: (notification: Notification) => void) {\n this.options = this.getDefaultOptions(options)\n this.removeCallback = removeCallback\n if (this.options.timeout) {\n this.timeoutRef = setTimeout(() => this.remove(), this.options.timeout)\n }\n this.message = this.options.message!\n this.type = this.options.type!\n this.componentId = options.componentId || null\n this.group = options.group || null\n this.model = { attributes: options } // For compatibility with existing code\n }\n\n select() {\n if (this.options.componentId) {\n // This operation is heavy\n const found = this.getAllComponents(this.editor)\n .find(({component, page}) => component.getId() === this.options.componentId) || null\n if (found) {\n const {component, page} = found\n this.editor.Pages.select(page)\n this.editor.select(component)\n this.editor.Canvas.scrollTo(component)\n } else {\n console.error(`Component with ID ${this.options.componentId} not found`)\n this.editor.runCommand('notifications:add', {\n message: `Component with ID ${this.options.componentId} not found`,\n type: 'error',\n })\n }\n }\n }\n\n remove() {\n if (this.removeCallback) {\n this.removeCallback(this)\n } else {\n // Fallback to command if no callback provided\n this.editor.runCommand('notifications:remove', {\n notification: this\n })\n }\n this.timeoutRef && clearTimeout(this.timeoutRef)\n }\n\n getSvgIcon(type: string): string {\n return this.options.icons?.[type as keyof NotificationOptions['icons']]!\n }\n\n private getDefaultOptions(opts: Partial<NotificationOptions>): NotificationOptions {\n return {\n ...{\n icons: {\n info: '\\u{1F6A7}',\n warning: '\\u{26A0}',\n error: '\\u{1F6AB}',\n success: '\\u{2705}',\n group: '\\u{1F4CC}',\n ...opts.icons,\n },\n }, ...opts\n } as NotificationOptions\n }\n\n /**\n * Get all components in the editor\n * This is a heavy operation\n */\n private getAllComponents(editor: Editor) {\n return editor.Pages.getAll().map(page => this.getAllComponentInPage(page)).flat()\n }\n\n private getAllComponentInPage(page: Page): {component: Component, page: Page}[] {\n const body = page.getMainComponent() as Component\n return [{\n component: body,\n page,\n }].concat(\n this.getAllChildrenComponent(body)\n .map(component => ({component, page}))\n )\n }\n\n private getAllChildrenComponent(component: Component): Component[] {\n const children = Array.from(component.components().models)\n return children.concat(children.map(child => this.getAllChildrenComponent(child)).flat())\n }\n}\n","import { Editor } from \"grapesjs\"\nimport { Notification, NotificationOptions } from \"./Notification\"\nimport { StyleInfo } from \"lit/directives/style-map\"\n\n// Events\nexport const NOTIFICATION_CHANGED = 'notifications:changed'\nexport const NOTIFICATION_ADDED = 'notifications:added'\nexport const NOTIFICATION_REMOVED = 'notifications:removed'\nexport const NOTIFICATION_CLEARED = 'notifications:cleared'\n\nexport interface NotificationManagerOptions {\n style?: Readonly<StyleInfo>\n container: HTMLElement\n maxNotifications?: number\n reverse?: boolean\n timeout?: number\n storeKey?: string\n i18n?: any\n icons?: {\n info?: string\n warning?: string\n error?: string\n success?: string\n }\n}\n\n/**\n * GrapesJs plugin to manage notifications\n */\nexport class NotificationManager {\n private notifications: Notification[] = []\n\n constructor(initialNotifications: any[], protected editor: Editor, protected options: NotificationManagerOptions) {\n // Convert initial data to notification objects\n this.notifications = initialNotifications.map(data => {\n if (typeof data === 'object' && data.message) {\n const removeCallback = (notification: Notification) => this.remove(notification)\n return new Notification(this.editor, data, removeCallback)\n }\n return data\n }).filter(Boolean)\n }\n\n /**\n * Get all notifications\n */\n getAll(): Notification[] {\n return [...this.notifications]\n }\n\n /**\n * Add a notification\n */\n add(options: NotificationOptions): void {\n const removeCallback = (notification: Notification) => this.remove(notification)\n const notification = new Notification(this.editor, options, removeCallback)\n this.notifications.push(notification)\n this.editor.trigger(NOTIFICATION_ADDED, notification)\n this.editor.trigger(NOTIFICATION_CHANGED, this.getAll())\n }\n\n /**\n * Remove a notification\n */\n remove(notification: Notification | any): void {\n const index = this.notifications.findIndex(n => n === notification || n.model === notification)\n if (index > -1) {\n const removed = this.notifications.splice(index, 1)[0]\n this.editor.trigger(NOTIFICATION_REMOVED, removed)\n this.editor.trigger(NOTIFICATION_CHANGED, this.getAll())\n }\n }\n\n /**\n * Clear all notifications\n */\n reset(): void {\n this.notifications = []\n this.editor.trigger(NOTIFICATION_CLEARED)\n this.editor.trigger(NOTIFICATION_CHANGED, this.getAll())\n }\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y 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,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(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,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&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[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.0\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(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!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.3.0\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{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 r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.0\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import{nothing as t,noChange as i}from\"../lit-html.js\";import{Directive as r,PartType as s,directive as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends r{constructor(i){if(super(i),this.it=t,i.type!==s.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=n(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","import { html, render as litRender, TemplateResult } from 'lit'\nimport { classMap } from 'lit-html/directives/class-map.js'\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js'\nimport { Editor } from 'grapesjs'\nimport { Notification } from './Notification'\nimport { NotificationManagerOptions } from './NotificationManager'\n\nexport default function(editor: Editor, container: HTMLElement, notifs: Notification[], options: NotificationManagerOptions): void {\n const notifications = [...notifs]\n\n // Reverse if options.reverse is true\n if (options.reverse) {\n notifications.reverse()\n }\n \n const organizedNotifications = organizeNotifications(notifications)\n .slice(0, options.maxNotifications || notifications.length)\n\n litRender(html`\n <style>\n .gjs-notification {\n top: 10px;\n right: 10px;\n max-width: 300px;\n z-index: 9999;\n list-style: none;\n padding: 10px;\n margin: 10px;\n font-family: var(--gjs-main-font);\n font-size: var(--gjs-font-size);\n max-height: 80vh;\n overflow-y: auto;\n }\n .gjs-notification details summary {\n list-style: none;\n }\n .gjs-notification li {\n border-radius: 5px;\n margin: 10px 0;\n padding: 10px;\n list-style: none;\n }\n .gjs-notification ul {\n padding: 0;\n }\n </style>\n <ul class=\"gjs-notification\">\n ${\n organizedNotifications\n .map(item => typeof item === 'string' ? renderGroup(editor, options, item, notifications.filter(n => n.group === item)) : renderNotification(editor, item))\n }\n </ul>\n `, getContainer(container))\n}\n\nfunction getContainer(container: HTMLElement | string): HTMLElement {\n if (typeof container === 'string') {\n return document.querySelector(container) as HTMLElement\n }\n return container\n}\n\nfunction organizeNotifications(notifications: Notification[]): (Notification | string)[] {\n const groups: {[key: string]: boolean} = {}\n const organized: (Notification | string)[] = []\n\n notifications.forEach(notification => {\n if (notification.group && !groups[notification.group]) {\n groups[notification.group] = true\n organized.push(notification.group)\n } else if (!notification.group) {\n organized.push(notification)\n }\n })\n\n return organized\n}\n\nfunction renderGroup(editor: Editor, options: NotificationManagerOptions, groupName: string, groupedNotifications: Notification[]): TemplateResult {\n return html`\n <li class=\"gjs-sm gjs-one-bg gjs-two-color gjs-notification__group\">\n <details class=\"gjs-sm gjs-one-bg gjs-two-color\">\n <summary class=\"gjs-sm-header gjs-label\">\n <div>\\u{1F4CC} ${groupName}</div>\n <button @click=${() => groupedNotifications.forEach(notification => notification.remove())} class=\"gjs-btn-prim\">${editor.I18n.t('@silexlabs/grapesjs-notifications.CloseAll')}</button>\n <button\n @click=${(e: any) => e.currentTarget.closest('details').toggleAttribute('open')}\n class=\"gjs-btn-prim\"\n >${ editor.I18n.t('@silexlabs/grapesjs-notifications.Show') }</button>\n </summary>\n <ul>\n ${groupedNotifications\n .slice(0, options.maxNotifications || groupedNotifications.length)\n .map(notification => html`\n ${renderNotification(editor, notification)}\n `)}\n </ul>\n </details>\n </li>\n `\n}\n\nfunction renderNotification(editor: Editor, notification: Notification): TemplateResult {\n return html`\n <li class=${classMap({\n 'gjs-sm': true,\n 'gjs-one-bg': true,\n 'gjs-two-color': true,\n 'gjs-notification__item': true,\n 'gjs-notification__info': notification.type === 'info',\n 'gjs-notification__warning': notification.type === 'warning',\n 'gjs-notification__error': notification.type === 'error',\n 'gjs-notification__success': notification.type === 'success',\n })}>\n <header class=\"gjs-sm-header gjs-label\">\n <span>${notification.getSvgIcon(notification.type)}</span>\n <span class=\"gjs-sm-header\">${unsafeHTML(notification.message)}</span>\n </header>\n <footer class=\"gjs-sm-footer\">\n <button @click=${() => notification.remove()} class=\"gjs-btn-prim\">${editor.I18n.t('@silexlabs/grapesjs-notifications.Close')}</button>\n ${notification.componentId ? html`\n <button @click=${() => notification.select()} class=\"gjs-btn-prim\">${editor.I18n.t('@silexlabs/grapesjs-notifications.Select')}</button>\n ` : ''}\n </footer>\n </li>\n `\n}\n","import { Notification } from './Notification'\n\n/**\n * @fileoverview Storage class\n * Stores the notifications in the local storage\n */\n\nexport class Storage {\n constructor(private storeKey?: string) {}\n \n getAll(): any[] {\n if(!this.storeKey) return []\n return JSON.parse(localStorage.getItem(this.storeKey) || '[]')\n }\n \n save(data: Notification[]) {\n if(!this.storeKey) return\n localStorage.setItem(this.storeKey, JSON.stringify(data.map(n => ({\n message: n.message,\n type: n.type,\n componentId: n.componentId,\n group: n.group,\n timeout: n.options?.timeout\n }))))\n }\n}\n","import { Editor } from 'grapesjs'\nimport en from './locale/en'\nimport { \n NotificationManager, \n NotificationManagerOptions,\n NOTIFICATION_CHANGED,\n NOTIFICATION_ADDED,\n NOTIFICATION_REMOVED,\n NOTIFICATION_CLEARED\n} from './NotificationManager'\nimport view from './view'\nimport { Storage } from './Storage'\n\n// Commands\nexport const NOTIFICATION_ADD = 'notifications:add'\nexport const NOTIFICATION_REMOVE = 'notifications:remove' \nexport const NOTIFICATION_CLEAR = 'notifications:clear'\n\n// Events (re-exported from NotificationManager)\nexport {\n NOTIFICATION_CHANGED,\n NOTIFICATION_ADDED,\n NOTIFICATION_REMOVED,\n NOTIFICATION_CLEARED\n}\n\n// Types\nexport type { NotificationManagerOptions } from './NotificationManager'\nexport type { NotificationOptions } from './Notification'\nexport { Notification } from './Notification'\n\n/**\n * Create a container if needed, make it sticky and append it to the body\n */\nfunction createDefaultContainer(container?: HTMLElement): HTMLElement {\n if (container) return container\n \n const el = document.createElement('ul')\n el.style.position = 'fixed'\n el.style.bottom = '10px'\n el.style.zIndex = '9999'\n document.body.appendChild(el)\n return el\n}\n\n// GrapesJS Plugin\nexport default (editor: Editor, opts: Partial<NotificationManagerOptions> = {}) => {\n const options = {\n i18n: {},\n container: createDefaultContainer(opts.container),\n storeKey: undefined,\n maxNotifications: 50,\n reverse: false,\n ...opts\n } as NotificationManagerOptions\n\n // Load i18n files\n editor.I18n && editor.I18n.addMessages({\n en,\n ...options.i18n,\n })\n\n // Create storage if needed\n const storage = options.storeKey ? new Storage(options.storeKey) : null\n\n // Create notification manager\n const notificationManager = new NotificationManager(storage?.getAll() || [], editor, options)\n\n // Add commands\n editor.Commands.add(NOTIFICATION_ADD, {\n run(editor: Editor, sender: any, options: any) {\n notificationManager.add(options)\n }\n })\n\n editor.Commands.add(NOTIFICATION_REMOVE, {\n run(editor: Editor, sender: any, data: any) {\n const notification = data?.notification || data\n notificationManager.remove(notification)\n }\n })\n\n editor.Commands.add(NOTIFICATION_CLEAR, {\n run(editor: Editor) {\n notificationManager.reset()\n }\n })\n\n\n // Handle notification changes\n editor.on(NOTIFICATION_CHANGED, (notifications) => {\n // Use the passed notifications array or get all as fallback\n const allNotifications = notifications || notificationManager.getAll()\n // Update storage\n storage?.save(allNotifications)\n // Render notifications\n view(editor, options.container, allNotifications, options)\n })\n\n // Public API accessible via commands and events only\n return {\n getAll: () => notificationManager.getAll(),\n add: (notification: any) => editor.runCommand(NOTIFICATION_ADD, notification),\n remove: (notification: any) => editor.runCommand(NOTIFICATION_REMOVE, notification),\n clear: () => editor.runCommand(NOTIFICATION_CLEAR)\n }\n}\n"],"names":["root","factory","exports","module","define","amd","globalThis","window","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","editor","options","removeCallback","componentId","group","getDefaultOptions","timeout","timeoutRef","setTimeout","remove","message","type","model","attributes","select","found","getAllComponents","find","component","getId","page","Pages","Canvas","scrollTo","console","error","runCommand","notification","clearTimeout","getSvgIcon","icons","opts","info","warning","success","getAll","map","getAllComponentInPage","flat","body","getMainComponent","concat","getAllChildrenComponent","children","Array","from","components","models","child","NOTIFICATION_CHANGED","NOTIFICATION_ADDED","NOTIFICATION_REMOVED","NOTIFICATION_CLEARED","initialNotifications","notifications","data","Notification","filter","Boolean","add","push","trigger","index","findIndex","n","removed","splice","reset","t","e","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","s","WeakMap","constructor","_$cssResult$","Error","cssText","styleSheet","length","replaceSync","set","toString","S","adoptedStyleSheets","document","createElement","litNonce","setAttribute","textContent","appendChild","c","cssRules","r","is","getOwnPropertyDescriptor","h","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","a","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","d","u","toAttribute","JSON","stringify","fromAttribute","i","Number","parse","f","b","attribute","String","converter","reflect","useDefault","hasChanged","metadata","litPropertyMetadata","y","HTMLElement","addInitializer","_$Ei","observedAttributes","finalize","_$Eh","keys","createProperty","state","create","wrapped","elementProperties","noAccessor","getPropertyDescriptor","requestUpdate","configurable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","reverse","unshift","toLowerCase","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","_$Ej","hasAttribute","C","_$EP","has","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","createPolicy","createHTML","Math","random","toFixed","slice","createComment","iterator","v","_","m","RegExp","g","$","_$litType$","strings","values","x","T","for","E","A","createTreeWalker","P","V","lastIndex","exec","test","startsWith","N","parts","el","currentNode","content","firstChild","replaceWith","childNodes","nextNode","nodeType","hasAttributes","getAttributeNames","endsWith","getAttribute","split","name","ctor","H","I","L","k","tagName","append","indexOf","innerHTML","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","M","_$AV","_$AN","_$AD","_$AM","parentNode","_$AU","creationScope","importNode","R","nextSibling","z","_$AI","_$Cv","_$AH","_$AA","_$AB","startNode","endNode","_$AR","O","insertBefore","createTextNode","_$AC","_$AP","setConnected","element","fill","j","arguments","toggleAttribute","capture","once","passive","removeEventListener","addEventListener","handleEvent","host","litHtmlPolyfillSupport","litHtmlVersions","B","renderBefore","_$litPart$","renderOptions","_$Do","render","_$litElement$","litElementHydrateSupport","LitElement","litElementPolyfillSupport","litElementVersions","_$Ct","_$Ci","join","st","nt","classList","it","directiveName","_t","raw","resultType","container","notifs","organizedNotifications","groups","organized","organizeNotifications","maxNotifications","item","groupName","groupedNotifications","I18n","currentTarget","closest","renderNotification","renderGroup","querySelector","getContainer","storeKey","localStorage","getItem","save","setItem","NOTIFICATION_ADD","NOTIFICATION_REMOVE","NOTIFICATION_CLEAR","createDefaultContainer","style","position","bottom","zIndex","i18n","undefined","addMessages","en","storage","Storage","notificationManager","NotificationManager","Commands","run","sender","on","allNotifications","view","clear"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAQ,qCAAuCD,IAE/CD,EAAK,qCAAuCC,GAC7C,CATD,CASyB,oBAAfK,WAA6BA,WAAgC,oBAAXC,OAAyBA,OAASC,MAAO,I,mBCRrG,IAAIC,EAAsB,CCA1BA,EAAwB,CAACP,EAASQ,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBP,IACH,oBAAXoB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeZ,EAASoB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeZ,EAAS,aAAc,CAAEsB,OAAO,GAAO,G,8OCL9D,SACI,oCAAqC,CACjC,MAAS,YACT,SAAY,gBACZ,OAAU,qBACV,KAAQ,W,+OCYhB,aAWE,WAAsBC,EAAgBC,EAAoCC,GAA1E,WAAsB,KAAAF,OAAAA,EAVtB,KAAAG,GAAoB,KACpB,KAAAC,YAA6B,KAC7B,KAAAC,MAAuB,KASrBtB,KAAKkB,QAAUlB,KAAKuB,kBAAkBL,GACtClB,KAAKmB,eAAiBA,EAClBnB,KAAKkB,QAAQM,UACfxB,KAAKyB,WAAaC,YAAW,WAAM,SAAKC,QAAL,GAAe3B,KAAKkB,QAAQM,UAEjExB,KAAKoB,GAAKF,EAAQE,IAAM,KACxBpB,KAA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V,KAAKsB,YAAY,IACrCC,GAAE,GACChX,EAAQ6W,OAIb,IAAMI,EAAUjX,EAAQgW,SAAW,IAAIkB,GAAQlX,EAAQgW,UAAY,KAG7DmB,EAAsB,IAAIC,GAAoBH,aAAO,EAAPA,EAAS9U,WAAY,GAAIpC,EAAQC,GAkCrF,OA/BAD,EAAOsX,SAAS1T,IAAI0S,GAAkB,CACpCiB,IAAG,SAACvX,EAAgBwX,EAAavX,GAC/BmX,EAAoBxT,IAAI3D,EAC1B,IAGFD,EAAOsX,SAAS1T,IAAI2S,GAAqB,CACvCgB,IAAG,SAACvX,EAAgBwX,EAAahU,GAC/B,IAAM5B,GAAe4B,aAAI,EAAJA,EAAM5B,eAAgB4B,EAC3C4T,EAAoB1W,OAAOkB,EAC7B,IAGF5B,EAAOsX,SAAS1T,IAAI4S,GAAoB,CACtCe,IAAG,SAACvX,GACFoX,EAAoB/S,OACtB,IAKFrE,EAAOyX,GAAGvU,GAAsB,SAACK,GAE/B,IAAMmU,EAAmBnU,GAAiB6T,EAAoBhV,SAE9D8U,SAAAA,EAASd,KAAKsB,GAEdC,GAAK3X,EAAQC,EAAQ+U,UAAW0C,EAAkBzX,EACpD,IAGO,CACLmC,OAAQ,WAAM,OAAAgV,EAAoBhV,QAApB,EACdwB,IAAK,SAAChC,GAAsB,OAAA5B,EAAO2B,WAAW2U,GAAkB1U,EAApC,EAC5BlB,OAAQ,SAACkB,GAAsB,OAAA5B,EAAO2B,WAAW4U,GAAqB3U,EAAvC,EAC/BgW,MAAO,WAAM,OAAA5X,EAAO2B,WAAW6U,GAAlB,EAEhB,E","sources":["webpack://@silexlabs/grapesjs-notifications/webpack/universalModuleDefinition","webpack://@silexlabs/grapesjs-notifications/webpack/bootstrap","webpack://@silexlabs/grapesjs-notifications/webpack/runtime/define property getters","webpack://@silexlabs/grapesjs-notifications/webpack/runtime/hasOwnProperty shorthand","webpack://@silexlabs/grapesjs-notifications/webpack/runtime/make namespace object","webpack://@silexlabs/grapesjs-notifications/./src/locale/en.js","webpack://@silexlabs/grapesjs-notifications/./src/Notification.ts","webpack://@silexlabs/grapesjs-notifications/./src/NotificationManager.ts","webpack://@silexlabs/grapesjs-notifications/./node_modules/@lit/reactive-element/css-tag.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/@lit/reactive-element/reactive-element.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/lit-html.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-element/lit-element.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/directive.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/directives/class-map.js","webpack://@silexlabs/grapesjs-notifications/./node_modules/lit-html/directives/unsafe-html.js","webpack://@silexlabs/grapesjs-notifications/./src/view.ts","webpack://@silexlabs/grapesjs-notifications/./src/Storage.ts","webpack://@silexlabs/grapesjs-notifications/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@silexlabs/grapesjs-notifications\"] = factory();\n\telse\n\t\troot[\"@silexlabs/grapesjs-notifications\"] = factory();\n})(typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : this), () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default {\n '@silexlabs/grapesjs-notifications': {\n 'Close': '\\u2716 Dismiss',\n 'CloseAll': '\\u2716 Dismiss all',\n 'Select': '\\u2713 Select component',\n 'Show': '\\u2193 Show',\n },\n};","import { Component, Page, Editor } from 'grapesjs'\n\nexport interface NotificationOptions {\n id?: string\n message: string\n group?: string\n timeout?: number\n componentId?: string\n type: 'info' | 'warning' | 'error' | 'success'\n icons: {\n info: string\n warning: string\n error: string\n success: string\n }\n}\n\nexport class Notification {\n id: string | null = null\n componentId: string | null = null\n group: string | null = null\n timeoutRef\n message: string\n type: 'info' | 'warning' | 'error' | 'success'\n options: NotificationOptions\n public model: any // For compatibility\n private removeCallback?: (notification: Notification) => void\n\n constructor(protected editor: Editor, options: NotificationOptions | any, removeCallback?: (notification: Notification) => void) {\n this.options = this.getDefaultOptions(options)\n this.removeCallback = removeCallback\n if (this.options.timeout) {\n this.timeoutRef = setTimeout(() => this.remove(), this.options.timeout)\n }\n this.id = options.id || null\n this.message = this.options.message!\n this.type = this.options.type!\n this.componentId = options.componentId || null\n this.group = options.group || null\n this.model = { attributes: options } // For compatibility with existing code\n }\n\n select() {\n if (this.options.componentId) {\n // This operation is heavy\n const found = this.getAllComponents(this.editor)\n .find(({component, page}) => component.getId() === this.options.componentId) || null\n if (found) {\n const {component, page} = found\n this.editor.Pages.select(page)\n this.editor.select(component)\n this.editor.Canvas.scrollTo(component)\n } else {\n console.error(`Component with ID ${this.options.componentId} not found`)\n this.editor.runCommand('notifications:add', {\n message: `Component with ID ${this.options.componentId} not found`,\n type: 'error',\n })\n }\n }\n }\n\n remove() {\n if (this.removeCallback) {\n this.removeCallback(this)\n } else {\n // Fallback to command if no callback provided\n this.editor.runCommand('notifications:remove', {\n notification: this\n })\n }\n this.timeoutRef && clearTimeout(this.timeoutRef)\n }\n\n getSvgIcon(type: string): string {\n return this.options.icons?.[type as keyof NotificationOptions['icons']]!\n }\n\n private getDefaultOptions(opts: Partial<NotificationOptions>): NotificationOptions {\n return {\n ...{\n icons: {\n info: '\\u{1F6A7}',\n warning: '\\u{26A0}',\n error: '\\u{1F6AB}',\n success: '\\u{2705}',\n group: '\\u{1F4CC}',\n ...opts.icons,\n },\n }, ...opts\n } as NotificationOptions\n }\n\n /**\n * Get all components in the editor\n * This is a heavy operation\n */\n private getAllComponents(editor: Editor) {\n return editor.Pages.getAll().map(page => this.getAllComponentInPage(page)).flat()\n }\n\n private getAllComponentInPage(page: Page): {component: Component, page: Page}[] {\n const body = page.getMainComponent() as Component\n return [{\n component: body,\n page,\n }].concat(\n this.getAllChildrenComponent(body)\n .map(component => ({component, page}))\n )\n }\n\n private getAllChildrenComponent(component: Component): Component[] {\n const children = Array.from(component.components().models)\n return children.concat(children.map(child => this.getAllChildrenComponent(child)).flat())\n }\n}\n","import { Editor } from \"grapesjs\"\nimport { Notification, NotificationOptions as BaseNotificationOptions } from \"./Notification\"\nimport { StyleInfo } from \"lit/directives/style-map\"\n\nexport interface NotificationOptions extends BaseNotificationOptions {\n id?: string\n}\n\n// Events\nexport const NOTIFICATION_CHANGED = 'notifications:changed'\nexport const NOTIFICATION_ADDED = 'notifications:added'\nexport const NOTIFICATION_REMOVED = 'notifications:removed'\nexport const NOTIFICATION_CLEARED = 'notifications:cleared'\n\nexport interface NotificationManagerOptions {\n style?: Readonly<StyleInfo>\n container: HTMLElement\n maxNotifications?: number\n reverse?: boolean\n timeout?: number\n storeKey?: string\n i18n?: any\n icons?: {\n info?: string\n warning?: string\n error?: string\n success?: string\n }\n}\n\n/**\n * GrapesJs plugin to manage notifications\n */\nexport class NotificationManager {\n private notifications: Notification[] = []\n\n constructor(initialNotifications: any[], protected editor: Editor, protected options: NotificationManagerOptions) {\n // Convert initial data to notification objects\n this.notifications = initialNotifications.map(data => {\n if (typeof data === 'object' && data.message) {\n const removeCallback = (notification: Notification) => this.remove(notification)\n return new Notification(this.editor, data, removeCallback)\n }\n return data\n }).filter(Boolean)\n }\n\n /**\n * Get all notifications\n */\n getAll(): Notification[] {\n return [...this.notifications]\n }\n\n /**\n * Add a notification\n */\n add(options: NotificationOptions): void {\n if (options.id) {\n // Remove any existing notification with the same id\n const existing = this.notifications.find(n => n.options.id === options.id)\n if (existing) {\n this.remove(existing)\n }\n }\n const removeCallback = (notification: Notification) => this.remove(notification)\n const notification = new Notification(this.editor, options, removeCallback)\n this.notifications.push(notification)\n this.editor.trigger(NOTIFICATION_ADDED, notification)\n this.editor.trigger(NOTIFICATION_CHANGED, this.getAll())\n }\n\n /**\n * Remove a notification\n */\n remove(notification: Notification | any): void {\n const index = this.notifications.findIndex(n => n === notification || n.model === notification)\n if (index > -1) {\n const removed = this.notifications.splice(index, 1)[0]\n this.editor.trigger(NOTIFICATION_REMOVED, removed)\n this.editor.trigger(NOTIFICATION_CHANGED, this.getAll())\n }\n }\n\n /**\n * Clear all notifications\n */\n reset(): void {\n this.notifications = []\n this.editor.trigger(NOTIFICATION_CLEARED)\n this.editor.trigger(NOTIFICATION_CHANGED, this.getAll())\n }\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y 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,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(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,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&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[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.0\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(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!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.3.0\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{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 r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.0\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import{nothing as t,noChange as i}from\"../lit-html.js\";import{Directive as r,PartType as s,directive as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends r{constructor(i){if(super(i),this.it=t,i.type!==s.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=n(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","import { html, render as litRender, TemplateResult } from 'lit'\nimport { classMap } from 'lit-html/directives/class-map.js'\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js'\nimport { Editor } from 'grapesjs'\nimport { Notification } from './Notification'\nimport { NotificationManagerOptions } from './NotificationManager'\n\nexport default function(editor: Editor, container: HTMLElement, notifs: Notification[], options: NotificationManagerOptions): void {\n const notifications = [...notifs]\n\n // Reverse if options.reverse is true\n if (options.reverse) {\n notifications.reverse()\n }\n \n const organizedNotifications = organizeNotifications(notifications)\n .slice(0, options.maxNotifications || notifications.length)\n\n litRender(html`\n <style>\n .gjs-notification {\n top: 10px;\n right: 10px;\n max-width: 300px;\n z-index: 9999;\n list-style: none;\n padding: 10px;\n margin: 10px;\n font-family: var(--gjs-main-font);\n font-size: var(--gjs-font-size);\n max-height: 80vh;\n overflow-y: auto;\n }\n .gjs-notification details summary {\n list-style: none;\n }\n .gjs-notification li {\n border-radius: 5px;\n margin: 10px 0;\n padding: 10px;\n list-style: none;\n }\n .gjs-notification ul {\n padding: 0;\n }\n </style>\n <ul class=\"gjs-notification\">\n ${\n organizedNotifications\n .map(item => typeof item === 'string' ? renderGroup(editor, options, item, notifications.filter(n => n.group === item)) : renderNotification(editor, item))\n }\n </ul>\n `, getContainer(container))\n}\n\nfunction getContainer(container: HTMLElement | string): HTMLElement {\n if (typeof container === 'string') {\n return document.querySelector(container) as HTMLElement\n }\n return container\n}\n\nfunction organizeNotifications(notifications: Notification[]): (Notification | string)[] {\n const groups: {[key: string]: boolean} = {}\n const organized: (Notification | string)[] = []\n\n notifications.forEach(notification => {\n if (notification.group && !groups[notification.group]) {\n groups[notification.group] = true\n organized.push(notification.group)\n } else if (!notification.group) {\n organized.push(notification)\n }\n })\n\n return organized\n}\n\nfunction renderGroup(editor: Editor, options: NotificationManagerOptions, groupName: string, groupedNotifications: Notification[]): TemplateResult {\n return html`\n <li class=\"gjs-sm gjs-one-bg gjs-two-color gjs-notification__group\">\n <details class=\"gjs-sm gjs-one-bg gjs-two-color\">\n <summary class=\"gjs-sm-header gjs-label\">\n <div>\\u{1F4CC} ${groupName}</div>\n <button @click=${() => groupedNotifications.forEach(notification => notification.remove())} class=\"gjs-btn-prim\">${editor.I18n.t('@silexlabs/grapesjs-notifications.CloseAll')}</button>\n <button\n @click=${(e: any) => e.currentTarget.closest('details').toggleAttribute('open')}\n class=\"gjs-btn-prim\"\n >${ editor.I18n.t('@silexlabs/grapesjs-notifications.Show') }</button>\n </summary>\n <ul>\n ${groupedNotifications\n .slice(0, options.maxNotifications || groupedNotifications.length)\n .map(notification => html`\n ${renderNotification(editor, notification)}\n `)}\n </ul>\n </details>\n </li>\n `\n}\n\nfunction renderNotification(editor: Editor, notification: Notification): TemplateResult {\n return html`\n <li class=${classMap({\n 'gjs-sm': true,\n 'gjs-one-bg': true,\n 'gjs-two-color': true,\n 'gjs-notification__item': true,\n 'gjs-notification__info': notification.type === 'info',\n 'gjs-notification__warning': notification.type === 'warning',\n 'gjs-notification__error': notification.type === 'error',\n 'gjs-notification__success': notification.type === 'success',\n })}>\n <header class=\"gjs-sm-header gjs-label\">\n <span>${notification.getSvgIcon(notification.type)}</span>\n <span class=\"gjs-sm-header\">${unsafeHTML(notification.message)}</span>\n </header>\n <footer class=\"gjs-sm-footer\">\n <button @click=${() => notification.remove()} class=\"gjs-btn-prim\">${editor.I18n.t('@silexlabs/grapesjs-notifications.Close')}</button>\n ${notification.componentId ? html`\n <button @click=${() => notification.select()} class=\"gjs-btn-prim\">${editor.I18n.t('@silexlabs/grapesjs-notifications.Select')}</button>\n ` : ''}\n </footer>\n </li>\n `\n}\n","import { Notification } from './Notification'\n\n/**\n * @fileoverview Storage class\n * Stores the notifications in the local storage\n */\n\nexport class Storage {\n constructor(private storeKey?: string) {}\n \n getAll(): any[] {\n if(!this.storeKey) return []\n return JSON.parse(localStorage.getItem(this.storeKey) || '[]')\n }\n \n save(data: Notification[]) {\n if(!this.storeKey) return\n localStorage.setItem(this.storeKey, JSON.stringify(data.map(n => ({\n message: n.message,\n type: n.type,\n componentId: n.componentId,\n group: n.group,\n timeout: n.options?.timeout\n }))))\n }\n}\n","import { Editor } from 'grapesjs'\nimport en from './locale/en'\nimport { \n NotificationManager, \n NotificationManagerOptions,\n NOTIFICATION_CHANGED,\n NOTIFICATION_ADDED,\n NOTIFICATION_REMOVED,\n NOTIFICATION_CLEARED\n} from './NotificationManager'\nimport view from './view'\nimport { Storage } from './Storage'\n\n// Commands\nexport const NOTIFICATION_ADD = 'notifications:add'\nexport const NOTIFICATION_REMOVE = 'notifications:remove' \nexport const NOTIFICATION_CLEAR = 'notifications:clear'\n\n// Events (re-exported from NotificationManager)\nexport {\n NOTIFICATION_CHANGED,\n NOTIFICATION_ADDED,\n NOTIFICATION_REMOVED,\n NOTIFICATION_CLEARED\n}\n\n// Types\nexport type { NotificationManagerOptions } from './NotificationManager'\nexport type { NotificationOptions } from './Notification'\nexport { Notification } from './Notification'\n\n/**\n * Create a container if needed, make it sticky and append it to the body\n */\nfunction createDefaultContainer(container?: HTMLElement): HTMLElement {\n if (container) return container\n \n const el = document.createElement('ul')\n el.style.position = 'fixed'\n el.style.bottom = '10px'\n el.style.zIndex = '9999'\n document.body.appendChild(el)\n return el\n}\n\n// GrapesJS Plugin\nexport default (editor: Editor, opts: Partial<NotificationManagerOptions> = {}) => {\n const options = {\n i18n: {},\n container: createDefaultContainer(opts.container),\n storeKey: undefined,\n maxNotifications: 50,\n reverse: false,\n ...opts\n } as NotificationManagerOptions\n\n // Load i18n files\n editor.I18n && editor.I18n.addMessages({\n en,\n ...options.i18n,\n })\n\n // Create storage if needed\n const storage = options.storeKey ? new Storage(options.storeKey) : null\n\n // Create notification manager\n const notificationManager = new NotificationManager(storage?.getAll() || [], editor, options)\n\n // Add commands\n editor.Commands.add(NOTIFICATION_ADD, {\n run(editor: Editor, sender: any, options: any) {\n notificationManager.add(options)\n }\n })\n\n editor.Commands.add(NOTIFICATION_REMOVE, {\n run(editor: Editor, sender: any, data: any) {\n const notification = data?.notification || data\n notificationManager.remove(notification)\n }\n })\n\n editor.Commands.add(NOTIFICATION_CLEAR, {\n run(editor: Editor) {\n notificationManager.reset()\n }\n })\n\n\n // Handle notification changes\n editor.on(NOTIFICATION_CHANGED, (notifications) => {\n // Use the passed notifications array or get all as fallback\n const allNotifications = notifications || notificationManager.getAll()\n // Update storage\n storage?.save(allNotifications)\n // Render notifications\n view(editor, options.container, allNotifications, options)\n })\n\n // Public API accessible via commands and events only\n return {\n getAll: () => notificationManager.getAll(),\n add: (notification: any) => editor.runCommand(NOTIFICATION_ADD, notification),\n remove: (notification: any) => editor.runCommand(NOTIFICATION_REMOVE, notification),\n clear: () => editor.runCommand(NOTIFICATION_CLEAR)\n }\n}\n"],"names":["root","factory","exports","module","define","amd","globalThis","window","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","editor","options","removeCallback","id","componentId","group","getDefaultOptions","timeout","timeoutRef","setTimeout","remove","message","type","model","attributes","select","found","getAllComponents","find","component","getId","page","Pages","Canvas","scrollTo","console","error","runCommand","notification","clearTimeout","getSvgIcon","icons","opts","info","warning","success","getAll","map","getAllComponentInPage","flat","body","getMainComponent","concat","getAllChildrenComponent","children","Array","from","components","models","child","NOTIFICATION_CHANGED","NOTIFICATION_ADDED","NOTIFICATION_REMOVED","NOTIFICATION_CLEARED","initialNotifications","notifications","data","Notification","filter","Boolean","add","existing","n","push","trigger","index","findIndex","removed","splice","reset","t","e","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","s","WeakMap","constructor","_$cssResult$","Error","cssText","styleSheet","length","replaceSync","set","toString","S","adoptedStyleSheets","document","createElement","litNonce","setAttribute","textContent","appendChild","c","cssRules","r","is","getOwnPropertyDescriptor","h","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","a","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","d","u","toAttribute","JSON","stringify","fromAttribute","i","Number","parse","f","b","attribute","String","converter","reflect","useDefault","hasChanged","metadata","litPropertyMetadata","y","HTMLElement","addInitializer","_$Ei","observedAttributes","finalize","_$Eh","keys","createProperty","state","create","wrapped","elementProperties","noAccessor","getPropertyDescriptor","requestUpdate","configurable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","reverse","unshift","toLowerCase","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","_$Ej","hasAttribute","C","_$EP","has","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","createPolicy","createHTML","Math","random","toFixed","slice","createComment","iterator","v","_","m","RegExp","g","$","_$litType$","strings","values","x","T","for","E","A","createTreeWalker","P","V","lastIndex","exec","test","startsWith","N","parts","el","currentNode","content","firstChild","replaceWith","childNodes","nextNode","nodeType","hasAttributes","getAttributeNames","endsWith","getAttribute","split","name","ctor","H","I","L","k","tagName","append","indexOf","innerHTML","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","M","_$AV","_$AN","_$AD","_$AM","parentNode","_$AU","creationScope","importNode","R","nextSibling","z","_$AI","_$Cv","_$AH","_$AA","_$AB","startNode","endNode","_$AR","O","insertBefore","createTextNode","_$AC","_$AP","setConnected","element","fill","j","arguments","toggleAttribute","capture","once","passive","removeEventListener","addEventListener","handleEvent","host","litHtmlPolyfillSupport","litHtmlVersions","B","renderBefore","_$litPart$","renderOptions","_$Do","render","_$litElement$","litElementHydrateSupport","LitElement","litElementPolyfillSupport","litElementVersions","_$Ct","_$Ci","join","st","nt","classList","it","directiveName","_t","raw","resultType","container","notifs","organizedNotifications","groups","organized","organizeNotifications","maxNotifications","item","groupName","groupedNotifications","I18n","currentTarget","closest","renderNotification","renderGroup","querySelector","getContainer","storeKey","localStorage","getItem","save","setItem","NOTIFICATION_ADD","NOTIFICATION_REMOVE","NOTIFICATION_CLEAR","createDefaultContainer","style","position","bottom","zIndex","i18n","undefined","addMessages","en","storage","Storage","notificationManager","NotificationManager","Commands","run","sender","on","allNotifications","view","clear"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexlabs/grapesjs-notifications",
3
- "version": "0.2.0",
3
+ "version": "0.2.1-0",
4
4
  "description": "This GrapesJs plugin is designed to enhance the user experience within the editor by providing a robust notification system. This plugin captures and displays various types of notifications including errors, warnings, and activities, thereby facilitating a more interactive and responsive interface.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,7 @@
1
1
  import { Component, Page, Editor } from 'grapesjs'
2
2
 
3
3
  export interface NotificationOptions {
4
+ id?: string
4
5
  message: string
5
6
  group?: string
6
7
  timeout?: number
@@ -15,6 +16,7 @@ export interface NotificationOptions {
15
16
  }
16
17
 
17
18
  export class Notification {
19
+ id: string | null = null
18
20
  componentId: string | null = null
19
21
  group: string | null = null
20
22
  timeoutRef
@@ -30,6 +32,7 @@ export class Notification {
30
32
  if (this.options.timeout) {
31
33
  this.timeoutRef = setTimeout(() => this.remove(), this.options.timeout)
32
34
  }
35
+ this.id = options.id || null
33
36
  this.message = this.options.message!
34
37
  this.type = this.options.type!
35
38
  this.componentId = options.componentId || null
@@ -1,7 +1,11 @@
1
1
  import { Editor } from "grapesjs"
2
- import { Notification, NotificationOptions } from "./Notification"
2
+ import { Notification, NotificationOptions as BaseNotificationOptions } from "./Notification"
3
3
  import { StyleInfo } from "lit/directives/style-map"
4
4
 
5
+ export interface NotificationOptions extends BaseNotificationOptions {
6
+ id?: string
7
+ }
8
+
5
9
  // Events
6
10
  export const NOTIFICATION_CHANGED = 'notifications:changed'
7
11
  export const NOTIFICATION_ADDED = 'notifications:added'
@@ -52,6 +56,13 @@ export class NotificationManager {
52
56
  * Add a notification
53
57
  */
54
58
  add(options: NotificationOptions): void {
59
+ if (options.id) {
60
+ // Remove any existing notification with the same id
61
+ const existing = this.notifications.find(n => n.options.id === options.id)
62
+ if (existing) {
63
+ this.remove(existing)
64
+ }
65
+ }
55
66
  const removeCallback = (notification: Notification) => this.remove(notification)
56
67
  const notification = new Notification(this.editor, options, removeCallback)
57
68
  this.notifications.push(notification)