@osdk/cbac-components 0.1.0-beta.0 → 0.1.0-beta.1

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 (29) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/cbac-picker/types.js +2 -0
  3. package/build/browser/cbac-picker/types.js.map +1 -0
  4. package/build/browser/cbac-picker/utils/cbacPickerUtils.js +37 -0
  5. package/build/browser/cbac-picker/utils/cbacPickerUtils.js.map +1 -0
  6. package/build/browser/cbac-picker/utils/selectionLogic.js +91 -0
  7. package/build/browser/cbac-picker/utils/selectionLogic.js.map +1 -0
  8. package/build/browser/public/experimental.js +3 -1
  9. package/build/browser/public/experimental.js.map +1 -1
  10. package/build/cjs/public/experimental.cjs +76 -0
  11. package/build/cjs/public/experimental.cjs.map +1 -1
  12. package/build/cjs/public/experimental.d.cts +32 -1
  13. package/build/esm/cbac-picker/types.js +2 -0
  14. package/build/esm/cbac-picker/types.js.map +1 -0
  15. package/build/esm/cbac-picker/utils/cbacPickerUtils.js +37 -0
  16. package/build/esm/cbac-picker/utils/cbacPickerUtils.js.map +1 -0
  17. package/build/esm/cbac-picker/utils/selectionLogic.js +91 -0
  18. package/build/esm/cbac-picker/utils/selectionLogic.js.map +1 -0
  19. package/build/esm/public/experimental.js +3 -1
  20. package/build/esm/public/experimental.js.map +1 -1
  21. package/build/types/cbac-picker/types.d.ts +27 -0
  22. package/build/types/cbac-picker/types.d.ts.map +1 -0
  23. package/build/types/cbac-picker/utils/cbacPickerUtils.d.ts +10 -0
  24. package/build/types/cbac-picker/utils/cbacPickerUtils.d.ts.map +1 -0
  25. package/build/types/cbac-picker/utils/selectionLogic.d.ts +4 -0
  26. package/build/types/cbac-picker/utils/selectionLogic.d.ts.map +1 -0
  27. package/build/types/public/experimental.d.ts +2 -1
  28. package/build/types/public/experimental.d.ts.map +1 -1
  29. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @osdk/cbac-components
2
2
 
3
+ ## 0.1.0-beta.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 0c76a82: add cbac types, selection logic, and picker utils
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [d4ac875]
12
+ - Updated dependencies [e19ff03]
13
+ - Updated dependencies [f294f5a]
14
+ - @osdk/react-components@0.2.0-beta.25
15
+ - @osdk/react@0.10.0-beta.13
16
+
3
17
  ## 0.1.0-beta.0
4
18
 
