@lightdash/common 0.2881.2 → 0.2881.3
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/constants/screenshot.d.ts +20 -0
- package/dist/cjs/constants/screenshot.d.ts.map +1 -1
- package/dist/cjs/constants/screenshot.js +21 -1
- package/dist/cjs/constants/screenshot.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/constants/screenshot.d.ts +20 -0
- package/dist/esm/constants/screenshot.d.ts.map +1 -1
- package/dist/esm/constants/screenshot.js +20 -0
- package/dist/esm/constants/screenshot.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/constants/screenshot.d.ts +20 -0
- package/dist/types/constants/screenshot.d.ts.map +1 -1
- package/dist/types/constants/screenshot.js +20 -0
- package/dist/types/constants/screenshot.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,24 @@
|
|
|
13
13
|
* - Backend: Waited for by UnfurlService.saveScreenshot()
|
|
14
14
|
*/
|
|
15
15
|
export declare const SCREENSHOT_READY_INDICATOR_ID = "lightdash-ready-indicator";
|
|
16
|
+
/**
|
|
17
|
+
* ID of an element that is always mounted on minimal pages and exposes the
|
|
18
|
+
* current screenshot progress: which tiles are expected, ready, and errored.
|
|
19
|
+
*
|
|
20
|
+
* Unlike SCREENSHOT_READY_INDICATOR_ID, this element exists from first paint
|
|
21
|
+
* so the UnfurlService can read it on timeout to identify which tile UUIDs
|
|
22
|
+
* are still unaccounted for.
|
|
23
|
+
*
|
|
24
|
+
* Data attributes:
|
|
25
|
+
* - data-tiles-expected: JSON array of tile UUIDs expected to render
|
|
26
|
+
* - data-tiles-ready: JSON array of tile UUIDs that called markTileScreenshotReady
|
|
27
|
+
* - data-tiles-errored: JSON array of tile UUIDs that called markTileScreenshotErrored
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* - Frontend: Rendered by ScreenshotProgressIndicator on minimal pages
|
|
31
|
+
* - Backend: Read by UnfurlService when waitForSelector(READY_INDICATOR) times out
|
|
32
|
+
*/
|
|
33
|
+
export declare const SCREENSHOT_PROGRESS_INDICATOR_ID = "lightdash-screenshot-progress";
|
|
16
34
|
/**
|
|
17
35
|
* Class name for tile loading skeleton overlays.
|
|
18
36
|
* The UnfurlService waits for these elements to be hidden (loading complete).
|
|
@@ -74,6 +92,8 @@ export declare const LOGIN_PAGE_ID = "lightdash-login-page";
|
|
|
74
92
|
export declare const SCREENSHOT_SELECTORS: {
|
|
75
93
|
/** ID selector: #lightdash-ready-indicator */
|
|
76
94
|
readonly READY_INDICATOR: "#lightdash-ready-indicator";
|
|
95
|
+
/** ID selector: #lightdash-screenshot-progress */
|
|
96
|
+
readonly PROGRESS_INDICATOR: "#lightdash-screenshot-progress";
|
|
77
97
|
/** Class selector: .loading_chart_overlay */
|
|
78
98
|
readonly LOADING_OVERLAY: ".loading_chart_overlay";
|
|
79
99
|
/** Class selector: .loading_chart */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../src/constants/screenshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAC7B,8CAA8C;;IAE9C,6CAA6C;;IAE7C,qCAAqC;;IAErC,qCAAqC;;IAErC,yCAAyC;;IAEzC,6CAA6C;;IAE7C,yCAAyC;;CAEnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../src/constants/screenshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AAEzE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gCAAgC,kCAAkC,CAAC;AAEhF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAC7B,8CAA8C;;IAE9C,kDAAkD;;IAElD,6CAA6C;;IAE7C,qCAAqC;;IAErC,qCAAqC;;IAErC,yCAAyC;;IAEzC,6CAA6C;;IAE7C,yCAAyC;;CAEnC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* IMPORTANT: Changes to these constants must be coordinated between frontend and backend deployments.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.SCREENSHOT_SELECTORS = exports.LOGIN_PAGE_ID = exports.ERROR_BOUNDARY_ID = exports.DASHBOARD_GRID_CLASS = exports.MARKDOWN_TILE_CLASS = exports.LOADING_CHART_CLASS = exports.LOADING_CHART_OVERLAY_CLASS = exports.SCREENSHOT_READY_INDICATOR_ID = void 0;
|
|
9
|
+
exports.SCREENSHOT_SELECTORS = exports.LOGIN_PAGE_ID = exports.ERROR_BOUNDARY_ID = exports.DASHBOARD_GRID_CLASS = exports.MARKDOWN_TILE_CLASS = exports.LOADING_CHART_CLASS = exports.LOADING_CHART_OVERLAY_CLASS = exports.SCREENSHOT_PROGRESS_INDICATOR_ID = exports.SCREENSHOT_READY_INDICATOR_ID = void 0;
|
|
10
10
|
/**
|
|
11
11
|
* ID of the element that signals when a dashboard/chart is ready for screenshot.
|
|
12
12
|
* The UnfurlService waits for this element to appear before taking a screenshot.
|
|
@@ -16,6 +16,24 @@ exports.SCREENSHOT_SELECTORS = exports.LOGIN_PAGE_ID = exports.ERROR_BOUNDARY_ID
|
|
|
16
16
|
* - Backend: Waited for by UnfurlService.saveScreenshot()
|
|
17
17
|
*/
|
|
18
18
|
exports.SCREENSHOT_READY_INDICATOR_ID = 'lightdash-ready-indicator';
|
|
19
|
+
/**
|
|
20
|
+
* ID of an element that is always mounted on minimal pages and exposes the
|
|
21
|
+
* current screenshot progress: which tiles are expected, ready, and errored.
|
|
22
|
+
*
|
|
23
|
+
* Unlike SCREENSHOT_READY_INDICATOR_ID, this element exists from first paint
|
|
24
|
+
* so the UnfurlService can read it on timeout to identify which tile UUIDs
|
|
25
|
+
* are still unaccounted for.
|
|
26
|
+
*
|
|
27
|
+
* Data attributes:
|
|
28
|
+
* - data-tiles-expected: JSON array of tile UUIDs expected to render
|
|
29
|
+
* - data-tiles-ready: JSON array of tile UUIDs that called markTileScreenshotReady
|
|
30
|
+
* - data-tiles-errored: JSON array of tile UUIDs that called markTileScreenshotErrored
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
* - Frontend: Rendered by ScreenshotProgressIndicator on minimal pages
|
|
34
|
+
* - Backend: Read by UnfurlService when waitForSelector(READY_INDICATOR) times out
|
|
35
|
+
*/
|
|
36
|
+
exports.SCREENSHOT_PROGRESS_INDICATOR_ID = 'lightdash-screenshot-progress';
|
|
19
37
|
/**
|
|
20
38
|
* Class name for tile loading skeleton overlays.
|
|
21
39
|
* The UnfurlService waits for these elements to be hidden (loading complete).
|
|
@@ -77,6 +95,8 @@ exports.LOGIN_PAGE_ID = 'lightdash-login-page';
|
|
|
77
95
|
exports.SCREENSHOT_SELECTORS = {
|
|
78
96
|
/** ID selector: #lightdash-ready-indicator */
|
|
79
97
|
READY_INDICATOR: `#${exports.SCREENSHOT_READY_INDICATOR_ID}`,
|
|
98
|
+
/** ID selector: #lightdash-screenshot-progress */
|
|
99
|
+
PROGRESS_INDICATOR: `#${exports.SCREENSHOT_PROGRESS_INDICATOR_ID}`,
|
|
80
100
|
/** Class selector: .loading_chart_overlay */
|
|
81
101
|
LOADING_OVERLAY: `.${exports.LOADING_CHART_OVERLAY_CLASS}`,
|
|
82
102
|
/** Class selector: .loading_chart */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshot.js","sourceRoot":"","sources":["../../../src/constants/screenshot.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;;;GAOG;AACU,QAAA,6BAA6B,GAAG,2BAA2B,CAAC;AAEzE;;;;;;;GAOG;AACU,QAAA,2BAA2B,GAAG,uBAAuB,CAAC;AAEnE;;;;;;;GAOG;AACU,QAAA,mBAAmB,GAAG,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACU,QAAA,mBAAmB,GAAG,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG,mBAAmB,CAAC;AAExD;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAE5D;;;;;;;;GAQG;AACU,QAAA,aAAa,GAAG,sBAAsB,CAAC;AAEpD;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAChC,8CAA8C;IAC9C,eAAe,EAAE,IAAI,qCAA6B,EAAE;IACpD,6CAA6C;IAC7C,eAAe,EAAE,IAAI,mCAA2B,EAAE;IAClD,qCAAqC;IACrC,a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