@sisense/sdk-ui 2.23.0 → 2.24.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.
Files changed (101) hide show
  1. package/dist/ai.cjs +3 -3
  2. package/dist/ai.js +7 -7
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +1172 -986
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{dimensions-C0BmtTH2.js → dimensions-C1R5YRt-.js} +1 -1
  8. package/dist/{dimensions-2t18RSZC.cjs → dimensions-C7yXAoZs.cjs} +1 -1
  9. package/dist/{execute-query-DmAyVFF5.cjs → execute-query-0Y9Fn9Pf.cjs} +1 -1
  10. package/dist/{execute-query-CHYTupEo.js → execute-query-b9oy2Egy.js} +7 -4
  11. package/dist/{index-Dx6wvLd3.cjs → index-Ck-0gJC9.cjs} +1 -1
  12. package/dist/{index-DCAC0mJe.js → index-r66Tjiqj.js} +21 -1
  13. package/dist/index.cjs +599 -595
  14. package/dist/index.js +14631 -14441
  15. package/dist/index.umd.js +951 -947
  16. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-csv-download.d.ts +24 -0
  17. package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +20 -0
  18. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-translated-data-options.d.ts +12 -1
  19. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-csv-download.d.ts +18 -0
  20. package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-csv-download.d.ts +15 -0
  21. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-csv-download.d.ts +18 -0
  22. package/dist/packages/sdk-ui/src/domains/widgets/components/tabber-buttons-widget/types.d.ts +8 -8
  23. package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +21 -1
  24. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +11 -2
  25. package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-csv-query-file-loader.d.ts +16 -0
  26. package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-with-csv-download-menu-item.d.ts +22 -0
  27. package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-menu-button.d.ts +1 -1
  28. package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +2 -2
  29. package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/custom-widgets-provider-adapter.d.ts +2 -1
  30. package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +11 -4
  31. package/dist/packages/sdk-ui/src/infra/plugins/custom-plugin-context-provider.d.ts +18 -0
  32. package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +29 -0
  33. package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/plugin-provider.d.ts +4 -2
  34. package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/types.d.ts +12 -4
  35. package/dist/packages/sdk-ui/src/infra/plugins/use-widget-plugin-registry.d.ts +7 -0
  36. package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/validate-plugins.d.ts +1 -1
  37. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +302 -0
  38. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +33 -0
  39. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +20 -0
  40. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +20 -0
  41. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +20 -0
  42. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +20 -0
  43. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +20 -0
  44. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +20 -0
  45. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +20 -0
  46. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +20 -0
  47. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +20 -0
  48. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +20 -0
  49. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +20 -0
  50. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +20 -0
  51. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +20 -0
  52. package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +20 -0
  53. package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +40 -0
  54. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/custom-formula/validate-custom-formula.d.ts +15 -3
  55. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +22 -6
  56. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/parse-compose-code.d.ts +19 -0
  57. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +5 -2
  58. package/dist/packages/sdk-ui/src/props.d.ts +19 -1
  59. package/dist/packages/sdk-ui/src/public-api/internal.d.ts +2 -0
  60. package/dist/packages/sdk-ui/src/public-api/public.d.ts +1 -1
  61. package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +2 -0
  62. package/dist/packages/sdk-ui/src/shared/const.d.ts +5 -0
  63. package/dist/packages/sdk-ui/src/shared/types/menu-item.d.ts +5 -1
  64. package/dist/packages/sdk-ui/src/shared/utils/menu-item-converters.d.ts +12 -0
  65. package/dist/{quota-notification-RAaHp-eO.cjs → quota-notification-BqRYSJ7r.cjs} +137 -137
  66. package/dist/{quota-notification-CVl0isIV.js → quota-notification-CeKnEyQG.js} +11248 -11000
  67. package/dist/translations/de-de.cjs +1 -1
  68. package/dist/translations/de-de.js +22 -2
  69. package/dist/translations/en-us.cjs +1 -1
  70. package/dist/translations/en-us.js +1 -1
  71. package/dist/translations/es-ar.cjs +1 -1
  72. package/dist/translations/es-ar.js +22 -2
  73. package/dist/translations/es-es.cjs +1 -1
  74. package/dist/translations/es-es.js +22 -2
  75. package/dist/translations/fr-fr.cjs +1 -1
  76. package/dist/translations/fr-fr.js +22 -2
  77. package/dist/translations/it-it.cjs +1 -1
  78. package/dist/translations/it-it.js +24 -4
  79. package/dist/translations/ja-jp.cjs +1 -1
  80. package/dist/translations/ja-jp.js +24 -4
  81. package/dist/translations/ko-kr.cjs +1 -1
  82. package/dist/translations/ko-kr.js +24 -4
  83. package/dist/translations/nl-nl.cjs +1 -1
  84. package/dist/translations/nl-nl.js +24 -4
  85. package/dist/translations/pt-br.cjs +1 -1
  86. package/dist/translations/pt-br.js +22 -2
  87. package/dist/translations/ru-ru.cjs +1 -1
  88. package/dist/translations/ru-ru.js +24 -4
  89. package/dist/translations/tr-tr.cjs +1 -1
  90. package/dist/translations/tr-tr.js +22 -2
  91. package/dist/translations/zh-cn.cjs +1 -1
  92. package/dist/translations/zh-cn.js +24 -4
  93. package/dist/{types-DZ4vWh8j.cjs → types-C0QU2tsE.cjs} +1 -1
  94. package/dist/{types-B96nVbgX.js → types-DJtC8_5_.js} +1 -1
  95. package/dist/{utils-ChqSLRbz.js → utils-BCp2ISWh.js} +208 -204
  96. package/dist/{utils-CgV-jWWQ.cjs → utils-D8O1_kl3.cjs} +16 -16
  97. package/dist/{widget-composer-Blul90Zb.cjs → widget-composer-BkHZISs7.cjs} +1 -1
  98. package/dist/{widget-composer-Cf_CN3Ux.js → widget-composer-CDNL9_XF.js} +3 -3
  99. package/package.json +8 -8
  100. package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/index.d.ts +0 -5
  101. package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-context.d.ts +0 -15