5
19
  ### Minor Changes
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["types.ts"],"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\nexport type MarkingSelectionState =\n | \"SELECTED\"\n | \"IMPLIED\"\n | \"DISALLOWED\"\n | \"IMPLIED_DISALLOWED\";\n\nexport interface CbacBannerData {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n markingIds: string[];\n}\n\nexport interface PickerMarkingCategory {\n id: string;\n name: string;\n description: string;\n categoryType: \"CONJUNCTIVE\" | \"DISJUNCTIVE\";\n markingType: \"MANDATORY\" | \"CBAC\";\n}\n\nexport interface PickerMarking {\n id: string;\n categoryId: string;\n name: string;\n description?: string;\n}\n\nexport interface CategoryMarkingGroup {\n category: PickerMarkingCategory;\n markings: PickerMarking[];\n}\n\nexport interface RequiredMarkingGroup {\n markingNames: string[];\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ const UNMARKED_BACKGROUND_COLORS = ["#8F99A8"];
18
+ const UNMARKED_TEXT_COLOR = "#FFFFFF";
19
+ const UNMARKED_CLASSIFICATION_STRING = "UNMARKED";
20
+ export const EMPTY_ARRAY = [];
21
+ export function backgroundFromColors(backgroundColors) {
22
+ return backgroundColors.length > 1 ? `linear-gradient(to right, ${backgroundColors.join(", ")})` : backgroundColors[0] ?? "transparent";
23
+ }
24
+ export function resolveBannerDisplay(banner) {
25
+ return {
26
+ classificationString: banner?.classificationString ?? UNMARKED_CLASSIFICATION_STRING,
27
+ textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,
28
+ backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS
29
+ };
30
+ }
31
+ export function resolveRequiredGroups(categoryGroups, requiredMarkingGroups) {
32
+ const markingIdToName = new Map(categoryGroups.flatMap(g => g.markings).map(m => [m.id, m.name]));
33
+ return requiredMarkingGroups.map(ids => ({
34
+ markingNames: ids.map(id => markingIdToName.get(id) ?? id)
35
+ }));
36
+ }
37
+ //# sourceMappingURL=cbacPickerUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cbacPickerUtils.js","names":["UNMARKED_BACKGROUND_COLORS","UNMARKED_TEXT_COLOR","UNMARKED_CLASSIFICATION_STRING","EMPTY_ARRAY","backgroundFromColors","backgroundColors","length","join","resolveBannerDisplay","banner","classificationString","textColor","resolveRequiredGroups","categoryGroups","requiredMarkingGroups","markingIdToName","Map","flatMap","g","markings","map","m","id","name","ids","markingNames","get"],"sources":["cbacPickerUtils.ts"],"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 type {\n CategoryMarkingGroup,\n CbacBannerData,\n RequiredMarkingGroup,\n} from \"../types.js\";\nconst UNMARKED_BACKGROUND_COLORS: string[] = [\"#8F99A8\"];\nconst UNMARKED_TEXT_COLOR = \"#FFFFFF\";\nconst UNMARKED_CLASSIFICATION_STRING = \"UNMARKED\";\n\nexport const EMPTY_ARRAY: string[] = [];\n\nexport function backgroundFromColors(backgroundColors: string[]): string {\n return backgroundColors.length > 1\n ? `linear-gradient(to right, ${backgroundColors.join(\", \")})`\n : backgroundColors[0] ?? \"transparent\";\n}\n\nexport interface ResolvedBannerDisplay {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n}\n\nexport function resolveBannerDisplay(\n banner: CbacBannerData | undefined,\n): ResolvedBannerDisplay {\n return {\n classificationString: banner?.classificationString\n ?? UNMARKED_CLASSIFICATION_STRING,\n textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,\n backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS,\n };\n}\n\nexport function resolveRequiredGroups(\n categoryGroups: CategoryMarkingGroup[],\n requiredMarkingGroups: string[][],\n): RequiredMarkingGroup[] {\n const markingIdToName = new Map(\n categoryGroups.flatMap((g) => g.markings).map((m) =>\n [m.id, m.name] as const\n ),\n );\n return requiredMarkingGroups.map((ids) => ({\n markingNames: ids.map((id) => marking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026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export function toggleMarking(markingId, currentSelection, categories) {
18
+ const isSelected = currentSelection.includes(markingId);
19
+ let ownerGroup;
20
+ for (const group of categories) {
21
+ for (const marking of group.markings) {
22
+ if (marking.id === markingId) {
23
+ ownerGroup = group;
24
+ break;
25
+ }
26
+ }
27
+ if (ownerGroup !== undefined) {
28
+ break;
29
+ }
30
+ }
31
+ if (ownerGroup === undefined) {
32
+ return currentSelection;
33
+ }
34
+ if (isSelected) {
35
+ return currentSelection.filter(id => id !== markingId);
36
+ }
37
+
38
+ // Disjunctive categories allow only one marking selected at a time (radio-style).
39
+ // Conjunctive categories allow multiple markings (checkbox-style).
40
+ if (ownerGroup.category.categoryType === "DISJUNCTIVE") {
41
+ const sameCategoryMarkingIds = new Set(ownerGroup.markings.map(m => m.id));
42
+ const withoutSameCategory = currentSelection.filter(id => !sameCategoryMarkingIds.has(id));
43
+ return [...withoutSameCategory, markingId];
44
+ }
45
+ return [...currentSelection, markingId];
46
+ }
47
+ export function computeMarkingStates(selectedIds, impliedIds, disallowedIds) {
48
+ const states = new Map();
49
+ const selectedSet = new Set(selectedIds);
50
+ const impliedSet = new Set(impliedIds);
51
+ const disallowedSet = new Set(disallowedIds);
52
+ const allIds = new Set([...selectedIds, ...impliedIds, ...disallowedIds]);
53
+ for (const id of allIds) {
54
+ const isImplied = impliedSet.has(id);
55
+ const isDisallowed = disallowedSet.has(id);
56
+ const isSelected = selectedSet.has(id);
57
+ if (isSelected) {
58
+ states.set(id, "SELECTED");
59
+ } else if (isImplied && isDisallowed) {
60
+ states.set(id, "IMPLIED_DISALLOWED");
61
+ } else if (isImplied) {
62
+ states.set(id, "IMPLIED");
63
+ } else if (isDisallowed) {
64
+ states.set(id, "DISALLOWED");
65
+ }
66
+ }
67
+ return states;
68
+ }
69
+ export function groupMarkingsByCategory(markings, categories) {
70
+ const markingsByCategoryId = new Map();
71
+ for (const marking of markings) {
72
+ const existing = markingsByCategoryId.get(marking.categoryId);
73
+ if (existing !== undefined) {
74
+ existing.push(marking);
75
+ } else {
76
+ markingsByCategoryId.set(marking.categoryId, [marking]);
77
+ }
78
+ }
79
+ const groups = [];
80
+ for (const category of categories) {
81
+ const categoryMarkings = markingsByCategoryId.get(category.id);
82
+ if (categoryMarkings !== undefined && categoryMarkings.length > 0) {
83
+ groups.push({
84
+ category,
85
+ markings: categoryMarkings
86
+ });
87
+ }
88
+ }
89
+ return groups;
90
+ }
91
+ //# sourceMappingURL=selectionLogic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectionLogic.js","names":["toggleMarking","markingId","currentSelection","categories","isSelected","includes","ownerGroup","group","marking","markings","id","undefined","filter","category","categoryType","sameCategoryMarkingIds","Set","map","m","withoutSameCategory","has","computeMarkingStates","selectedIds","impliedIds","disallowedIds","states","Map","selectedSet","impliedSet","disallowedSet","allIds","isImplied","isDisallowed","set","groupMarkingsByCategory","markingsByCategoryId","existing","get","categoryId","push","groups","categoryMarkings","length"],"sources":["selectionLogic.ts"],"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 type {\n CategoryMarkingGroup,\n MarkingSelectionState,\n PickerMarking,\n PickerMarkingCategory,\n} from \"../types.js\";\n\nexport function toggleMarking(\n markingId: string,\n currentSelection: string[],\n categories: CategoryMarkingGroup[],\n): string[] {\n const isSelected = currentSelection.includes(markingId);\n\n let ownerGroup: CategoryMarkingGroup | undefined;\n for (const group of categories) {\n for (const marking of group.markings) {\n if (marking.id === markingId) {\n ownerGroup = group;\n break;\n }\n }\n if (ownerGroup !== undefined) {\n break;\n }\n }\n\n if (ownerGroup === undefined) {\n return currentSelection;\n }\n\n if (isSelected) {\n return currentSelection.filter((id) => id !== markingId);\n }\n\n // Disjunctive categories allow only one marking selected at a time (radio-style).\n // Conjunctive categories allow multiple markings (checkbox-style).\n if (ownerGroup.category.categoryType === \"DISJUNCTIVE\") {\n const sameCategoryMarkingIds = new Set(\n ownerGroup.markings.map((m) => m.id),\n );\n const withoutSameCategory = currentSelection.filter(\n (id) => !sameCategoryMarkingIds.has(id),\n );\n return [...withoutSameCategory, markingId];\n }\n\n return [...currentSelection, markingId];\n}\n\nexport function computeMarkingStates(\n selectedIds: string[],\n impliedIds: string[],\n disallowedIds: string[],\n): Map<string, MarkingSelectionState> {\n const states = new Map<string, MarkingSelectionState>();\n\n const selectedSet = new Set(selectedIds);\n const impliedSet = new Set(impliedIds);\n const disallowedSet = new Set(disallowedIds);\n\n const allIds = new Set([...selectedIds, ...impliedIds, ...disallowedIds]);\n\n for (const id of allIds) {\n const isImplied = impliedSet.has(id);\n const isDisallowed = disallowedSet.has(id);\n const isSelected = selectedSet.has(id);\n\n if (isSelected) {\n states.set(id, \"SELECTED\");\n } else if (isImplied && isDisallowed) {\n states.set(id, \"IMPLIED_DISALLOWED\");\n } else if (isImplied) {\n states.set(id, \"IMPLIED\");\n } else if (isDisallowed) {\n states.set(id, \"DISALLOWED\");\n }\n }\n\n return states;\n}\n\nexport function groupMarkingsByCategory(\n markings: PickerMarking[],\n categories: PickerMarkingCategory[],\n): CategoryMarkingGroup[] {\n const markingsByCategoryId = new Map<string, PickerMarking[]>();\n\n for (const marking of markings) {\n const existing = markingsByCategoryId.get(marking.categoryId);\n if (existing !== undefined) {\n existing.push(marking);\n } else {\n markingsByCategoryId.set(marking.categoryId, [marking]);\n }\n }\n\n const groups: CategoryMarkingGroup[] = [];\n\n for (const category of categories) {\n const categoryMarkings = markingsByCategoryId.get(category.id);\n if (categoryMarkings !== undefined && categoryMarkings.length > 0) {\n groups.push({ category, markings: categoryMarkings });\n }\n }\n\n return groups;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,aAAaA,CAC3BC,SAAiB,EACjBC,gBAA0B,EAC1BC,UAAkC,EACxB;EACV,MAAMC,UAAU,GAAGF,gBAAgB,CAACG,QAAQ,CAACJ,SAAS,CAAC;EAEvD,IAAIK,UAA4C;EAChD,KAAK,MAAMC,KAAK,IAAIJ,UAAU,EAAE;IAC9B,KAAK,MAAMK,OAAO,IAAID,KAAK,CAACE,QAAQ,EAAE;MACpC,IAAID,OAAO,CAACE,EAAE,KAAKT,SAAS,EAAE;QAC5BK,UAAU,GAAGC,KAAK;QAClB;MACF;IACF;IACA,IAAID,UAAU,KAAKK,SAAS,EAAE;MAC5B;IACF;EACF;EAEA,IAAIL,UAAU,KAAKK,SAAS,EAAE;IAC5B,OAAOT,gBAAgB;EACzB;EAEA,IAAIE,UAAU,EAAE;IACd,OAAOF,gBAAgB,CAACU,MAAM,CAAEF,EAAE,IAAKA,EAAE,KAAKT,SAAS,CAAC;EAC1D;;EAEA;EACA;EACA,IAAIK,UAAU,CAACO,QAAQ,CAACC,YAAY,KAAK,aAAa,EAAE;IACtD,MAAMC,sBAAsB,GAAG,IAAIC,GAAG,CACpCV,UAAU,CAACG,QAAQ,CAACQ,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACR,EAAE,CACrC,CAAC;IACD,MAAMS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,GAAG,CAACvB,EAAE,EAAE,YAAY,CAAC;IAC9B;EACF;EAEA,OAAOe,MAAM;AACf;AAEA,OAAO,SAASS,uBAAuBA,CACrCzB,QAAyB,EACzBN,UAAmC,EACX;EACxB,MAAMgC,oBAAoB,GAAG,IAAIT,GAAG,CAA0B,CAAC;EAE/D,KAAK,MAAMlB,OAAO,IAAIC,QAAQ,EAAE;IAC9B,MAAM2B,QAAQ,GAAGD,oBAAoB,CAACE,GAAG,CAAC7B,OAAO,CAAC8B,UAAU,CAAC;IAC7D,IAAIF,QAAQ,KAAKzB,SAAS,EAAE;MAC1ByB,QAAQ,CAACG,IAAI,CAAC/B,OAAO,CAAC;IACxB,CAAC,MAAM;MACL2B,oBAAoB,CAACF,GAAG,CAACzB,OAAO,CAAC8B,UAAU,EAAE,CAAC9B,OAAO,CAAC,CAAC;IACzD;EACF;EAEA,MAAMgC,MAA8B,GAAG,EAAE;EAEzC,KAAK,MAAM3B,QAAQ,IAAIV,UAAU,EAAE;IACjC,MAAMsC,gBAAgB,GAAGN,oBAAoB,CAACE,GAAG,CAACxB,QAAQ,CAACH,EAAE,CAAC;IAC9D,IAAI+B,gBAAgB,KAAK9B,SAAS,IAAI8B,gBAAgB,CAACC,MAAM,GAAG,CAAC,EAAE;MACjEF,MAAM,CAACD,IAAI,CAAC;QAAE1B,QAAQ;QAAEJ,QAAQ,EAAEgC;MAAiB,CAAC,CAAC;IACvD;EACF;EAEA,OAAOD,MAAM;AACf","ignoreList":[]}
@@ -14,5 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export {};
17
+ // CBAC Picker - Selection logic utilities
18
+ export { computeMarkingStates, groupMarkingsByCategory, toggleMarking } from "../cbac-picker/utils/selectionLogic.js";
19
+ // CBAC Picker - Types
18
20
  //# sourceMappingURL=experimental.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.js","names":[],"sources":["experimental.ts"],"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\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","ignoreList":[]}
