@osdk/react-components 0.41.0 → 0.42.0-main-ecfcf3d26dbf2ca0124cc59848ff773e87f339c4
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/CHANGELOG.md +6 -0
- package/build/browser/cbac-picker/CbacBanner.js +6 -3
- package/build/browser/cbac-picker/CbacBanner.js.map +1 -1
- package/build/browser/cbac-picker/base/BaseCbacBanner.js +18 -1
- package/build/browser/cbac-picker/base/BaseCbacBanner.js.map +1 -1
- package/build/browser/cbac-picker/base/BaseCbacBanner.module.css +6 -0
- package/build/browser/cbac-picker/base/BaseCbacBanner.module.css.js +1 -0
- package/build/browser/styles.css +10 -0
- package/build/browser/tokens/component-tokens/cbac-picker.css +4 -0
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-3OWSHPWL.cjs → chunk-2F55VJ75.cjs} +4 -4
- package/build/cjs/{chunk-3OWSHPWL.cjs.map → chunk-2F55VJ75.cjs.map} +1 -1
- package/build/cjs/chunk-2KEOGT7E.cjs +11 -0
- package/build/cjs/{chunk-XGOBDPLC.cjs.map → chunk-2KEOGT7E.cjs.map} +1 -1
- package/build/cjs/{chunk-V53JNAEC.cjs → chunk-5ZJIJ2KU.cjs} +4 -4
- package/build/cjs/{chunk-V53JNAEC.cjs.map → chunk-5ZJIJ2KU.cjs.map} +1 -1
- package/build/cjs/chunk-72BR4CWL.cjs +11 -0
- package/build/cjs/{chunk-P7EZ2DQ2.cjs.map → chunk-72BR4CWL.cjs.map} +1 -1
- package/build/cjs/{chunk-LWVPWBMP.cjs → chunk-7H3YLRWV.cjs} +4 -4
- package/build/cjs/{chunk-LWVPWBMP.cjs.map → chunk-7H3YLRWV.cjs.map} +1 -1
- package/build/cjs/chunk-AAI637QW.cjs +11 -0
- package/build/cjs/{chunk-FKOFZSZD.cjs.map → chunk-AAI637QW.cjs.map} +1 -1
- package/build/cjs/{chunk-ZMAWPOG5.cjs → chunk-AMIL4453.cjs} +26 -8
- package/build/cjs/chunk-AMIL4453.cjs.map +1 -0
- package/build/cjs/chunk-DOCAILZS.cjs +11 -0
- package/build/cjs/{chunk-XXPWKSVT.cjs.map → chunk-DOCAILZS.cjs.map} +1 -1
- package/build/cjs/{chunk-MSI7HILM.cjs → chunk-EPGQKD2W.cjs} +7 -7
- package/build/cjs/{chunk-MSI7HILM.cjs.map → chunk-EPGQKD2W.cjs.map} +1 -1
- package/build/cjs/chunk-FSZ55W6N.cjs +11 -0
- package/build/cjs/{chunk-TPJZ6QL2.cjs.map → chunk-FSZ55W6N.cjs.map} +1 -1
- package/build/cjs/{chunk-AJTZWKW2.cjs → chunk-MOOLZJVZ.cjs} +22 -22
- package/build/cjs/{chunk-AJTZWKW2.cjs.map → chunk-MOOLZJVZ.cjs.map} +1 -1
- package/build/cjs/{chunk-OWBDRWL6.cjs → chunk-OWJ273YN.cjs} +3 -3
- package/build/cjs/chunk-OWJ273YN.cjs.map +1 -0
- package/build/cjs/{chunk-4FCWR6OW.cjs → chunk-PMXCM5IU.cjs} +4 -4
- package/build/cjs/{chunk-4FCWR6OW.cjs.map → chunk-PMXCM5IU.cjs.map} +1 -1
- package/build/cjs/{chunk-2PZPTWXN.cjs → chunk-U4LEIAUA.cjs} +4 -4
- package/build/cjs/{chunk-2PZPTWXN.cjs.map → chunk-U4LEIAUA.cjs.map} +1 -1
- package/build/cjs/{chunk-GLBBDB6P.cjs → chunk-VRX3IDUJ.cjs} +4 -4
- package/build/cjs/{chunk-GLBBDB6P.cjs.map → chunk-VRX3IDUJ.cjs.map} +1 -1
- package/build/cjs/public/experimental/action-form.cjs +4 -4
- package/build/cjs/public/experimental/cbac-picker.cjs +14 -14
- package/build/cjs/public/experimental/cbac-picker.css +27 -22
- package/build/cjs/public/experimental/cbac-picker.css.map +1 -1
- package/build/cjs/public/experimental/cbac-picker.d.cts +4 -2
- package/build/cjs/public/experimental/document-viewer.cjs +4 -4
- package/build/cjs/public/experimental/email-viewer.cjs +3 -3
- package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
- package/build/cjs/public/experimental/filter-list.cjs +15 -15
- package/build/cjs/public/experimental/image-viewer.cjs +3 -3
- package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
- package/build/cjs/public/experimental/object-table.cjs +22 -22
- package/build/cjs/public/experimental/object-table.css +5 -0
- package/build/cjs/public/experimental/object-table.css.map +1 -1
- package/build/cjs/public/experimental/pdf-viewer.cjs +7 -7
- package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
- package/build/cjs/public/experimental/video-viewer.cjs +3 -3
- package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
- package/build/cjs/public/experimental.cjs +74 -74
- package/build/cjs/public/experimental.css +5 -0
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/esm/cbac-picker/CbacBanner.js +6 -3
- package/build/esm/cbac-picker/CbacBanner.js.map +1 -1
- package/build/esm/cbac-picker/base/BaseCbacBanner.js +18 -1
- package/build/esm/cbac-picker/base/BaseCbacBanner.js.map +1 -1
- package/build/esm/cbac-picker/base/BaseCbacBanner.module.css +6 -0
- package/build/esm/tokens/component-tokens/cbac-picker.css +4 -0
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/cbac-picker/CbacBanner.d.ts +2 -1
- package/build/types/cbac-picker/CbacBanner.d.ts.map +1 -1
- package/build/types/cbac-picker/base/BaseCbacBanner.d.ts +2 -1
- package/build/types/cbac-picker/base/BaseCbacBanner.d.ts.map +1 -1
- package/docs/CSSVariables.md +11 -10
- package/docs/CbacPicker.md +13 -0
- package/package.json +5 -5
- package/build/cjs/chunk-FKOFZSZD.cjs +0 -11
- package/build/cjs/chunk-OWBDRWL6.cjs.map +0 -1
- package/build/cjs/chunk-P7EZ2DQ2.cjs +0 -11
- package/build/cjs/chunk-TPJZ6QL2.cjs +0 -11
- package/build/cjs/chunk-XGOBDPLC.cjs +0 -11
- package/build/cjs/chunk-XXPWKSVT.cjs +0 -11
- package/build/cjs/chunk-ZMAWPOG5.cjs.map +0 -1
|
@@ -22,10 +22,12 @@ export function CbacBanner({
|
|
|
22
22
|
markingIds,
|
|
23
23
|
onClick,
|
|
24
24
|
onDismiss,
|
|
25
|
-
className
|
|
25
|
+
className,
|
|
26
|
+
isLoading = false
|
|
26
27
|
}) {
|
|
27
28
|
const {
|
|
28
|
-
banner
|
|
29
|
+
banner,
|
|
30
|
+
isLoading: isFetchingCbacMarkings
|
|
29
31
|
} = useCbacBanner({
|
|
30
32
|
markingIds
|
|
31
33
|
});
|
|
@@ -36,7 +38,8 @@ export function CbacBanner({
|
|
|
36
38
|
backgroundColors: resolved.backgroundColors,
|
|
37
39
|
onClick: onClick,
|
|
38
40
|
onDismiss: onDismiss,
|
|
39
|
-
className: className
|
|
41
|
+
className: className,
|
|
42
|
+
isLoading: isFetchingCbacMarkings || isLoading
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
45
|
//# sourceMappingURL=CbacBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CbacBanner.js","names":["useCbacBanner","React","BaseCbacBanner","resolveBannerDisplay","CbacBanner","markingIds","onClick","onDismiss","className","banner","resolved","createElement","classificationString","textColor","backgroundColors"],"sources":["CbacBanner.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useCbacBanner } from \"@osdk/react/platform-apis\";\nimport React from \"react\";\n\nimport { BaseCbacBanner } from \"./base/BaseCbacBanner.js\";\nimport { resolveBannerDisplay } from \"./utils/cbacPickerUtils.js\";\n\nexport interface CbacBannerProps {\n markingIds: string[];\n onClick?: () => void;\n onDismiss?: () => void;\n className?: string;\n}\n\nexport function CbacBanner({\n markingIds,\n onClick,\n onDismiss,\n className,\n}: CbacBannerProps): React.ReactElement {\n const { banner } = useCbacBanner({
|
|
1
|
+
{"version":3,"file":"CbacBanner.js","names":["useCbacBanner","React","BaseCbacBanner","resolveBannerDisplay","CbacBanner","markingIds","onClick","onDismiss","className","isLoading","banner","isFetchingCbacMarkings","resolved","createElement","classificationString","textColor","backgroundColors"],"sources":["CbacBanner.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useCbacBanner } from \"@osdk/react/platform-apis\";\nimport React from \"react\";\n\nimport { BaseCbacBanner } from \"./base/BaseCbacBanner.js\";\nimport { resolveBannerDisplay } from \"./utils/cbacPickerUtils.js\";\n\nexport interface CbacBannerProps {\n markingIds: string[];\n onClick?: () => void;\n onDismiss?: () => void;\n className?: string;\n isLoading?: boolean;\n}\n\nexport function CbacBanner({\n markingIds,\n onClick,\n onDismiss,\n className,\n isLoading = false,\n}: CbacBannerProps): React.ReactElement {\n const { banner, isLoading: isFetchingCbacMarkings } = useCbacBanner({\n markingIds,\n });\n const resolved = resolveBannerDisplay(banner);\n\n return (\n <BaseCbacBanner\n classificationString={resolved.classificationString}\n textColor={resolved.textColor}\n backgroundColors={resolved.backgroundColors}\n onClick={onClick}\n onDismiss={onDismiss}\n className={className}\n isLoading={isFetchingCbacMarkings || isLoading}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,2BAA2B;AACzD,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,oBAAoB,QAAQ,4BAA4B;AAUjE,OAAO,SAASC,UAAUA,CAAC;EACzBC,UAAU;EACVC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,SAAS,GAAG;AACG,CAAC,EAAsB;EACtC,MAAM;IAAEC,MAAM;IAAED,SAAS,EAAEE;EAAuB,CAAC,GAAGX,aAAa,CAAC;IAClEK;EACF,CAAC,CAAC;EACF,MAAMO,QAAQ,GAAGT,oBAAoB,CAACO,MAAM,CAAC;EAE7C,oBACET,KAAA,CAAAY,aAAA,CAACX,cAAc;IACbY,oBAAoB,EAAEF,QAAQ,CAACE,oBAAqB;IACpDC,SAAS,EAAEH,QAAQ,CAACG,SAAU;IAC9BC,gBAAgB,EAAEJ,QAAQ,CAACI,gBAAiB;IAC5CV,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEE,sBAAsB,IAAIF;EAAU,CAChD,CAAC;AAEN","ignoreList":[]}
|
|
@@ -18,6 +18,7 @@ import { Button } from "@base-ui/react/button";
|
|
|
18
18
|
import { Cross } from "@blueprintjs/icons";
|
|
19
19
|
import classnames from "classnames";
|
|
20
20
|
import React from "react";
|
|
21
|
+
import { SkeletonBar } from "../../base-components/skeleton/SkeletonBar.js";
|
|
21
22
|
import { backgroundFromColors } from "../utils/cbacPickerUtils.js";
|
|
22
23
|
import styles from "./BaseCbacBanner.module.css";
|
|
23
24
|
export function BaseCbacBanner({
|
|
@@ -26,7 +27,8 @@ export function BaseCbacBanner({
|
|
|
26
27
|
backgroundColors,
|
|
27
28
|
onClick,
|
|
28
29
|
onDismiss,
|
|
29
|
-
className
|
|
30
|
+
className,
|
|
31
|
+
isLoading = false
|
|
30
32
|
}) {
|
|
31
33
|
const bannerStyle = React.useMemo(() => ({
|
|
32
34
|
"--osdk-cbac-banner-bg": backgroundFromColors(backgroundColors),
|
|
@@ -36,6 +38,11 @@ export function BaseCbacBanner({
|
|
|
36
38
|
e.stopPropagation();
|
|
37
39
|
onDismiss?.();
|
|
38
40
|
}, [onDismiss]);
|
|
41
|
+
if (isLoading) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(BannerSkeleton, {
|
|
43
|
+
className: className
|
|
44
|
+
});
|
|
45
|
+
}
|
|
39
46
|
const dismissButton = onDismiss != null ? /*#__PURE__*/React.createElement(Button, {
|
|
40
47
|
className: styles.dismissButton,
|
|
41
48
|
onClick: handleDismiss,
|
|
@@ -61,4 +68,14 @@ export function BaseCbacBanner({
|
|
|
61
68
|
className: styles.banner
|
|
62
69
|
}, classificationString), dismissButton);
|
|
63
70
|
}
|
|
71
|
+
function BannerSkeleton({
|
|
72
|
+
className
|
|
73
|
+
}) {
|
|
74
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: classnames(styles.bannerRow, className),
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
}, /*#__PURE__*/React.createElement(SkeletonBar, {
|
|
78
|
+
className: styles.skeletonBanner
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
64
81
|
//# sourceMappingURL=BaseCbacBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCbacBanner.js","names":["Button","Cross","classnames","React","backgroundFromColors","styles","BaseCbacBanner","classificationString","textColor","backgroundColors","onClick","onDismiss","className","bannerStyle","useMemo","handleDismiss","useCallback","e","stopPropagation","
|
|
1
|
+
{"version":3,"file":"BaseCbacBanner.js","names":["Button","Cross","classnames","React","SkeletonBar","backgroundFromColors","styles","BaseCbacBanner","classificationString","textColor","backgroundColors","onClick","onDismiss","className","isLoading","bannerStyle","useMemo","handleDismiss","useCallback","e","stopPropagation","createElement","BannerSkeleton","dismissButton","size","color","bannerRow","style","banner","clickable","skeletonBanner"],"sources":["BaseCbacBanner.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button } from \"@base-ui/react/button\";\nimport { Cross } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\n\nimport { SkeletonBar } from \"../../base-components/skeleton/SkeletonBar.js\";\nimport { backgroundFromColors } from \"../utils/cbacPickerUtils.js\";\n\nimport styles from \"./BaseCbacBanner.module.css\";\n\nexport interface BaseCbacBannerProps {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n onClick?: () => void;\n onDismiss?: () => void;\n className?: string;\n isLoading?: boolean;\n}\n\nexport function BaseCbacBanner({\n classificationString,\n textColor,\n backgroundColors,\n onClick,\n onDismiss,\n className,\n isLoading = false,\n}: BaseCbacBannerProps): React.ReactElement {\n const bannerStyle = React.useMemo(\n (): React.CSSProperties =>\n ({\n \"--osdk-cbac-banner-bg\": backgroundFromColors(backgroundColors),\n \"--osdk-cbac-banner-color\": textColor,\n }) as React.CSSProperties,\n [textColor, backgroundColors]\n );\n\n const handleDismiss = React.useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n },\n [onDismiss]\n );\n\n if (isLoading) {\n return <BannerSkeleton className={className} />;\n }\n\n const dismissButton =\n onDismiss != null ? (\n <Button\n className={styles.dismissButton}\n onClick={handleDismiss}\n aria-label=\"Clear classification\"\n >\n <Cross size={12} color=\"currentColor\" />\n </Button>\n ) : null;\n\n if (onClick != null) {\n return (\n <div\n className={classnames(styles.bannerRow, className)}\n style={bannerStyle}\n >\n <Button\n className={classnames(styles.banner, styles.clickable)}\n onClick={onClick}\n aria-label=\"Edit classification\"\n >\n {classificationString}\n </Button>\n {dismissButton}\n </div>\n );\n }\n\n return (\n <div\n className={classnames(styles.bannerRow, className)}\n style={bannerStyle}\n >\n <span className={styles.banner}>{classificationString}</span>\n {dismissButton}\n </div>\n );\n}\n\nfunction BannerSkeleton({\n className,\n}: {\n className?: string;\n}): React.ReactElement {\n return (\n <div className={classnames(styles.bannerRow, className)} aria-hidden=\"true\">\n <SkeletonBar className={styles.skeletonBanner} />\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,WAAW,QAAQ,+CAA+C;AAC3E,SAASC,oBAAoB,QAAQ,6BAA6B;AAElE,OAAOC,MAAM,MAAM,6BAA6B;AAYhD,OAAO,SAASC,cAAcA,CAAC;EAC7BC,oBAAoB;EACpBC,SAAS;EACTC,gBAAgB;EAChBC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,SAAS,GAAG;AACO,CAAC,EAAsB;EAC1C,MAAMC,WAAW,GAAGZ,KAAK,CAACa,OAAO,CAC/B,OACG;IACC,uBAAuB,EAAEX,oBAAoB,CAACK,gBAAgB,CAAC;IAC/D,0BAA0B,EAAED;EAC9B,CAAC,CAAwB,EAC3B,CAACA,SAAS,EAAEC,gBAAgB,CAC9B,CAAC;EAED,MAAMO,aAAa,GAAGd,KAAK,CAACe,WAAW,CACpCC,CAAmB,IAAK;IACvBA,CAAC,CAACC,eAAe,CAAC,CAAC;IACnBR,SAAS,GAAG,CAAC;EACf,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AAC,eAAY;EAAM,gBACzEV,KAAA,CAAAkB,aAAA,CAACjB,WAAW;IAACS,SAAS,EAAEP,MAAM,CAACwB;EAAe,CAAE,CAC7C,CAAC;AAEV","ignoreList":[]}
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
--osdk-cbac-banner-placeholder-color: var(
|
|
29
29
|
--osdk-typography-color-default-rest
|
|
30
30
|
);
|
|
31
|
+
/* Line height of the banner text plus its top/bottom padding. */
|
|
32
|
+
--osdk-cbac-banner-skeleton-height: calc(
|
|
33
|
+
var(--osdk-cbac-banner-font-size) * 1.5 + var(--osdk-surface-spacing) * 2
|
|
34
|
+
);
|
|
31
35
|
|
|
32
36
|
/* Marking Button */
|
|
33
37
|
--osdk-cbac-marking-button-padding: calc(var(--osdk-surface-spacing) * 0.5)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const PACKAGE_USER_AGENT = `osdk-react-components/${"0.
|
|
17
|
+
const PACKAGE_USER_AGENT = `osdk-react-components/${"0.42.0-main-ecfcf3d26dbf2ca0124cc59848ff773e87f339c4"}`;
|
|
18
18
|
export function componentUserAgent(componentName) {
|
|
19
19
|
return `${PACKAGE_USER_AGENT}/${componentName}`;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT = `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT = `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GAAG,iFAAsD;AAEjF,OAAO,SAASC,kBAAkBA,CAACC,aAAqB,EAAU;EAChE,OAAO,GAAGF,kBAAkB,IAAIE,aAAa,EAAE;AACjD","ignoreList":[]}
|
|
@@ -4,5 +4,6 @@ export interface CbacBannerProps {
|
|
|
4
4
|
onClick?: () => void;
|
|
5
5
|
onDismiss?: () => void;
|
|
6
6
|
className?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare function CbacBanner({ markingIds, onClick, onDismiss, className }: CbacBannerProps): React.ReactElement;
|
|
9
|
+
export declare function CbacBanner({ markingIds, onClick, onDismiss, className, isLoading }: CbacBannerProps): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAiBA,OAAO,WAAW,OAAQ;AAK1B,iBAAiB,gBAAgB;CAC/B;CACA;CACA;CACA;AACD;AAED,OAAO,iBAAS,WAAW,EACzB,YACA,SACA,WACA,WACgB,EAAf,kBAAkB,MAAM","names":[],"sources":["../../../src/cbac-picker/CbacBanner.tsx"],"version":3,"file":"CbacBanner.d.ts"}
|
|
1
|
+
{"mappings":"AAiBA,OAAO,WAAW,OAAQ;AAK1B,iBAAiB,gBAAgB;CAC/B;CACA;CACA;CACA;CACA;AACD;AAED,OAAO,iBAAS,WAAW,EACzB,YACA,SACA,WACA,WACA,WACgB,EAAf,kBAAkB,MAAM","names":[],"sources":["../../../src/cbac-picker/CbacBanner.tsx"],"version":3,"file":"CbacBanner.d.ts"}
|
|
@@ -6,5 +6,6 @@ export interface BaseCbacBannerProps {
|
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
onDismiss?: () => void;
|
|
8
8
|
className?: string;
|
|
9
|
+
isLoading?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function BaseCbacBanner({ classificationString, textColor, backgroundColors, onClick, onDismiss, className }: BaseCbacBannerProps): React.ReactElement;
|
|
11
|
+
export declare function BaseCbacBanner({ classificationString, textColor, backgroundColors, onClick, onDismiss, className, isLoading }: BaseCbacBannerProps): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAmBA,OAAO,WAAW,OAAQ;
|
|
1
|
+
{"mappings":"AAmBA,OAAO,WAAW,OAAQ;AAO1B,iBAAiB,oBAAoB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AAED,OAAO,iBAAS,eAAe,EAC7B,sBACA,WACA,kBACA,SACA,WACA,WACA,WACoB,EAAnB,sBAAsB,MAAM","names":[],"sources":["../../../../src/cbac-picker/base/BaseCbacBanner.tsx"],"version":3,"file":"BaseCbacBanner.d.ts"}
|
package/docs/CSSVariables.md
CHANGED
|
@@ -372,16 +372,17 @@ Styling for classification-based access control picker components.
|
|
|
372
372
|
|
|
373
373
|
#### Banner
|
|
374
374
|
|
|
375
|
-
| Variable | Default Value
|
|
376
|
-
| -------------------------------------- |
|
|
377
|
-
| `--osdk-cbac-banner-padding` | `calc(var(--osdk-surface-spacing) * 1) calc(var(--osdk-surface-spacing) * 2)`
|
|
378
|
-
| `--osdk-cbac-banner-font-size` | `var(--osdk-typography-size-body-small)`
|
|
379
|
-
| `--osdk-cbac-banner-font-weight` | `var(--osdk-typography-weight-bold)`
|
|
380
|
-
| `--osdk-cbac-banner-text-align` | `center`
|
|
381
|
-
| `--osdk-cbac-banner-border-radius` | `var(--osdk-surface-border-radius)`
|
|
382
|
-
| `--osdk-cbac-banner-border-color` | `var(--osdk-surface-border-color-default)`
|
|
383
|
-
| `--osdk-cbac-banner-placeholder-bg` | `var(--osdk-intent-default-disabled)`
|
|
384
|
-
| `--osdk-cbac-banner-placeholder-color` | `var(--osdk-typography-color-default-rest)`
|
|
375
|
+
| Variable | Default Value | Description |
|
|
376
|
+
| -------------------------------------- | --------------------------------------------------------------------------------- | ----------------------------- |
|
|
377
|
+
| `--osdk-cbac-banner-padding` | `calc(var(--osdk-surface-spacing) * 1) calc(var(--osdk-surface-spacing) * 2)` | Banner padding |
|
|
378
|
+
| `--osdk-cbac-banner-font-size` | `var(--osdk-typography-size-body-small)` | Banner font size |
|
|
379
|
+
| `--osdk-cbac-banner-font-weight` | `var(--osdk-typography-weight-bold)` | Banner font weight |
|
|
380
|
+
| `--osdk-cbac-banner-text-align` | `center` | Banner text alignment |
|
|
381
|
+
| `--osdk-cbac-banner-border-radius` | `var(--osdk-surface-border-radius)` | Banner border radius |
|
|
382
|
+
| `--osdk-cbac-banner-border-color` | `var(--osdk-surface-border-color-default)` | Banner border color |
|
|
383
|
+
| `--osdk-cbac-banner-placeholder-bg` | `var(--osdk-intent-default-disabled)` | Placeholder banner background |
|
|
384
|
+
| `--osdk-cbac-banner-placeholder-color` | `var(--osdk-typography-color-default-rest)` | Placeholder banner text color |
|
|
385
|
+
| `--osdk-cbac-banner-skeleton-height` | `calc(var(--osdk-cbac-banner-font-size) * 1.5 + var(--osdk-surface-spacing) * 2)` | Loading skeleton height |
|
|
385
386
|
|
|
386
387
|
#### Marking Button
|
|
387
388
|
|
package/docs/CbacPicker.md
CHANGED
|
@@ -119,6 +119,18 @@ function ClassificationDialog() {
|
|
|
119
119
|
|
|
120
120
|
The dialog title automatically adjusts: "Add classification" when no initial markings are provided, "Edit classification" when editing existing markings. The confirm button is disabled with a tooltip when the selection is invalid (e.g., missing required markings).
|
|
121
121
|
|
|
122
|
+
### CbacBanner
|
|
123
|
+
|
|
124
|
+
Fetches banner data for the given marking IDs and renders the resolved classification banner.
|
|
125
|
+
|
|
126
|
+
| Prop | Type | Required | Default | Description |
|
|
127
|
+
| ------------ | ------------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| `markingIds` | `string[]` | Yes | - | Marking IDs to resolve into a classification banner |
|
|
129
|
+
| `onClick` | `() => void` | No | - | Makes the banner clickable |
|
|
130
|
+
| `onDismiss` | `() => void` | No | - | Shows a dismiss button |
|
|
131
|
+
| `isLoading` | `boolean` | No | `false` | Forces the loading skeleton. OR'd with the query's own loading state, so the skeleton also shows automatically while banner data is being fetched. |
|
|
132
|
+
| `className` | `string` | No | - | CSS class for the banner |
|
|
133
|
+
|
|
122
134
|
## Base Components
|
|
123
135
|
|
|
124
136
|
Most users should use `CbacPicker` or `CbacPickerDialog` above — they handle all data fetching automatically.
|
|
@@ -151,6 +163,7 @@ The base components below are for advanced use cases where you need to supply yo
|
|
|
151
163
|
| `backgroundColors` | `string[]` | Yes | - | Background colors (rendered as gradient if multiple) |
|
|
152
164
|
| `onClick` | `() => void` | No | - | Makes banner clickable |
|
|
153
165
|
| `onDismiss` | `() => void` | No | - | Shows a dismiss button |
|
|
166
|
+
| `isLoading` | `boolean` | No | `false` | Renders a same-size loading skeleton instead of text |
|
|
154
167
|
| `className` | `string` | No | - | CSS class for the banner |
|
|
155
168
|
|
|
156
169
|
### BaseCbacPickerDialog
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0-main-ecfcf3d26dbf2ca0124cc59848ff773e87f339c4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -227,12 +227,12 @@
|
|
|
227
227
|
"react": "^18.3.1",
|
|
228
228
|
"react-dom": "^18.3.1",
|
|
229
229
|
"typescript": "~5.5.4",
|
|
230
|
-
"@osdk/
|
|
230
|
+
"@osdk/aip-core": "0.9.0",
|
|
231
231
|
"@osdk/client": "2.48.0",
|
|
232
|
-
"@osdk/
|
|
232
|
+
"@osdk/api": "2.48.0",
|
|
233
233
|
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
234
|
-
"@osdk/
|
|
235
|
-
"@osdk/
|
|
234
|
+
"@osdk/monorepo.tsconfig": "~0.7.0",
|
|
235
|
+
"@osdk/react": "2.48.0"
|
|
236
236
|
},
|
|
237
237
|
"publishConfig": {
|
|
238
238
|
"access": "public"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkOISZU73V_cjs = require('./chunk-OISZU73V.cjs');
|
|
4
|
-
var chunkOWBDRWL6_cjs = require('./chunk-OWBDRWL6.cjs');
|
|
5
|
-
|
|
6
|
-
// src/public/experimental/email-viewer.ts
|
|
7
|
-
var EmailViewer2 = chunkOWBDRWL6_cjs.withOsdkMetrics(chunkOISZU73V_cjs.EmailViewer, "EmailViewer");
|
|
8
|
-
|
|
9
|
-
exports.EmailViewer = EmailViewer2;
|
|
10
|
-
//# sourceMappingURL=chunk-FKOFZSZD.cjs.map
|
|
11
|
-
//# sourceMappingURL=chunk-FKOFZSZD.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/UserAgent.ts","../../src/util/withOsdkMetrics.ts"],"names":["useRegisterUserAgent","React"],"mappings":";;;;;;;;;;;;AAgBA,IAAM,kBAAA,GAAqB,yBAAyB,QAA2B,CAAA,CAAA;AACxE,SAAS,mBAAmB,aAAA,EAAe;AAChD,EAAA,OAAO,CAAA,EAAG,kBAAkB,CAAA,CAAA,EAAI,aAAa,CAAA,CAAA;AAC/C;;;ACKO,SAAS,eAAA,CAAgB,WAAW,IAAA,EAAM;AAC/C,EAAA,MAAM,UAAU,CAAA,KAAA,KAAS;AACvB,IAAAA,0BAAA,CAAqB,kBAAA,CAAmB,IAAI,CAAC,CAAA;AAC7C,IAAA,uBAAoBC,sBAAA,CAAM,aAAA,CAAc,SAAA,EAAW,KAAK,CAAA;AAAA,EAC1D,CAAA;AACA,EAAA,OAAA,CAAQ,WAAA,GAAc,mBAAmB,IAAI,CAAA,CAAA,CAAA;AAC7C,EAAA,OAAO,OAAA;AACT","file":"chunk-OWBDRWL6.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT = `osdk-react-components/${process.env.PACKAGE_VERSION}`;\nexport function componentUserAgent(componentName) {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRegisterUserAgent } from \"@osdk/react\";\nimport React from \"react\";\nimport { componentUserAgent } from \"./UserAgent.js\";\n\n// `any` is required: FunctionComponent defaults to FunctionComponent<{}> which\n// rejects components with required props. A generic P parameter doesn't help\n// because TS can't infer both P and C simultaneously from a single argument.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withOsdkMetrics(Component, name) {\n const Wrapped = props => {\n useRegisterUserAgent(componentUserAgent(name));\n return /*#__PURE__*/React.createElement(Component, props);\n };\n Wrapped.displayName = `withOsdkMetrics(${name})`;\n return Wrapped;\n}"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkRVZE7LPI_cjs = require('./chunk-RVZE7LPI.cjs');
|
|
4
|
-
var chunkOWBDRWL6_cjs = require('./chunk-OWBDRWL6.cjs');
|
|
5
|
-
|
|
6
|
-
// src/public/experimental/xml-viewer.ts
|
|
7
|
-
var XmlViewer2 = chunkOWBDRWL6_cjs.withOsdkMetrics(chunkRVZE7LPI_cjs.XmlViewer, "XmlViewer");
|
|
8
|
-
|
|
9
|
-
exports.XmlViewer = XmlViewer2;
|
|
10
|
-
//# sourceMappingURL=chunk-P7EZ2DQ2.cjs.map
|
|
11
|
-
//# sourceMappingURL=chunk-P7EZ2DQ2.cjs.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkVOROB7KJ_cjs = require('./chunk-VOROB7KJ.cjs');
|
|
4
|
-
var chunkOWBDRWL6_cjs = require('./chunk-OWBDRWL6.cjs');
|
|
5
|
-
|
|
6
|
-
// src/public/experimental/image-viewer.ts
|
|
7
|
-
var ImageViewer2 = chunkOWBDRWL6_cjs.withOsdkMetrics(chunkVOROB7KJ_cjs.ImageViewer, "ImageViewer");
|
|
8
|
-
|
|
9
|
-
exports.ImageViewer = ImageViewer2;
|
|
10
|
-
//# sourceMappingURL=chunk-TPJZ6QL2.cjs.map
|
|
11
|
-
//# sourceMappingURL=chunk-TPJZ6QL2.cjs.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkGKDO6NU7_cjs = require('./chunk-GKDO6NU7.cjs');
|
|
4
|
-
var chunkOWBDRWL6_cjs = require('./chunk-OWBDRWL6.cjs');
|
|
5
|
-
|
|
6
|
-
// src/public/experimental/excel-viewer.ts
|
|
7
|
-
var ExcelViewer2 = chunkOWBDRWL6_cjs.withOsdkMetrics(chunkGKDO6NU7_cjs.ExcelViewer, "ExcelViewer");
|
|
8
|
-
|
|
9
|
-
exports.ExcelViewer = ExcelViewer2;
|
|
10
|
-
//# sourceMappingURL=chunk-XGOBDPLC.cjs.map
|
|
11
|
-
//# sourceMappingURL=chunk-XGOBDPLC.cjs.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkKHMOMROL_cjs = require('./chunk-KHMOMROL.cjs');
|
|
4
|
-
var chunkOWBDRWL6_cjs = require('./chunk-OWBDRWL6.cjs');
|
|
5
|
-
|
|
6
|
-
// src/public/experimental/video-viewer.ts
|
|
7
|
-
var VideoViewer2 = chunkOWBDRWL6_cjs.withOsdkMetrics(chunkKHMOMROL_cjs.VideoViewer, "VideoViewer");
|
|
8
|
-
|
|
9
|
-
exports.VideoViewer = VideoViewer2;
|
|
10
|
-
//# sourceMappingURL=chunk-XXPWKSVT.cjs.map
|
|
11
|
-
//# sourceMappingURL=chunk-XXPWKSVT.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cbac-picker/utils/cbacPickerUtils.ts","../../src/cbac-picker/base/BaseCbacBanner.module.css","../../src/cbac-picker/base/BaseCbacBanner.tsx","../../src/cbac-picker/CbacBanner.tsx"],"names":["React","Button","Cross","classnames","useCbacBanner"],"mappings":";;;;;;;;;;;;;;;;AAgBA,IAAM,0BAAA,GAA6B,CAAC,SAAS,CAAA;AAC7C,IAAM,mBAAA,GAAsB,SAAA;AAC5B,IAAM,8BAAA,GAAiC,UAAA;AAChC,IAAM,cAAc;AACpB,SAAS,qBAAqB,gBAAA,EAAkB;AACrD,EAAA,OAAO,gBAAA,CAAiB,MAAA,GAAS,CAAA,GAAI,CAAA,0BAAA,EAA6B,gBAAA,CAAiB,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA,GAAM,gBAAA,CAAiB,CAAC,CAAA,IAAK,aAAA;AAC5H;AACO,SAAS,qBAAqB,MAAA,EAAQ;AAC3C,EAAA,OAAO;AAAA,IACL,oBAAA,EAAsB,QAAQ,oBAAA,IAAwB,8BAAA;AAAA,IACtD,SAAA,EAAW,QAAQ,SAAA,IAAa,mBAAA;AAAA,IAChC,gBAAA,EAAkB,QAAQ,gBAAA,IAAoB;AAAA,GAChD;AACF;AACO,SAAS,uBAAA,CAAwB,UAAA,EAAY,UAAA,EAAY,QAAA,EAAU;AACxE,EAAA,IAAI,WAAW,MAAA,KAAW,CAAA,IAAK,UAAA,KAAe,MAAA,IAAa,aAAa,MAAA,EAAW;AACjF,IAAA,OAAO,EAAC;AAAA,EACV;AACA,EAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,UAAU,CAAA;AACnC,EAAA,MAAM,aAAA,GAAgB,IAAI,GAAA,CAAI,UAAA,CAAW,GAAA,CAAI,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,EAAA,EAAI,CAAA,CAAE,IAAI,CAAC,CAAC,CAAA;AACjE,EAAA,MAAM,OAAA,uBAAc,GAAA,EAAI;AACxB,EAAA,KAAA,MAAW,WAAW,QAAA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2BAAA,CAAW,sBAAA,CAAO,SAAA,EAAW,SAAS,CAAA;AAAA,IACjD,KAAA,EAAO;AAAA,GACT,kBAAgBH,sBAAA,CAAM,aAAA,CAAc,MAAA,EAAQ;AAAA,IAC1C,WAAW,sBAAA,CAAO;AAAA,GACpB,EAAG,oBAAoB,CAAA,EAAG,aAAa,CAAA;AACzC;AC1CO,SAAS,UAAA,CAAW;AAAA,EACzB,UAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAAG;AACD,EAAA,MAAM;AAAA,IACJ;AAAA,MACEI,0BAAA,CAAc;AAAA,IAChB;AAAA,GACD,CAAA;AACD,EAAA,MAAM,QAAA,GAAW,qBAAqB,MAAM,CAAA;AAC5C,EAAA,uBAAoBJ,sBAAAA,CAAM,aAAA,CAAc,cAAA,EAAgB;AAAA,IACtD,sBAAsB,QAAA,CAAS,oBAAA;AAAA,IAC/B,WAAW,QAAA,CAAS,SAAA;AAAA,IACpB,kBAAkB,QAAA,CAAS,gBAAA;AAAA,IAC3B,OAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"chunk-ZMAWPOG5.cjs","sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst UNMARKED_BACKGROUND_COLORS = [\"#8F99A8\"];\nconst UNMARKED_TEXT_COLOR = \"#FFFFFF\";\nconst UNMARKED_CLASSIFICATION_STRING = \"UNMARKED\";\nexport const EMPTY_ARRAY = [];\nexport function backgroundFromColors(backgroundColors) {\n return backgroundColors.length > 1 ? `linear-gradient(to right, ${backgroundColors.join(\", \")})` : backgroundColors[0] ?? \"transparent\";\n}\nexport function resolveBannerDisplay(banner) {\n return {\n classificationString: banner?.classificationString ?? UNMARKED_CLASSIFICATION_STRING,\n textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,\n backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS\n };\n}\nexport function groupMarkingsByCategory(markingIds, categories, markings) {\n if (markingIds.length === 0 || categories === undefined || markings === undefined) {\n return [];\n }\n const selected = new Set(markingIds);\n const categoryNames = new Map(categories.map(c => [c.id, c.name]));\n const grouped = new Map();\n for (const marking of markings) {\n if (selected.has(marking.id)) {\n const name = categoryNames.get(marking.categoryId) ?? marking.categoryId;\n const list = grouped.get(name);\n if (list !== undefined) {\n list.push(marking.name);\n } else {\n grouped.set(name, [marking.name]);\n }\n }\n }\n return Array.from(grouped, ([categoryName, markingNames]) => ({\n categoryName,\n markingNames\n }));\n}\nexport function resolveRequiredGroups(categoryGroups, requiredMarkingGroups) {\n const markingIdToName = new Map(categoryGroups.flatMap(g => g.markings).map(m => [m.id, m.name]));\n return requiredMarkingGroups.map(ids => ({\n markingNames: ids.map(id => markingIdToName.get(id) ?? id)\n }));\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.bannerRow {\n display: flex;\n align-items: center;\n border-radius: var(--osdk-cbac-banner-border-radius);\n width: 100%;\n box-sizing: border-box;\n background: var(--osdk-cbac-banner-bg);\n color: var(--osdk-cbac-banner-color);\n}\n\n.banner {\n flex: 1;\n padding: var(--osdk-cbac-banner-padding);\n font-size: var(--osdk-cbac-banner-font-size);\n font-weight: var(--osdk-cbac-banner-font-weight);\n text-align: var(--osdk-cbac-banner-text-align);\n font-family: inherit;\n border: none;\n background: transparent;\n color: inherit;\n}\n\n.clickable {\n cursor: pointer;\n}\n\n.clickable:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n}\n\n.clickable:hover {\n filter: brightness(0.9);\n text-decoration: underline;\n}\n\n.dismissButton {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--osdk-surface-spacing) * 1);\n margin-right: calc(var(--osdk-surface-spacing) * 1);\n background: transparent;\n border: none;\n color: inherit;\n cursor: pointer;\n border-radius: var(--osdk-surface-border-radius);\n flex-shrink: 0;\n}\n\n.dismissButton:hover {\n filter: brightness(0.8);\n}\n\n.dismissButton:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n}\n","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button } from \"@base-ui/react/button\";\nimport { Cross } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport { backgroundFromColors } from \"../utils/cbacPickerUtils.js\";\nimport styles from \"./BaseCbacBanner.module.css\";\nexport function BaseCbacBanner({\n classificationString,\n textColor,\n backgroundColors,\n onClick,\n onDismiss,\n className\n}) {\n const bannerStyle = React.useMemo(() => ({\n \"--osdk-cbac-banner-bg\": backgroundFromColors(backgroundColors),\n \"--osdk-cbac-banner-color\": textColor\n }), [textColor, backgroundColors]);\n const handleDismiss = React.useCallback(e => {\n e.stopPropagation();\n onDismiss?.();\n }, [onDismiss]);\n const dismissButton = onDismiss != null ? /*#__PURE__*/React.createElement(Button, {\n className: styles.dismissButton,\n onClick: handleDismiss,\n \"aria-label\": \"Clear classification\"\n }, /*#__PURE__*/React.createElement(Cross, {\n size: 12,\n color: \"currentColor\"\n })) : null;\n if (onClick != null) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classnames(styles.bannerRow, className),\n style: bannerStyle\n }, /*#__PURE__*/React.createElement(Button, {\n className: classnames(styles.banner, styles.clickable),\n onClick: onClick,\n \"aria-label\": \"Edit classification\"\n }, classificationString), dismissButton);\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classnames(styles.bannerRow, className),\n style: bannerStyle\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: styles.banner\n }, classificationString), dismissButton);\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useCbacBanner } from \"@osdk/react/platform-apis\";\nimport React from \"react\";\nimport { BaseCbacBanner } from \"./base/BaseCbacBanner.js\";\nimport { resolveBannerDisplay } from \"./utils/cbacPickerUtils.js\";\nexport function CbacBanner({\n markingIds,\n onClick,\n onDismiss,\n className\n}) {\n const {\n banner\n } = useCbacBanner({\n markingIds\n });\n const resolved = resolveBannerDisplay(banner);\n return /*#__PURE__*/React.createElement(BaseCbacBanner, {\n classificationString: resolved.classificationString,\n textColor: resolved.textColor,\n backgroundColors: resolved.backgroundColors,\n onClick: onClick,\n onDismiss: onDismiss,\n className: className\n });\n}"]}
|