@sisense/sdk-ui 2.22.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +17 -17
- package/dist/ai.js +57 -57
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +2177 -1176
- package/dist/analytics-composer.cjs +47 -47
- package/dist/analytics-composer.js +135 -131
- package/dist/dimensions-2t18RSZC.cjs +1 -0
- package/dist/dimensions-C0BmtTH2.js +204 -0
- package/dist/execute-query-CHYTupEo.js +5866 -0
- package/dist/execute-query-DmAyVFF5.cjs +1 -0
- package/dist/{index-kxX21arA.js → index-DCAC0mJe.js} +18 -1
- package/dist/{index-NyouhE_A.cjs → index-Dx6wvLd3.cjs} +1 -1
- package/dist/index.cjs +335 -322
- package/dist/index.js +15230 -15097
- package/dist/index.umd.js +687 -634
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/const.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/smart-pointer-sensor.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +24 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/use-dashboard-persistence.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts +34 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +23 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-dashboard-theme.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/add-filter-popover/add-filter-data-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/data-schema-browser/data-schema-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/dimensions-browser/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/domains/formulas/fetch-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/core/execute-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query-by-widget-id/use-execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-query-cache/use-query-cache.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/get-load-data-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/helpers/data-loading.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +73 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +12 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +12 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-data-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/domains/widgets/event-to-delta.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/header-menu-utils.d.ts +14 -4
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-title-renaming.d.ts +27 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-widget-header-management.d.ts +28 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-container/widget-container.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/types.d.ts +31 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header.d.ts +3 -1
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +4 -0
- package/dist/packages/sdk-ui/src/infra/api/types/dashboard-dto.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +5 -231
- package/dist/packages/sdk-ui/src/infra/app/helpers.d.ts +16 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/types/deployment-props.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +236 -0
- package/dist/packages/sdk-ui/src/infra/contexts/sisense-context/sisense-context.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/theme-context.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/decorators/component-decorators/with-tracking/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/decorators/hook-decorators/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +34 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-nlq-result.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-query-recommendations.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/axis-type-detection.d.ts +17 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/chart-type-schemas.d.ts +37 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/translate-data-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/validate-chart-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-from-json.d.ts +42 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-to-json.d.ts +41 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-from-json.d.ts +11 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-from-json.d.ts → constructs/filters/translate-filters-from-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-to-json.d.ts → constructs/filters/translate-filters-to-json.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-measures-from-json.d.ts → constructs/measures/translate-measures-from-json.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +8 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/index.d.ts +7 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/translate-data-options.d.ts +14 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/validate-pivot-table-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-from-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-to-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts +8 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-from-json.d.ts → query/translate-query-from-json.d.ts} +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-jaql.d.ts → query/translate-query-to-jaql.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-json.d.ts → query/translate-query-to-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-from-json.d.ts +24 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-to-json.d.ts +18 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/process-custom-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/validate-custom-formula.d.ts +13 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/execute-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-schemas.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/filter-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +25 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-arg.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-node.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/attribute-helpers.d.ts +50 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/fuzzy-match.d.ts +16 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{parse-compose-code.d.ts → shared/utils/parse-compose-code.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +49 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/translation-helpers.d.ts +31 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +115 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/props.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/beta.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +8 -6
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +12 -5
- package/dist/packages/sdk-ui/src/shared/components/grouped-items-browser/types.d.ts +7 -1
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/inline-text-editor.d.ts +26 -0
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/use-blur-on-pointer-down-outside.d.ts +11 -0
- package/dist/packages/sdk-ui/src/shared/components/loading-indicator.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/components/quota-notification/quota-notification.d.ts +2 -2
- package/dist/packages/sdk-ui/src/shared/hooks/use-app-settings.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-notification.d.ts +4 -4
- package/dist/packages/sdk-ui/src/shared/hooks/use-should-load.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-with-change-detection.d.ts +5 -5
- package/dist/packages/sdk-ui/src/types.d.ts +3 -3
- package/dist/{quota-notification-D6oMJal8.js → quota-notification-CVl0isIV.js} +17901 -16770
- package/dist/quota-notification-RAaHp-eO.cjs +713 -0
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +19 -2
- package/dist/translations/en-us.cjs +1 -1
- package/dist/translations/en-us.js +1 -1
- package/dist/translations/es-ar.cjs +1 -1
- package/dist/translations/es-ar.js +19 -2
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +19 -2
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +19 -2
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +19 -2
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +19 -2
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +19 -2
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +19 -2
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +19 -2
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +19 -2
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +19 -2
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +19 -2
- package/dist/{types-ixSwJkxM.js → types-B96nVbgX.js} +1 -1
- package/dist/{types-CoY6F8Ma.cjs → types-DZ4vWh8j.cjs} +1 -1
- package/dist/{utils-C8YMrOdw.cjs → utils-CgV-jWWQ.cjs} +33 -33
- package/dist/{utils-BP-BglHE.js → utils-ChqSLRbz.js} +3742 -3774
- package/dist/{widget-composer-DI4sHaNe.cjs → widget-composer-Blul90Zb.cjs} +1 -1
- package/dist/{widget-composer-CUUFoCb9.js → widget-composer-Cf_CN3Ux.js} +8 -8
- package/package.json +10 -8
- package/dist/dimensions-BiLyFpCg.js +0 -202
- package/dist/dimensions-X4_igtmO.cjs +0 -1
- package/dist/execute-query-BEeqqDl6.js +0 -5795
- package/dist/execute-query-DJDE0zRU.cjs +0 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/common.d.ts +0 -84
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-from-json.d.ts +0 -12
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-to-json.d.ts +0 -13
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-measures-to-json.d.ts +0 -13
- package/dist/quota-notification-z3dv2KoH.cjs +0 -672
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var le=Object.defineProperty,de=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var $=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))q.call(t,r)&&$(e,r,t[r]);if(C)for(var r of C(t))k.call(t,r)&&$(e,r,t[r]);return e},m=(e,t)=>de(e,ce(t));var B=(e,t)=>{var r={};for(var i in e)q.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&C)for(var i of C(e))t.indexOf(i)<0&&k.call(e,i)&&(r[i]=e[i]);return r};const A=require("./types-
|
|
1
|
+
"use strict";var le=Object.defineProperty,de=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var $=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))q.call(t,r)&&$(e,r,t[r]);if(C)for(var r of C(t))k.call(t,r)&&$(e,r,t[r]);return e},m=(e,t)=>de(e,ce(t));var B=(e,t)=>{var r={};for(var i in e)q.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&C)for(var i of C(e))t.indexOf(i)<0&&k.call(e,i)&&(r[i]=e[i]);return r};const A=require("./types-DZ4vWh8j.cjs"),d=require("./utils-CgV-jWWQ.cjs"),s=require("./execute-query-DmAyVFF5.cjs");function ue(e){return e.replace(/\s+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function me(e){const t=/\[(.+?)\s\(Calendar\)\]/;return e.replace(t,"[$1]").trim()}function ge(e){if(e)if(e.metadata){if(!e.model)throw new s.TranslatableError("errors.missingModelTitle")}else throw new s.TranslatableError("errors.missingMetadata");else throw new s.TranslatableError("errors.emptyModel");return e}function fe(e){return!e||!e.jaql.datasource.title||!e.jaql.metadata.length}function J(e){if(![...s.ALL_CHART_TYPES,"pivot","pivot2"].includes(e))throw new s.TranslatableError("errors.chartTypeNotSupported",{chartType:e})}function ye(e){return"widgetType"in e&&e.widgetType==="pivot"}function h(e){var t;return"column"in e&&((t=e.column)==null?void 0:t.expression)&&/\(.*\)/.test(e.column.expression)}function _(e){const t="measures"in e&&g(e.measures)||"values"in e&&g(e.values);return ye(e)?"values"in e.dataOptions&&g(e.dataOptions.values):"chartType"in e?e.chartType==="indicator"?"value"in e.dataOptions&&g(e.dataOptions.value)||"secondary"in e.dataOptions&&g(e.dataOptions.secondary):e.chartType==="table"?!("columns"in e.dataOptions)||!g(e.dataOptions.columns)?!1:e.dataOptions.columns.some(i=>h(i)):e.chartType==="boxplot"?!1:e.chartType==="scatter"?"x"in e.dataOptions&&e.dataOptions.x!==void 0&&h(e.dataOptions.x)||"y"in e.dataOptions&&e.dataOptions.y!==void 0&&h(e.dataOptions.y)||"size"in e.dataOptions&&e.dataOptions.size!==void 0:e.chartType==="scattermap"?"colorBy"in e.dataOptions&&e.dataOptions.colorBy!==void 0&&h(e.dataOptions.colorBy)||"details"in e.dataOptions&&e.dataOptions.details!==void 0&&h(e.dataOptions.details)||"size"in e.dataOptions&&e.dataOptions.size!==void 0&&h(e.dataOptions.size):e.chartType==="areamap"?"geo"in e.dataOptions&&g(e.dataOptions.geo)&&"color"in e.dataOptions&&g(e.dataOptions.color):"value"in e.dataOptions&&g(e.dataOptions.value):t}function g(e){return Array.isArray(e)&&e.length>0}function Se(e){const t=e.split(`
|
|
2
2
|
`);for(let r=0;r<t.length-1;r++)if(t[r].trim()===""){const i=t[r+1].trim();if(i.startsWith("import *")||i.startsWith("import {")){t.splice(r,1);break}}return t.join(`
|
|
3
3
|
`)}function Oe(e){const t=i=>/^[$A-Z_][0-9A-Z_$]*$/i.test(i);if("composeCode"in e)return e;const r={};for(const[i,a]of Object.entries(e)){const n=t(i)?i:`"${i}"`;r[n]=a}return r}const he={react:{baseChartTmpl:`import { {{componentString}} } from '@sisense/sdk-ui';
|
|
4
4
|
{{extraImportsString}}
|
|
@@ -19,9 +19,9 @@ var q = (e, t) => {
|
|
|
19
19
|
t.indexOf(i) < 0 && k.call(e, i) && (r[i] = e[i]);
|
|
20
20
|
return r;
|
|
21
21
|
};
|
|
22
|
-
import { J as ue, c as Z, i as pe } from "./types-
|
|
23
|
-
import {
|
|
24
|
-
import { T as b, n as he, k as G,
|
|
22
|
+
import { J as ue, c as Z, i as pe } from "./types-B96nVbgX.js";
|
|
23
|
+
import { C as me, i as ge, a as fe, b as ye, n as _, m as w, g as B } from "./utils-ChqSLRbz.js";
|
|
24
|
+
import { T as b, A as Se, n as he, k as G, l as Oe, m as l, o as be, q as T, D as Te, r as W, s as X, t as ve, u as Ee, v as xe } from "./execute-query-CHYTupEo.js";
|
|
25
25
|
function Ce(e) {
|
|
26
26
|
return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
27
27
|
}
|
|
@@ -45,7 +45,7 @@ function De(e) {
|
|
|
45
45
|
return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
|
|
46
46
|
}
|
|
47
47
|
function ee(e) {
|
|
48
|
-
if (![...
|
|
48
|
+
if (![...Se, "pivot", "pivot2"].includes(e))
|
|
49
49
|
throw new b("errors.chartTypeNotSupported", { chartType: e });
|
|
50
50
|
}
|
|
51
51
|
function we(e) {
|
|
@@ -839,7 +839,7 @@ const Ue = {
|
|
|
839
839
|
mode: "value"
|
|
840
840
|
}
|
|
841
841
|
}, Ke = {
|
|
842
|
-
subtype:
|
|
842
|
+
subtype: me.SUBTYPE,
|
|
843
843
|
viewType: "month",
|
|
844
844
|
startOfWeek: "sunday",
|
|
845
845
|
cellLabels: {
|
|
@@ -1158,7 +1158,7 @@ const Y = `
|
|
|
1158
1158
|
const n = { dashboardOid: e, widgetOid: t }, s = lt[Number(a)];
|
|
1159
1159
|
return M(s, n, r);
|
|
1160
1160
|
}, mt = (e, t, r, i) => {
|
|
1161
|
-
if (
|
|
1161
|
+
if (ge(e)) {
|
|
1162
1162
|
ee(e.chartType);
|
|
1163
1163
|
const a = R(e), n = {
|
|
1164
1164
|
idString: e.id,
|
|
@@ -1183,7 +1183,7 @@ const Y = `
|
|
|
1183
1183
|
};
|
|
1184
1184
|
return M(r.chart, n, t);
|
|
1185
1185
|
}
|
|
1186
|
-
if (
|
|
1186
|
+
if (fe(e)) {
|
|
1187
1187
|
const a = R(e), n = {
|
|
1188
1188
|
idString: e.id,
|
|
1189
1189
|
widgetTypeString: "pivot",
|
|
@@ -1202,7 +1202,7 @@ const Y = `
|
|
|
1202
1202
|
};
|
|
1203
1203
|
return M(r.pivot, n, t);
|
|
1204
1204
|
}
|
|
1205
|
-
if (
|
|
1205
|
+
if (ye(e))
|
|
1206
1206
|
return "/** Custom widget code not supported yet */";
|
|
1207
1207
|
throw new b("errors.otherWidgetTypesNotSupported");
|
|
1208
1208
|
}, gt = ({
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.23.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"@mui/icons-material": "^6.4.11",
|
|
78
78
|
"@mui/material": "^6.4.11",
|
|
79
79
|
"@mui/system": "^6.4.11",
|
|
80
|
-
"@sisense/sdk-common": "2.
|
|
81
|
-
"@sisense/sdk-data": "2.
|
|
82
|
-
"@sisense/sdk-pivot-query-client": "2.
|
|
83
|
-
"@sisense/sdk-pivot-ui": "2.
|
|
84
|
-
"@sisense/sdk-query-client": "2.
|
|
85
|
-
"@sisense/sdk-rest-client": "2.
|
|
86
|
-
"@sisense/sdk-tracking": "2.
|
|
80
|
+
"@sisense/sdk-common": "2.23.0",
|
|
81
|
+
"@sisense/sdk-data": "2.23.0",
|
|
82
|
+
"@sisense/sdk-pivot-query-client": "2.23.0",
|
|
83
|
+
"@sisense/sdk-pivot-ui": "2.23.0",
|
|
84
|
+
"@sisense/sdk-query-client": "2.23.0",
|
|
85
|
+
"@sisense/sdk-rest-client": "2.23.0",
|
|
86
|
+
"@sisense/sdk-tracking": "2.23.0",
|
|
87
87
|
"@sisense/sisense-charts": "5.2.5",
|
|
88
88
|
"@tanstack/react-query": "4.43.0",
|
|
89
89
|
"classnames": "^2.3.2",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
},
|
|
117
117
|
"scripts": {
|
|
118
118
|
"dev": "vite",
|
|
119
|
+
"public-api-check": "node ./scripts/public-api-check/index.cjs",
|
|
119
120
|
"type-check": "tsc --noEmit",
|
|
120
121
|
"build": "run type-check && vite build --mode development && run build:umd",
|
|
121
122
|
"build:prod": "run type-check && vite build && run build:umd:prod",
|
|
@@ -183,6 +184,7 @@
|
|
|
183
184
|
"react-json-view": "^1.21.3",
|
|
184
185
|
"react-multi-carousel": "^2.8.6",
|
|
185
186
|
"react-plotly.js": "^2.6.0",
|
|
187
|
+
"react-simple-code-editor": "^0.13.1",
|
|
186
188
|
"rollup-plugin-re": "^1.0.7",
|
|
187
189
|
"sass": "^1.90.0",
|
|
188
190
|
"storybook": "9.1.6",
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { D as w, M as h, S as D, p as T, a as _, w as f, n as M, j as H, b as n, c as o, d as A } from "./execute-query-BEeqqDl6.js";
|
|
2
|
-
class c extends w {
|
|
3
|
-
constructor(e, t, s, r, u, m, l, d, y, a) {
|
|
4
|
-
if (super(e, u || h.Dimension, m, d, y), this.__serializable = "DimensionalDimension", this._dimensions = [], this._attributes = [], this._sort = D.None, !y && t) {
|
|
5
|
-
const { table: g, column: b } = T(t);
|
|
6
|
-
this.composeCode = `${_}.${f(g)}.${f(b)}`;
|
|
7
|
-
}
|
|
8
|
-
this._sort = l || D.None, this._expression = t, this.setDimensions(r || []), this.setAttributes(s), a && (this.defaultAttribute = a);
|
|
9
|
-
}
|
|
10
|
-
static parseType(e) {
|
|
11
|
-
switch (e) {
|
|
12
|
-
case "datetime":
|
|
13
|
-
case h.DateDimension:
|
|
14
|
-
return h.DateDimension;
|
|
15
|
-
case "text":
|
|
16
|
-
case h.TextDimension:
|
|
17
|
-
return h.TextDimension;
|
|
18
|
-
case "numeric":
|
|
19
|
-
case h.NumericDimension:
|
|
20
|
-
return h.NumericDimension;
|
|
21
|
-
}
|
|
22
|
-
return h.TextDimension;
|
|
23
|
-
}
|
|
24
|
-
getAttachedName(e, t) {
|
|
25
|
-
let s = e;
|
|
26
|
-
const r = M(e);
|
|
27
|
-
return (r === "id" || r === "name" || Object.getOwnPropertyDescriptor(this, r) !== void 0 || this[r] !== void 0) && (s = t), s;
|
|
28
|
-
}
|
|
29
|
-
setDimensions(e) {
|
|
30
|
-
this._dimensions = e;
|
|
31
|
-
for (let t = 0; t < e.length; t++) {
|
|
32
|
-
const s = this.getAttachedName(e[t].name, e[t].attributes[0].expression);
|
|
33
|
-
this[M(s)] = e[t], s != e[t].name && (e[t].name = s);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
setAttributes(e) {
|
|
37
|
-
this._attributes = e || [];
|
|
38
|
-
for (let t = 0; t < e.length; t++) {
|
|
39
|
-
const s = this.getAttachedName(e[t].name, e[t].expression);
|
|
40
|
-
this[M(s)] = e[t], e[t].name != s && (e[t].name = s);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* gets the element's ID
|
|
45
|
-
*/
|
|
46
|
-
get id() {
|
|
47
|
-
return this._expression;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Gets the child attributes
|
|
51
|
-
*/
|
|
52
|
-
get attributes() {
|
|
53
|
-
return this._attributes;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Gets the child dimensions
|
|
57
|
-
*/
|
|
58
|
-
get dimensions() {
|
|
59
|
-
return this._dimensions;
|
|
60
|
-
}
|
|
61
|
-
get expression() {
|
|
62
|
-
return this._expression;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Gets the sort definition of this instance
|
|
66
|
-
*
|
|
67
|
-
* @returns The Sort definition of this instance
|
|
68
|
-
*/
|
|
69
|
-
getSort() {
|
|
70
|
-
return this._sort;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Gets a sorted {@link Dimension} with the given definition
|
|
74
|
-
*
|
|
75
|
-
* @param sort - Sort definition
|
|
76
|
-
* @returns An instance representing the sorted {@link Dimension} of this instance
|
|
77
|
-
*/
|
|
78
|
-
sort(e) {
|
|
79
|
-
return new c(this.name, this.expression, this.attributes, this.dimensions, this.type, this.description, e, this.dataSource, this.composeCode, this.defaultAttribute);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Gets a serializable representation of the element
|
|
83
|
-
*/
|
|
84
|
-
serialize() {
|
|
85
|
-
const e = super.serialize();
|
|
86
|
-
return e.expression = this.expression, this.getSort() !== void 0 && (e.sort = this.getSort()), e.attributes = this._attributes.map((t) => t.serialize()), e.dimensions = this._dimensions.map((t) => t.serialize()), this.defaultAttribute && (e.defaultAttribute = this.defaultAttribute.serialize()), e;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Gets the JAQL representation of this instance
|
|
90
|
-
*
|
|
91
|
-
* @param nested - defines whether the JAQL is nested within parent JAQL statement or a root JAQL element
|
|
92
|
-
*/
|
|
93
|
-
jaql(e) {
|
|
94
|
-
if (this.defaultAttribute)
|
|
95
|
-
return this.defaultAttribute.jaql(e);
|
|
96
|
-
if (this.dimensions.length > 0)
|
|
97
|
-
return this.dimensions[0].jaql(e);
|
|
98
|
-
const t = {
|
|
99
|
-
jaql: {
|
|
100
|
-
title: this.name,
|
|
101
|
-
dim: this.expression,
|
|
102
|
-
datatype: H(this.type)
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return this._sort != D.None && (t.jaql.sort = this._sort == D.Ascending ? "asc" : "desc"), e === !0 ? t.jaql : t;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
const z = (i) => i && i.__serializable === "DimensionalDimension";
|
|
109
|
-
class p extends c {
|
|
110
|
-
constructor(e, t, s, r, u, m) {
|
|
111
|
-
super(e, t, [], [], h.DateDimension, s, r, u, m), this.__serializable = "DimensionalDateDimension", this.defaultLevel = n.Years, this.Years = new o(n.Years, t, n.Years, "yyyy", s, r, u), this.Quarters = new o(n.Quarters, t, n.Quarters, "Q yyyy", s, r, u), this.Months = new o(n.Months, t, n.Months, "yyyy-MM", s, r, u), this.Weeks = new o(n.Weeks, t, n.Weeks, "ww yyyy", s, r, u), this.Days = new o(n.Days, t, n.Days, "yyyy-MM-dd", s, r, u), this.Hours = new o(n.Hours, t, n.Hours, "yyyy-MM-dd HH:mm", s, r, u), this.MinutesRoundTo30 = new o(n.MinutesRoundTo30, t, n.MinutesRoundTo30, "yyyy-MM-dd HH:mm", s, r, u), this.MinutesRoundTo15 = new o(n.MinutesRoundTo15, t, n.MinutesRoundTo15, "yyyy-MM-dd HH:mm", s, r, u), this.Minutes = new o(n.Minutes, t, n.Minutes, "yyyy-MM-dd HH:mm", s, r, u), this.Seconds = new o(n.Seconds, t, n.Seconds, "yyyy-MM-dd HH:mm:ss", s, r, u), this.AggHours = new o(n.AggHours, t, n.AggHours, "HH:mm", s, r, u), this.AggMinutesRoundTo30 = new o(n.AggMinutesRoundTo30, t, n.AggMinutesRoundTo30, "HH:mm", s, r, u), this.AggMinutesRoundTo15 = new o(n.AggMinutesRoundTo15, t, n.AggMinutesRoundTo15, "HH:mm", s, r, u), this.AggMinutesRoundTo1 = new o(n.AggMinutesRoundTo1, t, n.AggMinutesRoundTo1, "HH:mm", s, r, u), this.setAttributes([
|
|
112
|
-
this.Years,
|
|
113
|
-
this.Quarters,
|
|
114
|
-
this.Months,
|
|
115
|
-
this.Weeks,
|
|
116
|
-
this.Days,
|
|
117
|
-
this.Hours,
|
|
118
|
-
this.MinutesRoundTo30,
|
|
119
|
-
this.MinutesRoundTo15,
|
|
120
|
-
this.Minutes,
|
|
121
|
-
this.Seconds,
|
|
122
|
-
this.AggHours,
|
|
123
|
-
this.AggMinutesRoundTo30,
|
|
124
|
-
this.AggMinutesRoundTo15,
|
|
125
|
-
this.AggMinutesRoundTo1
|
|
126
|
-
]);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* gets the element's ID
|
|
130
|
-
*/
|
|
131
|
-
get id() {
|
|
132
|
-
return this.expression;
|
|
133
|
-
}
|
|
134
|
-
setDimensions() {
|
|
135
|
-
}
|
|
136
|
-
setAttributes(e) {
|
|
137
|
-
this._attributes = e;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Gets the sort definition of this instance
|
|
141
|
-
*
|
|
142
|
-
* @returns The Sort definition of this instance
|
|
143
|
-
*/
|
|
144
|
-
getSort() {
|
|
145
|
-
return this._sort;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Gets a sorted {@link Dimension} with the given definition
|
|
149
|
-
*
|
|
150
|
-
* @param sort - Sort definition
|
|
151
|
-
* @returns An instance representing the sorted {@link Dimension} of this instance
|
|
152
|
-
*/
|
|
153
|
-
sort(e) {
|
|
154
|
-
return new p(this.name, this.expression, this.description, e, this.dataSource, this.composeCode);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Gets a serializable representation of the element
|
|
158
|
-
*/
|
|
159
|
-
serialize() {
|
|
160
|
-
return super.serialize();
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Gets the JAQL representation of this instance
|
|
164
|
-
*
|
|
165
|
-
* @param nested - defines whether the JAQL is nested within parent JAQL statement or a root JAQL element
|
|
166
|
-
*/
|
|
167
|
-
jaql(e) {
|
|
168
|
-
const t = this[this.defaultLevel].jaql();
|
|
169
|
-
return t.jaql.title = this.name, e ? t.jaql : t;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
const q = (i) => i && i.__serializable === "DimensionalDateDimension";
|
|
173
|
-
function R(i) {
|
|
174
|
-
const e = i.name || i.title, t = i.desc || i.description, s = i.expression || i.dim, r = c.parseType(i.dimtype || i.type), u = i.sort, m = i.dataSource;
|
|
175
|
-
if (r == h.DateDimension)
|
|
176
|
-
return new p(e, s, t, u, m);
|
|
177
|
-
const l = Object.getOwnPropertyNames(i).map((a) => i[a]).filter((a) => h.isAttribute(a == null ? void 0 : a.type));
|
|
178
|
-
if (l.length == 0)
|
|
179
|
-
if (i.attributes) {
|
|
180
|
-
let a;
|
|
181
|
-
for (let g = 0; g < i.attributes.length; g++)
|
|
182
|
-
a = i.attributes[g], l.push(new A(a.name, a.expression, a.type, a.description, a.sort, a.dataSource));
|
|
183
|
-
} else s && l.push(new A(e, s, r, t, u, m));
|
|
184
|
-
const d = Object.getOwnPropertyNames(i).map((a) => i[a]).filter((a) => h.isDimension(a == null ? void 0 : a.type));
|
|
185
|
-
if (d.length == 0 && i.dimensions)
|
|
186
|
-
for (let a = 0; a < i.dimensions.length; a++)
|
|
187
|
-
d.push(R(i.dimensions[a]));
|
|
188
|
-
const y = new c(e, s, l, d, r, t, u, m);
|
|
189
|
-
return i.defaultAttribute && (y.defaultAttribute = l.find((a) => a.name === i.defaultAttribute)), y;
|
|
190
|
-
}
|
|
191
|
-
function x(i) {
|
|
192
|
-
const e = i.name || i.title, t = i.expression || i.dim, s = i.desc || i.description, r = i.sort, u = i.dataSource;
|
|
193
|
-
return new p(e, t, s, r, u);
|
|
194
|
-
}
|
|
195
|
-
export {
|
|
196
|
-
c as D,
|
|
197
|
-
x as a,
|
|
198
|
-
q as b,
|
|
199
|
-
R as c,
|
|
200
|
-
p as d,
|
|
201
|
-
z as i
|
|
202
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./execute-query-DJDE0zRU.cjs");class m extends e.DimensionalElement{constructor(i,t,n,a,o,u,l,h,D,r){if(super(i,o||e.MetadataTypes.Dimension,u,h,D),this.__serializable="DimensionalDimension",this._dimensions=[],this._attributes=[],this._sort=e.Sort.None,!D&&t){const{table:d,column:p}=e.parseExpression(t);this.composeCode=`${e.DATA_MODEL_MODULE_NAME}.${e.wrapIfNeedsNormalization(d)}.${e.wrapIfNeedsNormalization(p)}`}this._sort=l||e.Sort.None,this._expression=t,this.setDimensions(a||[]),this.setAttributes(n),r&&(this.defaultAttribute=r)}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 n=i;const a=e.normalizeName(i);return(a==="id"||a==="name"||Object.getOwnPropertyDescriptor(this,a)!==void 0||this[a]!==void 0)&&(n=t),n}setDimensions(i){this._dimensions=i;for(let t=0;t<i.length;t++){const n=this.getAttachedName(i[t].name,i[t].attributes[0].expression);this[e.normalizeName(n)]=i[t],n!=i[t].name&&(i[t].name=n)}}setAttributes(i){this._attributes=i||[];for(let t=0;t<i.length;t++){const n=this.getAttachedName(i[t].name,i[t].expression);this[e.normalizeName(n)]=i[t],i[t].name!=n&&(i[t].name=n)}}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 m(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 g=s=>s&&s.__serializable==="DimensionalDimension";class y extends m{constructor(i,t,n,a,o,u){super(i,t,[],[],e.MetadataTypes.DateDimension,n,a,o,u),this.__serializable="DimensionalDateDimension",this.defaultLevel=e.DateLevels.Years,this.Years=new e.DimensionalLevelAttribute(e.DateLevels.Years,t,e.DateLevels.Years,"yyyy",n,a,o),this.Quarters=new e.DimensionalLevelAttribute(e.DateLevels.Quarters,t,e.DateLevels.Quarters,"Q yyyy",n,a,o),this.Months=new e.DimensionalLevelAttribute(e.DateLevels.Months,t,e.DateLevels.Months,"yyyy-MM",n,a,o),this.Weeks=new e.DimensionalLevelAttribute(e.DateLevels.Weeks,t,e.DateLevels.Weeks,"ww yyyy",n,a,o),this.Days=new e.DimensionalLevelAttribute(e.DateLevels.Days,t,e.DateLevels.Days,"yyyy-MM-dd",n,a,o),this.Hours=new e.DimensionalLevelAttribute(e.DateLevels.Hours,t,e.DateLevels.Hours,"yyyy-MM-dd HH:mm",n,a,o),this.MinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo30,t,e.DateLevels.MinutesRoundTo30,"yyyy-MM-dd HH:mm",n,a,o),this.MinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo15,t,e.DateLevels.MinutesRoundTo15,"yyyy-MM-dd HH:mm",n,a,o),this.Minutes=new e.DimensionalLevelAttribute(e.DateLevels.Minutes,t,e.DateLevels.Minutes,"yyyy-MM-dd HH:mm",n,a,o),this.Seconds=new e.DimensionalLevelAttribute(e.DateLevels.Seconds,t,e.DateLevels.Seconds,"yyyy-MM-dd HH:mm:ss",n,a,o),this.AggHours=new e.DimensionalLevelAttribute(e.DateLevels.AggHours,t,e.DateLevels.AggHours,"HH:mm",n,a,o),this.AggMinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo30,t,e.DateLevels.AggMinutesRoundTo30,"HH:mm",n,a,o),this.AggMinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo15,t,e.DateLevels.AggMinutesRoundTo15,"HH:mm",n,a,o),this.AggMinutesRoundTo1=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo1,t,e.DateLevels.AggMinutesRoundTo1,"HH:mm",n,a,o),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 y(this.name,this.expression,this.description,i,this.dataSource,this.composeCode)}serialize(){return super.serialize()}jaql(i){const t=this[this.defaultLevel].jaql();return t.jaql.title=this.name,i?t.jaql:t}}const c=s=>s&&s.__serializable==="DimensionalDateDimension";function M(s){const i=s.name||s.title,t=s.desc||s.description,n=s.expression||s.dim,a=m.parseType(s.dimtype||s.type),o=s.sort,u=s.dataSource;if(a==e.MetadataTypes.DateDimension)return new y(i,n,t,o,u);const l=Object.getOwnPropertyNames(s).map(r=>s[r]).filter(r=>e.MetadataTypes.isAttribute(r==null?void 0:r.type));if(l.length==0)if(s.attributes){let r;for(let d=0;d<s.attributes.length;d++)r=s.attributes[d],l.push(new e.DimensionalAttribute(r.name,r.expression,r.type,r.description,r.sort,r.dataSource))}else n&&l.push(new e.DimensionalAttribute(i,n,a,t,o,u));const h=Object.getOwnPropertyNames(s).map(r=>s[r]).filter(r=>e.MetadataTypes.isDimension(r==null?void 0:r.type));if(h.length==0&&s.dimensions)for(let r=0;r<s.dimensions.length;r++)h.push(M(s.dimensions[r]));const D=new m(i,n,l,h,a,t,o,u);return s.defaultAttribute&&(D.defaultAttribute=l.find(r=>r.name===s.defaultAttribute)),D}function A(s){const i=s.name||s.title,t=s.expression||s.dim,n=s.desc||s.description,a=s.sort,o=s.dataSource;return new y(i,t,n,a,o)}exports.DimensionalDateDimension=y;exports.DimensionalDimension=m;exports.createDateDimension=A;exports.createDimension=M;exports.isDimensionalDateDimension=c;exports.isDimensionalDimension=g;
|