1
+ {"version":3,"file":"experimental.js","names":["computeMarkingStates","groupMarkingsByCategory","toggleMarking"],"sources":["experimental.ts"],"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\n// CBAC Picker - Selection logic utilities\nexport {\n computeMarkingStates,\n groupMarkingsByCategory,\n toggleMarking,\n} from \"../cbac-picker/utils/selectionLogic.js\";\n// CBAC Picker - Types\nexport type {\n CategoryMarkingGroup,\n CbacBannerData,\n MarkingSelectionState,\n PickerMarking,\n PickerMarkingCategory,\n RequiredMarkingGroup,\n} from \"../cbac-picker/types.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SACEA,oBAAoB,EACpBC,uBAAuB,EACvBC,aAAa,QACR,wCAAwC;AAC/C","ignoreList":[]}
@@ -1,4 +1,80 @@
1
1
  'use strict';
2
2
 
3
+ // src/cbac-picker/utils/selectionLogic.ts
4
+ function toggleMarking(markingId, currentSelection, categories) {
5
+ const isSelected = currentSelection.includes(markingId);
6
+ let ownerGroup;
7
+ for (const group of categories) {
8
+ for (const marking of group.markings) {
9
+ if (marking.id === markingId) {
10
+ ownerGroup = group;
11
+ break;
12
+ }
13
+ }
14
+ if (ownerGroup !== void 0) {
15
+ break;
16
+ }
17
+ }
18
+ if (ownerGroup === void 0) {
19
+ return currentSelection;
20
+ }
21
+ if (isSelected) {
22
+ return currentSelection.filter((id) => id !== markingId);
23
+ }
24
+ if (ownerGroup.category.categoryType === "DISJUNCTIVE") {
25
+ const sameCategoryMarkingIds = new Set(ownerGroup.markings.map((m) => m.id));
26
+ const withoutSameCategory = currentSelection.filter((id) => !sameCategoryMarkingIds.has(id));
27
+ return [...withoutSameCategory, markingId];
28
+ }
29
+ return [...currentSelection, markingId];
30
+ }
31
+ function computeMarkingStates(selectedIds, impliedIds, disallowedIds) {
32
+ const states = /* @__PURE__ */ new Map();
33
+ const selectedSet = new Set(selectedIds);
34
+ const impliedSet = new Set(impliedIds);
35
+ const disallowedSet = new Set(disallowedIds);
36
+ const allIds = /* @__PURE__ */ new Set([...selectedIds, ...impliedIds, ...disallowedIds]);
37
+ for (const id of allIds) {
38
+ const isImplied = impliedSet.has(id);
39
+ const isDisallowed = disallowedSet.has(id);
40
+ const isSelected = selectedSet.has(id);
41
+ if (isSelected) {
42
+ states.set(id, "SELECTED");
43
+ } else if (isImplied && isDisallowed) {
44
+ states.set(id, "IMPLIED_DISALLOWED");
45
+ } else if (isImplied) {
46
+ states.set(id, "IMPLIED");
47
+ } else if (isDisallowed) {
48
+ states.set(id, "DISALLOWED");
49
+ }
50
+ }
51
+ return states;
52
+ }
53
+ function groupMarkingsByCategory(markings, categories) {
54
+ const markingsByCategoryId = /* @__PURE__ */ new Map();
55
+ for (const marking of markings) {
56
+ const existing = markingsByCategoryId.get(marking.categoryId);
57
+ if (existing !== void 0) {
58
+ existing.push(marking);
59
+ } else {
60
+ markingsByCategoryId.set(marking.categoryId, [marking]);
61
+ }
62
+ }
63
+ const groups = [];
64
+ for (const category of categories) {
65
+ const categoryMarkings = markingsByCategoryId.get(category.id);
66
+ if (categoryMarkings !== void 0 && categoryMarkings.length > 0) {
67
+ groups.push({
68
+ category,
69
+ markings: categoryMarkings
70
+ });
71
+ }
72
+ }
73
+ return groups;
74
+ }
75
+
76
+ exports.computeMarkingStates = computeMarkingStates;
77
+ exports.groupMarkingsByCategory = groupMarkingsByCategory;
78
+ exports.toggleMarking = toggleMarking;
3
79
  //# sourceMappingURL=experimental.cjs.map
