@luzmo/analytics-components-kit 1.0.1-alpha.38 → 1.0.1-alpha.39
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/components/{calculate-data-item-icon-BpMATs29.cjs → calculate-data-item-icon-Bygfq3KO.cjs} +1 -1
- package/components/{calculate-data-item-icon-BPZYysi7.js → calculate-data-item-icon-DlyGQVBA.js} +1 -1
- package/components/{de-CCq00pbq.js → de-BbcctJsI.js} +7 -0
- package/components/de-eIqMhTVC.cjs +20 -0
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +9 -9
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +10 -10
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +12 -12
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +10 -10
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +12 -12
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +10 -10
- package/components/draggable-data-item/index.cjs +1 -1
- package/components/draggable-data-item/index.js +6 -6
- package/components/draggable-data-item-level/index.cjs +1 -1
- package/components/draggable-data-item-level/index.js +8 -8
- package/components/droppable-slot/index.cjs +1 -1
- package/components/droppable-slot/index.js +9 -9
- package/components/edit-item/index.cjs +5 -5
- package/components/edit-item/index.js +5 -5
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +1 -1
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +5 -5
- package/components/{edit-option-base-J7XNb_vp.cjs → edit-option-base-B7owFMOO.cjs} +1 -1
- package/components/{edit-option-base-BHvx3Mlq.js → edit-option-base-Cw2iO2Av.js} +4 -4
- package/components/edit-option-color-picker/index.cjs +30 -30
- package/components/edit-option-color-picker/index.js +6 -6
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +3 -3
- package/components/edit-option-number-field/index.cjs +1 -1
- package/components/edit-option-number-field/index.js +3 -3
- package/components/edit-option-picker/index.cjs +1 -1
- package/components/edit-option-picker/index.js +4 -4
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +3 -3
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +5 -5
- package/components/edit-option-radio-button-group/index.cjs +1 -1
- package/components/edit-option-radio-button-group/index.js +3 -3
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +2 -2
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +2 -2
- package/components/edit-option-text-field/index.cjs +1 -1
- package/components/edit-option-text-field/index.js +3 -3
- package/components/{es-DBmbFw-L.js → es-ByWFTJ0s.js} +7 -0
- package/components/es-tWaYVbsQ.cjs +20 -0
- package/components/filter-data-item-picker/index.cjs +1 -1
- package/components/filter-data-item-picker/index.js +7 -7
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +6 -6
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +3 -3
- package/components/filter-value-picker-datetime/index.cjs +8 -8
- package/components/filter-value-picker-datetime/index.js +12 -12
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +8 -7
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +7 -7
- package/components/{focusable-_wp5pWO-.cjs → focusable-BTJYY_Mf.cjs} +1 -1
- package/components/{focusable-DB6Uhr-C.js → focusable-BXhQz3_k.js} +1 -1
- package/components/fr-2igiTsHU.cjs +20 -0
- package/components/{fr-BOwMikLT.js → fr-C5b2Wgoz.js} +7 -0
- package/components/get-css-variable-BEYG097C.js +1446 -0
- package/components/get-css-variable-BZxY4IOa.cjs +35 -0
- package/components/grid/actions.d.ts +21 -0
- package/components/grid/default-actions.d.ts +14 -0
- package/components/grid/grid-item-actions-menu.d.ts +35 -0
- package/components/grid/grid.d.ts +165 -0
- package/components/grid/index.cjs +326 -0
- package/components/grid/index.d.ts +10 -0
- package/components/grid/index.js +8948 -0
- package/components/{if-defined-DqthfJme.cjs → if-defined-Bulnuz1A.cjs} +1 -1
- package/components/{if-defined-B4gwZxx6.js → if-defined-CTc4c9nr.js} +1 -1
- package/components/{index-BNBJLKST.js → index-BC1LV3vH.js} +1 -1
- package/components/{index-BlLF9xYw.js → index-BNwJ9moR.js} +5 -5
- package/components/{index-DJKhZGty.cjs → index-B_dW2-QA.cjs} +14 -14
- package/components/{index-5mZhN-HJ.js → index-BiY07GvX.js} +4 -4
- package/components/{index-Dh6CgbzT.js → index-Boxjo5I0.js} +79 -79
- package/components/{index-uoJRMChX.cjs → index-C2PPSv8E.cjs} +2 -2
- package/components/{index-BhpqKmwq.cjs → index-CAJRL5rT.cjs} +1 -1
- package/components/{index-ROT368zu.cjs → index-CBOAQ3-E.cjs} +5 -5
- package/components/{index-eHmbYtYG.cjs → index-CT2vEcpn.cjs} +2 -2
- package/components/{index-C0mIH6sE.cjs → index-CaVIv7B9.cjs} +1 -1
- package/components/{index-DFe4VuxB.js → index-CbuHBIDB.js} +2 -2
- package/components/index-CcDZIqpD.cjs +192 -0
- package/components/index-CcLRp9ao.js +1685 -0
- package/components/{index-0AQhhYNR.js → index-Ciad94jH.js} +4 -4
- package/components/index-CpGRysX_.js +691 -0
- package/components/{index-COiTyPcJ.cjs → index-CzRmB9z3.cjs} +1 -1
- package/components/{index-CyAospmR.js → index-DE3d0E0P.js} +2 -2
- package/components/index-DFHExzGq.cjs +20 -0
- package/components/{index-BHXq1-M1.cjs → index-DQbl3h5H.cjs} +1 -1
- package/components/{index-CKenYdIM.cjs → index-DSQyBS9Z.cjs} +1 -1
- package/components/{index-jlphu2Tm.js → index-Desl7GJ0.js} +2 -2
- package/components/index-GgkqKtE6.cjs +20 -0
- package/components/{index-BFPa6sJd.js → index-Jmmy73Aq.js} +1 -1
- package/components/{index-B0rH2mr9.cjs → index-Tx5oQjbt.cjs} +1 -1
- package/components/{index-5UNCjfdE.js → index-UWOCtc0Y.js} +6 -6
- package/components/{index-C7pagyza.cjs → index-cHKqEi5-.cjs} +3 -3
- package/components/{index-DDR_JmOh.js → index-rQxtPaJl.js} +1 -1
- package/components/{index-D5asknFy.js → index-sCesmw8l.js} +5 -5
- package/components/index.cjs +1 -1
- package/components/index.js +25 -21
- package/components/item-list.cjs +1 -1
- package/components/item-list.js +267 -46
- package/components/item-menu/item-list/item-list.d.ts +2 -0
- package/components/{localized-decorator-DGnMToFa.js → localized-decorator-DNr1P1m0.js} +1 -1
- package/components/{localized-decorator-ClAOFk8M.cjs → localized-decorator-SOrjcPab.cjs} +1 -1
- package/components/luzmo-icons-DAsjNJNI.cjs +31 -0
- package/components/{luzmo-icons-BZPchcMw.js → luzmo-icons-DEoJcvoL.js} +145 -113
- package/components/{luzmo-icons-NEyaMpEM-1fxXxs3F.cjs → luzmo-icons-DbwDQtuO-DSQ-uVxy.cjs} +2 -2
- package/components/{luzmo-icons-NEyaMpEM-DbyDs_5B.js → luzmo-icons-DbwDQtuO-QG0fLECn.js} +9 -9
- package/components/{nl-CY0iO3Ch.js → nl-76jn_zMH.js} +7 -0
- package/components/nl-B50x7wMn.cjs +20 -0
- package/components/{pending-state-DTX7ggyF-B_9VbFxI.js → pending-state-DTX7ggyF-D1SvcIIz.js} +2 -2
- package/components/{pending-state-DTX7ggyF-C_go9EJh.cjs → pending-state-DTX7ggyF-DZzxjogp.cjs} +1 -1
- package/components/{periods.const-D2cMP5hH.js → periods.const-C89NNRX-.js} +1 -1
- package/components/{periods.const-BbgInj9J.cjs → periods.const-CfXsouLz.cjs} +1 -1
- package/components/{property-Dlf9S6Jz.cjs → property-BCb4Kybn.cjs} +7 -7
- package/components/{property-CxtZroGf.js → property-Dn4zSyxu.js} +46 -36
- package/components/query-all-CR2wWKRD.cjs +24 -0
- package/components/query-all-Ddzx2fEK.js +34 -0
- package/components/{set-locale-5FFfQpVQ.cjs → set-locale-Cam8nRIW.cjs} +1 -1
- package/components/{set-locale-DAGnJZD8.js → set-locale-DbEAMqUs.js} +1 -1
- package/components/{sized-mixin-ZTphZKLm.cjs → sized-mixin-BNtmplgF.cjs} +1 -1
- package/components/{sized-mixin-C7R5uRbF.js → sized-mixin-BR_Ii7le.js} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +4 -4
- package/components/slot-menu-list/index.cjs +2 -6
- package/components/slot-menu-list/index.js +59 -70
- package/components/{state-CrfOw8Zp.cjs → state-BxZEcclm.cjs} +1 -1
- package/components/{state-BVYsk_HZ.js → state-vVJlsarL.js} +1 -1
- package/components/{task-DH8UFyxP.js → task-PQaVY8Iw.js} +1 -1
- package/components/{task-CdvrMX8r.cjs → task-qPJdeXO1.cjs} +1 -1
- package/components/{text-field-B9IkRRxO-CRU1UGaM.cjs → text-field-BIADXoLC-B8w9TVmS.cjs} +1 -1
- package/components/{text-field-B9IkRRxO-CWWQN_rn.js → text-field-BIADXoLC-B9oE05VF.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +56 -472
- package/custom-elements.json +491 -0
- package/index.d.ts +1 -0
- package/package.json +6 -1
- package/utils/filters/expressions.d.ts +1 -1
- package/utils/themes/bliss.d.ts +43 -0
- package/utils/themes/classic-dark.d.ts +34 -0
- package/utils/themes/classic.d.ts +43 -0
- package/utils/themes/default-dark.d.ts +46 -0
- package/utils/themes/default.d.ts +46 -0
- package/utils/themes/index.d.ts +121 -120
- package/utils/themes/orion.d.ts +44 -0
- package/utils/themes/pinky.d.ts +42 -0
- package/utils/themes/radiant.d.ts +42 -0
- package/utils/themes/royale.d.ts +36 -0
- package/utils/themes/seasonal.d.ts +43 -0
- package/utils/themes/urban.d.ts +44 -0
- package/utils/themes/vivid.d.ts +42 -0
- package/components/de-DcZysUyZ.cjs +0 -20
- package/components/es-CGiBfBKJ.cjs +0 -20
- package/components/fr-DZbYwMlh.cjs +0 -20
- package/components/index-B4EIbvuW.cjs +0 -192
- package/components/luzmo-icons-BpFUFRQm.cjs +0 -31
- package/components/nl-0V96M02q.cjs +0 -20
@@ -0,0 +1,35 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2025 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
"use strict";function Pe(e){if(Array.isArray(e))return e}function je(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(t=t.call(e)).next,r!==0)for(;!(u=(n=a.call(t)).done)&&(l.push(n.value),l.length!==r);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&t.return!=null&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}function Z(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function be(e,r){if(e){if(typeof e=="string")return Z(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Z(e,r):void 0}}function Ie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(e,r){return Pe(e)||je(e,r)||be(e,r)||Ie()}var X={},k={},ne;function we(){if(ne)return k;ne=1,Object.defineProperty(k,"__esModule",{value:!0}),k.bind=void 0;function e(r,t){var n=t.type,o=t.listener,a=t.options;return r.addEventListener(n,o,a),function(){r.removeEventListener(n,o,a)}}return k.bind=e,k}var F={},ae;function xe(){if(ae)return F;ae=1;var e=F&&F.__assign||function(){return e=Object.assign||function(a){for(var i,l=1,u=arguments.length;l<u;l++){i=arguments[l];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(a[c]=i[c])}return a},e.apply(this,arguments)};Object.defineProperty(F,"__esModule",{value:!0}),F.bindAll=void 0;var r=we();function t(a){if(!(typeof a>"u"))return typeof a=="boolean"?{capture:a}:a}function n(a,i){if(i==null)return a;var l=e(e({},a),{options:e(e({},t(i)),t(a.options))});return l}function o(a,i,l){var u=i.map(function(c){var f=n(c,l);return(0,r.bind)(a,f)});return function(){u.forEach(function(f){return f()})}}return F.bindAll=o,F}var oe;function Ce(){return oe||(oe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=e.bind=void 0;var r=we();Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return r.bind}});var t=xe();Object.defineProperty(e,"bindAll",{enumerable:!0,get:function(){return t.bindAll}})}(X)),X}var K=Ce();function L(e){"@babel/helpers - typeof";return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},L(e)}function He(e,r){if(L(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(L(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Fe(e){var r=He(e,"string");return L(r)=="symbol"?r:r+""}function Y(e,r,t){return(r=Fe(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var De=2147483647,Oe="data-pdnd-honey-pot";function ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function ue(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ie(Object(t),!0).forEach(function(n){Y(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var $=2,le=$/2;function Me(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function Ke(e){return{x:e.x-le,y:e.y-le}}function Re(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function We(e){return{x:Math.min(e.x,window.innerWidth-$),y:Math.min(e.y,window.innerHeight-$)}}function ce(e){var r=e.client,t=We(Re(Ke(Me(r))));return DOMRect.fromRect({x:t.x,y:t.y,width:$,height:$})}function de(e){var r=e.clientRect;return{left:"".concat(r.left,"px"),top:"".concat(r.top,"px"),width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}}function ke(e){var r=e.client,t=e.clientRect;return r.x>=t.x&&r.x<=t.x+t.width&&r.y>=t.y&&r.y<=t.y+t.height}function Ne(e){var r=e.initial,t=document.createElement("div");t.setAttribute(Oe,"true");var n=ce({client:r});Object.assign(t.style,ue(ue({backgroundColor:"transparent",position:"fixed",padding:0,margin:0,boxSizing:"border-box"},de({clientRect:n})),{},{pointerEvents:"auto",zIndex:De})),document.body.appendChild(t);var o=K.bind(window,{type:"pointermove",listener:function(i){var l={x:i.clientX,y:i.clientY};n=ce({client:l}),Object.assign(t.style,de({clientRect:n}))},options:{capture:!0}});return function(i){var l=i.current;if(o(),ke({client:l,clientRect:n})){t.remove();return}function u(){c(),t.remove()}var c=K.bindAll(window,[{type:"pointerdown",listener:u},{type:"pointermove",listener:u},{type:"focusin",listener:u},{type:"focusout",listener:u},{type:"dragstart",listener:u},{type:"dragenter",listener:u},{type:"dragover",listener:u}],{capture:!0})}}function Le(){var e=null;function r(){return e=null,K.bind(window,{type:"pointermove",listener:function(o){e={x:o.clientX,y:o.clientY}},options:{capture:!0}})}function t(){var n=null;return function(a){var i=a.eventName,l=a.payload;if(i==="onDragStart"){var u,c=l.location.initial.input,f=(u=e)!==null&&u!==void 0?u:{x:c.clientX,y:c.clientY};n=Ne({initial:f})}if(i==="onDrop"){var v,p=l.location.current.input;(v=n)===null||v===void 0||v({current:{x:p.clientX,y:p.clientY}}),n=null,e=null}}}return{bindEvents:r,getOnPostDispatch:t}}function $e(e){if(Array.isArray(e))return Z(e)}function Ue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
22
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e){return $e(e)||Ue(e)||be(e)||Ye()}function Se(e){return e instanceof Element&&e.hasAttribute(Oe)}function Be(e){var r=document.elementsFromPoint(e.x,e.y),t=he(r,2),n=t[0],o=t[1];return n?Se(n)?o??null:n:null}function ee(e){var r=null;return function(){if(!r){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];var i=e.apply(this,o);r={result:i}}return r.result}}var Xe=ee(function(){return navigator.userAgent.includes("Firefox")}),B=ee(function(){var r=navigator,t=r.userAgent;return t.includes("AppleWebKit")&&!t.includes("Chrome")}),J={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function qe(e){var r=e.dragLeave;return B()?r.hasOwnProperty(J.isLeavingWindow):!1}(function(){if(typeof window>"u"||!B())return;function r(){return{enterCount:0,isOverWindow:!1}}var t=r();function n(){t=r()}K.bindAll(window,[{type:"dragstart",listener:function(){t.enterCount=0,t.isOverWindow=!0}},{type:"drop",listener:n},{type:"dragend",listener:n},{type:"dragenter",listener:function(a){!t.isOverWindow&&t.enterCount===0&&(a[J.isEnteringWindow]=!0),t.isOverWindow=!0,t.enterCount++}},{type:"dragleave",listener:function(a){t.enterCount--,t.isOverWindow&&t.enterCount===0&&(a[J.isLeavingWindow]=!0,t.isOverWindow=!1)}}],{capture:!0})})();function ze(e){return"nodeName"in e}function Ve(e){return ze(e)&&e.ownerDocument!==document}function Ge(e){var r=e.dragLeave,t=r.type,n=r.relatedTarget;return t!=="dragleave"?!1:B()?qe({dragLeave:r}):n==null?!0:Xe()?Ve(n):n instanceof HTMLIFrameElement}function Ze(e){var r=e.onDragEnd;return[{type:"pointermove",listener:function(){var t=0;return function(){if(t<20){t++;return}r()}}()},{type:"pointerdown",listener:r}]}function N(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var Je=function(r){var t=[],n=null,o=function(){for(var i=arguments.length,l=new Array(i),u=0;u<i;u++)l[u]=arguments[u];t=l,!n&&(n=requestAnimationFrame(function(){n=null,r.apply(void 0,t)}))};return o.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},o},q=Je(function(e){return e()}),U=function(){var e=null;function r(n){var o=requestAnimationFrame(function(){e=null,n()});e={frameId:o,fn:n}}function t(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:r,flush:t}}();function Qe(e){var r=e.source,t=e.initial,n=e.dispatchEvent,o={dropTargets:[]};function a(l){n(l),o={dropTargets:l.payload.location.current.dropTargets}}var i={start:function(u){var c=u.nativeSetDragImage,f={current:t,previous:o,initial:t};a({eventName:"onGenerateDragPreview",payload:{source:r,location:f,nativeSetDragImage:c}}),U.schedule(function(){a({eventName:"onDragStart",payload:{source:r,location:f}})})},dragUpdate:function(u){var c=u.current;U.flush(),q.cancel(),a({eventName:"onDropTargetChange",payload:{source:r,location:{initial:t,previous:o,current:c}}})},drag:function(u){var c=u.current;q(function(){U.flush();var f={initial:t,previous:o,current:c};a({eventName:"onDrag",payload:{source:r,location:f}})})},drop:function(u){var c=u.current,f=u.updatedSourcePayload;U.flush(),q.cancel(),a({eventName:"onDrop",payload:{source:f??r,location:{current:c,previous:o,initial:t}}})}};return i}var Q={isActive:!1};function Ae(){return!Q.isActive}function _e(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function et(e){var r=e.current,t=e.next;if(r.length!==t.length)return!0;for(var n=0;n<r.length;n++)if(r[n].element!==t[n].element)return!0;return!1}function tt(e){var r=e.event,t=e.dragType,n=e.getDropTargetsOver,o=e.dispatchEvent;if(!Ae())return;var a=rt({event:r,dragType:t,getDropTargetsOver:n});Q.isActive=!0;var i={current:a};z({event:r,current:a.dropTargets});var l=Qe({source:t.payload,dispatchEvent:o,initial:a});function u(d){var s=et({current:i.current.dropTargets,next:d.dropTargets});i.current=d,s&&l.dragUpdate({current:i.current})}function c(d){var s=N(d),g=Se(d.target)?Be({x:s.clientX,y:s.clientY}):d.target,y=n({target:g,event:d,input:s,source:t.payload,current:i.current.dropTargets});y.length&&(d.preventDefault(),z({event:d,current:y})),u({dropTargets:y,input:s})}function f(){i.current.dropTargets.length&&u({dropTargets:[],input:i.current.input}),l.drop({current:i.current,updatedSourcePayload:null}),v()}function v(){Q.isActive=!1,p()}var p=K.bindAll(window,[{type:"dragover",listener:function(s){c(s),l.drag({current:i.current})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function(s){Ge({dragLeave:s})&&(u({input:i.current.input,dropTargets:[]}),t.startedFrom==="external"&&f())}},{type:"drop",listener:function(s){if(i.current={dropTargets:i.current.dropTargets,input:N(s)},!i.current.dropTargets.length){f();return}s.preventDefault(),z({event:s,current:i.current.dropTargets}),l.drop({current:i.current,updatedSourcePayload:t.type==="external"?t.getDropPayload(s):null}),v()}},{type:"dragend",listener:function(s){i.current={dropTargets:i.current.dropTargets,input:N(s)},f()}}].concat(Te(Ze({onDragEnd:f}))),{capture:!0});l.start({nativeSetDragImage:_e(r)})}function z(e){var r,t=e.event,n=e.current,o=(r=n[0])===null||r===void 0?void 0:r.dropEffect;o!=null&&t.dataTransfer&&(t.dataTransfer.dropEffect=o)}function rt(e){var r=e.event,t=e.dragType,n=e.getDropTargetsOver,o=N(r);if(t.startedFrom==="external")return{input:o,dropTargets:[]};var a=n({input:o,source:t.payload,target:r.target,event:r,current:[]});return{input:o,dropTargets:a}}var se={canStart:Ae,start:tt},_=new Map;function nt(e){var r=e.typeKey,t=e.mount,n=_.get(r);if(n)return n.usageCount++,n;var o={typeKey:r,unmount:t(),usageCount:1};return _.set(r,o),o}function at(e){var r=nt(e);return function(){r.usageCount--,!(r.usageCount>0)&&(r.unmount(),_.delete(e.typeKey))}}function te(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(){r.forEach(function(o){return o()})}}function Ee(e,r){var t=r.attribute,n=r.value;return e.setAttribute(t,n),function(){return e.removeAttribute(t)}}function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function H(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?fe(Object(t),!0).forEach(function(n){Y(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function V(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=ot(e))||r){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return i=c.done,c},e:function(c){l=!0,a=c},f:function(){try{i||t.return==null||t.return()}finally{if(l)throw a}}}}function ot(e,r){if(e){if(typeof e=="string")return pe(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pe(e,r):void 0}}function pe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function G(e){return e.slice(0).reverse()}function it(e){var r=e.typeKey,t=e.defaultDropEffect,n=new WeakMap,o="data-drop-target-for-".concat(r),a="[".concat(o,"]");function i(d){return n.set(d.element,d),function(){return n.delete(d.element)}}function l(d){{var s=n.get(d.element);s&&console.warn("You have already registered a [".concat(r,"] dropTarget on the same element"),{existing:s,proposed:d}),d.element instanceof HTMLIFrameElement&&console.warn(`
|
24
|
+
We recommend not registering <iframe> elements as drop targets
|
25
|
+
as it can result in some strange browser event ordering.
|
26
|
+
`.replace(/\s{2,}/g," ").trim())}return te(Ee(d.element,{attribute:o,value:"true"}),i(d))}function u(d){var s,g,y,T,w=d.source,D=d.target,m=d.input,S=d.event,b=d.result,h=b===void 0?[]:b;if(S===void 0)return h;const E=S.composedPath();if(D=E.find(R=>R instanceof Element?R.hasAttribute("data-drop-target-for-element"):!1),D=D??E[0],!(D instanceof Element))return D instanceof Node?u({source:w,target:D.parentElement,input:m,result:h}):h;var j=D.closest(a);if(j==null)return h;var O=n.get(j);if(O==null)return h;var P={input:m,source:w,element:O.element};if(O.canDrop&&!O.canDrop(P))return u({source:w,target:O.element.parentElement,input:m,result:h});var I=(s=(g=O.getData)===null||g===void 0?void 0:g.call(O,P))!==null&&s!==void 0?s:{},A=(y=(T=O.getDropEffect)===null||T===void 0?void 0:T.call(O,P))!==null&&y!==void 0?y:t,x={data:I,element:O.element,dropEffect:A,isActiveDueToStickiness:!1};return u({source:w,target:O.element.parentElement,input:m,result:[].concat(Te(h),[x])})}function c(d){var s=d.eventName,g=d.payload,y=V(g.location.current.dropTargets),T;try{for(y.s();!(T=y.n()).done;){var w,D=T.value,m=n.get(D.element),S=H(H({},g),{},{self:D});m==null||(w=m[s])===null||w===void 0||w.call(m,S)}}catch(b){y.e(b)}finally{y.f()}}var f={onGenerateDragPreview:c,onDrag:c,onDragStart:c,onDrop:c,onDropTargetChange:function(s){var g=s.payload,y=new Set(g.location.current.dropTargets.map(function(W){return W.element})),T=new Set,w=V(g.location.previous.dropTargets),D;try{for(w.s();!(D=w.n()).done;){var m,S=D.value;T.add(S.element);var b=n.get(S.element),h=y.has(S.element),E=H(H({},g),{},{self:S});if(b==null||(m=b.onDropTargetChange)===null||m===void 0||m.call(b,E),!h){var j;b==null||(j=b.onDragLeave)===null||j===void 0||j.call(b,E)}}}catch(W){w.e(W)}finally{w.f()}var O=V(g.location.current.dropTargets),P;try{for(O.s();!(P=O.n()).done;){var I,A,x=P.value;if(!T.has(x.element)){var R=H(H({},g),{},{self:x}),C=n.get(x.element);C==null||(I=C.onDropTargetChange)===null||I===void 0||I.call(C,R),C==null||(A=C.onDragEnter)===null||A===void 0||A.call(C,R)}}}catch(W){O.e(W)}finally{O.f()}}};function v(d){f[d.eventName](d)}function p(d){var s=d.source,g=d.target,y=d.input,T=d.event,w=d.current,D=u({source:s,target:g,event:T,input:y});if(D.length>=w.length)return D;for(var m=G(w),S=G(D),b=[],h=0;h<m.length;h++){var E,j=m[h],O=S[h];if(O!=null){b.push(O);continue}var P=b[h-1],I=m[h-1];if((P==null?void 0:P.element)!==(I==null?void 0:I.element))break;var A=n.get(j.element);if(!A)break;var x={input:y,source:s,element:A.element};if(A.canDrop&&!A.canDrop(x)||!((E=A.getIsSticky)!==null&&E!==void 0&&E.call(A,x)))break;b.push(H(H({},j),{},{isActiveDueToStickiness:!0}))}return G(b)}return{dropTargetForConsumers:l,getIsOver:p,dispatchEvent:v}}function ut(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=lt(e))||r){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return i=c.done,c},e:function(c){l=!0,a=c},f:function(){try{i||t.return==null||t.return()}finally{if(l)throw a}}}}function lt(e,r){if(e){if(typeof e=="string")return ve(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ve(e,r):void 0}}function ve(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function ge(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function ct(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ge(Object(t),!0).forEach(function(n){Y(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dt(){var e=new Set,r=null;function t(a){r&&(!a.canMonitor||a.canMonitor(r.canMonitorArgs))&&r.active.add(a)}function n(a){var i=ct({},a);return e.add(i),t(i),function(){e.delete(i),r&&r.active.delete(i)}}function o(a){var i=a.eventName,l=a.payload;if(i==="onGenerateDragPreview"){r={canMonitorArgs:{initial:l.location.initial,source:l.source},active:new Set};var u=ut(e),c;try{for(u.s();!(c=u.n()).done;){var f=c.value;t(f)}}catch(y){u.e(y)}finally{u.f()}}if(r){for(var v=Array.from(r.active),p=0,d=v;p<d.length;p++){var s=d[p];if(r.active.has(s)){var g;(g=s[i])===null||g===void 0||g.call(s,l)}}i==="onDrop"&&(r.active.clear(),r=null)}}return{dispatchEvent:o,monitorForConsumers:n}}function st(e){var r=e.typeKey,t=e.mount,n=e.dispatchEventToSource,o=e.onPostDispatch,a=e.defaultDropEffect,i=dt(),l=it({typeKey:r,defaultDropEffect:a});function u(v){n==null||n(v),l.dispatchEvent(v),i.dispatchEvent(v),o==null||o(v)}function c(v){var p=v.event,d=v.dragType;se.start({event:p,dragType:d,getDropTargetsOver:l.getIsOver,dispatchEvent:u})}function f(){function v(){var p={canStart:se.canStart,start:c};return t(p)}return at({typeKey:r,mount:v})}return{registerUsage:f,dropTarget:l.dropTargetForConsumers,monitor:i.monitorForConsumers}}var ft=ee(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),pt="pdnd:android-fallback",ye="text/plain",vt="text/uri-list",gt="application/vnd.pdnd",M=new WeakMap;function yt(e){return M.set(e.element,e),function(){M.delete(e.element)}}var me=Le(),re=st({typeKey:"element",defaultDropEffect:"move",mount:function(r){return te(me.bindEvents(),K.bind(document,{type:"dragstart",listener:function(n){var o,a,i,l,u,c;if(!r.canStart(n)||n.defaultPrevented)return;if(!n.dataTransfer){console.warn(`
|
28
|
+
It appears as though you have are not testing DragEvents correctly.
|
29
|
+
|
30
|
+
- If you are unit testing, ensure you have polyfilled DragEvent.
|
31
|
+
- If you are browser testing, ensure you are dispatching drag events correctly.
|
32
|
+
|
33
|
+
Please see our testing guides for more information:
|
34
|
+
https://atlassian.design/components/pragmatic-drag-and-drop/core-package/testing
|
35
|
+
`.replace(/ {2}/g,""));return}const v=n.composedPath().find(h=>h instanceof HTMLElement&&M.has(h));if(!v)return null;const p=M.get(v);if(!p)return null;var d=N(n),s={element:p.element,dragHandle:(o=p.dragHandle)!==null&&o!==void 0?o:null,input:d};if(p.canDrag&&!p.canDrag(s))return n.preventDefault(),null;if(p.dragHandle){const E=(v.shadowRoot||document).elementFromPoint(d.clientX,d.clientY);if(!p.dragHandle.contains(E))return n.preventDefault(),null}var g=(a=(i=p.getInitialDataForExternal)===null||i===void 0?void 0:i.call(p,s))!==null&&a!==void 0?a:null;if(g)for(var y=0,T=Object.entries(g);y<T.length;y++){var w=he(T[y],2),D=w[0],m=w[1];n.dataTransfer.setData(D,m??"")}ft()&&!n.dataTransfer.types.includes(ye)&&!n.dataTransfer.types.includes(vt)&&n.dataTransfer.setData(ye,pt),n.dataTransfer.setData(gt,"");var S={element:p.element,dragHandle:(l=p.dragHandle)!==null&&l!==void 0?l:null,data:(u=(c=p.getInitialData)===null||c===void 0?void 0:c.call(p,s))!==null&&u!==void 0?u:{}},b={type:"element",payload:S,startedFrom:"internal"};r.start({event:n,dragType:b})}}))},dispatchEventToSource:function(r){var t,n,o=r.eventName,a=r.payload;(t=M.get(a.source.element))===null||t===void 0||(n=t[o])===null||n===void 0||n.call(t,a)},onPostDispatch:me.getOnPostDispatch()}),mt=re.dropTarget,bt=re.monitor;function ht(e){e.dragHandle&&!e.element.contains(e.dragHandle)&&console.warn("Drag handle element must be contained in draggable element",{element:e.element,dragHandle:e.dragHandle});{var r=M.get(e.element);r&&console.warn("You have already registered a `draggable` on the same element",{existing:r,proposed:e})}return te(re.registerUsage(),yt(e),Ee(e.element,{attribute:"draggable",value:"true"}))}function wt(){return{x:0,y:0}}function Dt(e){var r=e.render,t=e.nativeSetDragImage,n=e.getOffset,o=n===void 0?wt:n,a=document.createElement("div");Object.assign(a.style,{position:"fixed",top:0,left:0,zIndex:De,pointerEvents:"none"}),document.body.append(a);var i=r({container:a});queueMicrotask(function(){var c=o({container:a});if(B()){var f=a.getBoundingClientRect();if(f.width===0)return;a.style.left="-".concat(f.width-1e-4,"px")}t==null||t(a,c.x,c.y)});function l(){u(),i==null||i(),document.body.removeChild(a)}var u=bt({onDragStart:l,onDrop:l})}const Ot=(e,r)=>{let t=getComputedStyle(e).getPropertyValue(r);for(;!t&&e.parentElement;)e=e.parentElement,t=getComputedStyle(e).getPropertyValue(r);return t.trim()};exports._defineProperty=Y;exports.draggable=ht;exports.dropTargetForElements=mt;exports.getCssVariableValue=Ot;exports.setCustomNativeDragPreview=Dt;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { IconDefinition } from '@luzmo/icons';
|
2
|
+
type DefaultActionType = 'lock' | 'filters' | 'edit' | 'edit-data' | 'edit-options' | 'edit-filters' | 'delete' | 'clone';
|
3
|
+
export interface Action {
|
4
|
+
icon?: IconDefinition;
|
5
|
+
label?: string;
|
6
|
+
action?: string | DefaultActionType;
|
7
|
+
type?: 'toggle' | 'button';
|
8
|
+
active?: boolean;
|
9
|
+
tooltip?: string;
|
10
|
+
}
|
11
|
+
export interface InputActionGroup {
|
12
|
+
type: 'group';
|
13
|
+
actions: (string | Action)[];
|
14
|
+
}
|
15
|
+
export interface ActionGroup {
|
16
|
+
type: 'group';
|
17
|
+
actions?: Action[];
|
18
|
+
}
|
19
|
+
export declare const generateActionsMenu: (data?: InputActionGroup[]) => ActionGroup[] | undefined;
|
20
|
+
export declare const defaultActionsMenu: () => ActionGroup[];
|
21
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { IconDefinition } from '@luzmo/icons';
|
2
|
+
export interface Action {
|
3
|
+
icon: IconDefinition;
|
4
|
+
label: string;
|
5
|
+
action: string;
|
6
|
+
type: 'toggle' | 'button';
|
7
|
+
active?: boolean;
|
8
|
+
tooltip?: string;
|
9
|
+
}
|
10
|
+
export interface ActionGroup {
|
11
|
+
type: 'group';
|
12
|
+
actions: Action[];
|
13
|
+
}
|
14
|
+
export declare const defaultActions: ActionGroup[];
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { Placement } from '@luzmo/lucero';
|
2
|
+
import '@luzmo/lucero/action-button';
|
3
|
+
import '@luzmo/lucero/action-group';
|
4
|
+
import '@luzmo/lucero/icon';
|
5
|
+
import '@luzmo/lucero/tooltip';
|
6
|
+
import { LuzmoElement } from '@luzmo/lucero/utils';
|
7
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
8
|
+
import { ActionGroup } from './actions';
|
9
|
+
/**
|
10
|
+
* @element luzmo-grid-item-actions-menu
|
11
|
+
*/
|
12
|
+
export declare class LuzmoGridItemActionsMenu extends LuzmoElement {
|
13
|
+
static get styles(): CSSResultArray;
|
14
|
+
/**
|
15
|
+
* The preferred placement of the menu
|
16
|
+
*/
|
17
|
+
placement: Placement;
|
18
|
+
/**
|
19
|
+
* The Actions to display in the menu
|
20
|
+
*/
|
21
|
+
actions: ActionGroup[];
|
22
|
+
/**
|
23
|
+
* The language to display the actions in
|
24
|
+
*/
|
25
|
+
language: string;
|
26
|
+
private get isVertical();
|
27
|
+
private _dispatchAction;
|
28
|
+
private _handleActionClick;
|
29
|
+
clearActiveToggles(): void;
|
30
|
+
focus(): void;
|
31
|
+
private _generateActionButton;
|
32
|
+
private _generateActionGroup;
|
33
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
34
|
+
protected render(): TemplateResult;
|
35
|
+
}
|
@@ -0,0 +1,165 @@
|
|
1
|
+
import { VizItemType } from '@luzmo/dashboard-contents-types';
|
2
|
+
import '@luzmo/embed';
|
3
|
+
import type { LuzmoEmbedVizItem } from '@luzmo/embed';
|
4
|
+
import { Placement } from '@luzmo/lucero';
|
5
|
+
import '@luzmo/lucero/action-button';
|
6
|
+
import '@luzmo/lucero/action-group';
|
7
|
+
import '@luzmo/lucero/icon';
|
8
|
+
import { LuzmoElement } from '@luzmo/lucero/utils';
|
9
|
+
import { GridStack } from 'gridstack';
|
10
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
11
|
+
import { InputActionGroup } from './actions';
|
12
|
+
import './grid-item-actions-menu';
|
13
|
+
export type GridItemRenderer = (item: GridItemData, index: number) => TemplateResult;
|
14
|
+
export interface GridItemData {
|
15
|
+
id?: string;
|
16
|
+
type: VizItemType | string;
|
17
|
+
placementActionsMenu?: Placement;
|
18
|
+
actionsMenu?: InputActionGroup[];
|
19
|
+
position?: {
|
20
|
+
sizeX: number;
|
21
|
+
sizeY: number;
|
22
|
+
row: number;
|
23
|
+
col: number;
|
24
|
+
};
|
25
|
+
options?: any;
|
26
|
+
slots?: any;
|
27
|
+
filters?: any;
|
28
|
+
contextId?: string;
|
29
|
+
canFilter?: string | string[];
|
30
|
+
renderer?: string;
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
* @element luzmo-grid
|
34
|
+
*
|
35
|
+
* A grid component that allows you to create a grid of items.
|
36
|
+
*
|
37
|
+
* @fires grid-item-action - Fired when an item action is performed
|
38
|
+
* @fires grid-changed - Fired when the grid is changed
|
39
|
+
* @fires grid-ready - Fired when the grid is ready
|
40
|
+
*/
|
41
|
+
export declare class LuzmoGrid extends LuzmoElement {
|
42
|
+
static get styles(): CSSResultArray;
|
43
|
+
/**
|
44
|
+
* The URL of the app server
|
45
|
+
* @default https://app.luzmo.com
|
46
|
+
* @description The URL of the app server
|
47
|
+
*/
|
48
|
+
appServer?: string;
|
49
|
+
/**
|
50
|
+
* The API Host of the databroker
|
51
|
+
* @default https://api.luzmo.com
|
52
|
+
* @description The host of the databroker API
|
53
|
+
*/
|
54
|
+
apiHost?: string;
|
55
|
+
/**
|
56
|
+
* The auth key of the databroker
|
57
|
+
*/
|
58
|
+
authKey?: string;
|
59
|
+
/**
|
60
|
+
* The auth token of the databroker
|
61
|
+
*/
|
62
|
+
authToken?: string;
|
63
|
+
/**
|
64
|
+
* The cache time of the databroker
|
65
|
+
* @default 30000
|
66
|
+
* @description The time to cache the data in milliseconds
|
67
|
+
*/
|
68
|
+
cacheTime?: number;
|
69
|
+
/**
|
70
|
+
* The language of the settings interface
|
71
|
+
*/
|
72
|
+
language: string;
|
73
|
+
/**
|
74
|
+
* The language to use for locale-aware formatting and labels
|
75
|
+
*/
|
76
|
+
contentLanguage: string;
|
77
|
+
/**
|
78
|
+
* The number of columns in the grid.
|
79
|
+
*/
|
80
|
+
columns: number;
|
81
|
+
/**
|
82
|
+
* The height of each row in pixels in the grid.
|
83
|
+
*/
|
84
|
+
rowHeight: number;
|
85
|
+
/**
|
86
|
+
* Whether the grid is in view mode. When true, dragging, resizing and action buttons are disabled.
|
87
|
+
* @default false
|
88
|
+
*/
|
89
|
+
viewMode: boolean;
|
90
|
+
/**
|
91
|
+
* The placement of the item actions menu.
|
92
|
+
* @default 'right-start'
|
93
|
+
*/
|
94
|
+
placementItemActionsMenu: Placement;
|
95
|
+
/**
|
96
|
+
* The default item actions menu.
|
97
|
+
* @default [{ type: 'group', actions: ['edit-data', 'edit-options', 'clone'] }, { type: 'group', actions: ['delete'] }]
|
98
|
+
*/
|
99
|
+
defaultItemActionsMenu: InputActionGroup[];
|
100
|
+
/**
|
101
|
+
* Grid options configuration
|
102
|
+
*/
|
103
|
+
theme: any;
|
104
|
+
/**
|
105
|
+
* Items to add to the grid
|
106
|
+
*/
|
107
|
+
items: GridItemData[];
|
108
|
+
/**
|
109
|
+
* Custom renderers for different item types
|
110
|
+
*/
|
111
|
+
renderers: Record<string, GridItemRenderer>;
|
112
|
+
private _initialized;
|
113
|
+
private _gridElement;
|
114
|
+
private _gridItemElements;
|
115
|
+
private _grid?;
|
116
|
+
defaultRenderer: GridItemRenderer;
|
117
|
+
private _activeItemElement?;
|
118
|
+
private _activeItemActionToggle?;
|
119
|
+
private _focusedItemElement?;
|
120
|
+
connectedCallback(): void;
|
121
|
+
disconnectedCallback(): void;
|
122
|
+
protected updated(changedProperties: PropertyValues): void;
|
123
|
+
private _updateLuzmoVizItemsLanguage;
|
124
|
+
private _handleMouseover;
|
125
|
+
private _handleMouseout;
|
126
|
+
private _handleKeyDown;
|
127
|
+
private _handleFocus;
|
128
|
+
private _handleBlur;
|
129
|
+
private _handleDocumentClick;
|
130
|
+
private _cleanupActiveItem;
|
131
|
+
private _cleanup;
|
132
|
+
private _initializeGrid;
|
133
|
+
private _createOrUpdateDimensionsHint;
|
134
|
+
private _removeDimensionsHint;
|
135
|
+
private _handleAction;
|
136
|
+
private _handleDeleteItem;
|
137
|
+
private _handleCloneItem;
|
138
|
+
/**
|
139
|
+
* Get the GridStack instance
|
140
|
+
*/
|
141
|
+
get grid(): GridStack | undefined;
|
142
|
+
get gridItems(): {
|
143
|
+
item: GridItemData;
|
144
|
+
element: HTMLElement;
|
145
|
+
luzmoElement?: LuzmoEmbedVizItem;
|
146
|
+
}[];
|
147
|
+
/**
|
148
|
+
* Register a custom renderer for a specific type
|
149
|
+
*/
|
150
|
+
registerRenderer(type: string, renderer: GridItemRenderer): void;
|
151
|
+
private _renderOverlayContent;
|
152
|
+
private _createItemActionsMenuPopover;
|
153
|
+
private _removeItemActionsMenuPopover;
|
154
|
+
private _updateThemeProperties;
|
155
|
+
getGridItemById(id: string): {
|
156
|
+
item: GridItemData;
|
157
|
+
element: HTMLElement;
|
158
|
+
luzmoElement?: LuzmoEmbedVizItem;
|
159
|
+
} | undefined;
|
160
|
+
addGridItem(newItem: GridItemData): HTMLElement;
|
161
|
+
removeGridItem(gridItem: GridItemData): void;
|
162
|
+
removeGridItemById(id: string): void;
|
163
|
+
private _renderItem;
|
164
|
+
protected render(): TemplateResult;
|
165
|
+
}
|