@ktnpm_devops/react-component 0.19.0 → 0.20.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/composites/FilterDropdown/FilterDropdown.d.ts +1 -1
- package/dist/composites/FilterDropdown/FilterDropdown.d.ts.map +1 -1
- package/dist/composites/FilterDropdown/FilterDropdown.types.d.ts +7 -1
- package/dist/composites/FilterDropdown/FilterDropdown.types.d.ts.map +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +1 -1
- package/dist/index100.cjs +34 -22
- package/dist/index100.cjs.map +1 -1
- package/dist/index100.js +34 -22
- package/dist/index100.js.map +1 -1
- package/dist/index101.cjs +55 -48
- package/dist/index101.cjs.map +1 -1
- package/dist/index101.js +54 -47
- package/dist/index101.js.map +1 -1
- package/dist/index102.cjs +34 -16
- package/dist/index102.cjs.map +1 -1
- package/dist/index102.js +34 -16
- package/dist/index102.js.map +1 -1
- package/dist/index103.cjs +43 -36
- package/dist/index103.cjs.map +1 -1
- package/dist/index103.js +42 -35
- package/dist/index103.js.map +1 -1
- package/dist/index104.cjs +24 -6
- package/dist/index104.cjs.map +1 -1
- package/dist/index104.js +23 -5
- package/dist/index104.js.map +1 -1
- package/dist/index105.cjs +39 -21
- package/dist/index105.cjs.map +1 -1
- package/dist/index105.js +38 -20
- package/dist/index105.js.map +1 -1
- package/dist/index106.cjs +9 -22
- package/dist/index106.cjs.map +1 -1
- package/dist/index106.js +8 -21
- package/dist/index106.js.map +1 -1
- package/dist/index107.cjs +10 -6
- package/dist/index107.cjs.map +1 -1
- package/dist/index107.js +9 -5
- package/dist/index107.js.map +1 -1
- package/dist/index108.cjs +20 -19
- package/dist/index108.cjs.map +1 -1
- package/dist/index108.js +19 -18
- package/dist/index108.js.map +1 -1
- package/dist/index109.cjs +14 -19
- package/dist/index109.cjs.map +1 -1
- package/dist/index109.js +13 -18
- package/dist/index109.js.map +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +10 -33
- package/dist/index110.cjs.map +1 -1
- package/dist/index110.js +9 -32
- package/dist/index110.js.map +1 -1
- package/dist/index111.cjs +65 -2
- package/dist/index111.cjs.map +1 -1
- package/dist/index111.js +66 -3
- package/dist/index111.js.map +1 -1
- package/dist/index112.cjs +8 -50
- package/dist/index112.cjs.map +1 -1
- package/dist/index112.js +9 -51
- package/dist/index112.js.map +1 -1
- package/dist/index113.cjs +33 -22
- package/dist/index113.cjs.map +1 -1
- package/dist/index113.js +32 -21
- package/dist/index113.js.map +1 -1
- package/dist/index114.cjs +18 -69
- package/dist/index114.cjs.map +1 -1
- package/dist/index114.js +17 -68
- package/dist/index114.js.map +1 -1
- package/dist/index115.cjs +42 -7
- package/dist/index115.cjs.map +1 -1
- package/dist/index115.js +41 -6
- package/dist/index115.js.map +1 -1
- package/dist/index116.cjs +32 -32
- package/dist/index116.js +32 -32
- package/dist/index117.cjs +21 -35
- package/dist/index117.cjs.map +1 -1
- package/dist/index117.js +20 -34
- package/dist/index117.js.map +1 -1
- package/dist/index118.cjs +21 -43
- package/dist/index118.cjs.map +1 -1
- package/dist/index118.js +20 -42
- package/dist/index118.js.map +1 -1
- package/dist/index119.cjs +57 -24
- package/dist/index119.cjs.map +1 -1
- package/dist/index119.js +56 -23
- package/dist/index119.js.map +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index120.cjs +9 -39
- package/dist/index120.cjs.map +1 -1
- package/dist/index120.js +8 -38
- package/dist/index120.js.map +1 -1
- package/dist/index121.cjs +25 -9
- package/dist/index121.cjs.map +1 -1
- package/dist/index121.js +24 -8
- package/dist/index121.js.map +1 -1
- package/dist/index122.cjs +9 -10
- package/dist/index122.cjs.map +1 -1
- package/dist/index122.js +8 -9
- package/dist/index122.js.map +1 -1
- package/dist/index123.cjs +16 -20
- package/dist/index123.cjs.map +1 -1
- package/dist/index123.js +15 -19
- package/dist/index123.js.map +1 -1
- package/dist/index124.cjs +7 -14
- package/dist/index124.cjs.map +1 -1
- package/dist/index124.js +6 -13
- package/dist/index124.js.map +1 -1
- package/dist/index125.cjs +39 -10
- package/dist/index125.cjs.map +1 -1
- package/dist/index125.js +38 -9
- package/dist/index125.js.map +1 -1
- package/dist/index126.cjs +13 -64
- package/dist/index126.cjs.map +1 -1
- package/dist/index126.js +14 -65
- package/dist/index126.js.map +1 -1
- package/dist/index127.cjs +22 -19
- package/dist/index127.cjs.map +1 -1
- package/dist/index127.js +22 -19
- package/dist/index127.js.map +1 -1
- package/dist/index128.cjs +30 -24
- package/dist/index128.cjs.map +1 -1
- package/dist/index128.js +30 -24
- package/dist/index128.js.map +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +1 -1
- package/dist/index25.cjs +2 -2
- package/dist/index25.js +2 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index27.cjs +2 -2
- package/dist/index27.js +2 -2
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.cjs +6 -5
- package/dist/index29.cjs.map +1 -1
- package/dist/index29.js +6 -5
- package/dist/index29.js.map +1 -1
- package/dist/index30.cjs +10 -10
- package/dist/index30.js +10 -10
- package/dist/index31.cjs +4 -4
- package/dist/index31.js +4 -4
- package/dist/index32.cjs +3 -3
- package/dist/index32.js +3 -3
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.cjs +2 -2
- package/dist/index36.js +2 -2
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +1 -1
- package/dist/index38.cjs +2 -2
- package/dist/index38.js +2 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.cjs +3 -3
- package/dist/index45.js +3 -3
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +1 -1
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +1 -1
- package/dist/index50.cjs +2 -2
- package/dist/index50.js +2 -2
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.cjs +2 -2
- package/dist/index52.js +2 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.cjs +2 -2
- package/dist/index55.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index60.cjs +19 -64
- package/dist/index60.cjs.map +1 -1
- package/dist/index60.js +19 -64
- package/dist/index60.js.map +1 -1
- package/dist/index61.cjs +2 -11
- package/dist/index61.cjs.map +1 -1
- package/dist/index61.js +2 -11
- package/dist/index61.js.map +1 -1
- package/dist/index63.cjs +19 -34
- package/dist/index63.cjs.map +1 -1
- package/dist/index63.js +19 -34
- package/dist/index63.js.map +1 -1
- package/dist/index64.cjs +16 -16
- package/dist/index64.js +16 -16
- package/dist/index65.cjs +2 -11
- package/dist/index65.cjs.map +1 -1
- package/dist/index65.js +2 -11
- package/dist/index65.js.map +1 -1
- package/dist/index66.cjs +22 -16
- package/dist/index66.cjs.map +1 -1
- package/dist/index66.js +22 -16
- package/dist/index66.js.map +1 -1
- package/dist/index67.cjs +15 -21
- package/dist/index67.cjs.map +1 -1
- package/dist/index67.js +15 -21
- package/dist/index67.js.map +1 -1
- package/dist/index68.cjs +3 -36
- package/dist/index68.cjs.map +1 -1
- package/dist/index68.js +3 -36
- package/dist/index68.js.map +1 -1
- package/dist/index69.cjs +13 -37
- package/dist/index69.cjs.map +1 -1
- package/dist/index69.js +13 -37
- package/dist/index69.js.map +1 -1
- package/dist/index70.cjs +13 -49
- package/dist/index70.cjs.map +1 -1
- package/dist/index70.js +13 -49
- package/dist/index70.js.map +1 -1
- package/dist/index71.cjs +19 -19
- package/dist/index71.js +19 -19
- package/dist/index72.cjs +17 -2
- package/dist/index72.cjs.map +1 -1
- package/dist/index72.js +17 -2
- package/dist/index72.js.map +1 -1
- package/dist/index73.cjs +134 -10
- package/dist/index73.cjs.map +1 -1
- package/dist/index73.js +133 -9
- package/dist/index73.js.map +1 -1
- package/dist/index74.cjs +40 -16
- package/dist/index74.cjs.map +1 -1
- package/dist/index74.js +41 -17
- package/dist/index74.js.map +1 -1
- package/dist/index75.cjs +19 -10
- package/dist/index75.cjs.map +1 -1
- package/dist/index75.js +20 -11
- package/dist/index75.js.map +1 -1
- package/dist/index76.cjs +33 -46
- package/dist/index76.cjs.map +1 -1
- package/dist/index76.js +32 -45
- package/dist/index76.js.map +1 -1
- package/dist/index77.cjs +46 -51
- package/dist/index77.cjs.map +1 -1
- package/dist/index77.js +45 -50
- package/dist/index77.js.map +1 -1
- package/dist/index78.cjs +80 -2
- package/dist/index78.cjs.map +1 -1
- package/dist/index78.js +81 -3
- package/dist/index78.js.map +1 -1
- package/dist/index79.cjs +51 -17
- package/dist/index79.cjs.map +1 -1
- package/dist/index79.js +50 -16
- package/dist/index79.js.map +1 -1
- package/dist/index80.cjs +53 -2
- package/dist/index80.cjs.map +1 -1
- package/dist/index80.js +54 -3
- package/dist/index80.js.map +1 -1
- package/dist/index81.cjs +34 -19
- package/dist/index81.cjs.map +1 -1
- package/dist/index81.js +35 -20
- package/dist/index81.js.map +1 -1
- package/dist/index82.cjs +48 -40
- package/dist/index82.cjs.map +1 -1
- package/dist/index82.js +47 -39
- package/dist/index82.js.map +1 -1
- package/dist/index83.cjs +18 -19
- package/dist/index83.cjs.map +1 -1
- package/dist/index83.js +17 -18
- package/dist/index83.js.map +1 -1
- package/dist/index84.cjs +31 -52
- package/dist/index84.cjs.map +1 -1
- package/dist/index84.js +31 -52
- package/dist/index84.js.map +1 -1
- package/dist/index85.cjs +16 -134
- package/dist/index85.cjs.map +1 -1
- package/dist/index85.js +15 -133
- package/dist/index85.js.map +1 -1
- package/dist/index86.cjs +64 -40
- package/dist/index86.cjs.map +1 -1
- package/dist/index86.js +64 -40
- package/dist/index86.js.map +1 -1
- package/dist/index87.cjs +17 -84
- package/dist/index87.cjs.map +1 -1
- package/dist/index87.js +16 -83
- package/dist/index87.js.map +1 -1
- package/dist/index88.cjs +3 -15
- package/dist/index88.cjs.map +1 -1
- package/dist/index88.js +3 -15
- package/dist/index88.js.map +1 -1
- package/dist/index89.cjs +116 -34
- package/dist/index89.cjs.map +1 -1
- package/dist/index89.js +115 -33
- package/dist/index89.js.map +1 -1
- package/dist/index90.cjs +33 -15
- package/dist/index90.cjs.map +1 -1
- package/dist/index90.js +34 -16
- package/dist/index90.js.map +1 -1
- package/dist/index91.cjs +14 -11
- package/dist/index91.cjs.map +1 -1
- package/dist/index91.js +15 -12
- package/dist/index91.js.map +1 -1
- package/dist/index92.cjs +22 -33
- package/dist/index92.cjs.map +1 -1
- package/dist/index92.js +21 -32
- package/dist/index92.js.map +1 -1
- package/dist/index93.cjs +69 -21
- package/dist/index93.cjs.map +1 -1
- package/dist/index93.js +68 -20
- package/dist/index93.js.map +1 -1
- package/dist/index94.cjs +7 -115
- package/dist/index94.cjs.map +1 -1
- package/dist/index94.js +7 -115
- package/dist/index94.js.map +1 -1
- package/dist/index95.cjs +20 -23
- package/dist/index95.cjs.map +1 -1
- package/dist/index95.js +20 -23
- package/dist/index95.js.map +1 -1
- package/dist/index96.cjs +21 -39
- package/dist/index96.cjs.map +1 -1
- package/dist/index96.js +20 -38
- package/dist/index96.js.map +1 -1
- package/dist/index97.cjs +6 -92
- package/dist/index97.cjs.map +1 -1
- package/dist/index97.js +5 -91
- package/dist/index97.js.map +1 -1
- package/dist/index98.cjs +39 -39
- package/dist/index98.cjs.map +1 -1
- package/dist/index98.js +38 -38
- package/dist/index98.js.map +1 -1
- package/dist/index99.cjs +93 -10
- package/dist/index99.cjs.map +1 -1
- package/dist/index99.js +91 -8
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FilterDropdownProps } from './FilterDropdown.types';
|
|
2
2
|
|
|
3
3
|
export declare const FilterDropdown: {
|
|
4
|
-
({ label, mode, options, selected, onToggle, onClear, value, onChange, placeholder, clearLabel, className, }: FilterDropdownProps): import("react").JSX.Element;
|
|
4
|
+
({ label, mode, options, selected, onToggle, onClear, value, onChange, count, placeholder, clearLabel, className, }: FilterDropdownProps): import("react").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=FilterDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../src/composites/FilterDropdown/FilterDropdown.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,eAAO,MAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../src/composites/FilterDropdown/FilterDropdown.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,eAAO,MAAM,cAAc;yHAaxB,mBAAmB;;CAkIrB,CAAC"}
|
|
@@ -4,7 +4,7 @@ export interface FilterDropdownOption {
|
|
|
4
4
|
label: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export interface FilterDropdownProps {
|
|
7
|
-
/** Trigger label, e.g. "Zona". A
|
|
7
|
+
/** Trigger label, e.g. "Zona". A count badge follows it when there is a selection. */
|
|
8
8
|
label: string;
|
|
9
9
|
/** `multi` = toggleable chips; `text` = a single search input. */
|
|
10
10
|
mode: FilterDropdownMode;
|
|
@@ -20,6 +20,12 @@ export interface FilterDropdownProps {
|
|
|
20
20
|
value?: string;
|
|
21
21
|
/** Called with the new text in `text` mode. */
|
|
22
22
|
onChange?: (value: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Text mode only: the number the trigger badge shows, for a text that holds several
|
|
25
|
+
* values (e.g. a comma-separated list of codes). Defaults to 1 when `value` is set and 0
|
|
26
|
+
* otherwise. Ignored in `multi` mode.
|
|
27
|
+
*/
|
|
28
|
+
count?: number;
|
|
23
29
|
/** Placeholder for the `text` mode input. */
|
|
24
30
|
placeholder?: string;
|
|
25
31
|
/** Label for the "clear" action. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdown.types.d.ts","sourceRoot":"","sources":["../../../src/composites/FilterDropdown/FilterDropdown.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,
|
|
1
|
+
{"version":3,"file":"FilterDropdown.types.d.ts","sourceRoot":"","sources":["../../../src/composites/FilterDropdown/FilterDropdown.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,IAAI,EAAE,kBAAkB,CAAC;IACzB,gCAAgC;IAChC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;IAClC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/index10.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const clsx = require("./index59.cjs");
|
|
6
|
-
const Accordion_module = require("./
|
|
6
|
+
const Accordion_module = require("./index75.cjs");
|
|
7
7
|
const Accordion = react.forwardRef(
|
|
8
8
|
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx.clsx(Accordion_module.default.root, className), ...props, children })
|
|
9
9
|
);
|
package/dist/index10.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useId } from "react";
|
|
3
3
|
import { clsx } from "./index59.js";
|
|
4
|
-
import styles from "./
|
|
4
|
+
import styles from "./index75.js";
|
|
5
5
|
const Accordion = forwardRef(
|
|
6
6
|
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx(styles.root, className), ...props, children })
|
|
7
7
|
);
|
package/dist/index100.cjs
CHANGED
|
@@ -1,30 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const root = "krc-root-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
3
|
+
const root = "krc-root-pttoq";
|
|
4
|
+
const header = "krc-header-npqnm";
|
|
5
|
+
const title = "krc-title-Nho7q";
|
|
6
|
+
const headerActions = "krc-headerActions-ealva";
|
|
7
|
+
const toolbar = "krc-toolbar-JDGNF";
|
|
8
|
+
const warning = "krc-warning-zk0fc";
|
|
9
|
+
const chartContainer = "krc-chartContainer-9YPrR";
|
|
10
|
+
const loading = "krc-loading-kZWgE";
|
|
11
|
+
const empty = "krc-empty-JDNOq";
|
|
12
|
+
const error = "krc-error-IULEe";
|
|
13
|
+
const retryButton = "krc-retryButton-GvyS0";
|
|
14
|
+
const compact = "krc-compact-bzibR";
|
|
11
15
|
const styles = {
|
|
12
16
|
root,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
header,
|
|
18
|
+
title,
|
|
19
|
+
headerActions,
|
|
20
|
+
toolbar,
|
|
21
|
+
warning,
|
|
22
|
+
chartContainer,
|
|
23
|
+
loading,
|
|
24
|
+
empty,
|
|
25
|
+
error,
|
|
26
|
+
retryButton,
|
|
27
|
+
compact
|
|
20
28
|
};
|
|
21
|
-
exports.
|
|
29
|
+
exports.chartContainer = chartContainer;
|
|
30
|
+
exports.compact = compact;
|
|
22
31
|
exports.default = styles;
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
32
|
+
exports.empty = empty;
|
|
33
|
+
exports.error = error;
|
|
34
|
+
exports.header = header;
|
|
35
|
+
exports.headerActions = headerActions;
|
|
36
|
+
exports.loading = loading;
|
|
37
|
+
exports.retryButton = retryButton;
|
|
27
38
|
exports.root = root;
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
39
|
+
exports.title = title;
|
|
40
|
+
exports.toolbar = toolbar;
|
|
41
|
+
exports.warning = warning;
|
|
30
42
|
//# sourceMappingURL=index100.cjs.map
|
package/dist/index100.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index100.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index100.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index100.js
CHANGED
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
const root = "krc-root-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
1
|
+
const root = "krc-root-pttoq";
|
|
2
|
+
const header = "krc-header-npqnm";
|
|
3
|
+
const title = "krc-title-Nho7q";
|
|
4
|
+
const headerActions = "krc-headerActions-ealva";
|
|
5
|
+
const toolbar = "krc-toolbar-JDGNF";
|
|
6
|
+
const warning = "krc-warning-zk0fc";
|
|
7
|
+
const chartContainer = "krc-chartContainer-9YPrR";
|
|
8
|
+
const loading = "krc-loading-kZWgE";
|
|
9
|
+
const empty = "krc-empty-JDNOq";
|
|
10
|
+
const error = "krc-error-IULEe";
|
|
11
|
+
const retryButton = "krc-retryButton-GvyS0";
|
|
12
|
+
const compact = "krc-compact-bzibR";
|
|
9
13
|
const styles = {
|
|
10
14
|
root,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
header,
|
|
16
|
+
title,
|
|
17
|
+
headerActions,
|
|
18
|
+
toolbar,
|
|
19
|
+
warning,
|
|
20
|
+
chartContainer,
|
|
21
|
+
loading,
|
|
22
|
+
empty,
|
|
23
|
+
error,
|
|
24
|
+
retryButton,
|
|
25
|
+
compact
|
|
18
26
|
};
|
|
19
27
|
export {
|
|
20
|
-
|
|
28
|
+
chartContainer,
|
|
29
|
+
compact,
|
|
21
30
|
styles as default,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
empty,
|
|
32
|
+
error,
|
|
33
|
+
header,
|
|
34
|
+
headerActions,
|
|
35
|
+
loading,
|
|
36
|
+
retryButton,
|
|
26
37
|
root,
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
title,
|
|
39
|
+
toolbar,
|
|
40
|
+
warning
|
|
29
41
|
};
|
|
30
42
|
//# sourceMappingURL=index100.js.map
|
package/dist/index100.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index100.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index100.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index101.cjs
CHANGED
|
@@ -1,50 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
exports.
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const root = "krc-root-W2sel";
|
|
4
|
+
const tableContainer = "krc-tableContainer-Ed3uk";
|
|
5
|
+
const table = "krc-table-7p0H-";
|
|
6
|
+
const th = "krc-th-fNmfv";
|
|
7
|
+
const sortable = "krc-sortable-Ve0MQ";
|
|
8
|
+
const thContent = "krc-thContent-BRDIL";
|
|
9
|
+
const sortIndicator = "krc-sortIndicator-PtGYj";
|
|
10
|
+
const resizeHandle = "krc-resizeHandle--St-g";
|
|
11
|
+
const td = "krc-td-ZVsrU";
|
|
12
|
+
const row = "krc-row-JivMH";
|
|
13
|
+
const rowClickable = "krc-rowClickable-lTgQW";
|
|
14
|
+
const rowSelected = "krc-rowSelected-Sv0qs";
|
|
15
|
+
const skeletonRow = "krc-skeletonRow-uD1y7";
|
|
16
|
+
const skeleton = "krc-skeleton-eeYso";
|
|
17
|
+
const empty = "krc-empty-xKpKS";
|
|
18
|
+
const loadMore = "krc-loadMore-njxDN";
|
|
19
|
+
const loadMoreButton = "krc-loadMoreButton-C3Q-f";
|
|
20
|
+
const styles = {
|
|
21
|
+
root,
|
|
22
|
+
tableContainer,
|
|
23
|
+
table,
|
|
24
|
+
th,
|
|
25
|
+
sortable,
|
|
26
|
+
thContent,
|
|
27
|
+
sortIndicator,
|
|
28
|
+
resizeHandle,
|
|
29
|
+
td,
|
|
30
|
+
row,
|
|
31
|
+
rowClickable,
|
|
32
|
+
rowSelected,
|
|
33
|
+
skeletonRow,
|
|
34
|
+
skeleton,
|
|
35
|
+
empty,
|
|
36
|
+
loadMore,
|
|
37
|
+
loadMoreButton
|
|
38
|
+
};
|
|
39
|
+
exports.default = styles;
|
|
40
|
+
exports.empty = empty;
|
|
41
|
+
exports.loadMore = loadMore;
|
|
42
|
+
exports.loadMoreButton = loadMoreButton;
|
|
43
|
+
exports.resizeHandle = resizeHandle;
|
|
44
|
+
exports.root = root;
|
|
45
|
+
exports.row = row;
|
|
46
|
+
exports.rowClickable = rowClickable;
|
|
47
|
+
exports.rowSelected = rowSelected;
|
|
48
|
+
exports.skeleton = skeleton;
|
|
49
|
+
exports.skeletonRow = skeletonRow;
|
|
50
|
+
exports.sortIndicator = sortIndicator;
|
|
51
|
+
exports.sortable = sortable;
|
|
52
|
+
exports.table = table;
|
|
53
|
+
exports.tableContainer = tableContainer;
|
|
54
|
+
exports.td = td;
|
|
55
|
+
exports.th = th;
|
|
56
|
+
exports.thContent = thContent;
|
|
50
57
|
//# sourceMappingURL=index101.cjs.map
|
package/dist/index101.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index101.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"index101.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index101.js
CHANGED
|
@@ -1,50 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
title: entry == null ? void 0 : entry.title,
|
|
38
|
-
children: (entry == null ? void 0 : entry.label) ?? run.group
|
|
39
|
-
},
|
|
40
|
-
`group-${run.start}`
|
|
41
|
-
);
|
|
42
|
-
})
|
|
43
|
-
] }),
|
|
44
|
-
/* @__PURE__ */ jsx("tr", { children: groupedColumns.map((column) => /* @__PURE__ */ jsx(ColumnHeader, { column }, column.key)) })
|
|
45
|
-
] });
|
|
46
|
-
}
|
|
1
|
+
const root = "krc-root-W2sel";
|
|
2
|
+
const tableContainer = "krc-tableContainer-Ed3uk";
|
|
3
|
+
const table = "krc-table-7p0H-";
|
|
4
|
+
const th = "krc-th-fNmfv";
|
|
5
|
+
const sortable = "krc-sortable-Ve0MQ";
|
|
6
|
+
const thContent = "krc-thContent-BRDIL";
|
|
7
|
+
const sortIndicator = "krc-sortIndicator-PtGYj";
|
|
8
|
+
const resizeHandle = "krc-resizeHandle--St-g";
|
|
9
|
+
const td = "krc-td-ZVsrU";
|
|
10
|
+
const row = "krc-row-JivMH";
|
|
11
|
+
const rowClickable = "krc-rowClickable-lTgQW";
|
|
12
|
+
const rowSelected = "krc-rowSelected-Sv0qs";
|
|
13
|
+
const skeletonRow = "krc-skeletonRow-uD1y7";
|
|
14
|
+
const skeleton = "krc-skeleton-eeYso";
|
|
15
|
+
const empty = "krc-empty-xKpKS";
|
|
16
|
+
const loadMore = "krc-loadMore-njxDN";
|
|
17
|
+
const loadMoreButton = "krc-loadMoreButton-C3Q-f";
|
|
18
|
+
const styles = {
|
|
19
|
+
root,
|
|
20
|
+
tableContainer,
|
|
21
|
+
table,
|
|
22
|
+
th,
|
|
23
|
+
sortable,
|
|
24
|
+
thContent,
|
|
25
|
+
sortIndicator,
|
|
26
|
+
resizeHandle,
|
|
27
|
+
td,
|
|
28
|
+
row,
|
|
29
|
+
rowClickable,
|
|
30
|
+
rowSelected,
|
|
31
|
+
skeletonRow,
|
|
32
|
+
skeleton,
|
|
33
|
+
empty,
|
|
34
|
+
loadMore,
|
|
35
|
+
loadMoreButton
|
|
36
|
+
};
|
|
47
37
|
export {
|
|
48
|
-
|
|
38
|
+
styles as default,
|
|
39
|
+
empty,
|
|
40
|
+
loadMore,
|
|
41
|
+
loadMoreButton,
|
|
42
|
+
resizeHandle,
|
|
43
|
+
root,
|
|
44
|
+
row,
|
|
45
|
+
rowClickable,
|
|
46
|
+
rowSelected,
|
|
47
|
+
skeleton,
|
|
48
|
+
skeletonRow,
|
|
49
|
+
sortIndicator,
|
|
50
|
+
sortable,
|
|
51
|
+
table,
|
|
52
|
+
tableContainer,
|
|
53
|
+
td,
|
|
54
|
+
th,
|
|
55
|
+
thContent
|
|
49
56
|
};
|
|
50
57
|
//# sourceMappingURL=index101.js.map
|
package/dist/index101.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index101.js","sources":[
|
|
1
|
+
{"version":3,"file":"index101.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index102.cjs
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
const MAX_LATITUDE = 90;
|
|
4
|
+
const MAX_LONGITUDE = 180;
|
|
5
|
+
const hasUsableCoordinates = (point) => Number.isFinite(point.latitude) && Number.isFinite(point.longitude) && Math.abs(point.latitude) <= MAX_LATITUDE && Math.abs(point.longitude) <= MAX_LONGITUDE;
|
|
6
|
+
const sample = (points, cap) => {
|
|
7
|
+
if (cap <= 1) return points.slice(0, Math.max(cap, 0));
|
|
8
|
+
const step = (points.length - 1) / (cap - 1);
|
|
9
|
+
return Array.from({ length: cap }, (_, i) => points[Math.round(i * step)]);
|
|
10
|
+
};
|
|
11
|
+
const boundsOf = (points) => {
|
|
12
|
+
if (points.length === 0) return null;
|
|
13
|
+
const latitudes = points.map((p) => p.point.latitude);
|
|
14
|
+
const longitudes = points.map((p) => p.point.longitude);
|
|
15
|
+
return [
|
|
16
|
+
[Math.min(...latitudes), Math.min(...longitudes)],
|
|
17
|
+
[Math.max(...latitudes), Math.max(...longitudes)]
|
|
18
|
+
];
|
|
19
|
+
};
|
|
20
|
+
const normalizePoints = (points, maxPoints) => {
|
|
21
|
+
const usable = [];
|
|
22
|
+
points.forEach((point, sourceIndex) => {
|
|
23
|
+
if (hasUsableCoordinates(point)) usable.push({ point, sourceIndex });
|
|
12
24
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
const drawn = usable.length > maxPoints ? sample(usable, maxPoints) : usable;
|
|
26
|
+
return {
|
|
27
|
+
drawn,
|
|
28
|
+
bounds: boundsOf(drawn),
|
|
29
|
+
info: {
|
|
30
|
+
total: points.length,
|
|
31
|
+
drawn: drawn.length,
|
|
32
|
+
skipped: points.length - usable.length,
|
|
33
|
+
dropped: usable.length - drawn.length
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
exports.normalizePoints = normalizePoints;
|
|
20
38
|
//# sourceMappingURL=index102.cjs.map
|
package/dist/index102.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index102.cjs","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index102.cjs","sources":["../src/geo/GeoMapCard/normalizePoints.ts"],"sourcesContent":["import type { GeoPoint, GeoRenderInfo } from '../../types/geo.types';\n\n/** A point that survived validation, paired with where it came from. */\nexport interface DrawnPoint {\n point: GeoPoint;\n /** Index in the original `points` array, not in the normalised one. */\n sourceIndex: number;\n}\n\n/** South-west and north-east corners, in Leaflet's `[lat, lng]` order. */\nexport type GeoBounds = [[number, number], [number, number]];\n\nexport interface NormalizeResult {\n drawn: DrawnPoint[];\n bounds: GeoBounds | null;\n info: GeoRenderInfo;\n}\n\nconst MAX_LATITUDE = 90;\nconst MAX_LONGITUDE = 180;\n\n/**\n * Garbage coordinates are the norm in network inventories, not the exception:\n * nulls, empty strings coerced to NaN and swapped lat/lng all show up.\n */\nconst hasUsableCoordinates = (point: GeoPoint): boolean =>\n Number.isFinite(point.latitude) &&\n Number.isFinite(point.longitude) &&\n Math.abs(point.latitude) <= MAX_LATITUDE &&\n Math.abs(point.longitude) <= MAX_LONGITUDE;\n\n/**\n * Evenly spread `cap` markers across `points`, always keeping the first and last.\n * Deterministic on purpose: the same data must always draw the same map.\n */\nconst sample = (points: DrawnPoint[], cap: number): DrawnPoint[] => {\n if (cap <= 1) return points.slice(0, Math.max(cap, 0));\n\n const step = (points.length - 1) / (cap - 1);\n\n return Array.from({ length: cap }, (_, i) => points[Math.round(i * step)]);\n};\n\nconst boundsOf = (points: DrawnPoint[]): GeoBounds | null => {\n if (points.length === 0) return null;\n\n const latitudes = points.map((p) => p.point.latitude);\n const longitudes = points.map((p) => p.point.longitude);\n\n return [\n [Math.min(...latitudes), Math.min(...longitudes)],\n [Math.max(...latitudes), Math.max(...longitudes)],\n ];\n};\n\n/**\n * Drop the unplottable points, cap the marker count, then report what happened.\n *\n * Coincident points are *not* folded the way the scatter chart folds them: on a\n * map two cells at the same site are two cells, and zooming already separates\n * them.\n *\n * The reported counts satisfy `total === drawn + skipped + dropped`.\n */\nexport const normalizePoints = (points: GeoPoint[], maxPoints: number): NormalizeResult => {\n const usable: DrawnPoint[] = [];\n\n points.forEach((point, sourceIndex) => {\n if (hasUsableCoordinates(point)) usable.push({ point, sourceIndex });\n });\n\n const drawn = usable.length > maxPoints ? sample(usable, maxPoints) : usable;\n\n return {\n drawn,\n bounds: boundsOf(drawn),\n info: {\n total: points.length,\n drawn: drawn.length,\n skipped: points.length - usable.length,\n dropped: usable.length - drawn.length,\n },\n };\n};\n"],"names":[],"mappings":";;AAkBA,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAMtB,MAAM,uBAAuB,CAAC,UAC5B,OAAO,SAAS,MAAM,QAAQ,KAC9B,OAAO,SAAS,MAAM,SAAS,KAC/B,KAAK,IAAI,MAAM,QAAQ,KAAK,gBAC5B,KAAK,IAAI,MAAM,SAAS,KAAK;AAM/B,MAAM,SAAS,CAAC,QAAsB,QAA8B;AAClE,MAAI,OAAO,EAAG,QAAO,OAAO,MAAM,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC;AAErD,QAAM,QAAQ,OAAO,SAAS,MAAM,MAAM;AAE1C,SAAO,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC,GAAG,MAAM,OAAO,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC;AAC3E;AAEA,MAAM,WAAW,CAAC,WAA2C;AAC3D,MAAI,OAAO,WAAW,EAAG,QAAO;AAEhC,QAAM,YAAY,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,QAAQ;AACpD,QAAM,aAAa,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,SAAS;AAEtD,SAAO;AAAA,IACL,CAAC,KAAK,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,GAAG,UAAU,CAAC;AAAA,IAChD,CAAC,KAAK,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,GAAG,UAAU,CAAC;AAAA,EAAA;AAEpD;AAWO,MAAM,kBAAkB,CAAC,QAAoB,cAAuC;AACzF,QAAM,SAAuB,CAAA;AAE7B,SAAO,QAAQ,CAAC,OAAO,gBAAgB;AACrC,QAAI,qBAAqB,KAAK,EAAG,QAAO,KAAK,EAAE,OAAO,aAAa;AAAA,EACrE,CAAC;AAED,QAAM,QAAQ,OAAO,SAAS,YAAY,OAAO,QAAQ,SAAS,IAAI;AAEtE,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,SAAS,KAAK;AAAA,IACtB,MAAM;AAAA,MACJ,OAAO,OAAO;AAAA,MACd,OAAO,MAAM;AAAA,MACb,SAAS,OAAO,SAAS,OAAO;AAAA,MAChC,SAAS,OAAO,SAAS,MAAM;AAAA,IAAA;AAAA,EACjC;AAEJ;;"}
|
package/dist/index102.js
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const MAX_LATITUDE = 90;
|
|
2
|
+
const MAX_LONGITUDE = 180;
|
|
3
|
+
const hasUsableCoordinates = (point) => Number.isFinite(point.latitude) && Number.isFinite(point.longitude) && Math.abs(point.latitude) <= MAX_LATITUDE && Math.abs(point.longitude) <= MAX_LONGITUDE;
|
|
4
|
+
const sample = (points, cap) => {
|
|
5
|
+
if (cap <= 1) return points.slice(0, Math.max(cap, 0));
|
|
6
|
+
const step = (points.length - 1) / (cap - 1);
|
|
7
|
+
return Array.from({ length: cap }, (_, i) => points[Math.round(i * step)]);
|
|
8
|
+
};
|
|
9
|
+
const boundsOf = (points) => {
|
|
10
|
+
if (points.length === 0) return null;
|
|
11
|
+
const latitudes = points.map((p) => p.point.latitude);
|
|
12
|
+
const longitudes = points.map((p) => p.point.longitude);
|
|
13
|
+
return [
|
|
14
|
+
[Math.min(...latitudes), Math.min(...longitudes)],
|
|
15
|
+
[Math.max(...latitudes), Math.max(...longitudes)]
|
|
16
|
+
];
|
|
17
|
+
};
|
|
18
|
+
const normalizePoints = (points, maxPoints) => {
|
|
19
|
+
const usable = [];
|
|
20
|
+
points.forEach((point, sourceIndex) => {
|
|
21
|
+
if (hasUsableCoordinates(point)) usable.push({ point, sourceIndex });
|
|
10
22
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
const drawn = usable.length > maxPoints ? sample(usable, maxPoints) : usable;
|
|
24
|
+
return {
|
|
25
|
+
drawn,
|
|
26
|
+
bounds: boundsOf(drawn),
|
|
27
|
+
info: {
|
|
28
|
+
total: points.length,
|
|
29
|
+
drawn: drawn.length,
|
|
30
|
+
skipped: points.length - usable.length,
|
|
31
|
+
dropped: usable.length - drawn.length
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
16
35
|
export {
|
|
17
|
-
|
|
18
|
-
hasColumnGroups
|
|
36
|
+
normalizePoints
|
|
19
37
|
};
|
|
20
38
|
//# sourceMappingURL=index102.js.map
|
package/dist/index102.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index102.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index102.js","sources":["../src/geo/GeoMapCard/normalizePoints.ts"],"sourcesContent":["import type { GeoPoint, GeoRenderInfo } from '../../types/geo.types';\n\n/** A point that survived validation, paired with where it came from. */\nexport interface DrawnPoint {\n point: GeoPoint;\n /** Index in the original `points` array, not in the normalised one. */\n sourceIndex: number;\n}\n\n/** South-west and north-east corners, in Leaflet's `[lat, lng]` order. */\nexport type GeoBounds = [[number, number], [number, number]];\n\nexport interface NormalizeResult {\n drawn: DrawnPoint[];\n bounds: GeoBounds | null;\n info: GeoRenderInfo;\n}\n\nconst MAX_LATITUDE = 90;\nconst MAX_LONGITUDE = 180;\n\n/**\n * Garbage coordinates are the norm in network inventories, not the exception:\n * nulls, empty strings coerced to NaN and swapped lat/lng all show up.\n */\nconst hasUsableCoordinates = (point: GeoPoint): boolean =>\n Number.isFinite(point.latitude) &&\n Number.isFinite(point.longitude) &&\n Math.abs(point.latitude) <= MAX_LATITUDE &&\n Math.abs(point.longitude) <= MAX_LONGITUDE;\n\n/**\n * Evenly spread `cap` markers across `points`, always keeping the first and last.\n * Deterministic on purpose: the same data must always draw the same map.\n */\nconst sample = (points: DrawnPoint[], cap: number): DrawnPoint[] => {\n if (cap <= 1) return points.slice(0, Math.max(cap, 0));\n\n const step = (points.length - 1) / (cap - 1);\n\n return Array.from({ length: cap }, (_, i) => points[Math.round(i * step)]);\n};\n\nconst boundsOf = (points: DrawnPoint[]): GeoBounds | null => {\n if (points.length === 0) return null;\n\n const latitudes = points.map((p) => p.point.latitude);\n const longitudes = points.map((p) => p.point.longitude);\n\n return [\n [Math.min(...latitudes), Math.min(...longitudes)],\n [Math.max(...latitudes), Math.max(...longitudes)],\n ];\n};\n\n/**\n * Drop the unplottable points, cap the marker count, then report what happened.\n *\n * Coincident points are *not* folded the way the scatter chart folds them: on a\n * map two cells at the same site are two cells, and zooming already separates\n * them.\n *\n * The reported counts satisfy `total === drawn + skipped + dropped`.\n */\nexport const normalizePoints = (points: GeoPoint[], maxPoints: number): NormalizeResult => {\n const usable: DrawnPoint[] = [];\n\n points.forEach((point, sourceIndex) => {\n if (hasUsableCoordinates(point)) usable.push({ point, sourceIndex });\n });\n\n const drawn = usable.length > maxPoints ? sample(usable, maxPoints) : usable;\n\n return {\n drawn,\n bounds: boundsOf(drawn),\n info: {\n total: points.length,\n drawn: drawn.length,\n skipped: points.length - usable.length,\n dropped: usable.length - drawn.length,\n },\n };\n};\n"],"names":[],"mappings":"AAkBA,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAMtB,MAAM,uBAAuB,CAAC,UAC5B,OAAO,SAAS,MAAM,QAAQ,KAC9B,OAAO,SAAS,MAAM,SAAS,KAC/B,KAAK,IAAI,MAAM,QAAQ,KAAK,gBAC5B,KAAK,IAAI,MAAM,SAAS,KAAK;AAM/B,MAAM,SAAS,CAAC,QAAsB,QAA8B;AAClE,MAAI,OAAO,EAAG,QAAO,OAAO,MAAM,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC;AAErD,QAAM,QAAQ,OAAO,SAAS,MAAM,MAAM;AAE1C,SAAO,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC,GAAG,MAAM,OAAO,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC;AAC3E;AAEA,MAAM,WAAW,CAAC,WAA2C;AAC3D,MAAI,OAAO,WAAW,EAAG,QAAO;AAEhC,QAAM,YAAY,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,QAAQ;AACpD,QAAM,aAAa,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,SAAS;AAEtD,SAAO;AAAA,IACL,CAAC,KAAK,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,GAAG,UAAU,CAAC;AAAA,IAChD,CAAC,KAAK,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,GAAG,UAAU,CAAC;AAAA,EAAA;AAEpD;AAWO,MAAM,kBAAkB,CAAC,QAAoB,cAAuC;AACzF,QAAM,SAAuB,CAAA;AAE7B,SAAO,QAAQ,CAAC,OAAO,gBAAgB;AACrC,QAAI,qBAAqB,KAAK,EAAG,QAAO,KAAK,EAAE,OAAO,aAAa;AAAA,EACrE,CAAC;AAED,QAAM,QAAQ,OAAO,SAAS,YAAY,OAAO,QAAQ,SAAS,IAAI;AAEtE,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,SAAS,KAAK;AAAA,IACtB,MAAM;AAAA,MACJ,OAAO,OAAO;AAAA,MACd,OAAO,MAAM;AAAA,MACb,SAAS,OAAO,SAAS,OAAO;AAAA,MAChC,SAAS,OAAO,SAAS,MAAM;AAAA,IAAA;AAAA,EACjC;AAEJ;"}
|