4
80
  //# sourceMappingURL=experimental.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"experimental.cjs"}
1
+ {"version":3,"sources":["../../../src/cbac-picker/utils/selectionLogic.ts"],"names":[],"mappings":";;;AAgBO,SAAS,aAAA,CAAc,SAAW,EAAA,gBAAA,EAAkB,UAAY,EAAA;AACrE,EAAM,MAAA,UAAA,GAAa,gBAAiB,CAAA,QAAA,CAAS,SAAS,CAAA;AACtD,EAAI,IAAA,UAAA;AACJ,EAAA,KAAA,MAAW,SAAS,UAAY,EAAA;AAC9B,IAAW,KAAA,MAAA,OAAA,IAAW,MAAM,QAAU,EAAA;AACpC,MAAI,IAAA,OAAA,CAAQ,OAAO,SAAW,EAAA;AAC5B,QAAa,UAAA,GAAA,KAAA;AACb,QAAA;AAAA;AACF;AAEF,IAAA,IAAI,eAAe,MAAW,EAAA;AAC5B,MAAA;AAAA;AACF;AAEF,EAAA,IAAI,eAAe,MAAW,EAAA;AAC5B,IAAO,OAAA,gBAAA;AAAA;AAET,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,OAAO,gBAAiB,CAAA,MAAA,CAAO,CAAM,EAAA,KAAA,EAAA,KAAO,SAAS,CAAA;AAAA;AAKvD,EAAI,IAAA,UAAA,CAAW,QAAS,CAAA,YAAA,KAAiB,aAAe,EAAA;AACtD,IAAM,MAAA,sBAAA,GAAyB,IAAI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AS,CAAA;AAAA,eACf,YAAc,EAAA;AACvB,MAAO,MAAA,CAAA,GAAA,CAAI,IAAI,YAAY,CAAA;AAAA;AAC7B;AAEF,EAAO,OAAA,MAAA;AACT;AACO,SAAS,uBAAA,CAAwB,UAAU,UAAY,EAAA;AAC5D,EAAM,MAAA,oBAAA,uBAA2B,GAAI,EAAA;AACrC,EAAA,KAAA,MAAW,WAAW,QAAU,EAAA;AAC9B,IAAA,MAAM,QAAW,GAAA,oBAAA,CAAqB,GAAI,CAAA,OAAA,CAAQ,UAAU,CAAA;AAC5D,IAAA,IAAI,aAAa,MAAW,EAAA;AAC1B,MAAA,QAAA,CAAS,KAAK,OAAO,CAAA;AAAA,KAChB,MAAA;AACL,MAAA,oBAAA,CAAqB,GAAI,CAAA,OAAA,CAAQ,UAAY,EAAA,CAAC,OAAO,CAAC,CAAA;AAAA;AACxD;AAEF,EAAA,MAAM,SAAS,EAAC;AAChB,EAAA,KAAA,MAAW,YAAY,UAAY,EAAA;AACjC,IAAA,MAAM,gBAAmB,GAAA,oBAAA,CAAqB,GAAI,CAAA,QAAA,CAAS,EAAE,CAAA;AAC7D,IAAA,IAAI,gBAAqB,KAAA,MAAA,IAAa,gBAAiB,CAAA,MAAA,GAAS,CAAG,EAAA;AACjE,MAAA,MAAA,CAAO,IAAK,CAAA;AAAA,QACV,QAAA;AAAA,QACA,QAAU,EAAA;AAAA,OACX,CAAA;AAAA;AACH;AAEF,EAAO,OAAA,MAAA;AACT","file":"experimental.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\nexport function toggleMarking(markingId, currentSelection, categories) {\n const isSelected = currentSelection.includes(markingId);\n let ownerGroup;\n for (const group of categories) {\n for (const marking of group.markings) {\n if (marking.id === markingId) {\n ownerGroup = group;\n break;\n }\n }\n if (ownerGroup !== undefined) {\n break;\n }\n }\n if (ownerGroup === undefined) {\n return currentSelection;\n }\n if (isSelected) {\n return currentSelection.filter(id => id !== markingId);\n }\n\n // Disjunctive categories allow only one marking selected at a time (radio-style).\n // Conjunctive categories allow multiple markings (checkbox-style).\n if (ownerGroup.category.categoryType === \"DISJUNCTIVE\") {\n const sameCategoryMarkingIds = new Set(ownerGroup.markings.map(m => m.id));\n const withoutSameCategory = currentSelection.filter(id => !sameCategoryMarkingIds.has(id));\n return [...withoutSameCategory, markingId];\n }\n return [...currentSelection, markingId];\n}\nexport function computeMarkingStates(selectedIds, impliedIds, disallowedIds) {\n const states = new Map();\n const selectedSet = new Set(selectedIds);\n const impliedSet = new Set(impliedIds);\n const disallowedSet = new Set(disallowedIds);\n const allIds = new Set([...selectedIds, ...impliedIds, ...disallowedIds]);\n for (const id of allIds) {\n const isImplied = impliedSet.has(id);\n const isDisallowed = disallowedSet.has(id);\n const isSelected = selectedSet.has(id);\n if (isSelected) {\n states.set(id, \"SELECTED\");\n } else if (isImplied && isDisallowed) {\n states.set(id, \"IMPLIED_DISALLOWED\");\n } else if (isImplied) {\n states.set(id, \"IMPLIED\");\n } else if (isDisallowed) {\n states.set(id, \"DISALLOWED\");\n }\n }\n return states;\n}\nexport function groupMarkingsByCategory(markings, categories) {\n const markingsByCategoryId = new Map();\n for (const marking of markings) {\n const existing = markingsByCategoryId.get(marking.categoryId);\n if (existing !== undefined) {\n existing.push(marking);\n } else {\n markingsByCategoryId.set(marking.categoryId, [marking]);\n }\n }\n const groups = [];\n for (const category of categories) {\n const categoryMarkings = markingsByCategoryId.get(category.id);\n if (categoryMarkings !== undefined && categoryMarkings.length > 0) {\n groups.push({\n category,\n markings: categoryMarkings\n });\n }\n }\n return groups;\n}"]}
@@ -1,2 +1,33 @@
1
+ type MarkingSelectionState = "SELECTED" | "IMPLIED" | "DISALLOWED" | "IMPLIED_DISALLOWED";
2
+ interface CbacBannerData {
3
+ classificationString: string;
4
+ textColor: string;
5
+ backgroundColors: string[];
6
+ markingIds: string[];
7
+ }
8
+ interface PickerMarkingCategory {
9
+ id: string;
10
+ name: string;
11
+ description: string;
12
+ categoryType: "CONJUNCTIVE" | "DISJUNCTIVE";
13
+ markingType: "MANDATORY" | "CBAC";
14
+ }
15
+ interface PickerMarking {
16
+ id: string;
17
+ categoryId: string;
18
+ name: string;
19
+ description?: string;
20
+ }
21
+ interface CategoryMarkingGroup {
22
+ category: PickerMarkingCategory;
23
+ markings: PickerMarking[];
24
+ }
25
+ interface RequiredMarkingGroup {
26
+ markingNames: string[];
27
+ }
1
28
 
