@brickclay-org/ui 0.0.51 → 0.0.53
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/README.md +1911 -1911
- package/fesm2022/brickclay-org-ui.mjs +326 -14
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +106 -2
- package/package.json +1 -1
- package/src/lib/hierarchical-select/hierarchical-select.css +130 -0
- package/src/styles.css +1 -0
|
@@ -3030,37 +3030,37 @@ class BKTooltipDirective {
|
|
|
3030
3030
|
return;
|
|
3031
3031
|
const hostRect = this.el.nativeElement.getBoundingClientRect();
|
|
3032
3032
|
const tooltipRect = this.tooltipElement.getBoundingClientRect();
|
|
3033
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
3034
|
-
const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
|
|
3035
3033
|
const triangle = this.tooltipElement.querySelector('.bk-tooltip-triangle');
|
|
3036
3034
|
const padding = 10;
|
|
3037
3035
|
let top = 0, left = 0;
|
|
3038
|
-
// Position logic
|
|
3036
|
+
// Position logic — using viewport-relative coords (getBoundingClientRect)
|
|
3037
|
+
// since the tooltip uses position: fixed (no scroll offset needed)
|
|
3039
3038
|
switch (this.tooltipPosition) {
|
|
3040
3039
|
case 'right':
|
|
3041
3040
|
case 'left':
|
|
3042
|
-
top = hostRect.top +
|
|
3043
|
-
left =
|
|
3044
|
-
|
|
3045
|
-
|
|
3041
|
+
top = hostRect.top + hostRect.height / 2;
|
|
3042
|
+
left =
|
|
3043
|
+
this.tooltipPosition === 'right'
|
|
3044
|
+
? hostRect.right + padding
|
|
3045
|
+
: hostRect.left - tooltipRect.width - padding;
|
|
3046
3046
|
// Auto flip if out of viewport
|
|
3047
3047
|
if (this.tooltipPosition === 'right' && left + tooltipRect.width > window.innerWidth) {
|
|
3048
|
-
left = hostRect.left
|
|
3048
|
+
left = hostRect.left - tooltipRect.width - padding;
|
|
3049
3049
|
}
|
|
3050
3050
|
else if (this.tooltipPosition === 'left' && left < 0) {
|
|
3051
|
-
left = hostRect.right +
|
|
3051
|
+
left = hostRect.right + padding;
|
|
3052
3052
|
}
|
|
3053
3053
|
this.setStyle(this.tooltipElement, {
|
|
3054
3054
|
transform: 'translateY(-50%)',
|
|
3055
3055
|
});
|
|
3056
|
-
this.setTriangleStyles(triangle, this.tooltipPosition, left < hostRect.left
|
|
3056
|
+
this.setTriangleStyles(triangle, this.tooltipPosition, left < hostRect.left);
|
|
3057
3057
|
break;
|
|
3058
3058
|
case 'top':
|
|
3059
3059
|
case 'bottom':
|
|
3060
|
-
left = hostRect.left +
|
|
3060
|
+
left = hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;
|
|
3061
3061
|
top = this.tooltipPosition === 'top'
|
|
3062
|
-
? hostRect.top
|
|
3063
|
-
: hostRect.bottom +
|
|
3062
|
+
? hostRect.top - tooltipRect.height - padding
|
|
3063
|
+
: hostRect.bottom + padding;
|
|
3064
3064
|
// Prevent overflow
|
|
3065
3065
|
left = Math.max(10, Math.min(left, window.innerWidth - tooltipRect.width - 10));
|
|
3066
3066
|
this.setStyle(this.tooltipElement, {
|
|
@@ -5768,6 +5768,318 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5768
5768
|
type: Output
|
|
5769
5769
|
}] } });
|
|
5770
5770
|
|
|
5771
|
+
class BkHierarchicalSelect {
|
|
5772
|
+
/** Tree data (root-level array). */
|
|
5773
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
5774
|
+
/** Key for display label (e.g. 'noteType'). */
|
|
5775
|
+
labelKey = input('noteType', ...(ngDevMode ? [{ debugName: "labelKey" }] : []));
|
|
5776
|
+
/** Key for value (e.g. 'noteTypeKey'). */
|
|
5777
|
+
valueKey = input('noteTypeKey', ...(ngDevMode ? [{ debugName: "valueKey" }] : []));
|
|
5778
|
+
/** Key for children array (e.g. 'childs' or 'children'). */
|
|
5779
|
+
childrenKey = input('childs', ...(ngDevMode ? [{ debugName: "childrenKey" }] : []));
|
|
5780
|
+
/** Placeholder when nothing selected. */
|
|
5781
|
+
placeholder = input('Select...', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
5782
|
+
/** Label above the control. */
|
|
5783
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
5784
|
+
/** Required indicator. */
|
|
5785
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
5786
|
+
/** Optional icon URL in the trigger. */
|
|
5787
|
+
iconSrc = input(undefined, ...(ngDevMode ? [{ debugName: "iconSrc" }] : []));
|
|
5788
|
+
iconAlt = input('icon', ...(ngDevMode ? [{ debugName: "iconAlt" }] : []));
|
|
5789
|
+
/** Disabled state (can also be set by form control via CVA). */
|
|
5790
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
5791
|
+
disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "disabledByForm" }] : []));
|
|
5792
|
+
isDisabled = computed(() => this.disabled() || this.disabledByForm(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
5793
|
+
/** Whether to allow selecting parent nodes that have children. Default: only leaf selection. */
|
|
5794
|
+
allowParentSelection = input(false, ...(ngDevMode ? [{ debugName: "allowParentSelection" }] : []));
|
|
5795
|
+
/** Text for "Back" link (e.g. "< Back to Main"). */
|
|
5796
|
+
backToMainText = input('Back to Main', ...(ngDevMode ? [{ debugName: "backToMainText" }] : []));
|
|
5797
|
+
/** Search placeholder. */
|
|
5798
|
+
searchPlaceholder = input('Search', ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : []));
|
|
5799
|
+
/** When true, dropdown is positioned fixed and sized to the trigger (use inside modals/popups). */
|
|
5800
|
+
appendToBody = input(false, ...(ngDevMode ? [{ debugName: "appendToBody" }] : []));
|
|
5801
|
+
/** Key for option color (e.g. "color"). When set, option label and selected value use this color. */
|
|
5802
|
+
colorKey = input('', ...(ngDevMode ? [{ debugName: "colorKey" }] : []));
|
|
5803
|
+
/** Whether to show clear button when a value is selected. */
|
|
5804
|
+
clearable = input(true, ...(ngDevMode ? [{ debugName: "clearable" }] : []));
|
|
5805
|
+
/** Emit full selected node. */
|
|
5806
|
+
selectionChange = output();
|
|
5807
|
+
/** Emit value only (e.g. noteTypeKey). */
|
|
5808
|
+
valueChange = output();
|
|
5809
|
+
/** Emit when clear button is clicked. */
|
|
5810
|
+
clear = output();
|
|
5811
|
+
searchInput;
|
|
5812
|
+
controlWrapper;
|
|
5813
|
+
el = inject(ElementRef);
|
|
5814
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
5815
|
+
dropdownStyle = signal({
|
|
5816
|
+
left: '0px',
|
|
5817
|
+
width: 'auto',
|
|
5818
|
+
}, ...(ngDevMode ? [{ debugName: "dropdownStyle" }] : []));
|
|
5819
|
+
searchTerm = signal('', ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
5820
|
+
/** Breadcrumb stack: each entry is the parent node we navigated into. */
|
|
5821
|
+
breadcrumb = signal([], ...(ngDevMode ? [{ debugName: "breadcrumb" }] : []));
|
|
5822
|
+
/** Currently selected node (leaf or parent if allowParentSelection). */
|
|
5823
|
+
selected = signal(null, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
5824
|
+
/** Current level items: root or children of last breadcrumb. */
|
|
5825
|
+
currentLevelItems = computed(() => {
|
|
5826
|
+
const list = this.items();
|
|
5827
|
+
const stack = this.breadcrumb();
|
|
5828
|
+
if (!list?.length)
|
|
5829
|
+
return [];
|
|
5830
|
+
let level = list;
|
|
5831
|
+
for (const parent of stack) {
|
|
5832
|
+
const children = this.getChildren(parent);
|
|
5833
|
+
level = children ?? [];
|
|
5834
|
+
}
|
|
5835
|
+
return level;
|
|
5836
|
+
}, ...(ngDevMode ? [{ debugName: "currentLevelItems" }] : []));
|
|
5837
|
+
/** Filtered by search (matches label in current level and descendants). */
|
|
5838
|
+
filteredItems = computed(() => {
|
|
5839
|
+
const term = this.searchTerm().toLowerCase().trim();
|
|
5840
|
+
const level = this.currentLevelItems();
|
|
5841
|
+
if (!term)
|
|
5842
|
+
return level;
|
|
5843
|
+
return level.filter((item) => this.getLabel(item).toLowerCase().includes(term));
|
|
5844
|
+
}, ...(ngDevMode ? [{ debugName: "filteredItems" }] : []));
|
|
5845
|
+
/** Display text in trigger: path "Parent > Child" or placeholder. */
|
|
5846
|
+
displayPath = computed(() => {
|
|
5847
|
+
const sel = this.selected();
|
|
5848
|
+
if (!sel)
|
|
5849
|
+
return [];
|
|
5850
|
+
const path = this.buildPathTo(sel);
|
|
5851
|
+
return path.length ? path : [sel];
|
|
5852
|
+
}, ...(ngDevMode ? [{ debugName: "displayPath" }] : []));
|
|
5853
|
+
/** Whether we're not at root (show Back). */
|
|
5854
|
+
showBack = computed(() => this.breadcrumb().length > 0, ...(ngDevMode ? [{ debugName: "showBack" }] : []));
|
|
5855
|
+
getLabel(node) {
|
|
5856
|
+
const key = this.labelKey();
|
|
5857
|
+
return (node && key && node[key]) ?? '';
|
|
5858
|
+
}
|
|
5859
|
+
/** Returns the color for the node (e.g. node.color) when colorKey is set. */
|
|
5860
|
+
resolveColor(node) {
|
|
5861
|
+
if (!node)
|
|
5862
|
+
return null;
|
|
5863
|
+
const key = this.colorKey();
|
|
5864
|
+
return key && typeof node === 'object' ? node[key] ?? null : null;
|
|
5865
|
+
}
|
|
5866
|
+
getValue(node) {
|
|
5867
|
+
const key = this.valueKey();
|
|
5868
|
+
return key && node ? node[key] : node;
|
|
5869
|
+
}
|
|
5870
|
+
getChildren(node) {
|
|
5871
|
+
const key = this.childrenKey();
|
|
5872
|
+
const raw = node?.[key];
|
|
5873
|
+
if (Array.isArray(raw) && raw.length > 0)
|
|
5874
|
+
return raw;
|
|
5875
|
+
const alt = node?.['children'];
|
|
5876
|
+
return Array.isArray(alt) && alt.length > 0 ? alt : undefined;
|
|
5877
|
+
}
|
|
5878
|
+
hasChildren(node) {
|
|
5879
|
+
const ch = this.getChildren(node);
|
|
5880
|
+
return !!ch?.length;
|
|
5881
|
+
}
|
|
5882
|
+
isSelected(node) {
|
|
5883
|
+
const sel = this.selected();
|
|
5884
|
+
if (!sel)
|
|
5885
|
+
return false;
|
|
5886
|
+
return this.getValue(sel) === this.getValue(node);
|
|
5887
|
+
}
|
|
5888
|
+
/** Build path from root to target (finds first occurrence). */
|
|
5889
|
+
buildPathTo(target) {
|
|
5890
|
+
const targetVal = this.getValue(target);
|
|
5891
|
+
const path = [];
|
|
5892
|
+
const search = (list, parentPath) => {
|
|
5893
|
+
for (const node of list) {
|
|
5894
|
+
const currentPath = [...parentPath, node];
|
|
5895
|
+
if (this.getValue(node) === targetVal) {
|
|
5896
|
+
path.push(...currentPath);
|
|
5897
|
+
return true;
|
|
5898
|
+
}
|
|
5899
|
+
const children = this.getChildren(node);
|
|
5900
|
+
if (children?.length && search(children, currentPath))
|
|
5901
|
+
return true;
|
|
5902
|
+
}
|
|
5903
|
+
return false;
|
|
5904
|
+
};
|
|
5905
|
+
search(this.items(), []);
|
|
5906
|
+
return path;
|
|
5907
|
+
}
|
|
5908
|
+
toggleDropdown(event) {
|
|
5909
|
+
event?.preventDefault();
|
|
5910
|
+
event?.stopPropagation();
|
|
5911
|
+
if (this.isDisabled())
|
|
5912
|
+
return;
|
|
5913
|
+
if (this.isOpen()) {
|
|
5914
|
+
this.closeDropdown();
|
|
5915
|
+
}
|
|
5916
|
+
else {
|
|
5917
|
+
this.openDropdown();
|
|
5918
|
+
}
|
|
5919
|
+
}
|
|
5920
|
+
openDropdown() {
|
|
5921
|
+
const sel = this.selected();
|
|
5922
|
+
if (sel) {
|
|
5923
|
+
const path = this.buildPathTo(sel);
|
|
5924
|
+
this.breadcrumb.set(path.slice(0, -1));
|
|
5925
|
+
}
|
|
5926
|
+
else {
|
|
5927
|
+
this.breadcrumb.set([]);
|
|
5928
|
+
}
|
|
5929
|
+
if (this.appendToBody() && this.controlWrapper?.nativeElement) {
|
|
5930
|
+
this.updatePosition();
|
|
5931
|
+
}
|
|
5932
|
+
this.isOpen.set(true);
|
|
5933
|
+
this.searchTerm.set('');
|
|
5934
|
+
setTimeout(() => this.searchInput?.nativeElement?.focus(), 0);
|
|
5935
|
+
}
|
|
5936
|
+
updatePosition() {
|
|
5937
|
+
const el = this.controlWrapper?.nativeElement;
|
|
5938
|
+
if (!el)
|
|
5939
|
+
return;
|
|
5940
|
+
const rect = el.getBoundingClientRect();
|
|
5941
|
+
this.dropdownStyle.set({
|
|
5942
|
+
top: `${rect.bottom + 4}px`,
|
|
5943
|
+
bottom: undefined,
|
|
5944
|
+
left: `${rect.left}px`,
|
|
5945
|
+
width: `${rect.width}px`,
|
|
5946
|
+
});
|
|
5947
|
+
}
|
|
5948
|
+
getDropdownTop() {
|
|
5949
|
+
if (this.appendToBody())
|
|
5950
|
+
return this.dropdownStyle().top ?? null;
|
|
5951
|
+
return '105%';
|
|
5952
|
+
}
|
|
5953
|
+
getDropdownLeft() {
|
|
5954
|
+
return this.appendToBody() ? this.dropdownStyle().left : null;
|
|
5955
|
+
}
|
|
5956
|
+
getDropdownWidth() {
|
|
5957
|
+
return this.appendToBody() ? this.dropdownStyle().width : null;
|
|
5958
|
+
}
|
|
5959
|
+
onWindowScrollOrResize() {
|
|
5960
|
+
if (this.isOpen() && this.appendToBody())
|
|
5961
|
+
this.closeDropdown();
|
|
5962
|
+
}
|
|
5963
|
+
closeDropdown() {
|
|
5964
|
+
this.isOpen.set(false);
|
|
5965
|
+
this.searchTerm.set('');
|
|
5966
|
+
this.breadcrumb.set([]);
|
|
5967
|
+
this.onTouched();
|
|
5968
|
+
}
|
|
5969
|
+
goBack() {
|
|
5970
|
+
const stack = this.breadcrumb();
|
|
5971
|
+
if (stack.length === 0)
|
|
5972
|
+
return;
|
|
5973
|
+
this.breadcrumb.set(stack.slice(0, -1));
|
|
5974
|
+
}
|
|
5975
|
+
onSearchInput(event) {
|
|
5976
|
+
const value = event.target.value;
|
|
5977
|
+
this.searchTerm.set(value);
|
|
5978
|
+
}
|
|
5979
|
+
selectItem(node, event) {
|
|
5980
|
+
event?.stopPropagation();
|
|
5981
|
+
const hasChildren = this.hasChildren(node);
|
|
5982
|
+
if (hasChildren && !this.allowParentSelection()) {
|
|
5983
|
+
this.breadcrumb.update((stack) => [...stack, node]);
|
|
5984
|
+
return;
|
|
5985
|
+
}
|
|
5986
|
+
this.selected.set(node);
|
|
5987
|
+
this.onChange(this.getValue(node));
|
|
5988
|
+
this.selectionChange.emit(node);
|
|
5989
|
+
this.valueChange.emit(this.getValue(node));
|
|
5990
|
+
this.closeDropdown();
|
|
5991
|
+
}
|
|
5992
|
+
openFromLabel(event) {
|
|
5993
|
+
event.preventDefault();
|
|
5994
|
+
event.stopPropagation();
|
|
5995
|
+
if (this.isDisabled())
|
|
5996
|
+
return;
|
|
5997
|
+
this.controlWrapper?.nativeElement?.focus();
|
|
5998
|
+
this.openDropdown();
|
|
5999
|
+
}
|
|
6000
|
+
onClickOutside(e) {
|
|
6001
|
+
if (!this.el.nativeElement.contains(e.target))
|
|
6002
|
+
this.closeDropdown();
|
|
6003
|
+
}
|
|
6004
|
+
// --- ControlValueAccessor ---
|
|
6005
|
+
_value = null;
|
|
6006
|
+
onChange = () => { };
|
|
6007
|
+
onTouched = () => { };
|
|
6008
|
+
writeValue(value) {
|
|
6009
|
+
this._value = value;
|
|
6010
|
+
if (value == null) {
|
|
6011
|
+
this.selected.set(null);
|
|
6012
|
+
return;
|
|
6013
|
+
}
|
|
6014
|
+
const node = this.findNodeByValue(this.items(), value);
|
|
6015
|
+
this.selected.set(node ?? null);
|
|
6016
|
+
}
|
|
6017
|
+
registerOnChange(fn) {
|
|
6018
|
+
this.onChange = fn;
|
|
6019
|
+
}
|
|
6020
|
+
registerOnTouched(fn) {
|
|
6021
|
+
this.onTouched = fn;
|
|
6022
|
+
}
|
|
6023
|
+
setDisabledState(isDisabled) {
|
|
6024
|
+
this.disabledByForm.set(isDisabled);
|
|
6025
|
+
}
|
|
6026
|
+
findNodeByValue(list, value) {
|
|
6027
|
+
for (const node of list) {
|
|
6028
|
+
if (this.getValue(node) === value)
|
|
6029
|
+
return node;
|
|
6030
|
+
const children = this.getChildren(node);
|
|
6031
|
+
if (children?.length) {
|
|
6032
|
+
const found = this.findNodeByValue(children, value);
|
|
6033
|
+
if (found)
|
|
6034
|
+
return found;
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
6037
|
+
return null;
|
|
6038
|
+
}
|
|
6039
|
+
handleClear(event) {
|
|
6040
|
+
event.stopPropagation();
|
|
6041
|
+
this.selected.set(null);
|
|
6042
|
+
this._value = null;
|
|
6043
|
+
this.onChange(null);
|
|
6044
|
+
this.selectionChange.emit(null);
|
|
6045
|
+
this.valueChange.emit(null);
|
|
6046
|
+
this.clear.emit(null);
|
|
6047
|
+
}
|
|
6048
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkHierarchicalSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6049
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: BkHierarchicalSelect, isStandalone: true, selector: "bk-hierarchical-select", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, childrenKey: { classPropertyName: "childrenKey", publicName: "childrenKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, iconAlt: { classPropertyName: "iconAlt", publicName: "iconAlt", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowParentSelection: { classPropertyName: "allowParentSelection", publicName: "allowParentSelection", isSignal: true, isRequired: false, transformFunction: null }, backToMainText: { classPropertyName: "backToMainText", publicName: "backToMainText", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, appendToBody: { classPropertyName: "appendToBody", publicName: "appendToBody", isSignal: true, isRequired: false, transformFunction: null }, colorKey: { classPropertyName: "colorKey", publicName: "colorKey", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", valueChange: "valueChange", clear: "clear" }, host: { listeners: { "window:scroll": "onWindowScrollOrResize()", "window:resize": "onWindowScrollOrResize()", "document:click": "onClickOutside($event)" } }, providers: [
|
|
6050
|
+
{
|
|
6051
|
+
provide: NG_VALUE_ACCESSOR,
|
|
6052
|
+
useExisting: forwardRef(() => BkHierarchicalSelect),
|
|
6053
|
+
multi: true,
|
|
6054
|
+
},
|
|
6055
|
+
], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "controlWrapper", first: true, predicate: ["controlWrapper"], descendants: true }], ngImport: i0, template: "<div class=\"hierarchical-select-container\">\r\n @if (label()) {\r\n <label\r\n class=\"input-label\"\r\n (click)=\"openFromLabel($event)\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"input-label-required\">*</span>\r\n }\r\n </label>\r\n }\r\n\r\n <div\r\n #controlWrapper\r\n class=\"hierarchical-select-control\"\r\n tabindex=\"0\"\r\n [class.focused]=\"isOpen()\"\r\n [class.disabled]=\"isDisabled()\"\r\n (mousedown)=\"toggleDropdown($event)\">\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" [alt]=\"iconAlt()\" class=\"shrink-0\" />\r\n }\r\n <div class=\"hierarchical-value-container\">\r\n @if (!selected()) {\r\n <div class=\"hierarchical-placeholder\">{{ placeholder() }}</div>\r\n } @else {\r\n <div class=\"hierarchical-value-label\" [style.color]=\"resolveColor(selected())\">\r\n @for (node of displayPath(); track getValue(node); let last = $last) {\r\n <span>{{ getLabel(node) }}</span>\r\n\r\n @if (!last) {\r\n <svg\r\n class=\"breadcrumb-separator\"\r\n width=\"5\"\r\n height=\"8\"\r\n viewBox=\"0 0 5 8\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M4.57142 4.00286C4.57185 3.92766 4.55744 3.85312 4.52901 3.78351C4.50057 3.71389 4.45868 3.65058 4.40572 3.59719L0.977497 0.169008C0.924381 0.115455 0.861186 0.0729493 0.79156 0.0439419C0.721933 0.0149346 0.647251 0 0.571824 0C0.496396 0 0.421714 0.0149346 0.352088 0.0439419C0.282461 0.0729493 0.219267 0.115455 0.16615 0.169008C0.059732 0.27606 0 0.420874 0 0.57182C0 0.722766 0.059732 0.867579 0.16615 0.974631L3.19442 4.00286L0.16615 7.02537C0.059732 7.13242 0 7.27723 0 7.42818C0 7.57913 0.059732 7.72394 0.16615 7.83099C0.219267 7.88454 0.282461 7.92705 0.352088 7.95606C0.421714 7.98507 0.496396 8 0.571824 8C0.647251 8 0.721933 7.98507 0.79156 7.95606C0.861186 7.92705 0.924381 7.88454 0.977497 7.83099L4.40572 4.40281C4.51128 4.29639 4.57079 4.15275 4.57142 4.00286Z\"\r\n fill=\"#BBBDC5\"/>\r\n </svg>\r\n }\r\n }\r\n </div>\r\n\r\n }\r\n </div>\r\n <div class=\"hierarchical-actions\">\r\n @if (clearable() && selected() && !isDisabled()) {\r\n <span class=\"hierarchical-clear-wrapper\" (mousedown)=\"handleClear($event)\" title=\"Clear\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\r\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\r\n </svg>\r\n </span>\r\n }\r\n <span class=\"hierarchical-arrow\" [class.open]=\"isOpen()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"m6 9 6 6 6-6\"/>\r\n </svg>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n @if (isOpen()) {\r\n <div\r\n class=\"hierarchical-dropdown-panel\"\r\n [class.hierarchical-dropdown-panel-fixed]=\"appendToBody()\"\r\n [style.position]=\"appendToBody() ? 'fixed' : 'absolute'\"\r\n [style.top]=\"getDropdownTop()\"\r\n [style.left]=\"getDropdownLeft()\"\r\n [style.width]=\"getDropdownWidth() ?? (appendToBody() ? null : '100%')\">\r\n <div class=\"hierarchical-search\">\r\n <div class=\"hierarchical-search-wrapper\">\r\n <svg class=\"text-[#BBBDC5] mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\">\r\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\r\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\r\n </svg>\r\n <input\r\n #searchInput\r\n type=\"text\"\r\n class=\"hierarchical-search-input\"\r\n [value]=\"searchTerm()\"\r\n [placeholder]=\"searchPlaceholder()\"\r\n (input)=\"onSearchInput($event)\"\r\n (click)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n\r\n @if (showBack()) {\r\n <button\r\n type=\"button\"\r\n class=\"hierarchical-back\"\r\n (click)=\"goBack(); $event.stopPropagation()\">\r\n <span>\r\n <svg width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M4.59961 0.599976L0.599609 4.59998L4.59961 8.59998\" stroke=\"#141414\" stroke-width=\"1.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n</svg>\r\n\r\n </span>\r\n {{ backToMainText() }}\r\n </button>\r\n }\r\n\r\n <div class=\"hierarchical-options-list\">\r\n @for (item of filteredItems(); track getValue(item)) {\r\n <div\r\n class=\"hierarchical-option\"\r\n [class.selected]=\"isSelected(item)\"\r\n (mousedown)=\"selectItem(item, $event)\">\r\n <span class=\"hierarchical-option-label\" [style.color]=\"resolveColor(item)\">{{ getLabel(item) }}</span>\r\n @if (hasChildren(item)) {\r\n <svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M4.57142 4.00286C4.57185 3.92766 4.55744 3.85312 4.52901 3.78351C4.50057 3.71389 4.45868 3.65058 4.40572 3.59719L0.977497 0.169008C0.924381 0.115455 0.861186 0.0729493 0.79156 0.0439419C0.721933 0.0149346 0.647251 0 0.571824 0C0.496396 0 0.421714 0.0149346 0.352088 0.0439419C0.282461 0.0729493 0.219267 0.115455 0.16615 0.169008C0.059732 0.27606 0 0.420874 0 0.57182C0 0.722766 0.059732 0.867579 0.16615 0.974631L3.19442 4.00286L0.16615 7.02537C0.059732 7.13242 0 7.27723 0 7.42818C0 7.57913 0.059732 7.72394 0.16615 7.83099C0.219267 7.88454 0.282461 7.92705 0.352088 7.95606C0.421714 7.98507 0.496396 8 0.571824 8C0.647251 8 0.721933 7.98507 0.79156 7.95606C0.861186 7.92705 0.924381 7.88454 0.977497 7.83099L4.40572 4.40281C4.51128 4.29639 4.57079 4.15275 4.57142 4.00286Z\" fill=\"#BBBDC5\"/>\r\n </svg>\r\n } @else if (isSelected(item)) {\r\n <svg width=\"10\" height=\"7\" viewBox=\"0 0 10 7\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.72939 6.28273C3.64166 6.28324 3.55468 6.26642 3.47346 6.23324C3.39223 6.20007 3.31835 6.15118 3.25606 6.08939L0.196061 3.00273C0.0705253 2.87719 -1.32274e-09 2.70693 0 2.52939C1.32273e-09 2.35186 0.0705253 2.1816 0.196061 2.05606C0.321597 1.93053 0.49186 1.86 0.669394 1.86C0.846929 1.86 1.01719 1.93053 1.14273 2.05606L3.72939 4.64939L8.17606 0.196061C8.3016 0.0705253 8.47186 -3.49963e-09 8.64939 0C8.82693 3.49963e-09 8.99719 0.0705253 9.12273 0.196061C9.24826 0.321597 9.31879 0.49186 9.31879 0.669395C9.31879 0.846929 9.24826 1.01719 9.12273 1.14273L4.20273 6.06273C4.07921 6.19434 3.90963 6.27316 3.72939 6.28273V6.28273Z\" fill=\"#141414\"/>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (filteredItems().length === 0) {\r\n <div class=\"hierarchical-option-empty\">No items found</div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".hierarchical-select-container{@apply relative w-full box-border;}.hierarchical-select-control{@apply flex items-center justify-between gap-2 w-full bg-white border border-[#E3E3E7] rounded transition-all duration-200 px-3 py-2.5 cursor-pointer;}.hierarchical-select-control.focused{@apply border-[#6B7080] shadow-none z-10;}.hierarchical-select-control.disabled{@apply bg-[#F4F4F6] cursor-not-allowed opacity-60;}.hierarchical-value-container{@apply flex flex-1 items-center flex-wrap gap-1 relative overflow-hidden h-full min-w-0;}.hierarchical-placeholder{@apply text-[#6B7080] font-normal text-sm truncate w-full pointer-events-none;}.hierarchical-value-label{@apply font-normal text-sm leading-[18px] text-[#141414] truncate w-full flex items-center;}.hierarchical-actions{@apply flex items-center gap-2 flex-shrink-0;}.hierarchical-clear-wrapper{@apply text-gray-400 hover:text-red-500 cursor-pointer;}.hierarchical-arrow{@apply flex-shrink-0 text-gray-400 transition-transform duration-200;}.hierarchical-arrow.open{@apply rotate-180;}.hierarchical-dropdown-panel{@apply absolute left-0 top-[calc(100%+4px)] w-full min-w-[250px] max-w-[320px] bg-white border border-[#E3E3E7] rounded-xl shadow-lg z-[99] overflow-hidden cursor-default p-2.5;}.hierarchical-dropdown-panel-fixed{z-index:10050}.hierarchical-search{@apply px-2 pt-2;}.hierarchical-search-wrapper{@apply flex items-center border border-[#E3E3E7] rounded-md px-3 py-[7px] bg-white transition-colors focus-within:border-[#6B7080];}.hierarchical-search-input{@apply w-full outline-none font-normal text-sm text-[#141414] placeholder-[#A1A3AE] bg-transparent;}.hierarchical-back{@apply w-full text-left px-2.5 py-2 text-sm text-[#141414] hover:bg-[#F8F8F8] rounded-md transition-colors mt-1 flex items-center gap-1.5;}.hierarchical-options-list{@apply max-h-60 overflow-auto relative flex flex-col gap-0.5 mt-1;}.hierarchical-option{@apply flex items-center justify-between gap-2 p-2.5 cursor-pointer transition-colors font-normal text-sm text-[#141414] rounded-md;}.hierarchical-option:hover,.hierarchical-option.selected{@apply bg-[#F8F8F8];}.hierarchical-option-label{@apply flex-1 truncate;}.hierarchical-option-chevron{@apply flex-shrink-0 text-[#6B7080];}.hierarchical-option-check{@apply flex-shrink-0 text-[#141414];}.hierarchical-option-empty{@apply px-3 py-2 text-gray-400 cursor-default text-sm;}.input-label{@apply text-sm font-medium text-[#141414] tracking-[-.28px] mb-1.5 inline-block;}.input-label-required{@apply text-[#E7000B];}.hierarchical-options-list::-webkit-scrollbar{width:6px}.hierarchical-options-list::-webkit-scrollbar-track{background:transparent;border-radius:8px;width:8px}.hierarchical-options-list::-webkit-scrollbar-thumb{background:#d6d7dc;border-radius:8px;transition:.3s ease-in-out}.hierarchical-options-list::-webkit-scrollbar-thumb:hover{background:#909090}.breadcrumb-separator{margin:0 6px;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }] });
|
|
6056
|
+
}
|
|
6057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkHierarchicalSelect, decorators: [{
|
|
6058
|
+
type: Component,
|
|
6059
|
+
args: [{ selector: 'bk-hierarchical-select', standalone: true, imports: [CommonModule, FormsModule], providers: [
|
|
6060
|
+
{
|
|
6061
|
+
provide: NG_VALUE_ACCESSOR,
|
|
6062
|
+
useExisting: forwardRef(() => BkHierarchicalSelect),
|
|
6063
|
+
multi: true,
|
|
6064
|
+
},
|
|
6065
|
+
], template: "<div class=\"hierarchical-select-container\">\r\n @if (label()) {\r\n <label\r\n class=\"input-label\"\r\n (click)=\"openFromLabel($event)\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"input-label-required\">*</span>\r\n }\r\n </label>\r\n }\r\n\r\n <div\r\n #controlWrapper\r\n class=\"hierarchical-select-control\"\r\n tabindex=\"0\"\r\n [class.focused]=\"isOpen()\"\r\n [class.disabled]=\"isDisabled()\"\r\n (mousedown)=\"toggleDropdown($event)\">\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" [alt]=\"iconAlt()\" class=\"shrink-0\" />\r\n }\r\n <div class=\"hierarchical-value-container\">\r\n @if (!selected()) {\r\n <div class=\"hierarchical-placeholder\">{{ placeholder() }}</div>\r\n } @else {\r\n <div class=\"hierarchical-value-label\" [style.color]=\"resolveColor(selected())\">\r\n @for (node of displayPath(); track getValue(node); let last = $last) {\r\n <span>{{ getLabel(node) }}</span>\r\n\r\n @if (!last) {\r\n <svg\r\n class=\"breadcrumb-separator\"\r\n width=\"5\"\r\n height=\"8\"\r\n viewBox=\"0 0 5 8\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M4.57142 4.00286C4.57185 3.92766 4.55744 3.85312 4.52901 3.78351C4.50057 3.71389 4.45868 3.65058 4.40572 3.59719L0.977497 0.169008C0.924381 0.115455 0.861186 0.0729493 0.79156 0.0439419C0.721933 0.0149346 0.647251 0 0.571824 0C0.496396 0 0.421714 0.0149346 0.352088 0.0439419C0.282461 0.0729493 0.219267 0.115455 0.16615 0.169008C0.059732 0.27606 0 0.420874 0 0.57182C0 0.722766 0.059732 0.867579 0.16615 0.974631L3.19442 4.00286L0.16615 7.02537C0.059732 7.13242 0 7.27723 0 7.42818C0 7.57913 0.059732 7.72394 0.16615 7.83099C0.219267 7.88454 0.282461 7.92705 0.352088 7.95606C0.421714 7.98507 0.496396 8 0.571824 8C0.647251 8 0.721933 7.98507 0.79156 7.95606C0.861186 7.92705 0.924381 7.88454 0.977497 7.83099L4.40572 4.40281C4.51128 4.29639 4.57079 4.15275 4.57142 4.00286Z\"\r\n fill=\"#BBBDC5\"/>\r\n </svg>\r\n }\r\n }\r\n </div>\r\n\r\n }\r\n </div>\r\n <div class=\"hierarchical-actions\">\r\n @if (clearable() && selected() && !isDisabled()) {\r\n <span class=\"hierarchical-clear-wrapper\" (mousedown)=\"handleClear($event)\" title=\"Clear\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\r\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\r\n </svg>\r\n </span>\r\n }\r\n <span class=\"hierarchical-arrow\" [class.open]=\"isOpen()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"m6 9 6 6 6-6\"/>\r\n </svg>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n @if (isOpen()) {\r\n <div\r\n class=\"hierarchical-dropdown-panel\"\r\n [class.hierarchical-dropdown-panel-fixed]=\"appendToBody()\"\r\n [style.position]=\"appendToBody() ? 'fixed' : 'absolute'\"\r\n [style.top]=\"getDropdownTop()\"\r\n [style.left]=\"getDropdownLeft()\"\r\n [style.width]=\"getDropdownWidth() ?? (appendToBody() ? null : '100%')\">\r\n <div class=\"hierarchical-search\">\r\n <div class=\"hierarchical-search-wrapper\">\r\n <svg class=\"text-[#BBBDC5] mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\">\r\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\r\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\r\n </svg>\r\n <input\r\n #searchInput\r\n type=\"text\"\r\n class=\"hierarchical-search-input\"\r\n [value]=\"searchTerm()\"\r\n [placeholder]=\"searchPlaceholder()\"\r\n (input)=\"onSearchInput($event)\"\r\n (click)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n\r\n @if (showBack()) {\r\n <button\r\n type=\"button\"\r\n class=\"hierarchical-back\"\r\n (click)=\"goBack(); $event.stopPropagation()\">\r\n <span>\r\n <svg width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M4.59961 0.599976L0.599609 4.59998L4.59961 8.59998\" stroke=\"#141414\" stroke-width=\"1.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n</svg>\r\n\r\n </span>\r\n {{ backToMainText() }}\r\n </button>\r\n }\r\n\r\n <div class=\"hierarchical-options-list\">\r\n @for (item of filteredItems(); track getValue(item)) {\r\n <div\r\n class=\"hierarchical-option\"\r\n [class.selected]=\"isSelected(item)\"\r\n (mousedown)=\"selectItem(item, $event)\">\r\n <span class=\"hierarchical-option-label\" [style.color]=\"resolveColor(item)\">{{ getLabel(item) }}</span>\r\n @if (hasChildren(item)) {\r\n <svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M4.57142 4.00286C4.57185 3.92766 4.55744 3.85312 4.52901 3.78351C4.50057 3.71389 4.45868 3.65058 4.40572 3.59719L0.977497 0.169008C0.924381 0.115455 0.861186 0.0729493 0.79156 0.0439419C0.721933 0.0149346 0.647251 0 0.571824 0C0.496396 0 0.421714 0.0149346 0.352088 0.0439419C0.282461 0.0729493 0.219267 0.115455 0.16615 0.169008C0.059732 0.27606 0 0.420874 0 0.57182C0 0.722766 0.059732 0.867579 0.16615 0.974631L3.19442 4.00286L0.16615 7.02537C0.059732 7.13242 0 7.27723 0 7.42818C0 7.57913 0.059732 7.72394 0.16615 7.83099C0.219267 7.88454 0.282461 7.92705 0.352088 7.95606C0.421714 7.98507 0.496396 8 0.571824 8C0.647251 8 0.721933 7.98507 0.79156 7.95606C0.861186 7.92705 0.924381 7.88454 0.977497 7.83099L4.40572 4.40281C4.51128 4.29639 4.57079 4.15275 4.57142 4.00286Z\" fill=\"#BBBDC5\"/>\r\n </svg>\r\n } @else if (isSelected(item)) {\r\n <svg width=\"10\" height=\"7\" viewBox=\"0 0 10 7\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3.72939 6.28273C3.64166 6.28324 3.55468 6.26642 3.47346 6.23324C3.39223 6.20007 3.31835 6.15118 3.25606 6.08939L0.196061 3.00273C0.0705253 2.87719 -1.32274e-09 2.70693 0 2.52939C1.32273e-09 2.35186 0.0705253 2.1816 0.196061 2.05606C0.321597 1.93053 0.49186 1.86 0.669394 1.86C0.846929 1.86 1.01719 1.93053 1.14273 2.05606L3.72939 4.64939L8.17606 0.196061C8.3016 0.0705253 8.47186 -3.49963e-09 8.64939 0C8.82693 3.49963e-09 8.99719 0.0705253 9.12273 0.196061C9.24826 0.321597 9.31879 0.49186 9.31879 0.669395C9.31879 0.846929 9.24826 1.01719 9.12273 1.14273L4.20273 6.06273C4.07921 6.19434 3.90963 6.27316 3.72939 6.28273V6.28273Z\" fill=\"#141414\"/>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (filteredItems().length === 0) {\r\n <div class=\"hierarchical-option-empty\">No items found</div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".hierarchical-select-container{@apply relative w-full box-border;}.hierarchical-select-control{@apply flex items-center justify-between gap-2 w-full bg-white border border-[#E3E3E7] rounded transition-all duration-200 px-3 py-2.5 cursor-pointer;}.hierarchical-select-control.focused{@apply border-[#6B7080] shadow-none z-10;}.hierarchical-select-control.disabled{@apply bg-[#F4F4F6] cursor-not-allowed opacity-60;}.hierarchical-value-container{@apply flex flex-1 items-center flex-wrap gap-1 relative overflow-hidden h-full min-w-0;}.hierarchical-placeholder{@apply text-[#6B7080] font-normal text-sm truncate w-full pointer-events-none;}.hierarchical-value-label{@apply font-normal text-sm leading-[18px] text-[#141414] truncate w-full flex items-center;}.hierarchical-actions{@apply flex items-center gap-2 flex-shrink-0;}.hierarchical-clear-wrapper{@apply text-gray-400 hover:text-red-500 cursor-pointer;}.hierarchical-arrow{@apply flex-shrink-0 text-gray-400 transition-transform duration-200;}.hierarchical-arrow.open{@apply rotate-180;}.hierarchical-dropdown-panel{@apply absolute left-0 top-[calc(100%+4px)] w-full min-w-[250px] max-w-[320px] bg-white border border-[#E3E3E7] rounded-xl shadow-lg z-[99] overflow-hidden cursor-default p-2.5;}.hierarchical-dropdown-panel-fixed{z-index:10050}.hierarchical-search{@apply px-2 pt-2;}.hierarchical-search-wrapper{@apply flex items-center border border-[#E3E3E7] rounded-md px-3 py-[7px] bg-white transition-colors focus-within:border-[#6B7080];}.hierarchical-search-input{@apply w-full outline-none font-normal text-sm text-[#141414] placeholder-[#A1A3AE] bg-transparent;}.hierarchical-back{@apply w-full text-left px-2.5 py-2 text-sm text-[#141414] hover:bg-[#F8F8F8] rounded-md transition-colors mt-1 flex items-center gap-1.5;}.hierarchical-options-list{@apply max-h-60 overflow-auto relative flex flex-col gap-0.5 mt-1;}.hierarchical-option{@apply flex items-center justify-between gap-2 p-2.5 cursor-pointer transition-colors font-normal text-sm text-[#141414] rounded-md;}.hierarchical-option:hover,.hierarchical-option.selected{@apply bg-[#F8F8F8];}.hierarchical-option-label{@apply flex-1 truncate;}.hierarchical-option-chevron{@apply flex-shrink-0 text-[#6B7080];}.hierarchical-option-check{@apply flex-shrink-0 text-[#141414];}.hierarchical-option-empty{@apply px-3 py-2 text-gray-400 cursor-default text-sm;}.input-label{@apply text-sm font-medium text-[#141414] tracking-[-.28px] mb-1.5 inline-block;}.input-label-required{@apply text-[#E7000B];}.hierarchical-options-list::-webkit-scrollbar{width:6px}.hierarchical-options-list::-webkit-scrollbar-track{background:transparent;border-radius:8px;width:8px}.hierarchical-options-list::-webkit-scrollbar-thumb{background:#d6d7dc;border-radius:8px;transition:.3s ease-in-out}.hierarchical-options-list::-webkit-scrollbar-thumb:hover{background:#909090}.breadcrumb-separator{margin:0 6px;flex-shrink:0}\n"] }]
|
|
6066
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], valueKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueKey", required: false }] }], childrenKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "childrenKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: false }] }], iconAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAlt", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowParentSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowParentSelection", required: false }] }], backToMainText: [{ type: i0.Input, args: [{ isSignal: true, alias: "backToMainText", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], appendToBody: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendToBody", required: false }] }], colorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorKey", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], clear: [{ type: i0.Output, args: ["clear"] }], searchInput: [{
|
|
6067
|
+
type: ViewChild,
|
|
6068
|
+
args: ['searchInput']
|
|
6069
|
+
}], controlWrapper: [{
|
|
6070
|
+
type: ViewChild,
|
|
6071
|
+
args: ['controlWrapper']
|
|
6072
|
+
}], onWindowScrollOrResize: [{
|
|
6073
|
+
type: HostListener,
|
|
6074
|
+
args: ['window:scroll']
|
|
6075
|
+
}, {
|
|
6076
|
+
type: HostListener,
|
|
6077
|
+
args: ['window:resize']
|
|
6078
|
+
}], onClickOutside: [{
|
|
6079
|
+
type: HostListener,
|
|
6080
|
+
args: ['document:click', ['$event']]
|
|
6081
|
+
}] } });
|
|
6082
|
+
|
|
5771
6083
|
/*
|
|
5772
6084
|
* Public API Surface of brickclay-lib
|
|
5773
6085
|
*/
|
|
@@ -5777,5 +6089,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5777
6089
|
* Generated bundle index. Do not edit.
|
|
5778
6090
|
*/
|
|
5779
6091
|
|
|
5780
|
-
export { AvatarProfile, BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkGrid, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, getDialogBackdropAnimation, getDialogPanelAnimation };
|
|
6092
|
+
export { AvatarProfile, BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkGrid, BkHierarchicalSelect, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, getDialogBackdropAnimation, getDialogPanelAnimation };
|
|
5781
6093
|
//# sourceMappingURL=brickclay-org-ui.mjs.map
|