react-semaphor 0.1.560 → 0.1.562

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 (168) hide show
  1. package/dist/analytics-protocol/index.js +450 -423
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-BaIQrEzX.js} +221 -188
  7. package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-R_yT8xH4.js} +116 -117
  8. package/dist/chunks/bookmark-impact-D4Kl4amw.js +75 -0
  9. package/dist/chunks/bookmark-state-CWeoGbrx.js +743 -0
  10. package/dist/chunks/{braces-Da41xfUd.js → braces-DzgoQC64.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-D1EUXzaR.js} +550 -425
  12. package/dist/chunks/{context-BgPDzLHZ.js → context-R31TSL5V.js} +1 -1
  13. package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-Bp1y5oun.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-S5FB3aUW.js} +236 -236
  15. package/dist/chunks/dashboard-controls-CfC_6Ztn.js +2277 -0
  16. package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-gYZT7ZQY.js} +5 -5
  17. package/dist/chunks/dates-DFY7Gfss.js +91 -0
  18. package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-u7OI_g8Q.js} +7119 -7198
  19. package/dist/chunks/filter-reach-copy-CvV7W5dd.js +3965 -0
  20. package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-CPwFkrMz.js} +11 -10
  21. package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +16722 -0
  22. package/dist/chunks/{index-DtHidOPV.js → index-CNGkfUp4.js} +269 -264
  23. package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-BM65viQh.js} +1 -1
  24. package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BoeLBfL3.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-hEucouWM.js} +4 -4
  26. package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CCh9JjP1.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-DsLdFdSa.js} +365 -349
  29. package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-Bnso1cm1.js} +6 -6
  30. package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-T1cRkh3m.js} +1 -1
  31. package/dist/chunks/{palette-Bsh376zO.js → palette-p1XSJFgB.js} +1 -1
  32. package/dist/chunks/pivot-result-contract-expectations-B53jqszr.js +56 -0
  33. package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
  34. package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
  35. package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
  36. package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-BITkNSDa.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +8214 -0
  38. package/dist/chunks/{save-B5EAsgQF.js → save-CHV1B1fL.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-DFYBrE6O.js} +93 -94
  40. package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
  41. package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-Bz5aywT4.js} +1 -1
  42. package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-Cfuafnem.js} +38188 -40344
  43. package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
  44. package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-DdDVXFB8.js} +6 -6
  45. package/dist/chunks/{switch-ByxH4M7t.js → switch-BW4yXSYs.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-bSXxGn-v.js} +1 -1
  47. package/dist/chunks/temporal-input-presentation-sk9gqLi6.js +4960 -0
  48. package/dist/chunks/{token-types-CQtXUVMy.js → token-types-BUK06hU2.js} +1 -1
  49. package/dist/chunks/{upload-wbR-NVzq.js → upload-BnmuyPqW.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
  51. package/dist/chunks/{validators-CXTneCA4.js → validators-BIM0FE31.js} +774 -895
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2477 -2685
  54. package/dist/data-app-sdk/index.js +30 -30
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +25 -25
  57. package/dist/format-utils/index.js +274 -267
  58. package/dist/index.js +59 -59
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  63. package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
  64. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  65. package/dist/types/components/index.d.ts +1 -2
  66. package/dist/types/components/surfboard/filter/types.d.ts +3 -1
  67. package/dist/types/index.js +50 -51
  68. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  69. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
  70. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
  71. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
  72. package/dist/types/lib/print/print-inputs.d.ts +2 -1
  73. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
  74. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
  75. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  76. package/dist/types/lib/stores/editor-store.d.ts +9 -1
  77. package/dist/types/lib/stores/table-actions.d.ts +0 -2
  78. package/dist/types/lib/types/common-types.d.ts +6 -0
  79. package/dist/types/lib/types/explorer-types.d.ts +7 -1
  80. package/dist/types/lib/types/interaction-types.d.ts +3 -1
  81. package/dist/types/lib/types/token-types.d.ts +0 -1
  82. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +13 -1
  83. package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
  84. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  85. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
  86. package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
  87. package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
  88. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
  89. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  90. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +76 -0
  91. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  92. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  93. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  94. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  95. package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
  96. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  97. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  98. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  99. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +17 -0
  100. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +117 -0
  101. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  102. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  103. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  104. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +51 -0
  105. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +30 -0
  106. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  107. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  108. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3402 -4313
  109. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +49 -8
  110. package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
  111. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
  112. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +52 -2
  113. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
  114. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
  115. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
  116. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +20 -20
  117. package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
  118. package/dist/types/shared/dashboard-authoring/index.d.ts +11 -6
  119. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  120. package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
  121. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
  122. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
  123. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
  124. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
  125. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
  126. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
  127. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
  128. package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
  129. package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
  130. package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
  131. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
  132. package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
  133. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
  134. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
  135. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +73 -3
  136. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -3
  137. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
  138. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
  139. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
  140. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  141. package/dist/types/shared/format-utils/document-print.d.ts +82 -0
  142. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
  143. package/dist/types/shared/format-utils/index.d.ts +1 -0
  144. package/dist/types/shared/format-utils/raw-temporal.d.ts +18 -7
  145. package/dist/types/shared/temporal/index.d.ts +1 -0
  146. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
  147. package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
  148. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
  149. package/package.json +2 -2
  150. package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
  151. package/dist/chunks/custom-visual-inputs-Dz-enUNR.js +0 -292
  152. package/dist/chunks/dashboard-controls-Bi7fyG-4.js +0 -2339
  153. package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
  154. package/dist/chunks/filter-reach-copy-BF4w4kI2.js +0 -3738
  155. package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
  156. package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
  157. package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
  158. package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
  159. package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
  160. package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
  161. package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
  162. package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
  163. package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
  164. package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
  165. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
  166. package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
  167. package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
  168. package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
@@ -1,6 +1,6 @@
1
1
  import { MatrixPath, MatrixPresentation, MatrixWindow, SemaphorScalarValue, SemaphorValueFormat } from '../../analytics-protocol/index.js';
2
2
  import { ReportRuntimeContext } from '../../report-runtime-context/index.js';
3
- import { MeasureCanonicalFormat } from '../types/index.js';
3
+ import { MeasureCanonicalFormat, RawTemporalFormat } from '../types/index.js';
4
4
  /** Null hierarchy members stay identifiable even when null cells render blank. */
5
5
  export declare function matrixMemberLabel(path: MatrixPath, levels?: ReadonlyMap<string, (value: SemaphorScalarValue) => string>): string;
6
6
  /**
@@ -34,6 +34,13 @@ export declare function matrixLevelLabels(input: {
34
34
  * override, else its catalog (model) format, in the one precedence
35
35
  * (`pickColumnFormat`). Arithmetic, precision and temporal rules stay shared.
36
36
  */
37
+ /**
38
+ * A Matrix raw date level's authored format: what its cells draw of a stored
39
+ * date format (a pattern or preset, and the time zones). Relative time, a
40
+ * prefix and a suffix aren't drawn; card settings read that from here
41
+ * (card appearance CA-D24).
42
+ */
43
+ export declare function matrixRawDateFormat(stored: SemaphorValueFormat | undefined): RawTemporalFormat | undefined;
37
44
  export declare function resolveMatrixValueFormat(override: SemaphorValueFormat | undefined, semantic: SemaphorValueFormat | undefined): import('../semantic-format.js').AdaptedCanonicalFormatSpec | undefined;
38
45
  /** One card's prepared formats: every Matrix surface (screen, Layout CSV, Flat CSV, PDF) formats through it. */
39
46
  export type MatrixFormatting = ReturnType<typeof prepareMatrixFormatting>;
@@ -24,6 +24,7 @@ export { fromSemanticFormat } from './semantic-format.js';
24
24
  export type * from './table-structure.js';
25
25
  export * from './pdf-export-policy.js';
26
26
  export * from './pdf-delivery.js';
27
+ export * from './document-print.js';
27
28
  export * from './numeric-presentation.js';
28
29
  export { pickColumnFormat, resolveColumnFormat, withLiveModelFormats, type ColumnFormatSource, type FormatSurface, type ModelFormats, type ResolvedColumnFormat, } from './resolve-column-format.js';
29
30
  export * from './presentation-execution.js';
@@ -4,6 +4,8 @@ import { RawDatePreset, RawTemporalValueKind, RawTemporalValueMetadata } from '.
4
4
  import { parseRawTemporalValueMetadata, validateRawTemporalResultColumn } from '../analytics-protocol/raw-temporal-contract.js';
5
5
  import { LocaleStyle, ResolvedValueFormatPreferences } from '../value-format-preferences/index.js';
6
6
  import { RawTemporalFormat, RawTemporalPatternDialect } from './types/format-types.js';
7
+ import { classifyTemporalLiteral } from '../temporal/raw-temporal-value.js';
8
+ export { classifyTemporalLiteral };
7
9
  export type { RawTemporalFormat, RawTemporalPatternDialect };
8
10
  /**
9
11
  * A stored raw date format's presentation (column formats CF-D4, CF-D16): its
@@ -86,13 +88,6 @@ export declare function resolveRawTemporalFormat(input: {
86
88
  preferences: ResolvedValueFormatPreferences;
87
89
  calendar: Pick<CalendarContext, 'tz'>;
88
90
  }): ResolvedRawTemporalFormat;
89
- /**
90
- * What a temporal literal is by its text alone: a calendar date, a wall-clock
91
- * date-time with no zone, or an instant with a zone or offset. Undefined for
92
- * any other text. Readers keep a date and a wall date-time as written; only an
93
- * instant names a moment.
94
- */
95
- export declare function classifyTemporalLiteral(value: string): RawTemporalValueKind | undefined;
96
91
  export declare function classifyDeclaredSqlTemporalColumn(input: {
97
92
  columnKey: string;
98
93
  values: readonly (string | null)[];
@@ -116,3 +111,19 @@ export declare function formatRawTemporalValue(input: {
116
111
  metadata: RawTemporalValueMetadata;
117
112
  format: ResolvedRawTemporalFormat;
118
113
  }): RawTemporalFormatResult;
114
+ /**
115
+ * One raw date column's formatter, as every raw-date renderer prepares it
116
+ * (a detail table, a SQL table, a Matrix level): the authored format resolved
117
+ * against the viewer's preferences, then prepared for the column's value
118
+ * kind. Throws when the column can't show the format; card settings call it
119
+ * to decide whether a format is usable (card appearance CA-D24).
120
+ */
121
+ export declare function prepareRawDateColumn(input: {
122
+ authored: RawTemporalFormat | undefined;
123
+ metadata: RawTemporalValueMetadata;
124
+ preferences: ResolvedValueFormatPreferences;
125
+ calendar: Pick<CalendarContext, 'tz'>;
126
+ }): {
127
+ format: ResolvedRawTemporalFormat;
128
+ formatValue: PreparedRawTemporalFormatter;
129
+ };
@@ -3,4 +3,5 @@ export * from './calendar-periods.js';
3
3
  export * from './relative-date.js';
4
4
  export * from './time-window-periods.js';
5
5
  export * from './calendar-day-equality.js';
6
+ export * from './raw-temporal-equality.js';
6
7
  export * from './temporal-parity-fixtures.js';
@@ -0,0 +1,19 @@
1
+ /** An `=` or `!=` on a raw date-time selection, as the instants its value names. */
2
+ export type RawTemporalEquality = {
3
+ operation: '=' | '!=';
4
+ /** Earliest first; each to the millisecond. */
5
+ instants: Date[];
6
+ };
7
+ /**
8
+ * The instants a raw date-time selection's `=` or `!=` names, or null: one
9
+ * value, a `raw_temporal` selection of a date-time, and text the raw-date
10
+ * formatter reads as that kind (a wall clock with no offset, or an instant
11
+ * with one). Anything else (a date, another operator, a value the formatter
12
+ * refuses) is null, and the caller compares as it would without the
13
+ * selection.
14
+ */
15
+ export declare function readRawTemporalEquality(predicate: {
16
+ operation: unknown;
17
+ values: unknown;
18
+ rawTemporal?: unknown;
19
+ }): RawTemporalEquality | null;
@@ -0,0 +1,29 @@
1
+ import { RawTemporalValueKind } from '../analytics-protocol/contracts.js';
2
+ /** A raw date's calendar and clock fields as written; `fraction` is the digits after the second. */
3
+ export type RawTemporalFields = {
4
+ year: number;
5
+ month: number;
6
+ day: number;
7
+ hour: number;
8
+ minute: number;
9
+ second: number;
10
+ fraction: string;
11
+ };
12
+ export type ParsedRawTemporalValue = {
13
+ status: 'valid';
14
+ fields: RawTemporalFields;
15
+ instant?: Date;
16
+ } | {
17
+ status: 'invalid_shape';
18
+ } | {
19
+ status: 'out_of_range';
20
+ };
21
+ /**
22
+ * What a temporal literal is by its text alone: a calendar date, a wall-clock
23
+ * date-time with no zone, or an instant with a zone or offset. Undefined for
24
+ * any other text. Readers keep a date and a wall date-time as written; only an
25
+ * instant names a moment.
26
+ */
27
+ export declare function classifyTemporalLiteral(value: string): RawTemporalValueKind | undefined;
28
+ /** A raw date's text read strictly as its kind: the fields as written and, for an instant, the moment it names. */
29
+ export declare function parseRawTemporalValue(value: string, kind: RawTemporalValueKind): ParsedRawTemporalValue;
@@ -21,3 +21,9 @@ export declare function wallClockMilliseconds(wall: ZonedWallClockTime): number;
21
21
  * day, so the answer never depends on the machine.
22
22
  */
23
23
  export declare function zonedWallClockToInstant(wall: ZonedWallClockTime, tz: string): Date;
24
+ /**
25
+ * Every instant a wall-clock time names in a timezone, earliest first: one,
26
+ * two in the hour a daylight-saving change repeats, none in the hour it
27
+ * skips.
28
+ */
29
+ export declare function zonedWallClockOccurrences(wall: ZonedWallClockTime, tz: string): Date[];
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.560",
8
+ "version": "0.1.562",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -127,7 +127,7 @@
127
127
  "build": "node scripts/build.mjs",
128
128
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
129
129
  "lint:regressions": "node scripts/lint-regressions.mjs",
130
- "check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/legacy-table-type-references.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/layout-engine.mjs",
130
+ "check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/legacy-table-type-references.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/kpi-figure-reads.mjs && node scripts/layout-engine.mjs",
131
131
  "preview": "vite preview",
132
132
  "test": "vitest run",
133
133
  "test:changed": "vitest run --changed",
@@ -1,111 +0,0 @@
1
- import { z as t } from "zod";
2
- import { b as g, d as v } from "./matrix-operation-contract-WPv4R-H_.js";
3
- import { a as T } from "./metric-comparison-ljMKYZKa.js";
4
- import { D as O, v as y, k as E, j as A, i as V } from "./table-settings-Imz0FgWi.js";
5
- const p = 1, $ = ["PRIVATE", "TEAM", "DASHBOARD"], R = t.object({
6
- filterId: t.string().min(1),
7
- name: t.string(),
8
- operation: t.string(),
9
- valueType: t.enum(["string", "number", "date", "boolean"]),
10
- values: t.array(t.unknown())
11
- }).passthrough().superRefine((e, o) => {
12
- const s = [];
13
- O.has(e.operation) ? y(e, e.valueType, "filterValue", s) : s.push("filterValue.operation must be a valid filter operation.");
14
- for (const i of s) o.addIssue({ code: "custom", message: i });
15
- }), S = t.unknown().superRefine((e, o) => {
16
- for (const s of T(e).errors)
17
- o.addIssue({ code: "custom", message: s.message });
18
- }), _ = t.discriminatedUnion("kind", [
19
- t.object({ kind: t.literal("filter"), filterValue: R }).strict(),
20
- t.object({ kind: t.literal("control"), value: t.unknown() }).strict(),
21
- t.object({
22
- kind: t.literal("selection"),
23
- selection: g
24
- }).strict()
25
- ]), w = t.union([
26
- t.object({
27
- status: t.literal("set"),
28
- value: _,
29
- comparisonSelection: S.optional()
30
- }).strict(),
31
- t.object({
32
- status: t.literal("cleared"),
33
- comparisonSelection: S.optional()
34
- }).strict(),
35
- t.object({ comparisonSelection: S }).strict()
36
- ]), k = ["bySheetId", "byCardId", "byDocumentSectionId"], B = /* @__PURE__ */ new Set(["version", "selectedSheetId", "inputs", "tableSettings"]), D = /* @__PURE__ */ new Set(["shared", ...k]), d = (e) => !!e && typeof e == "object" && !Array.isArray(e);
37
- function b(e, o, s) {
38
- if (e === void 0) return;
39
- if (!d(e)) {
40
- o.push({ target: "input", id: s });
41
- return;
42
- }
43
- const i = {};
44
- for (const [a, u] of Object.entries(e)) {
45
- const c = a ? w.safeParse(u) : void 0;
46
- c != null && c.success ? i[a] = c.data : o.push({
47
- target: v(a) ? "selection" : "input",
48
- id: a
49
- });
50
- }
51
- return Object.keys(i).length ? i : void 0;
52
- }
53
- function K(e, o) {
54
- if (o !== p)
55
- return { ok: !1, error: `Unsupported bookmark version ${o}.` };
56
- if (!d(e) || e.version !== p)
57
- return { ok: !1, error: "The bookmark state is invalid." };
58
- const s = [], i = Object.keys(e).filter((l) => !B.has(l));
59
- let a;
60
- typeof e.selectedSheetId == "string" && e.selectedSheetId ? a = e.selectedSheetId : e.selectedSheetId !== void 0 && s.push({ target: "sheet", id: String(e.selectedSheetId) });
61
- const u = {};
62
- if (d(e.inputs)) {
63
- i.push(
64
- ...Object.keys(e.inputs).filter((r) => !D.has(r)).map((r) => `inputs.${r}`)
65
- );
66
- const l = b(e.inputs.shared, s, "shared");
67
- l && (u.shared = l);
68
- for (const r of k) {
69
- const n = e.inputs[r];
70
- if (n === void 0) continue;
71
- if (!d(n)) {
72
- s.push({ target: "input", id: r });
73
- continue;
74
- }
75
- const f = {};
76
- for (const [h, I] of Object.entries(n)) {
77
- const m = b(I, s, `${r}.${h}`);
78
- m && (f[h] = m);
79
- }
80
- Object.keys(f).length && (u[r] = f);
81
- }
82
- } else e.inputs !== void 0 && i.push("inputs");
83
- const c = {};
84
- if (d(e.tableSettings))
85
- for (const [l, r] of Object.entries(e.tableSettings)) {
86
- const n = l ? E(r, V) : void 0;
87
- n != null && n.ok ? A(n.value) || (c[l] = n.value) : s.push({ target: "card", id: l });
88
- }
89
- else e.tableSettings !== void 0 && i.push("tableSettings");
90
- return {
91
- ok: !0,
92
- value: {
93
- version: p,
94
- ...a ? { selectedSheetId: a } : {},
95
- ...Object.keys(u).length ? { inputs: u } : {},
96
- ...Object.keys(c).length ? { tableSettings: c } : {}
97
- },
98
- issues: s,
99
- unknownKeys: i
100
- };
101
- }
102
- function j(e, o) {
103
- const s = K(e, o);
104
- return s.ok ? s.issues.some((i) => i.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : s.issues.length || s.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: s.value } : s;
105
- }
106
- export {
107
- p as B,
108
- $ as a,
109
- j as p,
110
- K as r
111
- };
@@ -1,292 +0,0 @@
1
- import { v as F } from "./global-date-filter-utils-D8365uPH.js";
2
- function h(e) {
3
- if (!(e != null && e.expectedType)) return "table";
4
- const r = Array.isArray(e.expectedType) ? e.expectedType[0] : e.expectedType;
5
- return M(r) ? r : "table";
6
- }
7
- const E = [
8
- "bar",
9
- "horizontalBar",
10
- "line",
11
- "area",
12
- "stackedArea",
13
- "combo",
14
- "pie",
15
- "doughnut",
16
- "radar",
17
- "polarArea",
18
- "bubble",
19
- "scatter",
20
- "stackedBar",
21
- "stackedLine",
22
- "table",
23
- "detailTable",
24
- "kpi",
25
- "pyramid",
26
- "tornado",
27
- "range",
28
- "text",
29
- "funnel",
30
- "bullet",
31
- "heatmap",
32
- "treemap",
33
- "custom"
34
- ];
35
- function M(e) {
36
- return E.includes(e);
37
- }
38
- function x(e) {
39
- const r = e.position;
40
- if (typeof r == "number") return r;
41
- if (typeof r == "string") {
42
- const t = r.match(/\d+/);
43
- if (t) {
44
- const n = Number(t[0]);
45
- if (!Number.isNaN(n)) return n;
46
- }
47
- }
48
- return Number.POSITIVE_INFINITY;
49
- }
50
- function m(e) {
51
- if (typeof e == "number")
52
- return { kind: "number", start: e, end: e };
53
- if (typeof e == "string") {
54
- const r = e.match(/^(\d+)$/);
55
- if (r) {
56
- const s = Number(r[1]);
57
- return { kind: "number", start: s, end: s };
58
- }
59
- const t = e.match(/^(\d+)-(\d+)$/);
60
- if (t) {
61
- const s = Number(t[1]), d = Number(t[2]);
62
- return { kind: "range", start: s, end: d };
63
- }
64
- const n = e.match(/^(\d+)\+$/);
65
- if (n)
66
- return { kind: "dynamic", start: Number(n[1]), end: Number.POSITIVE_INFINITY };
67
- }
68
- return null;
69
- }
70
- function k(e) {
71
- return !e || e.length === 0 ? void 0 : [...e].sort(
72
- (t, n) => x(t) - x(n)
73
- )[0];
74
- }
75
- function N(e, r) {
76
- if (!e || e.length === 0) return;
77
- const t = [], n = [], s = [];
78
- e.forEach((i) => {
79
- const u = m(i.position);
80
- u && (u.kind === "number" ? t.push(i) : u.kind === "range" ? n.push(i) : u.kind === "dynamic" && s.push(i));
81
- });
82
- const d = t.find((i) => {
83
- const u = m(i.position);
84
- return (u == null ? void 0 : u.kind) === "number" && u.start === r;
85
- });
86
- if (d) return d;
87
- const p = n.sort(
88
- (i, u) => x(i) - x(u)
89
- ).find((i) => {
90
- const u = m(i.position);
91
- return (u == null ? void 0 : u.kind) === "range" && r >= u.start && r <= u.end;
92
- });
93
- if (p) return p;
94
- const a = s.map((i) => ({
95
- slot: i,
96
- parsed: m(i.position)
97
- })).filter((i) => {
98
- var u;
99
- return ((u = i.parsed) == null ? void 0 : u.kind) === "dynamic";
100
- }).sort(
101
- (i, u) => {
102
- var o, f;
103
- return (((o = i.parsed) == null ? void 0 : o.start) ?? 0) - (((f = u.parsed) == null ? void 0 : f.start) ?? 0);
104
- }
105
- ).filter((i) => {
106
- var u;
107
- return r >= (((u = i.parsed) == null ? void 0 : u.start) ?? 0);
108
- }).sort(
109
- (i, u) => {
110
- var o, f;
111
- return (((o = u.parsed) == null ? void 0 : o.start) ?? 0) - (((f = i.parsed) == null ? void 0 : f.start) ?? 0);
112
- }
113
- )[0];
114
- return a == null ? void 0 : a.slot;
115
- }
116
- function A(e, r) {
117
- const t = N(e, r);
118
- if (t)
119
- return h(t);
120
- }
121
- function V(e, r) {
122
- var n;
123
- const t = (n = e == null ? void 0 : e.customCardPreferences) == null ? void 0 : n.slotIndex;
124
- return typeof t == "number" ? t : r;
125
- }
126
- function S(e, r) {
127
- var t;
128
- if (!((t = e == null ? void 0 : e.customCardPreferences) != null && t.url))
129
- return !1;
130
- if (e.type === "custom" || e.customCardPreferences.visualType === "multiple" || e.customCardPreferences.dataInputCardIds || (e.customCardPreferences.minInputs || 0) > 1 || (e.customCardPreferences.maxInputs || 0) > 1)
131
- return !0;
132
- if (r && r.length > 1) {
133
- const n = r.filter(
134
- (s) => {
135
- var d;
136
- return typeof ((d = s.customCardPreferences) == null ? void 0 : d.slotIndex) == "number";
137
- }
138
- );
139
- if (n.length > 1 && n.some((s) => s.id !== e.id))
140
- return !0;
141
- }
142
- return !1;
143
- }
144
- function O(e) {
145
- const r = [];
146
- let t = -1;
147
- e.forEach((n, s) => {
148
- const d = V(n, s);
149
- d > t && (t = d), r[d] = n ?? null;
150
- });
151
- for (let n = 0; n <= t; n += 1)
152
- n in r || (r[n] = null);
153
- return r;
154
- }
155
- function $(e) {
156
- return e.map((r, t) => !r.customCardPreferences || r.customCardPreferences.slotIndex === t ? r : {
157
- ...r,
158
- customCardPreferences: {
159
- ...r.customCardPreferences,
160
- slotIndex: t
161
- }
162
- });
163
- }
164
- function v(e) {
165
- const r = k(e);
166
- if (r)
167
- return h(r);
168
- }
169
- function R(e, r, t) {
170
- if (!e) return;
171
- const n = A(t, r);
172
- return e.type === "custom" && n ? n : e.type;
173
- }
174
- function Y(e, r, t) {
175
- var T;
176
- const n = {
177
- dataSource: t.dataSource,
178
- connectionId: t.connectionId
179
- }, s = {
180
- type: "component",
181
- visualType: "multiple",
182
- url: r.url,
183
- componentName: r.name,
184
- icon: r.icon,
185
- pluginChartType: r.chartType,
186
- minInputs: r.minInputs,
187
- maxInputs: r.maxInputs
188
- }, d = r.minInputs || 1, p = e.map((c) => ({ slot: c, parsed: m(c.position) })).filter((c) => c.parsed !== null).reduce((c, l) => {
189
- const g = l.parsed.end;
190
- return Number.isFinite(g) ? Math.max(c, g) : c;
191
- }, -1), b = Math.max(d, p + 1), a = k(e), i = a ? x(a) : 0;
192
- let u = !1;
193
- const o = [];
194
- for (let c = 0; c < b; c += 1) {
195
- const l = N(e, c), g = h(l), I = !u && c === i, P = c, C = {
196
- ...n,
197
- id: F(),
198
- title: (I ? a == null ? void 0 : a.label : l == null ? void 0 : l.label) || `Tab ${c + 1}`,
199
- tabTitle: (I ? a == null ? void 0 : a.label : l == null ? void 0 : l.label) || `Tab ${c + 1}`,
200
- description: (I ? a == null ? void 0 : a.description : l == null ? void 0 : l.description) || "",
201
- type: g,
202
- sql: "",
203
- preferences: {
204
- onClickFilter: [{ columnIndex: 0, expression: "" }]
205
- },
206
- ...I && {
207
- customCardPreferences: {
208
- ...s,
209
- slotIndex: P
210
- }
211
- },
212
- ...!I && {
213
- customCardPreferences: {
214
- slotIndex: P
215
- }
216
- }
217
- };
218
- I && (u = !0), o.push(C);
219
- }
220
- if (!u && o.length > 0) {
221
- const c = ((T = o[0].customCardPreferences) == null ? void 0 : T.slotIndex) ?? 0;
222
- o[0] = {
223
- ...o[0],
224
- type: o[0].type,
225
- customCardPreferences: {
226
- ...s,
227
- slotIndex: c
228
- }
229
- };
230
- }
231
- const f = o.findIndex(
232
- (c) => {
233
- var l;
234
- return !!((l = c.customCardPreferences) != null && l.url);
235
- }
236
- );
237
- if (f > 0) {
238
- const [c] = o.splice(f, 1);
239
- o.unshift(c);
240
- }
241
- return o;
242
- }
243
- function _({
244
- frame: e,
245
- configCard: r,
246
- isMultiInputVisual: t
247
- }) {
248
- var s;
249
- if (!t || !r)
250
- return e.cards;
251
- const n = (s = r.customCardPreferences) == null ? void 0 : s.dataInputCardIds;
252
- return n ? Object.keys(n).sort((d, y) => Number(d) - Number(y)).map((d) => {
253
- var p;
254
- const y = (p = n[d]) == null ? void 0 : p.cardId;
255
- return e.cards.find((b) => b.id === y) || null;
256
- }) : e.cards;
257
- }
258
- function j(e, r) {
259
- return r && S(r, e.cards) ? r : e.cards.find((t) => S(t, e.cards)) || null;
260
- }
261
- function q(e, r) {
262
- var s, d;
263
- if (!e) return null;
264
- const t = r == null ? void 0 : r.visualType;
265
- if (t) return t;
266
- if (r != null && r.slots && r.slots.length > 0 || ((r == null ? void 0 : r.minInputs) || 0) > 1 || ((r == null ? void 0 : r.maxInputs) || 0) > 1 || ((r == null ? void 0 : r.dataInputs) || []).length > 1)
267
- return "multiple";
268
- const n = (s = e.customCardPreferences) == null ? void 0 : s.visualType;
269
- return n || ((d = e.customCardPreferences) != null && d.dataInputCardIds ? "multiple" : null);
270
- }
271
- function w(e) {
272
- return e.visualType === "multiple" || e.slots && e.slots.length > 0 || (e.minInputs || 0) > 1 || (e.maxInputs || 0) > 1 || (e.dataInputs || []).length > 1 ? "multiple" : "single";
273
- }
274
- function z(e) {
275
- return Array.isArray(e) ? { records: e } : e;
276
- }
277
- export {
278
- V as a,
279
- O as b,
280
- R as c,
281
- w as d,
282
- Y as e,
283
- j as f,
284
- _ as g,
285
- N as h,
286
- S as i,
287
- $ as j,
288
- h as k,
289
- v as l,
290
- z as n,
291
- q as r
292
- };