@indigina/ui-kit 1.1.653 → 1.1.655
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.
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -6503,7 +6503,7 @@ class KitMultiselectComponent {
|
|
|
6503
6503
|
provide: NG_VALUE_ACCESSOR,
|
|
6504
6504
|
useExisting: forwardRef(() => KitMultiselectComponent),
|
|
6505
6505
|
multi: true,
|
|
6506
|
-
}], queries: [{ propertyName: "multiSelectGroupTagTemplate", first: true, predicate: KitMultiselectGroupTagTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "multiselectComponent", first: true, predicate: MultiSelectComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"kit-multiselect\"\n [class.disabled]=\"disabled()\"\n [class.loading]=\"loaderVisible()\"\n [class.all-option-selected]=\"hasSelectedAllOption\"\n [class.invalid]=\"invalid()\">\n @if (label) {\n <kit-form-label class=\"label\"\n [text]=\"label\"\n [for]=\"multiselect\"\n ></kit-form-label>\n }\n <kendo-multiselect #multiselect\n valueField=\"value\"\n textField=\"text\"\n kendoDropDownFilter\n [ngClass]=\"[size(), itemsDirection()]\"\n [data]=\"items\"\n [disabled]=\"disabled()\"\n [autoClose]=\"autoClose\"\n [placeholder]=\"placeholder\"\n [valuePrimitive]=\"true\"\n [itemDisabled]=\"onItemDisabled()\"\n [popupSettings]=\"buildPopupSettings()\"\n [tagMapper]=\"tagMapper()\"\n [kendoMultiSelectSummaryTag]=\"autoSummaryTagValue()\"\n [checkboxes]=\"useCheckboxes()\"\n [listHeight]=\"listHeight()\"\n [allowCustom]=\"allowCustom()\"\n [filterable]=\"filterable()\"\n [(ngModel)]=\"selectedItems\"\n (filterChange)=\"onFilterChange($event)\">\n <ng-template kendoMultiSelectHeaderTemplate>\n @if (loaderVisible()) {\n <div class=\"popup-loader\">\n <div class=\"popup-loader-dots\"></div>\n </div>\n }\n </ng-template>\n <ng-template kendoMultiSelectTagTemplate\n let-dataItem>\n <kit-truncate-text>\n <span class=\"chip-text\"\n [class.all-option]=\"dataItem.value === allOption().value\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n <kit-svg-icon class=\"chip-icon\"\n [icon]=\"KitSvgIcon.CROSS\"\n ></kit-svg-icon>\n </ng-template>\n <ng-template kendoMultiSelectItemTemplate\n let-dataItem>\n <kit-truncate-text>\n <span class=\"option-text\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n @if (showCheckIcon()) {\n <kit-svg-icon class=\"option-icon\"\n [icon]=\"KitSvgIcon.CHECK\"\n ></kit-svg-icon>\n }\n </ng-template>\n <ng-template kendoMultiSelectGroupTagTemplate let-dataItems>\n <ng-container *ngTemplateOutlet=\"multiSelectGroupTagTemplate(); context: { dataItems }\"/>\n </ng-template>\n </kendo-multiselect>\n\n @if (messageText) {\n <kit-form-message [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-form-message>\n }\n</div>\n", styles: [".kit-multiselect .label{display:block;margin-bottom:4px}.kit-multiselect .k-multiselect{width:100%;border:1px solid var(--ui-kit-color-grey-11);background:var(--ui-kit-color-white)}.kit-multiselect .k-multiselect:hover{border-color:var(--ui-kit-color-hover)}.kit-multiselect .k-multiselect.k-focus{box-shadow:none}.kit-multiselect .k-multiselect.small{min-height:30px;border-radius:4px}.kit-multiselect .k-multiselect.small .k-input-values{padding:5px 7px}.kit-multiselect .k-multiselect.small .k-chip{height:20px}.kit-multiselect .k-multiselect.default{min-height:40px;border-radius:8px}.kit-multiselect .k-multiselect.default .k-input-values{padding:7px 12px}.kit-multiselect .k-multiselect.default .k-chip{height:24px}.kit-multiselect .k-input .k-input-inner{padding:0}.kit-multiselect .k-input.ltr .k-input-values{flex-direction:row}.kit-multiselect .k-input.rtl .k-input-values{flex-direction:row-reverse}.kit-multiselect .k-input-values{gap:8px}.kit-multiselect .k-input-inner{font-size:14px;font-weight:400}.kit-multiselect .k-input-inner::placeholder{color:var(--ui-kit-color-grey-12)}.kit-multiselect .k-chip{display:flex;align-items:center;position:relative;padding:0 8px;border:1px solid var(--ui-kit-color-grey-11);border-radius:4px;background:var(--ui-kit-color-grey-13)}.kit-multiselect .k-chip-label{display:flex;align-items:center;gap:4px;line-height:1}.kit-multiselect .k-chip-actions{position:absolute;right:8px;width:12px;height:12px;opacity:0}.kit-multiselect .k-chip-action{display:flex;padding:0;cursor:pointer}.kit-multiselect .k-chip-content:has(+.k-chip-actions:hover) .chip-icon{stroke:var(--ui-kit-color-main)}.kit-multiselect .k-chip .chip-text{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500}.kit-multiselect .k-chip .chip-icon{display:block;width:12px;height:12px;stroke:var(--ui-kit-color-grey-12);cursor:pointer}.kit-multiselect .k-chip .k-icon{width:12px;height:12px}.kit-multiselect .k-chip:has(.chip-text.all-option){display:flex}.kit-multiselect .k-chip:last-child:has(.k-chip-content .group-tag) .k-chip-actions{display:none}.kit-multiselect .k-clear-value{margin-right:12px;padding:0;opacity:1;color:var(--ui-kit-color-grey-12)}.kit-multiselect .k-clear-value:hover{color:var(--ui-kit-color-main)}.kit-multiselect.disabled .k-multiselect{opacity:1;filter:none;background-color:var(--ui-kit-color-grey-13)}.kit-multiselect.disabled .chip-text{color:var(--ui-kit-color-grey-12)}.kit-multiselect.invalid .k-multiselect{border-color:var(--ui-kit-color-red-1)}.kit-multiselect.invalid .kit-form-message-text{color:var(--ui-kit-color-red-1)}.kit-multiselect:focus-within .k-multiselect{border-color:var(--ui-kit-color-main);box-shadow:0 0 0 2px var(--ui-kit-color-focus)}.kit-multiselect.all-option-selected .k-chip{display:none}.kit-multiselect-popup.k-popup{margin-top:10px;border:none;border-radius:8px;box-shadow:0 9px 28px 8px #0000000d,0 3px 6px -4px #0000001f,0 6px 16px #00000014;background-color:var(--ui-kit-color-white)}.kit-multiselect-popup.k-popup.k-popup{padding:4px}.kit-multiselect-popup.k-popup .k-list-ul{gap:4px}.kit-multiselect-popup.k-popup .popup-loader{display:flex;justify-content:center;align-items:center;height:150px}.kit-multiselect-popup.k-popup .popup-loader-dots{width:13px;aspect-ratio:1;border-radius:50%;animation:dots-animation 1s infinite linear alternate}.kit-multiselect-popup.k-popup:has(.popup-loader){height:150px}.kit-multiselect-popup.k-popup:has(.popup-loader) .k-no-data,.kit-multiselect-popup.k-popup:has(.popup-loader) .k-list{display:none}.kit-multiselect-popup.k-popup .k-list-item{padding:6px 12px;background-color:var(--ui-kit-color-white);font-size:14px;font-weight:400;box-shadow:none;border-radius:4px;color:var(--ui-kit-color-grey-10);flex-wrap:nowrap;transition:none}.kit-multiselect-popup.k-popup .k-list-item:hover{color:var(--ui-kit-color-main)}.kit-multiselect-popup.k-popup .k-list-item .option-icon{display:none;width:16px;height:16px;fill:none;stroke:var(--ui-kit-color-main)}.kit-multiselect-popup.k-popup .k-list-item.k-disabled{color:var(--ui-kit-color-grey-12)}.kit-multiselect-popup.k-popup .k-list-item.k-selected{display:flex;align-items:center;background-color:var(--ui-kit-color-grey-13)}.kit-multiselect-popup.k-popup .k-list-item.k-selected .option-text{flex:1}.kit-multiselect-popup.k-popup .k-list-item.k-selected .option-icon{display:block}.kit-multiselect-popup.k-popup .k-checkbox{background-color:var(--ui-kit-color-grey-13);border:1px solid var(--ui-kit-color-grey-11);margin-right:4px}.kit-multiselect-popup.k-popup .k-checkbox:checked{border-color:var(--ui-kit-color-main);background-color:var(--ui-kit-color-main)}@keyframes dots-animation{0%{box-shadow:20px 0 var(--ui-kit-color-main),-20px 0 var(--ui-kit-color-grey-12);background:var(--ui-kit-color-main)}33%{box-shadow:20px 0 var(--ui-kit-color-main),-20px 0 var(--ui-kit-color-grey-12);background:var(--ui-kit-color-grey-12)}66%{box-shadow:20px 0 var(--ui-kit-color-grey-12),-20px 0 var(--ui-kit-color-main);background:var(--ui-kit-color-grey-12)}to{box-shadow:20px 0 var(--ui-kit-color-grey-12),-20px 0 var(--ui-kit-color-main);background:var(--ui-kit-color-main)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$5.HeaderTemplateDirective, selector: "[kendoDropDownListHeaderTemplate],[kendoComboBoxHeaderTemplate],[kendoDropDownTreeHeaderTemplate],[kendoMultiColumnComboBoxHeaderTemplate],[kendoAutoCompleteHeaderTemplate],[kendoMultiSelectHeaderTemplate],[kendoMultiSelectTreeHeaderTemplate]" }, { kind: "directive", type: i1$5.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "directive", type: i1$5.FilterDirective, selector: "[kendoDropDownFilter]", inputs: ["data", "kendoDropDownFilter", "filterable"] }, { kind: "component", type: i1$5.MultiSelectComponent, selector: "kendo-multiselect", inputs: ["showStickyHeader", "focusableId", "autoClose", "loading", "data", "value", "valueField", "textField", "tabindex", "tabIndex", "size", "rounded", "fillMode", "placeholder", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "disabled", "itemDisabled", "checkboxes", "readonly", "filterable", "virtual", "popupSettings", "listHeight", "valuePrimitive", "clearButton", "tagMapper", "allowCustom", "valueNormalizer", "inputAttributes"], outputs: ["filterChange", "valueChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "removeTag"], exportAs: ["kendoMultiSelect"] }, { kind: "directive", type: i1$5.SummaryTagDirective, selector: "[kendoMultiSelectSummaryTag]", inputs: ["kendoMultiSelectSummaryTag"] }, { kind: "directive", type: i1$5.GroupTagTemplateDirective, selector: "[kendoMultiSelectGroupTagTemplate],[kendoMultiSelectTreeGroupTagTemplate]" }, { kind: "directive", type: i1$5.TagTemplateDirective, selector: "[kendoMultiSelectTagTemplate],[kendoMultiSelectTreeTagTemplate]" }, { kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "component", type: KitFormMessageComponent, selector: "kit-form-message", inputs: ["icon", "message"] }, { kind: "component", type: KitFormLabelComponent, selector: "kit-form-label", inputs: ["text", "for", "tooltip", "popoverConfig"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6506
|
+
}], queries: [{ propertyName: "multiSelectGroupTagTemplate", first: true, predicate: KitMultiselectGroupTagTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "multiselectComponent", first: true, predicate: MultiSelectComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"kit-multiselect\"\n [class.disabled]=\"disabled()\"\n [class.loading]=\"loaderVisible()\"\n [class.all-option-selected]=\"hasSelectedAllOption\"\n [class.invalid]=\"invalid()\">\n @if (label) {\n <kit-form-label class=\"label\"\n [text]=\"label\"\n [for]=\"multiselect\"\n ></kit-form-label>\n }\n <kendo-multiselect #multiselect\n valueField=\"value\"\n textField=\"text\"\n kendoDropDownFilter\n [ngClass]=\"[size(), itemsDirection()]\"\n [data]=\"items\"\n [disabled]=\"disabled()\"\n [autoClose]=\"autoClose\"\n [placeholder]=\"placeholder\"\n [valuePrimitive]=\"true\"\n [itemDisabled]=\"onItemDisabled()\"\n [popupSettings]=\"buildPopupSettings()\"\n [tagMapper]=\"tagMapper()\"\n [kendoMultiSelectSummaryTag]=\"autoSummaryTagValue()\"\n [checkboxes]=\"useCheckboxes()\"\n [listHeight]=\"listHeight()\"\n [allowCustom]=\"allowCustom()\"\n [filterable]=\"filterable()\"\n [(ngModel)]=\"selectedItems\"\n (filterChange)=\"onFilterChange($event)\">\n <ng-template kendoMultiSelectHeaderTemplate>\n @if (loaderVisible()) {\n <div class=\"popup-loader\">\n <div class=\"popup-loader-dots\"></div>\n </div>\n }\n </ng-template>\n <ng-template kendoMultiSelectTagTemplate\n let-dataItem>\n <kit-truncate-text>\n <span class=\"chip-text\"\n [class.all-option]=\"dataItem.value === allOption().value\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n <kit-svg-icon class=\"chip-icon\"\n [icon]=\"KitSvgIcon.CROSS\"\n ></kit-svg-icon>\n </ng-template>\n <ng-template kendoMultiSelectItemTemplate\n let-dataItem>\n <div class=\"option-content\">\n <kit-truncate-text>\n <span class=\"option-text\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n @if (dataItem?.subText) {\n <kit-truncate-text>\n <span class=\"option-sub-text\">{{ dataItem.subText }}</span>\n </kit-truncate-text>\n }\n </div>\n @if (showCheckIcon()) {\n <kit-svg-icon class=\"option-icon\"\n [icon]=\"KitSvgIcon.CHECK\"\n ></kit-svg-icon>\n }\n </ng-template>\n <ng-template kendoMultiSelectGroupTagTemplate let-dataItems>\n <ng-container *ngTemplateOutlet=\"multiSelectGroupTagTemplate(); context: { dataItems }\"/>\n </ng-template>\n </kendo-multiselect>\n\n @if (messageText) {\n <kit-form-message [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-form-message>\n }\n</div>\n", styles: [".kit-multiselect .label{display:block;margin-bottom:4px}.kit-multiselect .k-multiselect{width:100%;border:1px solid var(--ui-kit-color-grey-11);background:var(--ui-kit-color-white)}.kit-multiselect .k-multiselect:hover{border-color:var(--ui-kit-color-hover)}.kit-multiselect .k-multiselect.k-focus{box-shadow:none}.kit-multiselect .k-multiselect.small{min-height:30px;border-radius:4px}.kit-multiselect .k-multiselect.small .k-input-values{padding:5px 7px}.kit-multiselect .k-multiselect.small .k-chip{height:20px}.kit-multiselect .k-multiselect.default{min-height:40px;border-radius:8px}.kit-multiselect .k-multiselect.default .k-input-values{padding:7px 12px}.kit-multiselect .k-multiselect.default .k-chip{height:24px}.kit-multiselect .k-input .k-input-inner{padding:0}.kit-multiselect .k-input.ltr .k-input-values{flex-direction:row}.kit-multiselect .k-input.rtl .k-input-values{flex-direction:row-reverse}.kit-multiselect .k-input-values{gap:8px}.kit-multiselect .k-input-inner{font-size:14px;font-weight:400}.kit-multiselect .k-input-inner::placeholder{color:var(--ui-kit-color-grey-12)}.kit-multiselect .k-chip{display:flex;align-items:center;position:relative;padding:0 8px;border:1px solid var(--ui-kit-color-grey-11);border-radius:4px;background:var(--ui-kit-color-grey-13)}.kit-multiselect .k-chip-label{display:flex;align-items:center;gap:4px;line-height:1}.kit-multiselect .k-chip-actions{position:absolute;right:8px;width:12px;height:12px;opacity:0}.kit-multiselect .k-chip-action{display:flex;padding:0;cursor:pointer}.kit-multiselect .k-chip-content:has(+.k-chip-actions:hover) .chip-icon{stroke:var(--ui-kit-color-main)}.kit-multiselect .k-chip .chip-text{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500}.kit-multiselect .k-chip .chip-icon{display:block;width:12px;height:12px;stroke:var(--ui-kit-color-grey-12);cursor:pointer}.kit-multiselect .k-chip .k-icon{width:12px;height:12px}.kit-multiselect .k-chip:has(.chip-text.all-option){display:flex}.kit-multiselect .k-chip:last-child:has(.k-chip-content .group-tag) .k-chip-actions{display:none}.kit-multiselect .k-clear-value{margin-right:12px;padding:0;opacity:1;color:var(--ui-kit-color-grey-12)}.kit-multiselect .k-clear-value:hover{color:var(--ui-kit-color-main)}.kit-multiselect.disabled .k-multiselect{opacity:1;filter:none;background-color:var(--ui-kit-color-grey-13)}.kit-multiselect.disabled .chip-text{color:var(--ui-kit-color-grey-12)}.kit-multiselect.invalid .k-multiselect{border-color:var(--ui-kit-color-red-1)}.kit-multiselect.invalid .kit-form-message-text{color:var(--ui-kit-color-red-1)}.kit-multiselect:focus-within .k-multiselect{border-color:var(--ui-kit-color-main);box-shadow:0 0 0 2px var(--ui-kit-color-focus)}.kit-multiselect.all-option-selected .k-chip{display:none}.kit-multiselect-popup.k-popup{margin-top:10px;border:none;border-radius:8px;box-shadow:0 9px 28px 8px #0000000d,0 3px 6px -4px #0000001f,0 6px 16px #00000014;background-color:var(--ui-kit-color-white)}.kit-multiselect-popup.k-popup.k-popup{padding:4px}.kit-multiselect-popup.k-popup .k-list-ul{gap:4px}.kit-multiselect-popup.k-popup .popup-loader{display:flex;justify-content:center;align-items:center;height:150px}.kit-multiselect-popup.k-popup .popup-loader-dots{width:13px;aspect-ratio:1;border-radius:50%;animation:dots-animation 1s infinite linear alternate}.kit-multiselect-popup.k-popup:has(.popup-loader){height:150px}.kit-multiselect-popup.k-popup:has(.popup-loader) .k-no-data,.kit-multiselect-popup.k-popup:has(.popup-loader) .k-list{display:none}.kit-multiselect-popup.k-popup .k-list-item{padding:6px 12px;background-color:var(--ui-kit-color-white);font-size:14px;font-weight:400;box-shadow:none;border-radius:4px;color:var(--ui-kit-color-grey-10);flex-wrap:nowrap;transition:none}.kit-multiselect-popup.k-popup .k-list-item:hover{color:var(--ui-kit-color-main)}.kit-multiselect-popup.k-popup .k-list-item .option-icon{display:none;width:16px;height:16px;fill:none;stroke:var(--ui-kit-color-main)}.kit-multiselect-popup.k-popup .k-list-item .option-content{display:flex;flex:1;flex-direction:column;min-width:0}.kit-multiselect-popup.k-popup .k-list-item .option-text,.kit-multiselect-popup.k-popup .k-list-item .option-sub-text{display:block;width:100%}.kit-multiselect-popup.k-popup .k-list-item .option-sub-text{color:var(--ui-kit-color-grey-12);font-size:12px;line-height:16px}.kit-multiselect-popup.k-popup .k-list-item.k-disabled{color:var(--ui-kit-color-grey-12)}.kit-multiselect-popup.k-popup .k-list-item.k-selected{display:flex;align-items:center;background-color:var(--ui-kit-color-grey-13)}.kit-multiselect-popup.k-popup .k-list-item.k-selected .option-icon{display:block}.kit-multiselect-popup.k-popup .k-checkbox{background-color:var(--ui-kit-color-grey-13);border:1px solid var(--ui-kit-color-grey-11);margin-right:4px}.kit-multiselect-popup.k-popup .k-checkbox:checked{border-color:var(--ui-kit-color-main);background-color:var(--ui-kit-color-main)}@keyframes dots-animation{0%{box-shadow:20px 0 var(--ui-kit-color-main),-20px 0 var(--ui-kit-color-grey-12);background:var(--ui-kit-color-main)}33%{box-shadow:20px 0 var(--ui-kit-color-main),-20px 0 var(--ui-kit-color-grey-12);background:var(--ui-kit-color-grey-12)}66%{box-shadow:20px 0 var(--ui-kit-color-grey-12),-20px 0 var(--ui-kit-color-main);background:var(--ui-kit-color-grey-12)}to{box-shadow:20px 0 var(--ui-kit-color-grey-12),-20px 0 var(--ui-kit-color-main);background:var(--ui-kit-color-main)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$5.HeaderTemplateDirective, selector: "[kendoDropDownListHeaderTemplate],[kendoComboBoxHeaderTemplate],[kendoDropDownTreeHeaderTemplate],[kendoMultiColumnComboBoxHeaderTemplate],[kendoAutoCompleteHeaderTemplate],[kendoMultiSelectHeaderTemplate],[kendoMultiSelectTreeHeaderTemplate]" }, { kind: "directive", type: i1$5.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "directive", type: i1$5.FilterDirective, selector: "[kendoDropDownFilter]", inputs: ["data", "kendoDropDownFilter", "filterable"] }, { kind: "component", type: i1$5.MultiSelectComponent, selector: "kendo-multiselect", inputs: ["showStickyHeader", "focusableId", "autoClose", "loading", "data", "value", "valueField", "textField", "tabindex", "tabIndex", "size", "rounded", "fillMode", "placeholder", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "disabled", "itemDisabled", "checkboxes", "readonly", "filterable", "virtual", "popupSettings", "listHeight", "valuePrimitive", "clearButton", "tagMapper", "allowCustom", "valueNormalizer", "inputAttributes"], outputs: ["filterChange", "valueChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "removeTag"], exportAs: ["kendoMultiSelect"] }, { kind: "directive", type: i1$5.SummaryTagDirective, selector: "[kendoMultiSelectSummaryTag]", inputs: ["kendoMultiSelectSummaryTag"] }, { kind: "directive", type: i1$5.GroupTagTemplateDirective, selector: "[kendoMultiSelectGroupTagTemplate],[kendoMultiSelectTreeGroupTagTemplate]" }, { kind: "directive", type: i1$5.TagTemplateDirective, selector: "[kendoMultiSelectTagTemplate],[kendoMultiSelectTreeTagTemplate]" }, { kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "component", type: KitFormMessageComponent, selector: "kit-form-message", inputs: ["icon", "message"] }, { kind: "component", type: KitFormLabelComponent, selector: "kit-form-label", inputs: ["text", "for", "tooltip", "popoverConfig"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6507
6507
|
}
|
|
6508
6508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitMultiselectComponent, decorators: [{
|
|
6509
6509
|
type: Component,
|
|
@@ -6520,7 +6520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
6520
6520
|
KitFormLabelComponent,
|
|
6521
6521
|
NgClass,
|
|
6522
6522
|
KitTruncateTextComponent,
|
|
6523
|
-
], template: "<div class=\"kit-multiselect\"\n [class.disabled]=\"disabled()\"\n [class.loading]=\"loaderVisible()\"\n [class.all-option-selected]=\"hasSelectedAllOption\"\n [class.invalid]=\"invalid()\">\n @if (label) {\n <kit-form-label class=\"label\"\n [text]=\"label\"\n [for]=\"multiselect\"\n ></kit-form-label>\n }\n <kendo-multiselect #multiselect\n valueField=\"value\"\n textField=\"text\"\n kendoDropDownFilter\n [ngClass]=\"[size(), itemsDirection()]\"\n [data]=\"items\"\n [disabled]=\"disabled()\"\n [autoClose]=\"autoClose\"\n [placeholder]=\"placeholder\"\n [valuePrimitive]=\"true\"\n [itemDisabled]=\"onItemDisabled()\"\n [popupSettings]=\"buildPopupSettings()\"\n [tagMapper]=\"tagMapper()\"\n [kendoMultiSelectSummaryTag]=\"autoSummaryTagValue()\"\n [checkboxes]=\"useCheckboxes()\"\n [listHeight]=\"listHeight()\"\n [allowCustom]=\"allowCustom()\"\n [filterable]=\"filterable()\"\n [(ngModel)]=\"selectedItems\"\n (filterChange)=\"onFilterChange($event)\">\n <ng-template kendoMultiSelectHeaderTemplate>\n @if (loaderVisible()) {\n <div class=\"popup-loader\">\n <div class=\"popup-loader-dots\"></div>\n </div>\n }\n </ng-template>\n <ng-template kendoMultiSelectTagTemplate\n let-dataItem>\n <kit-truncate-text>\n <span class=\"chip-text\"\n [class.all-option]=\"dataItem.value === allOption().value\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n <kit-svg-icon class=\"chip-icon\"\n [icon]=\"KitSvgIcon.CROSS\"\n ></kit-svg-icon>\n </ng-template>\n <ng-template kendoMultiSelectItemTemplate\n let-dataItem>\n <kit-truncate-text>\n
|
|
6523
|
+
], template: "<div class=\"kit-multiselect\"\n [class.disabled]=\"disabled()\"\n [class.loading]=\"loaderVisible()\"\n [class.all-option-selected]=\"hasSelectedAllOption\"\n [class.invalid]=\"invalid()\">\n @if (label) {\n <kit-form-label class=\"label\"\n [text]=\"label\"\n [for]=\"multiselect\"\n ></kit-form-label>\n }\n <kendo-multiselect #multiselect\n valueField=\"value\"\n textField=\"text\"\n kendoDropDownFilter\n [ngClass]=\"[size(), itemsDirection()]\"\n [data]=\"items\"\n [disabled]=\"disabled()\"\n [autoClose]=\"autoClose\"\n [placeholder]=\"placeholder\"\n [valuePrimitive]=\"true\"\n [itemDisabled]=\"onItemDisabled()\"\n [popupSettings]=\"buildPopupSettings()\"\n [tagMapper]=\"tagMapper()\"\n [kendoMultiSelectSummaryTag]=\"autoSummaryTagValue()\"\n [checkboxes]=\"useCheckboxes()\"\n [listHeight]=\"listHeight()\"\n [allowCustom]=\"allowCustom()\"\n [filterable]=\"filterable()\"\n [(ngModel)]=\"selectedItems\"\n (filterChange)=\"onFilterChange($event)\">\n <ng-template kendoMultiSelectHeaderTemplate>\n @if (loaderVisible()) {\n <div class=\"popup-loader\">\n <div class=\"popup-loader-dots\"></div>\n </div>\n }\n </ng-template>\n <ng-template kendoMultiSelectTagTemplate\n let-dataItem>\n <kit-truncate-text>\n <span class=\"chip-text\"\n [class.all-option]=\"dataItem.value === allOption().value\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n <kit-svg-icon class=\"chip-icon\"\n [icon]=\"KitSvgIcon.CROSS\"\n ></kit-svg-icon>\n </ng-template>\n <ng-template kendoMultiSelectItemTemplate\n let-dataItem>\n <div class=\"option-content\">\n <kit-truncate-text>\n <span class=\"option-text\"\n [ngClass]=\"dataItem?.optionClass\">\n {{ dataItem?.text }}\n </span>\n </kit-truncate-text>\n @if (dataItem?.subText) {\n <kit-truncate-text>\n <span class=\"option-sub-text\">{{ dataItem.subText }}</span>\n </kit-truncate-text>\n }\n </div>\n @if (showCheckIcon()) {\n <kit-svg-icon class=\"option-icon\"\n [icon]=\"KitSvgIcon.CHECK\"\n ></kit-svg-icon>\n }\n </ng-template>\n <ng-template kendoMultiSelectGroupTagTemplate let-dataItems>\n <ng-container *ngTemplateOutlet=\"multiSelectGroupTagTemplate(); context: { dataItems }\"/>\n </ng-template>\n </kendo-multiselect>\n\n @if (messageText) {\n <kit-form-message [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-form-message>\n }\n</div>\n", styles: [".kit-multiselect .label{display:block;margin-bottom:4px}.kit-multiselect .k-multiselect{width:100%;border:1px solid var(--ui-kit-color-grey-11);background:var(--ui-kit-color-white)}.kit-multiselect .k-multiselect:hover{border-color:var(--ui-kit-color-hover)}.kit-multiselect .k-multiselect.k-focus{box-shadow:none}.kit-multiselect .k-multiselect.small{min-height:30px;border-radius:4px}.kit-multiselect .k-multiselect.small .k-input-values{padding:5px 7px}.kit-multiselect .k-multiselect.small .k-chip{height:20px}.kit-multiselect .k-multiselect.default{min-height:40px;border-radius:8px}.kit-multiselect .k-multiselect.default .k-input-values{padding:7px 12px}.kit-multiselect .k-multiselect.default .k-chip{height:24px}.kit-multiselect .k-input .k-input-inner{padding:0}.kit-multiselect .k-input.ltr .k-input-values{flex-direction:row}.kit-multiselect .k-input.rtl .k-input-values{flex-direction:row-reverse}.kit-multiselect .k-input-values{gap:8px}.kit-multiselect .k-input-inner{font-size:14px;font-weight:400}.kit-multiselect .k-input-inner::placeholder{color:var(--ui-kit-color-grey-12)}.kit-multiselect .k-chip{display:flex;align-items:center;position:relative;padding:0 8px;border:1px solid var(--ui-kit-color-grey-11);border-radius:4px;background:var(--ui-kit-color-grey-13)}.kit-multiselect .k-chip-label{display:flex;align-items:center;gap:4px;line-height:1}.kit-multiselect .k-chip-actions{position:absolute;right:8px;width:12px;height:12px;opacity:0}.kit-multiselect .k-chip-action{display:flex;padding:0;cursor:pointer}.kit-multiselect .k-chip-content:has(+.k-chip-actions:hover) .chip-icon{stroke:var(--ui-kit-color-main)}.kit-multiselect .k-chip .chip-text{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500}.kit-multiselect .k-chip .chip-icon{display:block;width:12px;height:12px;stroke:var(--ui-kit-color-grey-12);cursor:pointer}.kit-multiselect .k-chip .k-icon{width:12px;height:12px}.kit-multiselect .k-chip:has(.chip-text.all-option){display:flex}.kit-multiselect .k-chip:last-child:has(.k-chip-content .group-tag) .k-chip-actions{display:none}.kit-multiselect .k-clear-value{margin-right:12px;padding:0;opacity:1;color:var(--ui-kit-color-grey-12)}.kit-multiselect .k-clear-value:hover{color:var(--ui-kit-color-main)}.kit-multiselect.disabled .k-multiselect{opacity:1;filter:none;background-color:var(--ui-kit-color-grey-13)}.kit-multiselect.disabled .chip-text{color:var(--ui-kit-color-grey-12)}.kit-multiselect.invalid .k-multiselect{border-color:var(--ui-kit-color-red-1)}.kit-multiselect.invalid .kit-form-message-text{color:var(--ui-kit-color-red-1)}.kit-multiselect:focus-within .k-multiselect{border-color:var(--ui-kit-color-main);box-shadow:0 0 0 2px var(--ui-kit-color-focus)}.kit-multiselect.all-option-selected .k-chip{display:none}.kit-multiselect-popup.k-popup{margin-top:10px;border:none;border-radius:8px;box-shadow:0 9px 28px 8px #0000000d,0 3px 6px -4px #0000001f,0 6px 16px #00000014;background-color:var(--ui-kit-color-white)}.kit-multiselect-popup.k-popup.k-popup{padding:4px}.kit-multiselect-popup.k-popup .k-list-ul{gap:4px}.kit-multiselect-popup.k-popup .popup-loader{display:flex;justify-content:center;align-items:center;height:150px}.kit-multiselect-popup.k-popup .popup-loader-dots{width:13px;aspect-ratio:1;border-radius:50%;animation:dots-animation 1s infinite linear alternate}.kit-multiselect-popup.k-popup:has(.popup-loader){height:150px}.kit-multiselect-popup.k-popup:has(.popup-loader) .k-no-data,.kit-multiselect-popup.k-popup:has(.popup-loader) .k-list{display:none}.kit-multiselect-popup.k-popup .k-list-item{padding:6px 12px;background-color:var(--ui-kit-color-white);font-size:14px;font-weight:400;box-shadow:none;border-radius:4px;color:var(--ui-kit-color-grey-10);flex-wrap:nowrap;transition:none}.kit-multiselect-popup.k-popup .k-list-item:hover{color:var(--ui-kit-color-main)}.kit-multiselect-popup.k-popup .k-list-item .option-icon{display:none;width:16px;height:16px;fill:none;stroke:var(--ui-kit-color-main)}.kit-multiselect-popup.k-popup .k-list-item .option-content{display:flex;flex:1;flex-direction:column;min-width:0}.kit-multiselect-popup.k-popup .k-list-item .option-text,.kit-multiselect-popup.k-popup .k-list-item .option-sub-text{display:block;width:100%}.kit-multiselect-popup.k-popup .k-list-item .option-sub-text{color:var(--ui-kit-color-grey-12);font-size:12px;line-height:16px}.kit-multiselect-popup.k-popup .k-list-item.k-disabled{color:var(--ui-kit-color-grey-12)}.kit-multiselect-popup.k-popup .k-list-item.k-selected{display:flex;align-items:center;background-color:var(--ui-kit-color-grey-13)}.kit-multiselect-popup.k-popup .k-list-item.k-selected .option-icon{display:block}.kit-multiselect-popup.k-popup .k-checkbox{background-color:var(--ui-kit-color-grey-13);border:1px solid var(--ui-kit-color-grey-11);margin-right:4px}.kit-multiselect-popup.k-popup .k-checkbox:checked{border-color:var(--ui-kit-color-main);background-color:var(--ui-kit-color-main)}@keyframes dots-animation{0%{box-shadow:20px 0 var(--ui-kit-color-main),-20px 0 var(--ui-kit-color-grey-12);background:var(--ui-kit-color-main)}33%{box-shadow:20px 0 var(--ui-kit-color-main),-20px 0 var(--ui-kit-color-grey-12);background:var(--ui-kit-color-grey-12)}66%{box-shadow:20px 0 var(--ui-kit-color-grey-12),-20px 0 var(--ui-kit-color-main);background:var(--ui-kit-color-grey-12)}to{box-shadow:20px 0 var(--ui-kit-color-grey-12),-20px 0 var(--ui-kit-color-main);background:var(--ui-kit-color-main)}}\n"] }]
|
|
6524
6524
|
}], ctorParameters: () => [], propDecorators: { items: [{
|
|
6525
6525
|
type: Input
|
|
6526
6526
|
}], selectedItems: [{
|
|
@@ -16690,12 +16690,22 @@ class KitFilterMultiselectComponent {
|
|
|
16690
16690
|
...this.items(),
|
|
16691
16691
|
...this.selectedItems()
|
|
16692
16692
|
.filter(value => !this.items().some(item => item.value === value))
|
|
16693
|
-
.map(value => ({
|
|
16693
|
+
.map(value => ({
|
|
16694
|
+
title: this.getStoredItemTitle(value),
|
|
16695
|
+
subText: this.getStoredItemSubText(value),
|
|
16696
|
+
value,
|
|
16697
|
+
checked: true,
|
|
16698
|
+
})),
|
|
16694
16699
|
];
|
|
16695
|
-
return items.map(item => ({
|
|
16700
|
+
return items.map(item => ({
|
|
16701
|
+
text: item.title,
|
|
16702
|
+
...(item.subText !== undefined ? { subText: item.subText } : {}),
|
|
16703
|
+
value: item.value,
|
|
16704
|
+
}));
|
|
16696
16705
|
}, /* @ts-ignore */
|
|
16697
16706
|
...(ngDevMode ? [{ debugName: "kitMultiselectItems" }] : /* istanbul ignore next */ []));
|
|
16698
16707
|
this.knownItemTitles = new Map();
|
|
16708
|
+
this.knownItemSubTexts = new Map();
|
|
16699
16709
|
this.searchTerms = new Subject();
|
|
16700
16710
|
this.rafId = null;
|
|
16701
16711
|
}
|
|
@@ -16749,12 +16759,16 @@ class KitFilterMultiselectComponent {
|
|
|
16749
16759
|
applyFilter() {
|
|
16750
16760
|
this.filterChanged.emit({
|
|
16751
16761
|
logic: KitFilterLogic.OR,
|
|
16752
|
-
filters: this.selectedItems().map(value =>
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16762
|
+
filters: this.selectedItems().map(value => {
|
|
16763
|
+
const subText = this.getStoredItemSubText(value);
|
|
16764
|
+
return {
|
|
16765
|
+
field: this.filter().field,
|
|
16766
|
+
operator: KitFilterOperator.EQ,
|
|
16767
|
+
value,
|
|
16768
|
+
title: this.getStoredItemTitle(value),
|
|
16769
|
+
...(subText !== undefined ? { subText } : {}),
|
|
16770
|
+
};
|
|
16771
|
+
}),
|
|
16758
16772
|
});
|
|
16759
16773
|
}
|
|
16760
16774
|
clearFilter() {
|
|
@@ -16770,6 +16784,10 @@ class KitFilterMultiselectComponent {
|
|
|
16770
16784
|
if (item.title && (typeof item.value === 'string' || typeof item.value === 'number' || typeof item.value === 'boolean')) {
|
|
16771
16785
|
this.knownItemTitles.set(item.value, item.title);
|
|
16772
16786
|
}
|
|
16787
|
+
if (item.subText !== undefined &&
|
|
16788
|
+
(typeof item.value === 'string' || typeof item.value === 'number' || typeof item.value === 'boolean')) {
|
|
16789
|
+
this.knownItemSubTexts.set(item.value, item.subText);
|
|
16790
|
+
}
|
|
16773
16791
|
});
|
|
16774
16792
|
const selectedValues = filterValue?.filters
|
|
16775
16793
|
.filter(filter => filter.operator === KitFilterOperator.EQ)
|
|
@@ -16782,13 +16800,23 @@ class KitFilterMultiselectComponent {
|
|
|
16782
16800
|
this.knownItemTitles.get(value) ??
|
|
16783
16801
|
String(value);
|
|
16784
16802
|
}
|
|
16803
|
+
getStoredItemSubText(value) {
|
|
16804
|
+
const item = this.items().find(option => option.value === value);
|
|
16805
|
+
return item ? item.subText : this.knownItemSubTexts.get(value);
|
|
16806
|
+
}
|
|
16785
16807
|
rememberItemTitles() {
|
|
16786
16808
|
for (const item of this.items()) {
|
|
16787
16809
|
this.knownItemTitles.set(item.value, item.title);
|
|
16810
|
+
if (item.subText !== undefined) {
|
|
16811
|
+
this.knownItemSubTexts.set(item.value, item.subText);
|
|
16812
|
+
}
|
|
16813
|
+
else {
|
|
16814
|
+
this.knownItemSubTexts.delete(item.value);
|
|
16815
|
+
}
|
|
16788
16816
|
}
|
|
16789
16817
|
}
|
|
16790
16818
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16791
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterMultiselectComponent, isStandalone: true, selector: "kit-filter-multiselect", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, useTranslation: { classPropertyName: "useTranslation", publicName: "useTranslation", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChanged: "searchChanged", filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (displayedValues.length > 1) {\n <div class=\"kit-filter-multiselect-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-multiselect-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipVisible]=\"!isPopupOpen\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] }}</span>\n <span class=\"kit-filter-multiselect-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] ?? '' }}</span>\n }\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-multiselect-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [extraInsideSelectors]=\"['.kit-filter-multiselect-options-popup']\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearFilter()\"\n (opened)=\"onPopupOpened()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-multiselect popupClass=\"kit-filter-multiselect-options-popup\"\n [items]=\"kitMultiselectItems()\"\n [selectedItems]=\"selectedItems()\"\n [placeholder]=\"'kit.common.selectValue' | translate\"\n [loaderVisible]=\"loading()\"\n (filterChanged)=\"onSearchChange($event)\"\n (changed)=\"onSelectionChange($event)\"\n ></kit-multiselect>\n </div>\n</ng-template>\n\n<ng-template #tooltipTemplate>\n @for (item of displayedValues.slice(1); track item) {\n <div class=\"kit-filter-multiselect-tooltip-item\">{{ item }}</div>\n }\n</ng-template>\n", styles: [".kit-filter-multiselect-tooltip{display:flex;align-items:center;gap:3px}.kit-filter-multiselect-tooltip-count{color:var(--ui-kit-color-main)}.kit-filter-multiselect-tooltip-item{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500;line-height:20px}.kit-filter-multiselect-single-item{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .kit-filter-multiselect-popup .popup-content{width:296px;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: KitMultiselectComponent, selector: "kit-multiselect", inputs: ["items", "selectedItems", "label", "disabled", "placeholder", "autoClose", "messageIcon", "messageText", "shouldAddAllAsOption", "allOptionLabel", "tagMapper", "size", "useCheckboxes", "popupClass", "listHeight", "allowCustom", "invalid", "filterable", "loaderVisible", "itemsDirection", "autoSummaryTag", "autoSummaryTagContainerClass", "fallbackGroupChipWidth", "showCheckIcon"], outputs: ["disabledChange", "filterChanged", "changed"] }, { kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible", "kitTooltipOffset"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16819
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterMultiselectComponent, isStandalone: true, selector: "kit-filter-multiselect", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, useTranslation: { classPropertyName: "useTranslation", publicName: "useTranslation", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChanged: "searchChanged", filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (displayedValues.length > 1) {\n <div class=\"kit-filter-multiselect-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-multiselect-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipVisible]=\"!isPopupOpen\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] }}</span>\n <span class=\"kit-filter-multiselect-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] ?? '' }}</span>\n }\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-multiselect-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [extraInsideSelectors]=\"['.kit-filter-multiselect-options-popup']\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearFilter()\"\n (opened)=\"onPopupOpened()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-multiselect popupClass=\"kit-filter-multiselect-options-popup\"\n [items]=\"kitMultiselectItems()\"\n [selectedItems]=\"selectedItems()\"\n [placeholder]=\"'kit.common.selectValue' | translate\"\n [loaderVisible]=\"loading()\"\n (filterChanged)=\"onSearchChange($event)\"\n (changed)=\"onSelectionChange($event)\"\n ></kit-multiselect>\n </div>\n</ng-template>\n\n<ng-template #tooltipTemplate>\n @for (item of displayedValues.slice(1); track item) {\n <div class=\"kit-filter-multiselect-tooltip-item\">{{ item }}</div>\n }\n</ng-template>\n", styles: [".kit-filter-multiselect-tooltip{display:flex;align-items:center;gap:3px}.kit-filter-multiselect-tooltip-count{color:var(--ui-kit-color-main)}.kit-filter-multiselect-tooltip-item{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500;line-height:20px}.kit-filter-multiselect-single-item{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1}::ng-deep .kit-filter-multiselect-popup .popup-content{width:296px;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: KitMultiselectComponent, selector: "kit-multiselect", inputs: ["items", "selectedItems", "label", "disabled", "placeholder", "autoClose", "messageIcon", "messageText", "shouldAddAllAsOption", "allOptionLabel", "tagMapper", "size", "useCheckboxes", "popupClass", "listHeight", "allowCustom", "invalid", "filterable", "loaderVisible", "itemsDirection", "autoSummaryTag", "autoSummaryTagContainerClass", "fallbackGroupChipWidth", "showCheckIcon"], outputs: ["disabledChange", "filterChanged", "changed"] }, { kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible", "kitTooltipOffset"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16792
16820
|
}
|
|
16793
16821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterMultiselectComponent, decorators: [{
|
|
16794
16822
|
type: Component,
|
|
@@ -16798,7 +16826,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
16798
16826
|
KitPopupComponent,
|
|
16799
16827
|
KitTooltipDirective,
|
|
16800
16828
|
TranslatePipe,
|
|
16801
|
-
], template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (displayedValues.length > 1) {\n <div class=\"kit-filter-multiselect-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-multiselect-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipVisible]=\"!isPopupOpen\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] }}</span>\n <span class=\"kit-filter-multiselect-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] ?? '' }}</span>\n }\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-multiselect-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [extraInsideSelectors]=\"['.kit-filter-multiselect-options-popup']\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearFilter()\"\n (opened)=\"onPopupOpened()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-multiselect popupClass=\"kit-filter-multiselect-options-popup\"\n [items]=\"kitMultiselectItems()\"\n [selectedItems]=\"selectedItems()\"\n [placeholder]=\"'kit.common.selectValue' | translate\"\n [loaderVisible]=\"loading()\"\n (filterChanged)=\"onSearchChange($event)\"\n (changed)=\"onSelectionChange($event)\"\n ></kit-multiselect>\n </div>\n</ng-template>\n\n<ng-template #tooltipTemplate>\n @for (item of displayedValues.slice(1); track item) {\n <div class=\"kit-filter-multiselect-tooltip-item\">{{ item }}</div>\n }\n</ng-template>\n", styles: [".kit-filter-multiselect-tooltip{display:flex;align-items:center;gap:3px}.kit-filter-multiselect-tooltip-count{color:var(--ui-kit-color-main)}.kit-filter-multiselect-tooltip-item{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500;line-height:20px}.kit-filter-multiselect-single-item{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .kit-filter-multiselect-popup .popup-content{width:296px;box-sizing:border-box}\n"] }]
|
|
16829
|
+
], template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (displayedValues.length > 1) {\n <div class=\"kit-filter-multiselect-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-multiselect-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipVisible]=\"!isPopupOpen\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] }}</span>\n <span class=\"kit-filter-multiselect-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n <span class=\"kit-filter-multiselect-single-item\">{{ displayedValues[0] ?? '' }}</span>\n }\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-multiselect-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [extraInsideSelectors]=\"['.kit-filter-multiselect-options-popup']\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearFilter()\"\n (opened)=\"onPopupOpened()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-multiselect popupClass=\"kit-filter-multiselect-options-popup\"\n [items]=\"kitMultiselectItems()\"\n [selectedItems]=\"selectedItems()\"\n [placeholder]=\"'kit.common.selectValue' | translate\"\n [loaderVisible]=\"loading()\"\n (filterChanged)=\"onSearchChange($event)\"\n (changed)=\"onSelectionChange($event)\"\n ></kit-multiselect>\n </div>\n</ng-template>\n\n<ng-template #tooltipTemplate>\n @for (item of displayedValues.slice(1); track item) {\n <div class=\"kit-filter-multiselect-tooltip-item\">{{ item }}</div>\n }\n</ng-template>\n", styles: [".kit-filter-multiselect-tooltip{display:flex;align-items:center;gap:3px}.kit-filter-multiselect-tooltip-count{color:var(--ui-kit-color-main)}.kit-filter-multiselect-tooltip-item{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500;line-height:20px}.kit-filter-multiselect-single-item{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1}::ng-deep .kit-filter-multiselect-popup .popup-content{width:296px;box-sizing:border-box}\n"] }]
|
|
16802
16830
|
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], useTranslation: [{ type: i0.Input, args: [{ isSignal: true, alias: "useTranslation", required: false }] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], searchChanged: [{ type: i0.Output, args: ["searchChanged"] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
16803
16831
|
|
|
16804
16832
|
class KitFilterNullCheckComponent {
|
|
@@ -17184,7 +17212,7 @@ class KitGridFiltersComponent {
|
|
|
17184
17212
|
return filters.some(filter => filter.field === item.field || filter.field === item.apiField);
|
|
17185
17213
|
}
|
|
17186
17214
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitGridFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17187
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitGridFiltersComponent, isStandalone: true, selector: "kit-grid-filters", inputs: { excludedColumns: { classPropertyName: "excludedColumns", publicName: "excludedColumns", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, filterListConfig: { classPropertyName: "filterListConfig", publicName: "filterListConfig", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item.field) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField ?? ''\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.MULTISELECT) {\n <kit-filter-multiselect [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [loading]=\"filterListConfig()[item.field].loading ?? false\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (searchChanged)=\"filterListConfig()[item.field].search?.($event)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-multiselect>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap
|
|
17215
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitGridFiltersComponent, isStandalone: true, selector: "kit-grid-filters", inputs: { excludedColumns: { classPropertyName: "excludedColumns", publicName: "excludedColumns", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, filterListConfig: { classPropertyName: "filterListConfig", publicName: "filterListConfig", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item.field) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField ?? ''\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.MULTISELECT) {\n <kit-filter-multiselect [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [loading]=\"filterListConfig()[item.field].loading ?? false\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (searchChanged)=\"filterListConfig()[item.field].search?.($event)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-multiselect>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"], dependencies: [{ kind: "component", type: KitFilterSelectorComponent, selector: "kit-filter-selector", inputs: ["items"], outputs: ["itemSelected"] }, { kind: "component", type: KitFilterCheckboxComponent, selector: "kit-filter-checkbox", inputs: ["filter", "translateKeyPrefix", "items", "showPopupOnInit", "guidField", "useTranslation"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterDateComponent, selector: "kit-filter-date", inputs: ["filter", "showPopupOnInit", "useUserTimeZone", "useLocalTimeZone", "dateFilterConstraint"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterRadioComponent, selector: "kit-filter-radio", inputs: ["filter", "translateKeyPrefix", "items", "useTranslation", "showPopupOnInit"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterInputComponent, selector: "kit-filter-input", inputs: ["filter", "showPopupOnInit", "filterInputType"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterNullCheckComponent, selector: "kit-filter-null-check", inputs: ["filter", "nullLabel", "notNullLabel", "showPopupOnInit", "selectedOption", "options"], outputs: ["filterRemoved", "filterChanged", "selectedOptionChange", "optionsChange"] }, { kind: "component", type: KitFilterCustomInputComponent, selector: "kit-filter-custom-input", inputs: ["filter", "showPopupOnInit"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterMultiselectComponent, selector: "kit-filter-multiselect", inputs: ["filter", "items", "loading", "useTranslation", "showPopupOnInit"], outputs: ["searchChanged", "filterRemoved", "filterChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17188
17216
|
}
|
|
17189
17217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitGridFiltersComponent, decorators: [{
|
|
17190
17218
|
type: Component,
|
|
@@ -17197,7 +17225,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
17197
17225
|
KitFilterNullCheckComponent,
|
|
17198
17226
|
KitFilterCustomInputComponent,
|
|
17199
17227
|
KitFilterMultiselectComponent,
|
|
17200
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item.field) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField ?? ''\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.MULTISELECT) {\n <kit-filter-multiselect [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [loading]=\"filterListConfig()[item.field].loading ?? false\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (searchChanged)=\"filterListConfig()[item.field].search?.($event)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-multiselect>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap
|
|
17228
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item.field) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField ?? ''\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.MULTISELECT) {\n <kit-filter-multiselect [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [loading]=\"filterListConfig()[item.field].loading ?? false\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useTranslation]=\"item.useTranslation\"\n (searchChanged)=\"filterListConfig()[item.field].search?.($event)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-multiselect>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"] }]
|
|
17201
17229
|
}], propDecorators: { excludedColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludedColumns", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], filterListConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterListConfig", required: true }] }], useLocalTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useLocalTimeZone", required: false }] }], nullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullLabel", required: false }] }], notNullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "notNullLabel", required: false }] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }] } });
|
|
17202
17230
|
|
|
17203
17231
|
class KitGridFiltersToggleComponent {
|
|
@@ -17268,18 +17296,22 @@ const gridExportOptions = [
|
|
|
17268
17296
|
];
|
|
17269
17297
|
|
|
17270
17298
|
const pdfMake = pdfMakeNamespace.default ?? pdfMakeNamespace;
|
|
17299
|
+
const CJK_FONT_FAMILY = 'NotoSansSC';
|
|
17300
|
+
const CJK_FONT_FILE = 'NotoSansCJKsc-Regular.otf';
|
|
17301
|
+
const CJK_FONT_URL = `assets/${CJK_FONT_FILE}`;
|
|
17271
17302
|
const COLOR_TEXT = '#2a2b32';
|
|
17272
17303
|
const COLOR_BORDER = '#e3e4e5';
|
|
17273
17304
|
const COLOR_HEADER_BACKGROUND = '#f0f0f0';
|
|
17274
|
-
const ZERO_WIDTH_SPACE = String.fromCodePoint(0x200b);
|
|
17275
|
-
const softWrapLongToken = (value) => value.replace(/\S{6,}/g, token => token.match(/.{1,3}/g)?.join(ZERO_WIDTH_SPACE) ?? token);
|
|
17276
17305
|
const buildTableHeader = (columns, translateTitle) => columns.map(column => ({
|
|
17277
17306
|
text: translateTitle(column.title),
|
|
17278
17307
|
style: 'tableHeader',
|
|
17279
17308
|
fillColor: COLOR_HEADER_BACKGROUND,
|
|
17280
17309
|
}));
|
|
17281
|
-
const buildTableBody = (data, columns, getCellValue) => data.map(row => columns.map(column =>
|
|
17282
|
-
|
|
17310
|
+
const buildTableBody = (data, columns, getCellValue) => data.map(row => columns.map(column => ({
|
|
17311
|
+
text: String(getCellValue(column, row) ?? ''),
|
|
17312
|
+
wordBreak: 'break-all',
|
|
17313
|
+
})));
|
|
17314
|
+
const buildDocDefinition = (columns, header, body, options, fontSize, cellPadding, useChineseFont) => ({
|
|
17283
17315
|
pageOrientation: (options.landscape ?? columns.length > 5) ? 'landscape' : 'portrait',
|
|
17284
17316
|
pageSize: (options.paperSize ?? 'A4'),
|
|
17285
17317
|
pageMargins: [
|
|
@@ -17288,7 +17320,7 @@ const buildDocDefinition = (columns, header, body, options, fontSize, cellPaddin
|
|
|
17288
17320
|
10,
|
|
17289
17321
|
10,
|
|
17290
17322
|
],
|
|
17291
|
-
defaultStyle: { fontSize, color: COLOR_TEXT },
|
|
17323
|
+
defaultStyle: { font: useChineseFont ? CJK_FONT_FAMILY : undefined, fontSize, color: COLOR_TEXT },
|
|
17292
17324
|
styles: {
|
|
17293
17325
|
tableHeader: { bold: true, fontSize: fontSize + 1, color: COLOR_TEXT },
|
|
17294
17326
|
},
|
|
@@ -17313,14 +17345,25 @@ const buildDocDefinition = (columns, header, body, options, fontSize, cellPaddin
|
|
|
17313
17345
|
},
|
|
17314
17346
|
}],
|
|
17315
17347
|
});
|
|
17316
|
-
const kitCreateGridPdfBlob = (data, columns, getCellValue, translateTitle, options = {}) => {
|
|
17348
|
+
const kitCreateGridPdfBlob = (data, columns, getCellValue, translateTitle, options = {}, useChineseFont = false) => {
|
|
17317
17349
|
pdfMake.addVirtualFileSystem(vfs);
|
|
17350
|
+
if (useChineseFont) {
|
|
17351
|
+
const fontUrl = new URL(CJK_FONT_URL, document.baseURI).toString();
|
|
17352
|
+
pdfMake.addFonts({
|
|
17353
|
+
[CJK_FONT_FAMILY]: {
|
|
17354
|
+
normal: fontUrl,
|
|
17355
|
+
bold: fontUrl,
|
|
17356
|
+
italics: fontUrl,
|
|
17357
|
+
bolditalics: fontUrl,
|
|
17358
|
+
},
|
|
17359
|
+
});
|
|
17360
|
+
}
|
|
17318
17361
|
const scale = options.scale ?? 1;
|
|
17319
17362
|
const fontSize = Math.round(11 * scale);
|
|
17320
17363
|
const cellPadding = Math.round(3 * scale);
|
|
17321
17364
|
const header = buildTableHeader(columns, translateTitle);
|
|
17322
17365
|
const body = buildTableBody(data, columns, getCellValue);
|
|
17323
|
-
const docDefinition = buildDocDefinition(columns, header, body, options, fontSize, cellPadding);
|
|
17366
|
+
const docDefinition = buildDocDefinition(columns, header, body, options, fontSize, cellPadding, useChineseFont);
|
|
17324
17367
|
return pdfMake.createPdf(docDefinition).getBlob();
|
|
17325
17368
|
};
|
|
17326
17369
|
|
|
@@ -17408,7 +17451,7 @@ class KitGridExportComponent {
|
|
|
17408
17451
|
reject(new Error('No data to export'));
|
|
17409
17452
|
return;
|
|
17410
17453
|
}
|
|
17411
|
-
kitCreateGridPdfBlob(data, this.exportedColumns, (column, row) => this.gridCellService.createCellValue(column.type, column.field, row, this.translationMap(), '', this.gridCellValueTransformMap()), (title) => this.translateService.instant(title), this.pdfExportOptions())
|
|
17454
|
+
kitCreateGridPdfBlob(data, this.exportedColumns, (column, row) => this.gridCellService.createCellValue(column.type, column.field, row, this.translationMap(), '', this.gridCellValueTransformMap()), (title) => this.translateService.instant(title), this.pdfExportOptions(), this.translateService.currentLang() === KitLanguage.CHINESE)
|
|
17412
17455
|
.then((blob) => {
|
|
17413
17456
|
saveAs(blob, `${this.exportedFileName()}.pdf`);
|
|
17414
17457
|
resolve();
|
|
@@ -17464,7 +17507,7 @@ class KitGridExportComponent {
|
|
|
17464
17507
|
return new Promise((resolve, reject) => this.getExportedData()().subscribe({
|
|
17465
17508
|
next: ({ data }) => {
|
|
17466
17509
|
const xmlContent = this.convertToXML(data, this.exportedColumns);
|
|
17467
|
-
const blob = new Blob([xmlContent], { type: 'application/xml' });
|
|
17510
|
+
const blob = new Blob([xmlContent], { type: 'application/xml;charset=utf-8' });
|
|
17468
17511
|
saveAs(blob, `${this.exportedFileName()}.xml`);
|
|
17469
17512
|
resolve();
|
|
17470
17513
|
},
|
|
@@ -17520,7 +17563,7 @@ class KitGridExportComponent {
|
|
|
17520
17563
|
.replaceAll('(', '_')
|
|
17521
17564
|
.replaceAll(')', '_')
|
|
17522
17565
|
.replaceAll('\'', '')
|
|
17523
|
-
.replace(/[
|
|
17566
|
+
.replace(/[^\p{L}\p{N}\p{M}_.-]/gu, '');
|
|
17524
17567
|
}
|
|
17525
17568
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitGridExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17526
17569
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: KitGridExportComponent, isStandalone: true, selector: "kit-grid-export", inputs: { getExportedData: { classPropertyName: "getExportedData", publicName: "getExportedData", isSignal: true, isRequired: true, transformFunction: null }, translationMap: { classPropertyName: "translationMap", publicName: "translationMap", isSignal: true, isRequired: true, transformFunction: null }, exportedFileName: { classPropertyName: "exportedFileName", publicName: "exportedFileName", isSignal: true, isRequired: true, transformFunction: null }, pdfExportOptions: { classPropertyName: "pdfExportOptions", publicName: "pdfExportOptions", isSignal: true, isRequired: false, transformFunction: null }, gridHasData: { classPropertyName: "gridHasData", publicName: "gridHasData", isSignal: true, isRequired: true, transformFunction: null }, exportDataCount: { classPropertyName: "exportDataCount", publicName: "exportDataCount", isSignal: true, isRequired: false, transformFunction: null }, gridCellValueTransformMap: { classPropertyName: "gridCellValueTransformMap", publicName: "gridCellValueTransformMap", isSignal: true, isRequired: false, transformFunction: null }, visibleColumns: { classPropertyName: "visibleColumns", publicName: "visibleColumns", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { exportRequested: "exportRequested" }, viewQueries: [{ propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }, { propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div class=\"kit-grid-export\">\n <kit-button #toggleButton\n kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.export.title' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [disabled]=\"!gridHasData() || isGridExporting()\"\n [icon]=\"kitSvgIcon.DOWNLOAD\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [active]=\"popup.isPopupOpen\"\n (clicked)=\"onPopupToggle()\" />\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-grid-export-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\">\n</kit-popup>\n\n<ng-template #content>\n <span class=\"kit-grid-export-popup-label\">{{ \"kit.export.exportTableData\" | translate }}</span>\n <kit-radio-button [type]=\"kitRadioButtonType.ICON_LIST\"\n [items]=\"gridExportOptions\" \n (changed)=\"onExport($event)\"/>\n</ng-template>\n", styles: ["::ng-deep .kit-grid-export-popup{width:220px}::ng-deep .kit-grid-export-popup-label{font-size:14px;font-weight:500;margin-bottom:20px;display:block}\n"], dependencies: [{ kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitRadioButtonComponent, selector: "kit-radio-button", inputs: ["items", "label", "name", "readonly", "type", "value", "checked", "icon", "disabled"], outputs: ["checkedChange", "disabledChange", "changed"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible", "kitTooltipOffset"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|