@@ -1,4 +1,4 @@
1
- "use strict";var Gs=Object.defineProperty,Hs=Object.defineProperties;var xs=Object.getOwnPropertyDescriptors;var Pe=Object.getOwnPropertySymbols;var Rt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable;var ct=(s,e)=>(e=Symbol[s])?e:Symbol.for("Symbol."+s),zs=s=>{throw TypeError(s)};var ft=(s,e,t)=>e in s?Gs(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,U=(s,e)=>{for(var t in e||(e={}))Rt.call(e,t)&&ft(s,t,e[t]);if(Pe)for(var t of Pe(e))Ut.call(e,t)&&ft(s,t,e[t]);return s},H=(s,e)=>Hs(s,xs(e));var Jt=(s,e)=>{var t={};for(var n in s)Rt.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&Pe)for(var n of Pe(s))e.indexOf(n)<0&&Ut.call(s,n)&&(t[n]=s[n]);return t};var ut=(s,e,t)=>ft(s,typeof e!="symbol"?e+"":e,t);var ht=(s,e,t)=>new Promise((n,i)=>{var r=a=>{try{l(t.next(a))}catch(c){i(c)}},o=a=>{try{l(t.throw(a))}catch(c){i(c)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(r,o);l((t=t.apply(s,e)).next())}),Xs=function(s,e){this[0]=s,this[1]=e};var d=s=>{var e=s[ct("asyncIterator")],t=!1,n,i={};return e==null?(e=s[ct("iterator")](),n=r=>i[r]=o=>e[r](o)):(e=e.call(s),n=r=>i[r]=o=>{if(t){if(t=!1,r==="throw")throw o;return o}return t=!0,{done:!1,value:new Xs(new Promise(l=>{var a=e[r](o);a instanceof Object||zs("Object expected"),l(a)}),1)}}),i[ct("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=r=>{throw r},"return"in e&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./types-DZ4vWh8j.cjs"),O=require("./widget-composer-Blul90Zb.cjs"),Qe=require("./utils-CgV-jWWQ.cjs"),Z=require("./analytics-composer/node.cjs"),De=require("./execute-query-DmAyVFF5.cjs"),It=Symbol.for("yaml.alias"),St=Symbol.for("yaml.document"),x=Symbol.for("yaml.map"),ss=Symbol.for("yaml.pair"),G=Symbol.for("yaml.scalar"),be=Symbol.for("yaml.seq"),R=Symbol.for("yaml.node.type"),oe=s=>!!s&&typeof s=="object"&&s[R]===It,we=s=>!!s&&typeof s=="object"&&s[R]===St,Se=s=>!!s&&typeof s=="object"&&s[R]===x,C=s=>!!s&&typeof s=="object"&&s[R]===ss,A=s=>!!s&&typeof s=="object"&&s[R]===G,ke=s=>!!s&&typeof s=="object"&&s[R]===be;function _(s){if(s&&typeof s=="object")switch(s[R]){case x:case be:return!0}return!1}function v(s){if(s&&typeof s=="object")switch(s[R]){case It:case x:case G:case be:return!0}return!1}const Zs=s=>(A(s)||_(s))&&!!s.anchor,q=Symbol("break visit"),ns=Symbol("skip children"),V=Symbol("remove node");function z(s,e){const t=is(e);we(s)?fe(null,s.contents,t,Object.freeze([s]))===V&&(s.contents=null):fe(null,s,t,Object.freeze([]))}z.BREAK=q;z.SKIP=ns;z.REMOVE=V;function fe(s,e,t,n){const i=rs(s,e,t,n);if(v(i)||C(i))return os(s,n,i),fe(s,i,t,n);if(typeof i!="symbol"){if(_(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=fe(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===q)return q;o===V&&(e.items.splice(r,1),r-=1)}}}else if(C(e)){n=Object.freeze(n.concat(e));const r=fe("key",e.key,t,n);if(r===q)return q;r===V&&(e.key=null);const o=fe("value",e.value,t,n);if(o===q)return q;o===V&&(e.value=null)}}return i}function He(s,e){return ht(this,null,function*(){const t=is(e);we(s)?(yield ue(null,s.contents,t,Object.freeze([s])))===V&&(s.contents=null):yield ue(null,s,t,Object.freeze([]))})}He.BREAK=q;He.SKIP=ns;He.REMOVE=V;function ue(s,e,t,n){return ht(this,null,function*(){const i=yield rs(s,e,t,n);if(v(i)||C(i))return os(s,n,i),ue(s,i,t,n);if(typeof i!="symbol"){if(_(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=yield ue(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===q)return q;o===V&&(e.items.splice(r,1),r-=1)}}}else if(C(e)){n=Object.freeze(n.concat(e));const r=yield ue("key",e.key,t,n);if(r===q)return q;r===V&&(e.key=null);const o=yield ue("value",e.value,t,n);if(o===q)return q;o===V&&(e.value=null)}}return i})}function is(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function rs(s,e,t,n){var i,r,o,l,a;if(typeof t=="function")return t(s,e,n);if(Se(e))return(i=t.Map)==null?void 0:i.call(t,s,e,n);if(ke(e))return(r=t.Seq)==null?void 0:r.call(t,s,e,n);if(C(e))return(o=t.Pair)==null?void 0:o.call(t,s,e,n);if(A(e))return(l=t.Scalar)==null?void 0:l.call(t,s,e,n);if(oe(e))return(a=t.Alias)==null?void 0:a.call(t,s,e,n)}function os(s,e,t){const n=e[e.length-1];if(_(n))n.items[s]=t;else if(C(n))s==="key"?n.key=t:n.value=t;else if(we(n))n.contents=t;else{const i=oe(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const en={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},tn=s=>s.replace(/[!,[\]{}]/g,e=>en[e]);class j{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},j.defaultYaml,e),this.tags=Object.assign({},j.defaultTags,t)}clone(){const e=new j(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new j(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:j.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},j.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:j.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},j.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,n,i]=e.match(new RegExp("^(.*!)([^!]*)$","s"));i||t(`The ${e} tag has no suffix`);const r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+tn(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&v(e.contents)){const r={};z(e.contents,(o,l)=>{v(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
1
+ "use strict";var Gs=Object.defineProperty,Hs=Object.defineProperties;var xs=Object.getOwnPropertyDescriptors;var Pe=Object.getOwnPropertySymbols;var Rt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable;var ct=(s,e)=>(e=Symbol[s])?e:Symbol.for("Symbol."+s),zs=s=>{throw TypeError(s)};var ft=(s,e,t)=>e in s?Gs(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,U=(s,e)=>{for(var t in e||(e={}))Rt.call(e,t)&&ft(s,t,e[t]);if(Pe)for(var t of Pe(e))Ut.call(e,t)&&ft(s,t,e[t]);return s},H=(s,e)=>Hs(s,xs(e));var Jt=(s,e)=>{var t={};for(var n in s)Rt.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&Pe)for(var n of Pe(s))e.indexOf(n)<0&&Ut.call(s,n)&&(t[n]=s[n]);return t};var ut=(s,e,t)=>ft(s,typeof e!="symbol"?e+"":e,t);var ht=(s,e,t)=>new Promise((n,i)=>{var r=a=>{try{l(t.next(a))}catch(c){i(c)}},o=a=>{try{l(t.throw(a))}catch(c){i(c)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(r,o);l((t=t.apply(s,e)).next())}),Xs=function(s,e){this[0]=s,this[1]=e};var d=s=>{var e=s[ct("asyncIterator")],t=!1,n,i={};return e==null?(e=s[ct("iterator")](),n=r=>i[r]=o=>e[r](o)):(e=e.call(s),n=r=>i[r]=o=>{if(t){if(t=!1,r==="throw")throw o;return o}return t=!0,{done:!1,value:new Xs(new Promise(l=>{var a=e[r](o);a instanceof Object||zs("Object expected"),l(a)}),1)}}),i[ct("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=r=>{throw r},"return"in e&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./types-C0QU2tsE.cjs"),O=require("./widget-composer-BkHZISs7.cjs"),Qe=require("./utils-D8O1_kl3.cjs"),Z=require("./analytics-composer/node.cjs"),De=require("./execute-query-0Y9Fn9Pf.cjs"),It=Symbol.for("yaml.alias"),St=Symbol.for("yaml.document"),x=Symbol.for("yaml.map"),ss=Symbol.for("yaml.pair"),G=Symbol.for("yaml.scalar"),be=Symbol.for("yaml.seq"),R=Symbol.for("yaml.node.type"),oe=s=>!!s&&typeof s=="object"&&s[R]===It,we=s=>!!s&&typeof s=="object"&&s[R]===St,Se=s=>!!s&&typeof s=="object"&&s[R]===x,C=s=>!!s&&typeof s=="object"&&s[R]===ss,A=s=>!!s&&typeof s=="object"&&s[R]===G,ke=s=>!!s&&typeof s=="object"&&s[R]===be;function _(s){if(s&&typeof s=="object")switch(s[R]){case x:case be:return!0}return!1}function v(s){if(s&&typeof s=="object")switch(s[R]){case It:case x:case G:case be:return!0}return!1}const Zs=s=>(A(s)||_(s))&&!!s.anchor,q=Symbol("break visit"),ns=Symbol("skip children"),V=Symbol("remove node");function z(s,e){const t=is(e);we(s)?fe(null,s.contents,t,Object.freeze([s]))===V&&(s.contents=null):fe(null,s,t,Object.freeze([]))}z.BREAK=q;z.SKIP=ns;z.REMOVE=V;function fe(s,e,t,n){const i=rs(s,e,t,n);if(v(i)||C(i))return os(s,n,i),fe(s,i,t,n);if(typeof i!="symbol"){if(_(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=fe(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===q)return q;o===V&&(e.items.splice(r,1),r-=1)}}}else if(C(e)){n=Object.freeze(n.concat(e));const r=fe("key",e.key,t,n);if(r===q)return q;r===V&&(e.key=null);const o=fe("value",e.value,t,n);if(o===q)return q;o===V&&(e.value=null)}}return i}function He(s,e){return ht(this,null,function*(){const t=is(e);we(s)?(yield ue(null,s.contents,t,Object.freeze([s])))===V&&(s.contents=null):yield ue(null,s,t,Object.freeze([]))})}He.BREAK=q;He.SKIP=ns;He.REMOVE=V;function ue(s,e,t,n){return ht(this,null,function*(){const i=yield rs(s,e,t,n);if(v(i)||C(i))return os(s,n,i),ue(s,i,t,n);if(typeof i!="symbol"){if(_(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=yield ue(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===q)return q;o===V&&(e.items.splice(r,1),r-=1)}}}else if(C(e)){n=Object.freeze(n.concat(e));const r=yield ue("key",e.key,t,n);if(r===q)return q;r===V&&(e.key=null);const o=yield ue("value",e.value,t,n);if(o===q)return q;o===V&&(e.value=null)}}return i})}function is(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function rs(s,e,t,n){var i,r,o,l,a;if(typeof t=="function")return t(s,e,n);if(Se(e))return(i=t.Map)==null?void 0:i.call(t,s,e,n);if(ke(e))return(r=t.Seq)==null?void 0:r.call(t,s,e,n);if(C(e))return(o=t.Pair)==null?void 0:o.call(t,s,e,n);if(A(e))return(l=t.Scalar)==null?void 0:l.call(t,s,e,n);if(oe(e))return(a=t.Alias)==null?void 0:a.call(t,s,e,n)}function os(s,e,t){const n=e[e.length-1];if(_(n))n.items[s]=t;else if(C(n))s==="key"?n.key=t:n.value=t;else if(we(n))n.contents=t;else{const i=oe(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const en={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},tn=s=>s.replace(/[!,[\]{}]/g,e=>en[e]);class j{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},j.defaultYaml,e),this.tags=Object.assign({},j.defaultTags,t)}clone(){const e=new j(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new j(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:j.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},j.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:j.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},j.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,n,i]=e.match(new RegExp("^(.*!)([^!]*)$","s"));i||t(`The ${e} tag has no suffix`);const r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+tn(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&v(e.contents)){const r={};z(e.contents,(o,l)=>{v(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
2
2
  `)}}j.defaultYaml={explicit:!1,version:"1.2"};j.defaultTags={"!!":"tag:yaml.org,2002:"};function ls(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function as(s){const e=new Set;return z(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function cs(s,e){for(let t=1;;++t){const n=`${s}${t}`;if(!e.has(n))return n}}function sn(s,e){const t=[],n=new Map;let i=null;return{onAnchor:r=>{t.push(r),i||(i=as(s));const o=cs(e,i);return i.add(o),o},setAnchors:()=>{for(const r of t){const o=n.get(r);if(typeof o=="object"&&o.anchor&&(A(o.node)||_(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function he(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){const o=n[i],l=he(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(const i of Array.from(n.keys())){const r=n.get(i),o=he(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(const i of Array.from(n)){const r=he(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(const[i,r]of Object.entries(n)){const o=he(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}function F(s,e,t){if(Array.isArray(s))return s.map((n,i)=>F(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Zs(s))return s.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};const i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!(t!=null&&t.keep)?Number(s):s}class At{constructor(e){Object.defineProperty(this,R,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!we(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=F(this,"",o);if(typeof i=="function")for(const{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?he(r,{"":l},"",l):l}}class xe extends At{constructor(e){super(It),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return z(e,{Node:(n,i)=>{if(i===this)return z.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i);if(!o){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(F(o,null,t),l=n.get(o)),!l||l.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Fe(i,o,n)),l.count*l.aliasCount>r)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(ls(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}}function Fe(s,e,t){if(oe(e)){const n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(_(e)){let n=0;for(const i of e.items){const r=Fe(s,i,t);r>n&&(n=r)}return n}else if(C(e)){const n=Fe(s,e.key,t),i=Fe(s,e.value,t);return Math.max(n,i)}return 1}const fs=s=>!s||typeof s!="function"&&typeof s!="object";class N extends At{constructor(e){super(G),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:F(this.value,e,t)}toString(){return String(this.value)}}N.BLOCK_FOLDED="BLOCK_FOLDED";N.BLOCK_LITERAL="BLOCK_LITERAL";N.PLAIN="PLAIN";N.QUOTE_DOUBLE="QUOTE_DOUBLE";N.QUOTE_SINGLE="QUOTE_SINGLE";const nn="tag:yaml.org,2002:";function rn(s,e,t){var n;if(e){const i=t.filter(o=>o.tag===e),r=(n=i.find(o=>!o.format))!=null?n:i[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,s))&&!i.format})}function Ce(s,e,t){var f,p,m;if(we(s)&&(s=s.contents),v(s))return s;if(C(s)){const y=(p=(f=t.schema[x]).createNode)==null?void 0:p.call(f,t.schema,null,t);return y.items.push(s),y}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt!="undefined"&&s instanceof BigInt)&&(s=s.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t;let a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor||(a.anchor=i(s)),new xe(a.anchor);a={anchor:null,node:null},l.set(s,a)}e!=null&&e.startsWith("!!")&&(e=nn+e.slice(2));let c=rn(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){const y=new N(s);return a&&(a.node=y),y}c=s instanceof Map?o[x]:Symbol.iterator in Object(s)?o[be]:o[x]}r&&(r(c),delete t.onTagObj);const h=c!=null&&c.createNode?c.createNode(t.schema,s,t):typeof((m=c==null?void 0:c.nodeClass)==null?void 0:m.from)=="function"?c.nodeClass.from(t.schema,s,t):new N(s);return e?h.tag=e:c.default||(h.tag=c.tag),a&&(a.node=h),h}function Ve(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Ce(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}const Ie=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done;class us extends At{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>v(n)||C(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ie(e))this.add(t);else{const[n,...i]=e,r=this.get(n,!0);if(_(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ve(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const i=this.get(t,!0);if(_(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&A(r)?r.value:r:_(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!C(t))return!1;const n=t.value;return n==null||e&&A(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const i=this.get(t,!0);return _(i)?i.hasIn(n):!1}setIn(e,t){const[n,...i]=e;if(i.length===0)this.set(n,t);else{const r=this.get(n,!0);if(_(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ve(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}const on=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Y(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}const se=(s,e,t)=>s.endsWith(`
3
3
  `)?Y(t,e):t.includes(`
4
4
  `)?`
@@ -59,13 +59,13 @@ var d = (s) => {
59
59
  throw r;
60
60
  }, "return" in e && n("return"), i;
61
61
  };
62
- import { E as Yt, a as nn } from "./types-B96nVbgX.js";
63
- import { b as xi, i as zi, e as Xi, d as Zi } from "./types-B96nVbgX.js";
64
- import { s as rn, c as on, p as ln, v as an, g as cn, a as V, b as Ye, d as Tt, e as It, f as Et, h as At, C as Te } from "./widget-composer-Cf_CN3Ux.js";
65
- import { k as tr, m as sr, j as nr, l as ir, i as rr, w as or } from "./widget-composer-Cf_CN3Ux.js";
66
- import { n as fn, d as un, i as hn, a as dn } from "./utils-ChqSLRbz.js";
62
+ import { E as Yt, a as nn } from "./types-DJtC8_5_.js";
63
+ import { b as xi, i as zi, e as Xi, d as Zi } from "./types-DJtC8_5_.js";
64
+ import { s as rn, c as on, p as ln, v as an, g as cn, a as V, b as Ye, d as Tt, e as It, f as Et, h as At, C as Te } from "./widget-composer-CDNL9_XF.js";
65
+ import { k as tr, m as sr, j as nr, l as ir, i as rr, w as or } from "./widget-composer-CDNL9_XF.js";
66
+ import { n as fn, d as un, i as hn, a as dn } from "./utils-BCp2ISWh.js";
67
67
  import { CustomSuperJSON as ar, translateChartFromJSON as cr, translateChartToJSON as fr, translatePivotTableFromJSON as ur, translatePivotTableToJSON as hr, translateQueryFromJSON as dr, translateQueryToJSON as pr, translateQueryToJaql as mr } from "./analytics-composer/node.js";
68
- import { k as pn, m as Wt, l as mn } from "./execute-query-CHYTupEo.js";
68
+ import { k as pn, m as Wt, l as mn } from "./execute-query-b9oy2Egy.js";
69
69
  const Lt = Symbol.for("yaml.alias"), bt = Symbol.for("yaml.document"), H = Symbol.for("yaml.map"), os = Symbol.for("yaml.pair"), W = Symbol.for("yaml.scalar"), ye = Symbol.for("yaml.seq"), F = Symbol.for("yaml.node.type"), ie = (s) => !!s && typeof s == "object" && s[F] === Lt, ge = (s) => !!s && typeof s == "object" && s[F] === bt, be = (s) => !!s && typeof s == "object" && s[F] === H, A = (s) => !!s && typeof s == "object" && s[F] === os, E = (s) => !!s && typeof s == "object" && s[F] === W, we = (s) => !!s && typeof s == "object" && s[F] === ye;
70
70
  function C(s) {
71
71
  if (s && typeof s == "object")
@@ -1,4 +1,4 @@
1
- import { D as T, M as h, S as f, p as _, a as H, w as b, n as A, j as R, b as n, c as u, d as w } from "./execute-query-CHYTupEo.js";
1
+ import { D as T, M as h, S as f, p as _, a as H, w as b, n as A, j as R, b as n, c as u, d as w } from "./execute-query-b9oy2Egy.js";
2
2
  class y extends T {
3
3
  constructor(t, e, r, o, d, m, l, c, a, g) {
4
4
  if (super(t, d || h.Dimension, m, c, a), this.__serializable = "DimensionalDimension", this._dimensions = [], this._attributes = [], this._sort = f.None, !a && e) {
@@ -1 +1 @@
1
- "use strict";const e=require("./execute-query-DmAyVFF5.cjs");class D extends e.DimensionalElement{constructor(i,t,a,o,u,l,d,m,r,h){if(super(i,u||e.MetadataTypes.Dimension,l,m,r),this.__serializable="DimensionalDimension",this._dimensions=[],this._attributes=[],this._sort=e.Sort.None,!r&&t){const{table:y,column:n}=e.parseExpression(t);this.composeCode=`${e.DATA_MODEL_MODULE_NAME}.${e.wrapIfNeedsNormalization(y)}.${e.wrapIfNeedsNormalization(n)}`}this._sort=d||e.Sort.None,this._expression=t,this.setDimensions(o||[]),this.setAttributes(a),h&&(this.defaultAttribute=h)}static parseType(i){switch(i){case"datetime":case e.MetadataTypes.DateDimension:return e.MetadataTypes.DateDimension;case"text":case e.MetadataTypes.TextDimension:return e.MetadataTypes.TextDimension;case"numeric":case e.MetadataTypes.NumericDimension:return e.MetadataTypes.NumericDimension}return e.MetadataTypes.TextDimension}getAttachedName(i,t){let a=i;const o=e.normalizeName(i);return(o==="id"||o==="name"||Object.getOwnPropertyDescriptor(this,o)!==void 0||this[o]!==void 0)&&(a=t),a}setDimensions(i){this._dimensions=i;for(let t=0;t<i.length;t++){const a=this.getAttachedName(i[t].name,i[t].attributes[0].expression);this[e.normalizeName(a)]=i[t],a!=i[t].name&&(i[t].name=a)}}setAttributes(i){this._attributes=i||[];for(let t=0;t<i.length;t++){const a=this.getAttachedName(i[t].name,i[t].expression);this[e.normalizeName(a)]=i[t],i[t].name!=a&&(i[t].name=a)}}get id(){return this._expression}get attributes(){return this._attributes}get dimensions(){return this._dimensions}get expression(){return this._expression}getSort(){return this._sort}sort(i){return new D(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,i,this.dataSource,this.composeCode,this.defaultAttribute)}serialize(){const i=super.serialize();return i.expression=this.expression,this.getSort()!==void 0&&(i.sort=this.getSort()),i.attributes=this._attributes.map(t=>t.serialize()),i.dimensions=this._dimensions.map(t=>t.serialize()),this.defaultAttribute&&(i.defaultAttribute=this.defaultAttribute.serialize()),i}jaql(i){if(this.defaultAttribute)return this.defaultAttribute.jaql(i);if(this.dimensions.length>0)return this.dimensions[0].jaql(i);const t={jaql:{title:this.name,dim:this.expression,datatype:e.jaqlSimpleColumnType(this.type)}};return this._sort!=e.Sort.None&&(t.jaql.sort=this._sort==e.Sort.Ascending?"asc":"desc"),i===!0?t.jaql:t}}const M=s=>s&&s.__serializable==="DimensionalDimension";class c extends D{constructor(i,t,a,o,u,l,d,m){super(i,t,[],[],e.MetadataTypes.DateDimension,a,o,u,l),this.__serializable="DimensionalDateDimension";const r=[a,o,u,void 0,void 0,d,m];this.defaultLevel=e.DateLevels.Years,this.Years=new e.DimensionalLevelAttribute(e.DateLevels.Years,t,e.DateLevels.Years,"yyyy",...r),this.Quarters=new e.DimensionalLevelAttribute(e.DateLevels.Quarters,t,e.DateLevels.Quarters,"Q yyyy",...r),this.Months=new e.DimensionalLevelAttribute(e.DateLevels.Months,t,e.DateLevels.Months,"yyyy-MM",...r),this.Weeks=new e.DimensionalLevelAttribute(e.DateLevels.Weeks,t,e.DateLevels.Weeks,"ww yyyy",...r),this.Days=new e.DimensionalLevelAttribute(e.DateLevels.Days,t,e.DateLevels.Days,"yyyy-MM-dd",...r),this.Hours=new e.DimensionalLevelAttribute(e.DateLevels.Hours,t,e.DateLevels.Hours,"yyyy-MM-dd HH:mm",...r),this.MinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo30,t,e.DateLevels.MinutesRoundTo30,"yyyy-MM-dd HH:mm",a,o,u),this.MinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo15,t,e.DateLevels.MinutesRoundTo15,"yyyy-MM-dd HH:mm",...r),this.Minutes=new e.DimensionalLevelAttribute(e.DateLevels.Minutes,t,e.DateLevels.Minutes,"yyyy-MM-dd HH:mm",...r),this.Seconds=new e.DimensionalLevelAttribute(e.DateLevels.Seconds,t,e.DateLevels.Seconds,"yyyy-MM-dd HH:mm:ss",a,o,u),this.AggHours=new e.DimensionalLevelAttribute(e.DateLevels.AggHours,t,e.DateLevels.AggHours,"HH:mm",...r),this.AggMinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo30,t,e.DateLevels.AggMinutesRoundTo30,"HH:mm",a,o,u),this.AggMinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo15,t,e.DateLevels.AggMinutesRoundTo15,"HH:mm",...r),this.AggMinutesRoundTo1=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo1,t,e.DateLevels.AggMinutesRoundTo1,"HH:mm",...r),this.setAttributes([this.Years,this.Quarters,this.Months,this.Weeks,this.Days,this.Hours,this.MinutesRoundTo30,this.MinutesRoundTo15,this.Minutes,this.Seconds,this.AggHours,this.AggMinutesRoundTo30,this.AggMinutesRoundTo15,this.AggMinutesRoundTo1])}get id(){return this.expression}setDimensions(){}setAttributes(i){this._attributes=i}getSort(){return this._sort}sort(i){return new c(this.name,this.expression,this.description,i,this.dataSource,this.composeCode,this.indexed,this.merged)}serialize(){return super.serialize()}jaql(i){const t=this[this.defaultLevel].jaql();return t.jaql.title=this.name,i?t.jaql:t}}const A=s=>s&&s.__serializable==="DimensionalDateDimension";function p(s){const i=s.name||s.title,t=s.desc||s.description,a=s.expression||s.dim,o=D.parseType(s.dimtype||s.type),u=s.sort,l=s.dataSource,d=s.indexed,m=s.merged;if(o==e.MetadataTypes.DateDimension)return new c(i,a,t,u,l,void 0,d,m);const r=Object.getOwnPropertyNames(s).map(n=>s[n]).filter(n=>e.MetadataTypes.isAttribute(n==null?void 0:n.type));if(r.length==0)if(s.attributes){let n;for(let g=0;g<s.attributes.length;g++)n=s.attributes[g],r.push(new e.DimensionalAttribute(n.name,n.expression,n.type,n.description,n.sort,n.dataSource,void 0,void 0,n.indexed,n.merged))}else a&&r.push(new e.DimensionalAttribute(i,a,o,t,u,l,void 0,void 0,d,m));const h=Object.getOwnPropertyNames(s).map(n=>s[n]).filter(n=>e.MetadataTypes.isDimension(n==null?void 0:n.type));if(h.length==0&&s.dimensions)for(let n=0;n<s.dimensions.length;n++)h.push(p(s.dimensions[n]));const y=new D(i,a,r,h,o,t,u,l);return s.defaultAttribute&&(y.defaultAttribute=r.find(n=>n.name===s.defaultAttribute)),y}function f(s){const i=s.name||s.title,t=s.expression||s.dim,a=s.desc||s.description,o=s.sort,u=s.dataSource;return new c(i,t,a,o,u,void 0,s.indexed,s.merged)}exports.DimensionalDateDimension=c;exports.DimensionalDimension=D;exports.createDateDimension=f;exports.createDimension=p;exports.isDimensionalDateDimension=A;exports.isDimensionalDimension=M;
1
+ "use strict";const e=require("./execute-query-0Y9Fn9Pf.cjs");class D extends e.DimensionalElement{constructor(i,t,a,o,u,l,d,m,r,h){if(super(i,u||e.MetadataTypes.Dimension,l,m,r),this.__serializable="DimensionalDimension",this._dimensions=[],this._attributes=[],this._sort=e.Sort.None,!r&&t){const{table:y,column:n}=e.parseExpression(t);this.composeCode=`${e.DATA_MODEL_MODULE_NAME}.${e.wrapIfNeedsNormalization(y)}.${e.wrapIfNeedsNormalization(n)}`}this._sort=d||e.Sort.None,this._expression=t,this.setDimensions(o||[]),this.setAttributes(a),h&&(this.defaultAttribute=h)}static parseType(i){switch(i){case"datetime":case e.MetadataTypes.DateDimension:return e.MetadataTypes.DateDimension;case"text":case e.MetadataTypes.TextDimension:return e.MetadataTypes.TextDimension;case"numeric":case e.MetadataTypes.NumericDimension:return e.MetadataTypes.NumericDimension}return e.MetadataTypes.TextDimension}getAttachedName(i,t){let a=i;const o=e.normalizeName(i);return(o==="id"||o==="name"||Object.getOwnPropertyDescriptor(this,o)!==void 0||this[o]!==void 0)&&(a=t),a}setDimensions(i){this._dimensions=i;for(let t=0;t<i.length;t++){const a=this.getAttachedName(i[t].name,i[t].attributes[0].expression);this[e.normalizeName(a)]=i[t],a!=i[t].name&&(i[t].name=a)}}setAttributes(i){this._attributes=i||[];for(let t=0;t<i.length;t++){const a=this.getAttachedName(i[t].name,i[t].expression);this[e.normalizeName(a)]=i[t],i[t].name!=a&&(i[t].name=a)}}get id(){return this._expression}get attributes(){return this._attributes}get dimensions(){return this._dimensions}get expression(){return this._expression}getSort(){return this._sort}sort(i){return new D(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,i,this.dataSource,this.composeCode,this.defaultAttribute)}serialize(){const i=super.serialize();return i.expression=this.expression,this.getSort()!==void 0&&(i.sort=this.getSort()),i.attributes=this._attributes.map(t=>t.serialize()),i.dimensions=this._dimensions.map(t=>t.serialize()),this.defaultAttribute&&(i.defaultAttribute=this.defaultAttribute.serialize()),i}jaql(i){if(this.defaultAttribute)return this.defaultAttribute.jaql(i);if(this.dimensions.length>0)return this.dimensions[0].jaql(i);const t={jaql:{title:this.name,dim:this.expression,datatype:e.jaqlSimpleColumnType(this.type)}};return this._sort!=e.Sort.None&&(t.jaql.sort=this._sort==e.Sort.Ascending?"asc":"desc"),i===!0?t.jaql:t}}const M=s=>s&&s.__serializable==="DimensionalDimension";class c extends D{constructor(i,t,a,o,u,l,d,m){super(i,t,[],[],e.MetadataTypes.DateDimension,a,o,u,l),this.__serializable="DimensionalDateDimension";const r=[a,o,u,void 0,void 0,d,m];this.defaultLevel=e.DateLevels.Years,this.Years=new e.DimensionalLevelAttribute(e.DateLevels.Years,t,e.DateLevels.Years,"yyyy",...r),this.Quarters=new e.DimensionalLevelAttribute(e.DateLevels.Quarters,t,e.DateLevels.Quarters,"Q yyyy",...r),this.Months=new e.DimensionalLevelAttribute(e.DateLevels.Months,t,e.DateLevels.Months,"yyyy-MM",...r),this.Weeks=new e.DimensionalLevelAttribute(e.DateLevels.Weeks,t,e.DateLevels.Weeks,"ww yyyy",...r),this.Days=new e.DimensionalLevelAttribute(e.DateLevels.Days,t,e.DateLevels.Days,"yyyy-MM-dd",...r),this.Hours=new e.DimensionalLevelAttribute(e.DateLevels.Hours,t,e.DateLevels.Hours,"yyyy-MM-dd HH:mm",...r),this.MinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo30,t,e.DateLevels.MinutesRoundTo30,"yyyy-MM-dd HH:mm",a,o,u),this.MinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo15,t,e.DateLevels.MinutesRoundTo15,"yyyy-MM-dd HH:mm",...r),this.Minutes=new e.DimensionalLevelAttribute(e.DateLevels.Minutes,t,e.DateLevels.Minutes,"yyyy-MM-dd HH:mm",...r),this.Seconds=new e.DimensionalLevelAttribute(e.DateLevels.Seconds,t,e.DateLevels.Seconds,"yyyy-MM-dd HH:mm:ss",a,o,u),this.AggHours=new e.DimensionalLevelAttribute(e.DateLevels.AggHours,t,e.DateLevels.AggHours,"HH:mm",...r),this.AggMinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo30,t,e.DateLevels.AggMinutesRoundTo30,"HH:mm",a,o,u),this.AggMinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo15,t,e.DateLevels.AggMinutesRoundTo15,"HH:mm",...r),this.AggMinutesRoundTo1=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo1,t,e.DateLevels.AggMinutesRoundTo1,"HH:mm",...r),this.setAttributes([this.Years,this.Quarters,this.Months,this.Weeks,this.Days,this.Hours,this.MinutesRoundTo30,this.MinutesRoundTo15,this.Minutes,this.Seconds,this.AggHours,this.AggMinutesRoundTo30,this.AggMinutesRoundTo15,this.AggMinutesRoundTo1])}get id(){return this.expression}setDimensions(){}setAttributes(i){this._attributes=i}getSort(){return this._sort}sort(i){return new c(this.name,this.expression,this.description,i,this.dataSource,this.composeCode,this.indexed,this.merged)}serialize(){return super.serialize()}jaql(i){const t=this[this.defaultLevel].jaql();return t.jaql.title=this.name,i?t.jaql:t}}const A=s=>s&&s.__serializable==="DimensionalDateDimension";function p(s){const i=s.name||s.title,t=s.desc||s.description,a=s.expression||s.dim,o=D.parseType(s.dimtype||s.type),u=s.sort,l=s.dataSource,d=s.indexed,m=s.merged;if(o==e.MetadataTypes.DateDimension)return new c(i,a,t,u,l,void 0,d,m);const r=Object.getOwnPropertyNames(s).map(n=>s[n]).filter(n=>e.MetadataTypes.isAttribute(n==null?void 0:n.type));if(r.length==0)if(s.attributes){let n;for(let g=0;g<s.attributes.length;g++)n=s.attributes[g],r.push(new e.DimensionalAttribute(n.name,n.expression,n.type,n.description,n.sort,n.dataSource,void 0,void 0,n.indexed,n.merged))}else a&&r.push(new e.DimensionalAttribute(i,a,o,t,u,l,void 0,void 0,d,m));const h=Object.getOwnPropertyNames(s).map(n=>s[n]).filter(n=>e.MetadataTypes.isDimension(n==null?void 0:n.type));if(h.length==0&&s.dimensions)for(let n=0;n<s.dimensions.length;n++)h.push(p(s.dimensions[n]));const y=new D(i,a,r,h,o,t,u,l);return s.defaultAttribute&&(y.defaultAttribute=r.find(n=>n.name===s.defaultAttribute)),y}function f(s){const i=s.name||s.title,t=s.expression||s.dim,a=s.desc||s.description,o=s.sort,u=s.dataSource;return new c(i,t,a,o,u,void 0,s.indexed,s.merged)}exports.DimensionalDateDimension=c;exports.DimensionalDimension=D;exports.createDateDimension=f;exports.createDimension=p;exports.isDimensionalDateDimension=A;exports.isDimensionalDimension=M;