2
- export { }
29
+ declare function toggleMarking(markingId: string, currentSelection: string[], categories: CategoryMarkingGroup[]): string[];
30
+ declare function computeMarkingStates(selectedIds: string[], impliedIds: string[], disallowedIds: string[]): Map<string, MarkingSelectionState>;
31
+ declare function groupMarkingsByCategory(markings: PickerMarking[], categories: PickerMarkingCategory[]): CategoryMarkingGroup[];
32
+
33
+ export { type CategoryMarkingGroup, type CbacBannerData, type MarkingSelectionState, type PickerMarking, type PickerMarkingCategory, type RequiredMarkingGroup, computeMarkingStates, groupMarkingsByCategory, toggleMarking };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["types.ts"],"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\nexport type MarkingSelectionState =\n | \"SELECTED\"\n | \"IMPLIED\"\n | \"DISALLOWED\"\n | \"IMPLIED_DISALLOWED\";\n\nexport interface CbacBannerData {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n markingIds: string[];\n}\n\nexport interface PickerMarkingCategory {\n id: string;\n name: string;\n description: string;\n categoryType: \"CONJUNCTIVE\" | \"DISJUNCTIVE\";\n markingType: \"MANDATORY\" | \"CBAC\";\n}\n\nexport interface PickerMarking {\n id: string;\n categoryId: string;\n name: string;\n description?: string;\n}\n\nexport interface CategoryMarkingGroup {\n category: PickerMarkingCategory;\n markings: PickerMarking[];\n}\n\nexport interface RequiredMarkingGroup {\n markingNames: string[];\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ const UNMARKED_BACKGROUND_COLORS = ["#8F99A8"];
18
+ const UNMARKED_TEXT_COLOR = "#FFFFFF";
19
+ const UNMARKED_CLASSIFICATION_STRING = "UNMARKED";
20
+ export const EMPTY_ARRAY = [];
21
+ export function backgroundFromColors(backgroundColors) {
22
+ return backgroundColors.length > 1 ? `linear-gradient(to right, ${backgroundColors.join(", ")})` : backgroundColors[0] ?? "transparent";
23
+ }
24
+ export function resolveBannerDisplay(banner) {
25
+ return {
26
+ classificationString: banner?.classificationString ?? UNMARKED_CLASSIFICATION_STRING,
27
+ textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,
28
+ backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS
29
+ };
30
+ }
31
+ export function resolveRequiredGroups(categoryGroups, requiredMarkingGroups) {
32
+ const markingIdToName = new Map(categoryGroups.flatMap(g => g.markings).map(m => [m.id, m.name]));
33
+ return requiredMarkingGroups.map(ids => ({
34
+ markingNames: ids.map(id => markingIdToName.get(id) ?? id)
35
+ }));
36
+ }
37
+ //# sourceMappingURL=cbacPickerUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cbacPickerUtils.js","names":["UNMARKED_BACKGROUND_COLORS","UNMARKED_TEXT_COLOR","UNMARKED_CLASSIFICATION_STRING","EMPTY_ARRAY","backgroundFromColors","backgroundColors","length","join","resolveBannerDisplay","banner","classificationString","textColor","resolveRequiredGroups","categoryGroups","requiredMarkingGroups","markingIdToName","Map","flatMap","g","markings","map","m","id","name","ids","markingNames","get"],"sources":["cbacPickerUtils.ts"],"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 type {\n CategoryMarkingGroup,\n CbacBannerData,\n RequiredMarkingGroup,\n} from \"../types.js\";\nconst UNMARKED_BACKGROUND_COLORS: string[] = [\"#8F99A8\"];\nconst UNMARKED_TEXT_COLOR = \"#FFFFFF\";\nconst UNMARKED_CLASSIFICATION_STRING = \"UNMARKED\";\n\nexport const EMPTY_ARRAY: string[] = [];\n\nexport function backgroundFromColors(backgroundColors: string[]): string {\n return backgroundColors.length > 1\n ? `linear-gradient(to right, ${backgroundColors.join(\", \")})`\n : backgroundColors[0] ?? \"transparent\";\n}\n\nexport interface ResolvedBannerDisplay {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n}\n\nexport function resolveBannerDisplay(\n banner: CbacBannerData | undefined,\n): ResolvedBannerDisplay {\n return {\n classificationString: banner?.classificationString\n ?? UNMARKED_CLASSIFICATION_STRING,\n textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,\n backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS,\n };\n}\n\nexport function resolveRequiredGroups(\n categoryGroups: CategoryMarkingGroup[],\n requiredMarkingGroups: string[][],\n): RequiredMarkingGroup[] {\n const markingIdToName = new Map(\n categoryGroups.flatMap((g) => g.markings).map((m) =>\n [m.id, m.name] as const\n ),\n );\n return requiredMarkingGroups.map((ids) => ({\n markingNames: ids.map((id) => markingIdToName.get(id) ?? id),\n }));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,MAAMA,0BAAoC,GAAG,CAAC,SAAS,CAAC;AACxD,MAAMC,mBAAmB,GAAG,SAAS;AACrC,MAAMC,8BAA8B,GAAG,UAAU;AAEjD,OAAO,MAAMC,WAAqB,GAAG,EAAE;AAEvC,OAAO,SAASC,oBAAoBA,CAACC,gBAA0B,EAAU;EACvE,OAAOA,gBAAgB,CAACC,MAAM,GAAG,CAAC,GAC9B,6BAA6BD,gBAAgB,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG,GAC3DF,gBAAgB,CAAC,CAAC,CAAC,IAAI,aAAa;AAC1C;AAQA,OAAO,SAASG,oBAAoBA,CAClCC,MAAkC,EACX;EACvB,OAAO;IACLC,oBAAoB,EAAED,MAAM,EAAEC,oBAAoB,IAC7CR,8BAA8B;IACnCS,SAAS,EAAEF,MAAM,EAAEE,SAAS,IAAIV,mBAAmB;IACnDI,gBAAgB,EAAEI,MAAM,EAAEJ,gBAAgB,IAAIL;EAChD,CAAC;AACH;AAEA,OAAO,SAASY,qBAAqBA,CACnCC,cAAsC,EACtCC,qBAAiC,EACT;EACxB,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAC7BH,cAAc,CAACI,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,QAAQ,CAAC,CAACC,GAAG,CAAEC,CAAC,IAC9C,CAACA,CAAC,CAACC,EAAE,EAAED,CAAC,CAACE,IAAI,CACf,CACF,CAAC;EACD,OAAOT,qBAAqB,CAACM,GAAG,CAAEI,GAAG,KAAM;IACzCC,YAAY,EAAED,GAAG,CAACJ,GAAG,CAAEE,EAAE,IAAKP,eAAe,CAACW,GAAG,CAACJ,EAAE,CAAC,IAAIA,EAAE;EAC7D,CAAC,CAAC,CAAC;AACL","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export function toggleMarking(markingId, currentSelection, categories) {
18
+ const isSelected = currentSelection.includes(markingId);
19
+ let ownerGroup;
20
+ for (const group of categories) {
21
+ for (const marking of group.markings) {
22
+ if (marking.id === markingId) {
23
+ ownerGroup = group;
24
+ break;
25
+ }
26
+ }
27
+ if (ownerGroup !== undefined) {
28
+ break;
29
+ }
30
+ }
31
+ if (ownerGroup === undefined) {
32
+ return currentSelection;
33
+ }
34
+ if (isSelected) {
35
+ return currentSelection.filter(id => id !== markingId);
36
+ }
37
+
38
+ // Disjunctive categories allow only one marking selected at a time (radio-style).
39
+ // Conjunctive categories allow multiple markings (checkbox-style).
40
+ if (ownerGroup.category.categoryType === "DISJUNCTIVE") {
41
+ const sameCategoryMarkingIds = new Set(ownerGroup.markings.map(m => m.id));
42
+ const withoutSameCategory = currentSelection.filter(id => !sameCategoryMarkingIds.has(id));
43
+ return [...withoutSameCategory, markingId];
44
+ }
45
+ return [...currentSelection, markingId];
46
+ }
47
+ export function computeMarkingStates(selectedIds, impliedIds, disallowedIds) {
48
+ const states = new Map();
49
+ const selectedSet = new Set(selectedIds);
50
+ const impliedSet = new Set(impliedIds);
51
+ const disallowedSet = new Set(disallowedIds);
52
+ const allIds = new Set([...selectedIds, ...impliedIds, ...disallowedIds]);
53
+ for (const id of allIds) {
54
+ const isImplied = impliedSet.has(id);
55
+ const isDisallowed = disallowedSet.has(id);
56
+ const isSelected = selectedSet.has(id);
57
+ if (isSelected) {
58
+ states.set(id, "SELECTED");
59
+ } else if (isImplied && isDisallowed) {
60
+ states.set(id, "IMPLIED_DISALLOWED");
61
+ } else if (isImplied) {
62
+ states.set(id, "IMPLIED");
63
+ } else if (isDisallowed) {
64
+ states.set(id, "DISALLOWED");
65
+ }
66
+ }
67
+ return states;
68
+ }
69
+ export function groupMarkingsByCategory(markings, categories) {
70
+ const markingsByCategoryId = new Map();
71
+ for (const marking of markings) {
72
+ const existing = markingsByCategoryId.get(marking.categoryId);
73
+ if (existing !== undefined) {
74
+ existing.push(marking);
75
+ } else {
76
+ markingsByCategoryId.set(marking.categoryId, [marking]);
77
+ }
78
+ }
79
+ const groups = [];
80
+ for (const category of categories) {
81
+ const categoryMarkings = markingsByCategoryId.get(category.id);
82
+ if (categoryMarkings !== undefined && categoryMarkings.length > 0) {
83
+ groups.push({
84
+ category,
85
+ markings: categoryMarkings
86
+ });
87
+ }
88
+ }
89
+ return groups;
90
+ }
91
+ //# sourceMappingURL=selectionLogic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectionLogic.js","names":["toggleMarking","markingId","currentSelection","categories","isSelected","includes","ownerGroup","group","marking","markings","id","undefined","filter","category","categoryType","sameCategoryMarkingIds","Set","map","m","withoutSameCategory","has","computeMarkingStates","selectedIds","impliedIds","disallowedIds","states","Map","selectedSet","impliedSet","disallowedSet","allIds","isImplied","isDisallowed","set","groupMarkingsByCategory","markingsByCategoryId","existing","get","categoryId","push","groups","categoryMarkings","length"],"sources":["selectionLogic.ts"],"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 type {\n CategoryMarkingGroup,\n MarkingSelectionState,\n PickerMarking,\n PickerMarkingCategory,\n} from \"../types.js\";\n\nexport function toggleMarking(\n markingId: string,\n currentSelection: string[],\n categories: CategoryMarkingGroup[],\n): string[] {\n const isSelected = currentSelection.includes(markingId);\n\n let ownerGroup: CategoryMarkingGroup | undefined;\n for (const group of categories) {\n for (const marking of group.markings) {\n if (marking.id === markingId) {\n ownerGroup = group;\n break;\n }\n }\n if (ownerGroup !== undefined) {\n break;\n }\n }\n\n if (ownerGroup === undefined) {\n return currentSelection;\n }\n\n if (isSelected) {\n return currentSelection.filter((id) => id !== markingId);\n }\n\n // Disjunctive categories allow only one marking selected at a time (radio-style).\n // Conjunctive categories allow multiple markings (checkbox-style).\n if (ownerGroup.category.categoryType === \"DISJUNCTIVE\") {\n const sameCategoryMarkingIds = new Set(\n ownerGroup.markings.map((m) => m.id),\n );\n const withoutSameCategory = currentSelection.filter(\n (id) => !sameCategoryMarkingIds.has(id),\n );\n return [...withoutSameCategory, markingId];\n }\n\n return [...currentSelection, markingId];\n}\n\nexport function computeMarkingStates(\n selectedIds: string[],\n impliedIds: string[],\n disallowedIds: string[],\n): Map<string, MarkingSelectionState> {\n const states = new Map<string, MarkingSelectionState>();\n\n const selectedSet = new Set(selectedIds);\n const impliedSet = new Set(impliedIds);\n const disallowedSet = new Set(disallowedIds);\n\n const allIds = new Set([...selectedIds, ...impliedIds, ...disallowedIds]);\n\n for (const id of allIds) {\n const isImplied = impliedSet.has(id);\n const isDisallowed = disallowedSet.has(id);\n const isSelected = selectedSet.has(id);\n\n if (isSelected) {\n states.set(id, \"SELECTED\");\n } else if (isImplied && isDisallowed) {\n states.set(id, \"IMPLIED_DISALLOWED\");\n } else if (isImplied) {\n states.set(id, \"IMPLIED\");\n } else if (isDisallowed) {\n states.set(id, \"DISALLOWED\");\n }\n }\n\n return states;\n}\n\nexport function groupMarkingsByCategory(\n markings: PickerMarking[],\n categories: PickerMarkingCategory[],\n): CategoryMarkingGroup[] {\n const markingsByCategoryId = new Map<string, PickerMarking[]>();\n\n for (const marking of markings) {\n const existing = markingsByCategoryId.get(marking.categoryId);\n if (existing !== undefined) {\n existing.push(marking);\n } else {\n markingsByCategoryId.set(marking.categoryId, [marking]);\n }\n }\n\n const groups: CategoryMarkingGroup[] = [];\n\n for (const category of categories) {\n const categoryMarkings = markingsByCategoryId.get(category.id);\n if (categoryMarkings !== undefined && categoryMarkings.length > 0) {\n groups.push({ category, markings: categoryMarkings });\n }\n }\n\n return groups;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,aAAaA,CAC3BC,SAAiB,EACjBC,gBAA0B,EAC1BC,UAAkC,EACxB;EACV,MAAMC,UAAU,GAAGF,gBAAgB,CAACG,QAAQ,CAACJ,SAAS,CAAC;EAEvD,IAAIK,UAA4C;EAChD,KAAK,MAAMC,KAAK,IAAIJ,UAAU,EAAE;IAC9B,KAAK,MAAMK,OAAO,IAAID,KAAK,CAACE,QAAQ,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EAAE,CAAC;IAC9D,IAAI+B,gBAAgB,KAAK9B,SAAS,IAAI8B,gBAAgB,CAACC,MAAM,GAAG,CAAC,EAAE;MACjEF,MAAM,CAACD,IAAI,CAAC;QAAE1B,QAAQ;QAAEJ,QAAQ,EAAEgC;MAAiB,CAAC,CAAC;IACvD;EACF;EAEA,OAAOD,MAAM;AACf","ignoreList":[]}
@@ -14,5 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export {};
17
+ // CBAC Picker - Selection logic utilities
18
+ export { computeMarkingStates, groupMarkingsByCategory, toggleMarking } from "../cbac-picker/utils/selectionLogic.js";
19
+ // CBAC Picker - Types
18
20
  //# sourceMappingURL=experimental.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.js","names":[],"sources":["experimental.ts"],"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\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","ignoreList":[]}
