@servicenow/sdk-build-plugins 4.2.0 → 4.4.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/acl-plugin.js +11 -0
- package/dist/acl-plugin.js.map +1 -1
- package/dist/applicability-plugin.d.ts +2 -0
- package/dist/applicability-plugin.js +72 -0
- package/dist/applicability-plugin.js.map +1 -0
- package/dist/atf/test-plugin.js +5 -2
- package/dist/atf/test-plugin.js.map +1 -1
- package/dist/basic-syntax-plugin.js +7 -1
- package/dist/basic-syntax-plugin.js.map +1 -1
- package/dist/business-rule-plugin.js +1 -0
- package/dist/business-rule-plugin.js.map +1 -1
- package/dist/call-expression-plugin.js +1 -107
- package/dist/call-expression-plugin.js.map +1 -1
- package/dist/column/column-to-record.d.ts +10 -3
- package/dist/column/column-to-record.js +44 -7
- package/dist/column/column-to-record.js.map +1 -1
- package/dist/column-plugin.d.ts +3 -1
- package/dist/column-plugin.js +12 -12
- package/dist/column-plugin.js.map +1 -1
- package/dist/dashboard/dashboard-component-property-defaults.d.ts +152 -0
- package/dist/dashboard/dashboard-component-property-defaults.js +264 -0
- package/dist/dashboard/dashboard-component-property-defaults.js.map +1 -0
- package/dist/dashboard/dashboard-component-resolver.d.ts +13 -0
- package/dist/dashboard/dashboard-component-resolver.js +69 -0
- package/dist/dashboard/dashboard-component-resolver.js.map +1 -0
- package/dist/dashboard/dashboard-plugin.d.ts +12 -0
- package/dist/dashboard/dashboard-plugin.js +397 -0
- package/dist/dashboard/dashboard-plugin.js.map +1 -0
- package/dist/data-plugin.d.ts +3 -0
- package/dist/data-plugin.js +61 -113
- package/dist/data-plugin.js.map +1 -1
- package/dist/email-notification-plugin.d.ts +2 -0
- package/dist/email-notification-plugin.js +541 -0
- package/dist/email-notification-plugin.js.map +1 -0
- package/dist/flow/constants/flow-plugin-constants.d.ts +58 -0
- package/dist/flow/constants/flow-plugin-constants.js +70 -0
- package/dist/flow/constants/flow-plugin-constants.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-constants.d.ts +38 -0
- package/dist/flow/flow-logic/flow-logic-constants.js +118 -0
- package/dist/flow/flow-logic/flow-logic-constants.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-diagnostics.d.ts +19 -0
- package/dist/flow/flow-logic/flow-logic-diagnostics.js +503 -0
- package/dist/flow/flow-logic/flow-logic-diagnostics.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-plugin-helpers.d.ts +62 -0
- package/dist/flow/flow-logic/flow-logic-plugin-helpers.js +2092 -0
- package/dist/flow/flow-logic/flow-logic-plugin-helpers.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-plugin.d.ts +52 -0
- package/dist/flow/flow-logic/flow-logic-plugin.js +283 -0
- package/dist/flow/flow-logic/flow-logic-plugin.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-shapes.d.ts +104 -0
- package/dist/flow/flow-logic/flow-logic-shapes.js +201 -0
- package/dist/flow/flow-logic/flow-logic-shapes.js.map +1 -0
- package/dist/flow/plugins/approval-rules-plugin.d.ts +2 -0
- package/dist/flow/plugins/approval-rules-plugin.js +49 -0
- package/dist/flow/plugins/approval-rules-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-action-definition-plugin.d.ts +2 -0
- package/dist/flow/plugins/flow-action-definition-plugin.js +286 -0
- package/dist/flow/plugins/flow-action-definition-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-data-pill-plugin.d.ts +9 -0
- package/dist/flow/plugins/flow-data-pill-plugin.js +212 -0
- package/dist/flow/plugins/flow-data-pill-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-definition-plugin.d.ts +2 -0
- package/dist/flow/plugins/flow-definition-plugin.js +1668 -0
- package/dist/flow/plugins/flow-definition-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-diagnostics-plugin.d.ts +26 -0
- package/dist/flow/plugins/flow-diagnostics-plugin.js +217 -0
- package/dist/flow/plugins/flow-diagnostics-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-instance-plugin.d.ts +12 -0
- package/dist/flow/plugins/flow-instance-plugin.js +1205 -0
- package/dist/flow/plugins/flow-instance-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-trigger-instance-plugin.d.ts +2 -0
- package/dist/flow/plugins/flow-trigger-instance-plugin.js +338 -0
- package/dist/flow/plugins/flow-trigger-instance-plugin.js.map +1 -0
- package/dist/flow/plugins/inline-script-plugin.d.ts +39 -0
- package/dist/flow/plugins/inline-script-plugin.js +80 -0
- package/dist/flow/plugins/inline-script-plugin.js.map +1 -0
- package/dist/flow/plugins/step-definition-plugin.d.ts +5 -0
- package/dist/flow/plugins/step-definition-plugin.js +71 -0
- package/dist/flow/plugins/step-definition-plugin.js.map +1 -0
- package/dist/flow/plugins/step-instance-plugin.d.ts +31 -0
- package/dist/flow/plugins/step-instance-plugin.js +339 -0
- package/dist/flow/plugins/step-instance-plugin.js.map +1 -0
- package/dist/flow/plugins/trigger-plugin.d.ts +2 -0
- package/dist/flow/plugins/trigger-plugin.js +96 -0
- package/dist/flow/plugins/trigger-plugin.js.map +1 -0
- package/dist/flow/plugins/wfa-datapill-plugin.d.ts +15 -0
- package/dist/flow/plugins/wfa-datapill-plugin.js +178 -0
- package/dist/flow/plugins/wfa-datapill-plugin.js.map +1 -0
- package/dist/flow/utils/approval-rules-processor.d.ts +13 -0
- package/dist/flow/utils/approval-rules-processor.js +267 -0
- package/dist/flow/utils/approval-rules-processor.js.map +1 -0
- package/dist/flow/utils/built-in-complex-objects.d.ts +19 -0
- package/dist/flow/utils/built-in-complex-objects.js +62 -0
- package/dist/flow/utils/built-in-complex-objects.js.map +1 -0
- package/dist/flow/utils/complex-object-resolver.d.ts +8 -0
- package/dist/flow/utils/complex-object-resolver.js +614 -0
- package/dist/flow/utils/complex-object-resolver.js.map +1 -0
- package/dist/flow/utils/complex-objects.d.ts +36 -0
- package/dist/flow/utils/complex-objects.js +481 -0
- package/dist/flow/utils/complex-objects.js.map +1 -0
- package/dist/flow/utils/data-pill-shapes.d.ts +58 -0
- package/dist/flow/utils/data-pill-shapes.js +135 -0
- package/dist/flow/utils/data-pill-shapes.js.map +1 -0
- package/dist/flow/utils/datapill-transformer.d.ts +110 -0
- package/dist/flow/utils/datapill-transformer.js +503 -0
- package/dist/flow/utils/datapill-transformer.js.map +1 -0
- package/dist/flow/utils/flow-constants.d.ts +72 -0
- package/dist/flow/utils/flow-constants.js +230 -0
- package/dist/flow/utils/flow-constants.js.map +1 -0
- package/dist/flow/utils/flow-io-to-record.d.ts +44 -0
- package/dist/flow/utils/flow-io-to-record.js +409 -0
- package/dist/flow/utils/flow-io-to-record.js.map +1 -0
- package/dist/flow/utils/flow-shapes.d.ts +161 -0
- package/dist/flow/utils/flow-shapes.js +255 -0
- package/dist/flow/utils/flow-shapes.js.map +1 -0
- package/dist/flow/utils/flow-to-xml.d.ts +16 -0
- package/dist/flow/utils/flow-to-xml.js +237 -0
- package/dist/flow/utils/flow-to-xml.js.map +1 -0
- package/dist/flow/utils/flow-variable-processor.d.ts +51 -0
- package/dist/flow/utils/flow-variable-processor.js +69 -0
- package/dist/flow/utils/flow-variable-processor.js.map +1 -0
- package/dist/flow/utils/label-cache-parser.d.ts +7 -0
- package/dist/flow/utils/label-cache-parser.js +24 -0
- package/dist/flow/utils/label-cache-parser.js.map +1 -0
- package/dist/flow/utils/label-cache-processor.d.ts +119 -0
- package/dist/flow/utils/label-cache-processor.js +719 -0
- package/dist/flow/utils/label-cache-processor.js.map +1 -0
- package/dist/flow/utils/pill-string-parser.d.ts +88 -0
- package/dist/flow/utils/pill-string-parser.js +306 -0
- package/dist/flow/utils/pill-string-parser.js.map +1 -0
- package/dist/flow/utils/schema-to-flow-object.d.ts +22 -0
- package/dist/flow/utils/schema-to-flow-object.js +318 -0
- package/dist/flow/utils/schema-to-flow-object.js.map +1 -0
- package/dist/flow/utils/service-catalog.d.ts +47 -0
- package/dist/flow/utils/service-catalog.js +137 -0
- package/dist/flow/utils/service-catalog.js.map +1 -0
- package/dist/flow/utils/utils.d.ts +117 -0
- package/dist/flow/utils/utils.js +345 -0
- package/dist/flow/utils/utils.js.map +1 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/list-plugin.js +1 -1
- package/dist/list-plugin.js.map +1 -1
- package/dist/now-attach-plugin.d.ts +1 -0
- package/dist/now-attach-plugin.js +10 -10
- package/dist/now-attach-plugin.js.map +1 -1
- package/dist/now-ref-plugin.js +1 -1
- package/dist/now-ref-plugin.js.map +1 -1
- package/dist/record-plugin.d.ts +29 -0
- package/dist/record-plugin.js +66 -7
- package/dist/record-plugin.js.map +1 -1
- package/dist/repack/index.d.ts +2 -0
- package/dist/repack/index.js +8 -0
- package/dist/repack/index.js.map +1 -1
- package/dist/rest-api-plugin.js +54 -44
- package/dist/rest-api-plugin.js.map +1 -1
- package/dist/server-module-plugin/index.d.ts +10 -0
- package/dist/server-module-plugin/index.js +83 -59
- package/dist/server-module-plugin/index.js.map +1 -1
- package/dist/service-catalog/catalog-clientscript-plugin.d.ts +2 -0
- package/dist/service-catalog/catalog-clientscript-plugin.js +117 -0
- package/dist/service-catalog/catalog-clientscript-plugin.js.map +1 -0
- package/dist/service-catalog/catalog-item-plugin.d.ts +2 -0
- package/dist/service-catalog/catalog-item-plugin.js +115 -0
- package/dist/service-catalog/catalog-item-plugin.js.map +1 -0
- package/dist/service-catalog/catalog-ui-policy-plugin.d.ts +2 -0
- package/dist/service-catalog/catalog-ui-policy-plugin.js +266 -0
- package/dist/service-catalog/catalog-ui-policy-plugin.js.map +1 -0
- package/dist/service-catalog/index.d.ts +5 -0
- package/dist/service-catalog/index.js +22 -0
- package/dist/service-catalog/index.js.map +1 -0
- package/dist/service-catalog/record-to-shape.d.ts +6 -0
- package/dist/service-catalog/record-to-shape.js +93 -0
- package/dist/service-catalog/record-to-shape.js.map +1 -0
- package/dist/service-catalog/sc-record-producer-plugin.d.ts +2 -0
- package/dist/service-catalog/sc-record-producer-plugin.js +140 -0
- package/dist/service-catalog/sc-record-producer-plugin.js.map +1 -0
- package/dist/service-catalog/service-catalog-base.d.ts +311 -0
- package/dist/service-catalog/service-catalog-base.js +542 -0
- package/dist/service-catalog/service-catalog-base.js.map +1 -0
- package/dist/service-catalog/service-catalog-diagnostics.d.ts +45 -0
- package/dist/service-catalog/service-catalog-diagnostics.js +172 -0
- package/dist/service-catalog/service-catalog-diagnostics.js.map +1 -0
- package/dist/service-catalog/shape-to-record.d.ts +8 -0
- package/dist/service-catalog/shape-to-record.js +235 -0
- package/dist/service-catalog/shape-to-record.js.map +1 -0
- package/dist/service-catalog/utils.d.ts +323 -0
- package/dist/service-catalog/utils.js +1216 -0
- package/dist/service-catalog/utils.js.map +1 -0
- package/dist/service-catalog/variable-helper.d.ts +43 -0
- package/dist/service-catalog/variable-helper.js +92 -0
- package/dist/service-catalog/variable-helper.js.map +1 -0
- package/dist/service-catalog/variable-set-plugin.d.ts +2 -0
- package/dist/service-catalog/variable-set-plugin.js +175 -0
- package/dist/service-catalog/variable-set-plugin.js.map +1 -0
- package/dist/service-catalog/variables-transform.d.ts +139 -0
- package/dist/service-catalog/variables-transform.js +403 -0
- package/dist/service-catalog/variables-transform.js.map +1 -0
- package/dist/sla/sla-validators.d.ts +61 -0
- package/dist/sla/sla-validators.js +224 -0
- package/dist/sla/sla-validators.js.map +1 -0
- package/dist/sla-plugin.d.ts +5 -0
- package/dist/sla-plugin.js +280 -0
- package/dist/sla-plugin.js.map +1 -0
- package/dist/static-content-plugin.js +25 -2
- package/dist/static-content-plugin.js.map +1 -1
- package/dist/table-plugin.js +32 -15
- package/dist/table-plugin.js.map +1 -1
- package/dist/ui-page-plugin.js +832 -19
- package/dist/ui-page-plugin.js.map +1 -1
- package/dist/ui-policy-plugin.js +5 -7
- package/dist/ui-policy-plugin.js.map +1 -1
- package/dist/utils.d.ts +10 -1
- package/dist/utils.js +16 -0
- package/dist/utils.js.map +1 -1
- package/dist/ux-list-menu-config-plugin.d.ts +2 -0
- package/dist/ux-list-menu-config-plugin.js +292 -0
- package/dist/ux-list-menu-config-plugin.js.map +1 -0
- package/dist/workspace-plugin/chrome-tab.d.ts +2 -0
- package/dist/workspace-plugin/chrome-tab.js +46 -0
- package/dist/workspace-plugin/chrome-tab.js.map +1 -0
- package/dist/workspace-plugin/constants.d.ts +52 -0
- package/dist/workspace-plugin/constants.js +56 -0
- package/dist/workspace-plugin/constants.js.map +1 -0
- package/dist/workspace-plugin/fluent-utils.d.ts +9 -0
- package/dist/workspace-plugin/fluent-utils.js +60 -0
- package/dist/workspace-plugin/fluent-utils.js.map +1 -0
- package/dist/workspace-plugin/page.d.ts +8 -0
- package/dist/workspace-plugin/page.js +108 -0
- package/dist/workspace-plugin/page.js.map +1 -0
- package/dist/workspace-plugin/screen.d.ts +1 -0
- package/dist/workspace-plugin/screen.js +38 -0
- package/dist/workspace-plugin/screen.js.map +1 -0
- package/dist/workspace-plugin/templates/index.d.ts +10 -0
- package/dist/workspace-plugin/templates/index.js +20 -0
- package/dist/workspace-plugin/templates/index.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-composition.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-composition.js +4043 -0
- package/dist/workspace-plugin/templates/record-page-composition.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-data.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-data.js +527 -0
- package/dist/workspace-plugin/templates/record-page-data.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-interalEventMappings.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-interalEventMappings.js +39 -0
- package/dist/workspace-plugin/templates/record-page-interalEventMappings.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-layoutModel.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-layoutModel.js +55 -0
- package/dist/workspace-plugin/templates/record-page-layoutModel.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-properties.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-properties.js +135 -0
- package/dist/workspace-plugin/templates/record-page-properties.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page.d.ts +3 -0
- package/dist/workspace-plugin/templates/record-page.js +8 -0
- package/dist/workspace-plugin/templates/record-page.js.map +1 -0
- package/dist/workspace-plugin.d.ts +2 -0
- package/dist/workspace-plugin.js +453 -0
- package/dist/workspace-plugin.js.map +1 -0
- package/package.json +10 -12
- package/src/acl-plugin.ts +16 -1
- package/src/applicability-plugin.ts +82 -0
- package/src/atf/test-plugin.ts +6 -3
- package/src/basic-syntax-plugin.ts +10 -1
- package/src/business-rule-plugin.ts +2 -1
- package/src/call-expression-plugin.ts +2 -130
- package/src/column/column-to-record.ts +54 -8
- package/src/column-plugin.ts +29 -13
- package/src/dashboard/dashboard-component-property-defaults.ts +277 -0
- package/src/dashboard/dashboard-component-resolver.ts +69 -0
- package/src/dashboard/dashboard-plugin.ts +450 -0
- package/src/data-plugin.ts +67 -139
- package/src/email-notification-plugin.ts +850 -0
- package/src/flow/constants/flow-plugin-constants.ts +79 -0
- package/src/flow/flow-logic/flow-logic-constants.ts +120 -0
- package/src/flow/flow-logic/flow-logic-diagnostics.ts +591 -0
- package/src/flow/flow-logic/flow-logic-plugin-helpers.ts +2550 -0
- package/src/flow/flow-logic/flow-logic-plugin.ts +337 -0
- package/src/flow/flow-logic/flow-logic-shapes.ts +215 -0
- package/src/flow/plugins/approval-rules-plugin.ts +48 -0
- package/src/flow/plugins/flow-action-definition-plugin.ts +295 -0
- package/src/flow/plugins/flow-data-pill-plugin.ts +258 -0
- package/src/flow/plugins/flow-definition-plugin.ts +2173 -0
- package/src/flow/plugins/flow-diagnostics-plugin.ts +280 -0
- package/src/flow/plugins/flow-instance-plugin.ts +1499 -0
- package/src/flow/plugins/flow-trigger-instance-plugin.ts +444 -0
- package/src/flow/plugins/inline-script-plugin.ts +83 -0
- package/src/flow/plugins/step-definition-plugin.ts +67 -0
- package/src/flow/plugins/step-instance-plugin.ts +431 -0
- package/src/flow/plugins/trigger-plugin.ts +95 -0
- package/src/flow/plugins/wfa-datapill-plugin.ts +213 -0
- package/src/flow/utils/approval-rules-processor.ts +298 -0
- package/src/flow/utils/built-in-complex-objects.ts +81 -0
- package/src/flow/utils/complex-object-resolver.ts +875 -0
- package/src/flow/utils/complex-objects.ts +656 -0
- package/src/flow/utils/data-pill-shapes.ts +165 -0
- package/src/flow/utils/datapill-transformer.ts +632 -0
- package/src/flow/utils/flow-constants.ts +285 -0
- package/src/flow/utils/flow-io-to-record.ts +533 -0
- package/src/flow/utils/flow-shapes.ts +296 -0
- package/src/flow/utils/flow-to-xml.ts +318 -0
- package/src/flow/utils/flow-variable-processor.ts +100 -0
- package/src/flow/utils/label-cache-parser.ts +37 -0
- package/src/flow/utils/label-cache-processor.ts +870 -0
- package/src/flow/utils/pill-string-parser.ts +375 -0
- package/src/flow/utils/schema-to-flow-object.ts +385 -0
- package/src/flow/utils/service-catalog.ts +174 -0
- package/src/flow/utils/utils.ts +395 -0
- package/src/index.ts +20 -1
- package/src/list-plugin.ts +1 -1
- package/src/now-attach-plugin.ts +14 -11
- package/src/now-ref-plugin.ts +1 -1
- package/src/record-plugin.ts +76 -11
- package/src/repack/index.ts +14 -0
- package/src/rest-api-plugin.ts +62 -50
- package/src/server-module-plugin/index.ts +112 -86
- package/src/service-catalog/catalog-clientscript-plugin.ts +140 -0
- package/src/service-catalog/catalog-item-plugin.ts +162 -0
- package/src/service-catalog/catalog-ui-policy-plugin.ts +324 -0
- package/src/service-catalog/index.ts +5 -0
- package/src/service-catalog/record-to-shape.ts +109 -0
- package/src/service-catalog/sc-record-producer-plugin.ts +201 -0
- package/src/service-catalog/service-catalog-base.ts +600 -0
- package/src/service-catalog/service-catalog-diagnostics.ts +254 -0
- package/src/service-catalog/shape-to-record.ts +279 -0
- package/src/service-catalog/utils.ts +1455 -0
- package/src/service-catalog/variable-helper.ts +135 -0
- package/src/service-catalog/variable-set-plugin.ts +197 -0
- package/src/service-catalog/variables-transform.ts +438 -0
- package/src/sla/sla-validators.ts +331 -0
- package/src/sla-plugin.ts +358 -0
- package/src/static-content-plugin.ts +25 -2
- package/src/table-plugin.ts +49 -16
- package/src/ui-page-plugin.ts +1063 -20
- package/src/ui-policy-plugin.ts +5 -9
- package/src/utils.ts +24 -1
- package/src/ux-list-menu-config-plugin.ts +312 -0
- package/src/workspace-plugin/chrome-tab.ts +44 -0
- package/src/workspace-plugin/constants.ts +53 -0
- package/src/workspace-plugin/fluent-utils.ts +60 -0
- package/src/workspace-plugin/page.ts +139 -0
- package/src/workspace-plugin/screen.ts +34 -0
- package/src/workspace-plugin/templates/index.ts +17 -0
- package/src/workspace-plugin/templates/record-page-composition.ts +4051 -0
- package/src/workspace-plugin/templates/record-page-data.ts +523 -0
- package/src/workspace-plugin/templates/record-page-interalEventMappings.ts +35 -0
- package/src/workspace-plugin/templates/record-page-layoutModel.ts +51 -0
- package/src/workspace-plugin/templates/record-page-properties.ts +131 -0
- package/src/workspace-plugin/templates/record-page.ts +6 -0
- package/src/workspace-plugin.ts +574 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import isEmpty from 'lodash/isEmpty'
|
|
2
|
+
import isEqual from 'lodash/isEqual'
|
|
3
|
+
|
|
4
|
+
export const DEFAULT_PROPERTY_VALUES = {
|
|
5
|
+
allowAdditionalGroupByPerMetric: false,
|
|
6
|
+
allowChangeDateRange: false,
|
|
7
|
+
scoreIcon: '',
|
|
8
|
+
applyDateRange: false,
|
|
9
|
+
autoAggregatePeriods: false,
|
|
10
|
+
bareBorder: false,
|
|
11
|
+
cacheExpirationTime: 0,
|
|
12
|
+
chartVariation: 'stacked',
|
|
13
|
+
dataLabelPosition: 'middle',
|
|
14
|
+
dataLabelsType: 'both',
|
|
15
|
+
dateFormat: 'default',
|
|
16
|
+
disableTooltip: false,
|
|
17
|
+
emptyStateAlignment: 'vertical-centered',
|
|
18
|
+
emptyStateContent: 'There are no scores available for the selected criteria. Contact your admin for more info.',
|
|
19
|
+
emptyStateHeading: 'No data available.',
|
|
20
|
+
emptyStateHeadingLevel: 3,
|
|
21
|
+
emptyStateIllustration: 'no-data',
|
|
22
|
+
enableAddZerosAtApi: true,
|
|
23
|
+
enableClickAndStay: false,
|
|
24
|
+
enableCustomEmptyState: false,
|
|
25
|
+
enableDrilldown: true,
|
|
26
|
+
enableRealTimeUpdate: false,
|
|
27
|
+
extensionType: 'step',
|
|
28
|
+
filterConfigurations: '@state.parFilters',
|
|
29
|
+
followFilters: true,
|
|
30
|
+
freezeFirstColumn: true,
|
|
31
|
+
freezeFooter: false,
|
|
32
|
+
freezeHeader: true,
|
|
33
|
+
gaugeArcAngle: '180',
|
|
34
|
+
headerTitleAlignment: 'start',
|
|
35
|
+
headingLevel: 2,
|
|
36
|
+
headingPosition: 'top',
|
|
37
|
+
hideDevSettings: false,
|
|
38
|
+
hideMatrixAggregate: false,
|
|
39
|
+
hideYAxis0: false,
|
|
40
|
+
hideYAxis1: false,
|
|
41
|
+
hideYAxis2: false,
|
|
42
|
+
hideYAxis3: false,
|
|
43
|
+
hideYAxis4: false,
|
|
44
|
+
iconStyle: 'background',
|
|
45
|
+
legendExpandToFit: false,
|
|
46
|
+
legendHorizontalAlignment: 'center',
|
|
47
|
+
legendPosition: 'bottom',
|
|
48
|
+
lineClamp: 1,
|
|
49
|
+
lineStrokeWidth: '2',
|
|
50
|
+
mapSysId: '93b8a3a2d7101200bd4a4ebfae61033a',
|
|
51
|
+
minValue: 0,
|
|
52
|
+
newReporting: false,
|
|
53
|
+
numberOfPeriods: 3,
|
|
54
|
+
period: 'M',
|
|
55
|
+
registerOrientation: 'horizontal',
|
|
56
|
+
registerPosition: 'bottom',
|
|
57
|
+
scoreAlignment: 'start',
|
|
58
|
+
scoreLabel: 'none',
|
|
59
|
+
scoreSize: 'auto',
|
|
60
|
+
scoreType: 'latest',
|
|
61
|
+
showAbsolutePeriod: false,
|
|
62
|
+
showAdditionalGroupBySelector: false,
|
|
63
|
+
showAlternateColumnColors: false,
|
|
64
|
+
showAlternateRowColors: true,
|
|
65
|
+
showBorder: true,
|
|
66
|
+
showCacheTime: true,
|
|
67
|
+
showChange: false,
|
|
68
|
+
showChangeFrom: 'previous',
|
|
69
|
+
showChangePercentage: false,
|
|
70
|
+
showClosestSeriesOnHover: true,
|
|
71
|
+
showColumnAggregate: true,
|
|
72
|
+
showColumnDividers: true,
|
|
73
|
+
showComment: false,
|
|
74
|
+
showConfidenceBand: false,
|
|
75
|
+
showContinuousLine: true,
|
|
76
|
+
showDataLabels: false,
|
|
77
|
+
showDataPassthrough: false,
|
|
78
|
+
showDataTable: false,
|
|
79
|
+
showDateRangeByDefault: false,
|
|
80
|
+
showExportOptions: true,
|
|
81
|
+
showFilterAsSeparateSeries: false,
|
|
82
|
+
showFilterIcon: true,
|
|
83
|
+
showFirstGroupAggregate: false,
|
|
84
|
+
showForecast: false,
|
|
85
|
+
showForecastRange: false,
|
|
86
|
+
showGapPercentage: false,
|
|
87
|
+
showHeader: true,
|
|
88
|
+
showHeaderSeparator: false,
|
|
89
|
+
showLabelFirst: false,
|
|
90
|
+
showLegend: true,
|
|
91
|
+
showLegendValue: false,
|
|
92
|
+
showLoadingIndicator: false,
|
|
93
|
+
showMarkers: false,
|
|
94
|
+
showMaximumRange: false,
|
|
95
|
+
showMetricLabel: false,
|
|
96
|
+
showOverlappingLabels: false,
|
|
97
|
+
showPercentageOfTotalInTooltip: true,
|
|
98
|
+
showPivotExpanded: true,
|
|
99
|
+
showRangeLabels: false,
|
|
100
|
+
showRangeLimit: true,
|
|
101
|
+
showRefresh: true,
|
|
102
|
+
showRegister: true,
|
|
103
|
+
showRegisterOnSameLine: false,
|
|
104
|
+
showRegisterPercentage: false,
|
|
105
|
+
showRegisterValue: false,
|
|
106
|
+
showRowAggregate: true,
|
|
107
|
+
showRowDividers: false,
|
|
108
|
+
showScoreDate: false,
|
|
109
|
+
showScoreUpdateTime: false,
|
|
110
|
+
showSecondGroupAggregate: false,
|
|
111
|
+
showSparkline: false,
|
|
112
|
+
showStackedValues: 'none',
|
|
113
|
+
showSubAggregate: true,
|
|
114
|
+
showTarget: false,
|
|
115
|
+
showThreshold: false,
|
|
116
|
+
showTotalAggregate: false,
|
|
117
|
+
showTrend: false,
|
|
118
|
+
showXGrid: false,
|
|
119
|
+
showYGrid: true,
|
|
120
|
+
showZero: false,
|
|
121
|
+
sortByOrder: 'desc',
|
|
122
|
+
sparklineStyle: 'area',
|
|
123
|
+
truncateColumnHeader: true,
|
|
124
|
+
truncateFirstColumn: true,
|
|
125
|
+
truncationType: 'end',
|
|
126
|
+
useCurrentDateForEnd: false,
|
|
127
|
+
useDataCache: false,
|
|
128
|
+
useRelativeScoreTime: false,
|
|
129
|
+
valueLabelSize: 'md',
|
|
130
|
+
wrapColumnHeader: false,
|
|
131
|
+
wrapElements: false,
|
|
132
|
+
wrapTitle: false,
|
|
133
|
+
xAxisHidden: false,
|
|
134
|
+
xAxisMaxLabelSize: 100,
|
|
135
|
+
xAxisTruncationType: 'end',
|
|
136
|
+
xAxisWrapLabels: false,
|
|
137
|
+
yAxis0Position: 'left',
|
|
138
|
+
yAxis1Position: 'right',
|
|
139
|
+
yAxis2Position: 'right',
|
|
140
|
+
yAxis3Position: 'right',
|
|
141
|
+
yAxis4Position: 'right',
|
|
142
|
+
yAxisHidden: false,
|
|
143
|
+
yAxisPosition: 'bottom',
|
|
144
|
+
yAxisShowGrid: true,
|
|
145
|
+
yAxisStyle: 'clean',
|
|
146
|
+
colorConfig: {
|
|
147
|
+
type: 'default',
|
|
148
|
+
},
|
|
149
|
+
userInfo: '@context.session.user',
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export const RESTRICTED_PROPERTIES = ['componentId', 'dataPassThrough', 'sharedContext', 'configVersion']
|
|
153
|
+
|
|
154
|
+
const DEFAULT_NUMBER_FORMAT = {
|
|
155
|
+
customFormat: false,
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Properties to omit from nested structures.
|
|
160
|
+
* Key = array property name, Value = array of property names to omit from items
|
|
161
|
+
*/
|
|
162
|
+
type OmitConfig = string[] | Record<string, string[]>
|
|
163
|
+
|
|
164
|
+
const OMIT_DEEP_PATHS: Record<string, OmitConfig> = {
|
|
165
|
+
dataSources: ['allowRealTime', 'isDatabaseView', 'preferredVisualizations', 'dataCategories'],
|
|
166
|
+
metrics: ['numberFormat'],
|
|
167
|
+
groupBy: {
|
|
168
|
+
groupBy: ['isRange', 'isChoice', 'isPaBucket'],
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Omits deep properties from an object
|
|
174
|
+
*/
|
|
175
|
+
function omitDeepProperties(obj: unknown): unknown {
|
|
176
|
+
if (!obj || typeof obj !== 'object') {
|
|
177
|
+
return obj
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (Array.isArray(obj)) {
|
|
181
|
+
return obj.map(omitDeepProperties)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const result: Record<string, unknown> = {}
|
|
185
|
+
|
|
186
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
187
|
+
const omitConfig = OMIT_DEEP_PATHS[key]
|
|
188
|
+
|
|
189
|
+
if (Array.isArray(value) && omitConfig) {
|
|
190
|
+
if (Array.isArray(omitConfig)) {
|
|
191
|
+
// Omit specified properties from each array item
|
|
192
|
+
result[key] = value.map((item) => {
|
|
193
|
+
if (!item || typeof item !== 'object') {
|
|
194
|
+
return item
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const filtered: Record<string, unknown> = {}
|
|
198
|
+
for (const [itemKey, itemValue] of Object.entries(item)) {
|
|
199
|
+
if (omitConfig.includes(itemKey)) {
|
|
200
|
+
// Special case: keep numberFormat if it's not default
|
|
201
|
+
if (itemKey === 'numberFormat' && key === 'metrics') {
|
|
202
|
+
if (itemValue && !isEqual(itemValue, DEFAULT_NUMBER_FORMAT)) {
|
|
203
|
+
filtered[itemKey] = omitDeepProperties(itemValue)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
continue
|
|
207
|
+
}
|
|
208
|
+
filtered[itemKey] = omitDeepProperties(itemValue)
|
|
209
|
+
}
|
|
210
|
+
return filtered
|
|
211
|
+
})
|
|
212
|
+
} else if (typeof omitConfig === 'object') {
|
|
213
|
+
// Handle nested config (e.g., groupBy.groupBy)
|
|
214
|
+
result[key] = value.map((item) => {
|
|
215
|
+
if (!item || typeof item !== 'object') {
|
|
216
|
+
return item
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const filtered: Record<string, unknown> = {}
|
|
220
|
+
for (const [itemKey, itemValue] of Object.entries(item)) {
|
|
221
|
+
const nestedConfig = omitConfig[itemKey]
|
|
222
|
+
|
|
223
|
+
if (Array.isArray(itemValue) && Array.isArray(nestedConfig)) {
|
|
224
|
+
// Process nested array
|
|
225
|
+
filtered[itemKey] = itemValue.map((nestedItem) => {
|
|
226
|
+
if (!nestedItem || typeof nestedItem !== 'object') {
|
|
227
|
+
return nestedItem
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const nestedFiltered: Record<string, unknown> = {}
|
|
231
|
+
for (const [nestedKey, nestedValue] of Object.entries(nestedItem)) {
|
|
232
|
+
if (!nestedConfig.includes(nestedKey)) {
|
|
233
|
+
nestedFiltered[nestedKey] = omitDeepProperties(nestedValue)
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return nestedFiltered
|
|
237
|
+
})
|
|
238
|
+
} else {
|
|
239
|
+
filtered[itemKey] = omitDeepProperties(itemValue)
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return filtered
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
|
+
} else if (value && typeof value === 'object') {
|
|
246
|
+
const filtered = omitDeepProperties(value)
|
|
247
|
+
if (!isEmpty(filtered)) {
|
|
248
|
+
result[key] = filtered
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
result[key] = value
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return result
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Removes properties from an object that match their default values
|
|
260
|
+
*/
|
|
261
|
+
export function removeRestrictedValues(props: object): unknown {
|
|
262
|
+
if (!props) {
|
|
263
|
+
return props
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const filtered: Record<string, unknown> = {}
|
|
267
|
+
|
|
268
|
+
for (const [key, value] of Object.entries(props)) {
|
|
269
|
+
if (RESTRICTED_PROPERTIES.find((prop) => prop === key)) {
|
|
270
|
+
continue
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
filtered[key] = value
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return omitDeepProperties(filtered)
|
|
277
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mapping of human-readable component names (kebab-case) to their sys_ids
|
|
3
|
+
*/
|
|
4
|
+
const COMPONENT_NAME_TO_SYSID: Record<string, string> = {
|
|
5
|
+
area: 'aba8630dc2ccc9b3c1774af1b6820696',
|
|
6
|
+
boxplot: 'c5d01636ff2602109bd2ffffffffff0a',
|
|
7
|
+
bubble: '50dbc52a13c8b4691f7c60e0246bf28c',
|
|
8
|
+
'calendar-report': '259e0221ff18a75c5f5f0fb28fa5d32f',
|
|
9
|
+
column: '2bd5dc19a7ad083941b7c992a966dd78',
|
|
10
|
+
'compatibility-mode-widget': '0805a7bf91a93efbdf0a975b38b01051',
|
|
11
|
+
dial: '63f050cf050137731a828878839e0b33',
|
|
12
|
+
donut: 'a2b0596cec6b9d49dd1ff9bf76b5084b',
|
|
13
|
+
gauge: '037bd8ea3013833fd049186779528b70',
|
|
14
|
+
geomap: '9c8c44bd78fe5918950e0db8e286211d',
|
|
15
|
+
heading: '1f6e0643eca7a637e36bd7833549ec9e',
|
|
16
|
+
heatmap: 'd1f6c60ce95607ea1ef236430d5fdec9',
|
|
17
|
+
'horizontal-bar': '85855283b7e03010097cb81cde11a91d',
|
|
18
|
+
image: '15fe506403f8a98575b6df59008ea8f1',
|
|
19
|
+
'indicator-scorecard': '9d31ba4d773ce32ef350d4A555b673f6e',
|
|
20
|
+
line: '18ac962264404bcc0039359d184b15f3',
|
|
21
|
+
list: '7ff373544303121093711347efb8f23c',
|
|
22
|
+
pareto: '53e0a2b49e3ff92ba54ea7ea6f0d0583',
|
|
23
|
+
pie: '96abe7e38d8790718022c5630a92176c',
|
|
24
|
+
'pivot-table': '06f6aacbd1818110f877d87436272684',
|
|
25
|
+
'rich-text': '2d56f06d55f46bbd4e79b5e624beb940',
|
|
26
|
+
scatter: 'e3aade757ef3da131076d005cada40d5',
|
|
27
|
+
'semi-donut': '3809c6583b8dd540a0bf735ed493bae2',
|
|
28
|
+
'single-score': 'd24d53f60350de7a652caf3188a46ed2',
|
|
29
|
+
spline: '0f1e76928c4814e1430774fb864003f0',
|
|
30
|
+
step: '7fa5f7264941fabfb1542985da30e0b8',
|
|
31
|
+
'vertical-bar': '23051643b7e03010097cb81cde11a910',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Mapping of sys_ids to human-readable component names (kebab-case)
|
|
36
|
+
*/
|
|
37
|
+
const COMPONENT_SYSID_TO_NAME: Record<string, string> = Object.fromEntries(
|
|
38
|
+
Object.entries(COMPONENT_NAME_TO_SYSID).map(([name, sysid]) => [sysid, name])
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Resolves a component value to its sys_id.
|
|
43
|
+
* If the value is already a sys_id (32-char hex), returns it as-is.
|
|
44
|
+
* If the value is a component name (case-insensitive), returns the corresponding sys_id.
|
|
45
|
+
* Otherwise, returns the value unchanged.
|
|
46
|
+
*/
|
|
47
|
+
export function resolveComponentToSysId(component: string): string {
|
|
48
|
+
// If it's already a sys_id (32 hex chars), return as-is
|
|
49
|
+
if (/^[0-9a-f]{32}$/i.test(component)) {
|
|
50
|
+
return component
|
|
51
|
+
}
|
|
52
|
+
// Normalize to lowercase for case-insensitive lookup
|
|
53
|
+
const normalized = component.toLowerCase()
|
|
54
|
+
// If it's a known component name, resolve to sys_id
|
|
55
|
+
if (COMPONENT_NAME_TO_SYSID[normalized]) {
|
|
56
|
+
return COMPONENT_NAME_TO_SYSID[normalized]
|
|
57
|
+
}
|
|
58
|
+
// Otherwise return as-is (could be a custom component reference)
|
|
59
|
+
return component
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Resolves a sys_id to its human-readable component name (kebab-case).
|
|
64
|
+
* If the sys_id has a known name, returns the name.
|
|
65
|
+
* Otherwise, returns the sys_id unchanged.
|
|
66
|
+
*/
|
|
67
|
+
export function resolveComponentToName(sysid: string): string {
|
|
68
|
+
return COMPONENT_SYSID_TO_NAME[sysid] || sysid
|
|
69
|
+
}
|