1
+ {"version":3,"file":"experimental.js","names":["computeMarkingStates","groupMarkingsByCategory","toggleMarking"],"sources":["experimental.ts"],"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\n// CBAC Picker - Selection logic utilities\nexport {\n computeMarkingStates,\n groupMarkingsByCategory,\n toggleMarking,\n} from \"../cbac-picker/utils/selectionLogic.js\";\n// CBAC Picker - Types\nexport type {\n CategoryMarkingGroup,\n CbacBannerData,\n MarkingSelectionState,\n PickerMarking,\n PickerMarkingCategory,\n RequiredMarkingGroup,\n} from \"../cbac-picker/types.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SACEA,oBAAoB,EACpBC,uBAAuB,EACvBC,aAAa,QACR,wCAAwC;AAC/C","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ export type MarkingSelectionState = "SELECTED" | "IMPLIED" | "DISALLOWED" | "IMPLIED_DISALLOWED";
2
+ export interface CbacBannerData {
3
+ classificationString: string;
4
+ textColor: string;
5
+ backgroundColors: string[];
6
+ markingIds: string[];
7
+ }
8
+ export interface PickerMarkingCategory {
9
+ id: string;
10
+ name: string;
11
+ description: string;
12
+ categoryType: "CONJUNCTIVE" | "DISJUNCTIVE";
13
+ markingType: "MANDATORY" | "CBAC";
14
+ }
15
+ export interface PickerMarking {
16
+ id: string;
17
+ categoryId: string;
18
+ name: string;
19
+ description?: string;
20
+ }
21
+ export interface CategoryMarkingGroup {
22
+ category: PickerMarkingCategory;
23
+ markings: PickerMarking[];
24
+ }
25
+ export interface RequiredMarkingGroup {
26
+ markingNames: string[];
27
+ }
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,YAAY,wBACR,aACA,YACA,eACA;AAEJ,iBAAiB,eAAe;CAC9B;CACA;CACA;CACA;AACD;AAED,iBAAiB,sBAAsB;CACrC;CACA;CACA;CACA,cAAc,gBAAgB;CAC9B,aAAa,cAAc;AAC5B;AAED,iBAAiB,cAAc;CAC7B;CACA;CACA;CACA;AACD;AAED,iBAAiB,qBAAqB;CACpC,UAAU;CACV,UAAU;AACX;AAED,iBAAiB,qBAAqB;CACpC;AACD","names":[],"sources":["../../../src/cbac-picker/types.ts"],"version":3,"file":"types.d.ts"}
@@ -0,0 +1,10 @@
1
+ import type { CategoryMarkingGroup, CbacBannerData, RequiredMarkingGroup } from "../types.js";
2
+ export declare const EMPTY_ARRAY: string[];
3
+ export declare function backgroundFromColors(backgroundColors: string[]): string;
4
+ export interface ResolvedBannerDisplay {
5
+ classificationString: string;
6
+ textColor: string;
7
+ backgroundColors: string[];
8
+ }
9
+ export declare function resolveBannerDisplay(banner: CbacBannerData | undefined): ResolvedBannerDisplay;
10
+ export declare function resolveRequiredGroups(categoryGroups: CategoryMarkingGroup[], requiredMarkingGroups: string[][]): RequiredMarkingGroup[];
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,sBACA,gBACA,4BACK,aAAc;AAKrB,OAAO,cAAMA;AAEb,OAAO,iBAAS,qBAAqBC;AAMrC,iBAAiB,sBAAsB;CACrC;CACA;CACA;AACD;AAED,OAAO,iBAAS,qBACdC,QAAQ,6BACP;AASH,OAAO,iBAAS,sBACdC,gBAAgB,wBAChBC,oCACC","names":["EMPTY_ARRAY: string[]","backgroundColors: string[]","banner: CbacBannerData | undefined","categoryGroups: CategoryMarkingGroup[]","requiredMarkingGroups: string[][]"],"sources":["../../../../src/cbac-picker/utils/cbacPickerUtils.ts"],"version":3,"file":"cbacPickerUtils.d.ts"}
@@ -0,0 +1,4 @@
1
+ import type { CategoryMarkingGroup, MarkingSelectionState, PickerMarking, PickerMarkingCategory } from "../types.js";
2
+ export declare function toggleMarking(markingId: string, currentSelection: string[], categories: CategoryMarkingGroup[]): string[];
3
+ export declare function computeMarkingStates(selectedIds: string[], impliedIds: string[], disallowedIds: string[]): Map<string, MarkingSelectionState>;
4
+ export declare function groupMarkingsByCategory(markings: PickerMarking[], categories: PickerMarkingCategory[]): CategoryMarkingGroup[];
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,sBACA,uBACA,eACA,6BACK,aAAc;AAErB,OAAO,iBAAS,cACdA,mBACAC,4BACAC,YAAY;AAwCd,OAAO,iBAAS,qBACdC,uBACAC,sBACAC,0BACC,YAAY;AA4Bf,OAAO,iBAAS,wBACdC,UAAU,iBACVC,YAAY,0BACX","names":["markingId: string","currentSelection: string[]","categories: CategoryMarkingGroup[]","selectedIds: string[]","impliedIds: string[]","disallowedIds: string[]","markings: PickerMarking[]","categories: PickerMarkingCategory[]"],"sources":["../../../../src/cbac-picker/utils/selectionLogic.ts"],"version":3,"file":"selectionLogic.d.ts"}
@@ -1 +1,2 @@
1
- export {};
1
+ export { computeMarkingStates, groupMarkingsByCategory, toggleMarking } from "../cbac-picker/utils/selectionLogic.js";
2
+ export type { CategoryMarkingGroup, CbacBannerData, MarkingSelectionState, PickerMarking, PickerMarkingCategory, RequiredMarkingGroup } from "../cbac-picker/types.js";
@@ -1 +1 @@
1
- {"mappings":"AAgBA","names":[],"sources":["../../../src/public/experimental.ts"],"version":3,"file":"experimental.d.ts"}
1
+ {"mappings":"AAiBA,SACE,sBACA,yBACA,qBACK;AAEP,cACE,sBACA,gBACA,uBACA,eACA,uBACA,4BACK","names":[],"sources":["../../../src/public/experimental.ts"],"version":3,"file":"experimental.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/cbac-components",
3
- "version": "0.1.0-beta.0",
3
+ "version": "0.1.0-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,9 +57,9 @@
57
57
  "react-dom": "^18.3.1",
58
58
  "typescript": "~5.5.4",
59
59
  "@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
60
+ "@osdk/react": "0.10.0-beta.13",
60
61
  "@osdk/monorepo.tsconfig": "~0.7.0-beta.1",
61
- "@osdk/react-components": "0.2.0-beta.23",
62
- "@osdk/react": "0.10.0-beta.11"
62
+ "@osdk/react-components": "0.2.0-beta.25"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"