aril 1.2.10 → 1.2.12
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/esm2022/theme/layout/app/history/history.service.mjs +4 -3
- package/esm2022/theme/layout/app/site-map/site-map-sidebar.component.mjs +4 -3
- package/esm2022/theme/layout/app/static-sidebar/static-sidebar.component.mjs +17 -8
- package/esm2022/ui/autoComplete/src/auto-complete.component.mjs +13 -9
- package/esm2022/ui-business/multiple-ref-value/src/multiple-ref-value.component.mjs +2 -2
- package/esm2022/ui-business/ref-value/src/ref-value.component.mjs +4 -3
- package/esm2022/ui-business/rolePicker/src/role-picker.component.mjs +13 -9
- package/fesm2022/aril-theme-layout.mjs +21 -11
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/fesm2022/aril-ui-autoComplete.mjs +12 -8
- package/fesm2022/aril-ui-autoComplete.mjs.map +1 -1
- package/fesm2022/aril-ui-business-multiple-ref-value.mjs +1 -1
- package/fesm2022/aril-ui-business-multiple-ref-value.mjs.map +1 -1
- package/fesm2022/aril-ui-business-ref-value.mjs +3 -2
- package/fesm2022/aril-ui-business-ref-value.mjs.map +1 -1
- package/fesm2022/aril-ui-business-rolePicker.mjs +12 -8
- package/fesm2022/aril-ui-business-rolePicker.mjs.map +1 -1
- package/package.json +54 -54
- package/theme/layout/app/history/history.service.ts +5 -2
- package/theme/layout/app/site-map/site-map-sidebar.component.ts +3 -2
- package/theme/layout/app/static-sidebar/static-sidebar.component.d.ts +0 -1
- package/theme/layout/app/static-sidebar/static-sidebar.component.html +3 -3
- package/theme/layout/app/static-sidebar/static-sidebar.component.ts +14 -7
- package/ui/autoComplete/src/auto-complete.component.d.ts +3 -1
- package/ui-business/ref-value/src/ref-value.component.d.ts +2 -1
- package/ui-business/rolePicker/src/role-picker.component.d.ts +3 -1
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, effect, Component, ViewChild } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i4 from '@angular/forms';
|
|
4
4
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i5 from 'primeng/autocomplete';
|
|
6
6
|
import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
|
|
7
7
|
import { ObjectUtils } from 'primeng/utils';
|
|
8
8
|
import { firstValueFrom } from 'rxjs';
|
|
9
9
|
import { API_CONFIGS } from 'aril/boot/config/api';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i3 from 'aril/ui/lib';
|
|
11
11
|
import { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';
|
|
12
12
|
import * as i1 from '@angular/common/http';
|
|
13
|
+
import * as i2 from '@ngneat/transloco';
|
|
13
14
|
|
|
14
15
|
class AutoCompleteComponent extends BaseInputComponent {
|
|
15
|
-
constructor(http) {
|
|
16
|
+
constructor(http, translocoService) {
|
|
16
17
|
super();
|
|
17
18
|
this.http = http;
|
|
19
|
+
this.translocoService = translocoService;
|
|
18
20
|
this.items = input([]);
|
|
19
21
|
this.referenceAsset = input(null);
|
|
20
22
|
this.placeholder = input('Arama...');
|
|
@@ -48,11 +50,13 @@ class AutoCompleteComponent extends BaseInputComponent {
|
|
|
48
50
|
let filtered = this.multiple() ?
|
|
49
51
|
selectionItems.filter((t) => this.ngControl.value?.some((v) => v === t.key)) ?? []
|
|
50
52
|
: [];
|
|
53
|
+
const lang = this.translocoService.getActiveLang();
|
|
54
|
+
const lowerQuery = query.toLocaleLowerCase(lang);
|
|
51
55
|
return [
|
|
52
56
|
...new Set([
|
|
53
57
|
...filtered,
|
|
54
58
|
...selectionItems.filter((selectionItem) => {
|
|
55
|
-
return selectionItem.text.
|
|
59
|
+
return selectionItem.text.toLocaleLowerCase(lang).indexOf(lowerQuery) == 0;
|
|
56
60
|
})
|
|
57
61
|
])
|
|
58
62
|
];
|
|
@@ -97,13 +101,13 @@ class AutoCompleteComponent extends BaseInputComponent {
|
|
|
97
101
|
if (selectedItem)
|
|
98
102
|
this.autoCompleteRef.writeValue(this.autoCompleteRef.getOptionLabel(selectedItem));
|
|
99
103
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AutoCompleteComponent, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
101
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: AutoCompleteComponent, isStandalone: true, selector: "aril-auto-complete[ngModel], aril-auto-complete[formControl], aril-auto-complete[formControlName]", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, referenceAsset: { classPropertyName: "referenceAsset", publicName: "referenceAsset", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "autoCompleteRef", first: true, predicate: AutoComplete, descendants: true }], usesInheritance: true, hostDirectives: [{ directive:
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AutoCompleteComponent, deps: [{ token: i1.HttpClient }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: AutoCompleteComponent, isStandalone: true, selector: "aril-auto-complete[ngModel], aril-auto-complete[formControl], aril-auto-complete[formControlName]", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, referenceAsset: { classPropertyName: "referenceAsset", publicName: "referenceAsset", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "autoCompleteRef", first: true, predicate: AutoComplete, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i3.ValueAccessorDirective }], ngImport: i0, template: "<p-autoComplete\r\n\t[optionLabel]=\"optionLabel()\"\r\n\t[optionValue]=\"optionValue()!\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"search($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[minLength]=\"minLength()\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\tappendTo=\"body\">\r\n</p-autoComplete>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }] }); }
|
|
102
106
|
}
|
|
103
107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AutoCompleteComponent, decorators: [{
|
|
104
108
|
type: Component,
|
|
105
109
|
args: [{ standalone: true, selector: 'aril-auto-complete[ngModel], aril-auto-complete[formControl], aril-auto-complete[formControlName]', imports: [ReactiveFormsModule, InputErrorMessagePipe, AutoCompleteModule], hostDirectives: [ValueAccessorDirective], template: "<p-autoComplete\r\n\t[optionLabel]=\"optionLabel()\"\r\n\t[optionValue]=\"optionValue()!\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"search($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[minLength]=\"minLength()\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\tappendTo=\"body\">\r\n</p-autoComplete>\r\n" }]
|
|
106
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }], propDecorators: { autoCompleteRef: [{
|
|
110
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.TranslocoService }], propDecorators: { autoCompleteRef: [{
|
|
107
111
|
type: ViewChild,
|
|
108
112
|
args: [AutoComplete]
|
|
109
113
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-ui-autoComplete.mjs","sources":["../../projects/aril/ui/autoComplete/src/auto-complete.component.ts","../../projects/aril/ui/autoComplete/src/auto-complete.component.html","../../projects/aril/ui/autoComplete/aril-ui-autoComplete.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { AfterViewInit, Component, ViewChild, effect, input } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { ObjectUtils } from 'primeng/utils';\r\n\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\nimport { API_CONFIGS } from 'aril/boot/config/api';\r\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\r\n\r\nimport { ReferenceAsset, SelectionItemRequestDTO, SuggestionsDTO } from './interfaces';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-auto-complete[ngModel], aril-auto-complete[formControl], aril-auto-complete[formControlName]',\r\n\ttemplateUrl: './auto-complete.component.html',\r\n\timports: [ReactiveFormsModule, InputErrorMessagePipe, AutoCompleteModule],\r\n\thostDirectives: [ValueAccessorDirective]\r\n})\r\nexport class AutoCompleteComponent extends BaseInputComponent implements AfterViewInit {\r\n\t@ViewChild(AutoComplete) autoCompleteRef!: AutoComplete;\r\n\r\n\titems = input<SuggestionsDTO[]>([]);\r\n\treferenceAsset = input<ReferenceAsset | null>(null);\r\n\tplaceholder = input<string>('Arama...');\r\n\tforceSelection = input<boolean>(false);\r\n\tmultiple = input<boolean>(false);\r\n\tminLength = input<number>(1);\r\n\r\n\toptionValue = input<keyof SuggestionsDTO | null>(null);\r\n\toptionLabel = input<keyof SuggestionsDTO>('text');\r\n\r\n\tselectionItems!: SuggestionsDTO[];\r\n\tfilteredSelectionItems!: SuggestionsDTO[];\r\n\r\n\tconstructor(private http: HttpClient) {\r\n\t\tsuper();\r\n\t\teffect(() => {\r\n\t\t\tif (this.referenceAsset()) this.getSelectionItems();\r\n\r\n\t\t\tif (this.items()?.length) this.setSelectionItems();\r\n\t\t});\r\n\t}\r\n\r\n\tngAfterViewInit(): void {\r\n\t\tthis.autoCompleteRef.getOptionValue = this.getOptionValue.bind(this);\r\n\t}\r\n\r\n\tgetOptionValue(option: any) {\r\n\t\treturn (\r\n\t\t\tthis.optionValue() ?\r\n\t\t\t\ttypeof option === 'object' ?\r\n\t\t\t\t\tObjectUtils.resolveFieldData(option, this.optionValue())\r\n\t\t\t\t:\toption\r\n\t\t\t:\toption\r\n\t\t);\r\n\t}\r\n\r\n\tsearch(event: any) {\r\n\t\tconst query = event.query;\r\n\r\n\t\tthis.filteredSelectionItems = this.filterSelection(query, this.selectionItems);\r\n\t}\r\n\r\n\tfilterSelection(query: string, selectionItems: SuggestionsDTO[]): SuggestionsDTO[] {\r\n\t\tlet filtered: SuggestionsDTO[] =\r\n\t\t\tthis.multiple() ?\r\n\t\t\t\tselectionItems.filter((t) => this.ngControl.value?.some((v: unknown) => v === t.key)) ?? []\r\n\t\t\t:\t[];\r\n\r\n\t\treturn [\r\n\t\t\t...new Set([\r\n\t\t\t\t...filtered,\r\n\t\t\t\t...selectionItems.filter((selectionItem) => {\r\n\t\t\t\t\treturn selectionItem.text.toLowerCase().indexOf(query.toLowerCase()) == 0;\r\n\t\t\t\t})\r\n\t\t\t])\r\n\t\t];\r\n\t}\r\n\r\n\tasync getSelectionItems() {\r\n\t\tconst payload: SelectionItemRequestDTO = {\r\n\t\t\tpager: {\r\n\t\t\t\tpageSize: 100,\r\n\t\t\t\tpageNumber: 1\r\n\t\t\t},\r\n\t\t\tasset: {\r\n\t\t\t\talias: 'cp',\r\n\t\t\t\tassetDefinitionCode: this.referenceAsset()!.referringAssetCode\r\n\t\t\t},\r\n\t\t\tattributes: [\r\n\t\t\t\t{\r\n\t\t\t\t\tattribute: {\r\n\t\t\t\t\t\talias: 'cp',\r\n\t\t\t\t\t\tattributeCode: this.referenceAsset()!.referringAttributeCode\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\r\n\t\tconst selectionGroup = await firstValueFrom(this.http.post<any>(API_CONFIGS.api + '/md/search', payload));\r\n\r\n\t\tthis.selectionItems = selectionGroup?.result.map((item: any) => ({\r\n\t\t\tkey: item.id,\r\n\t\t\ttext: String(item.attributes[0].value)\r\n\t\t}));\r\n\r\n\t\tthis.writeValue();\r\n\t}\r\n\r\n\tsetSelectionItems() {\r\n\t\tthis.selectionItems = this.items();\r\n\r\n\t\tthis.writeValue();\r\n\t}\r\n\r\n\tprivate writeValue() {\r\n\t\tif (this.multiple()) {\r\n\t\t\t// BUG issue https://github.com/primefaces/primeng/issues/15495\r\n\t\t\tthis.autoCompleteRef.completeMethod.emit({ originalEvent: null as any, query: '' });\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst selectedItem = this.selectionItems?.find((item) => item.key === this.ngControl.value);\r\n\r\n\t\tif (selectedItem) this.autoCompleteRef.writeValue(this.autoCompleteRef.getOptionLabel(selectedItem));\r\n\t}\r\n}\r\n","<p-autoComplete\r\n\t[optionLabel]=\"optionLabel()\"\r\n\t[optionValue]=\"optionValue()!\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"search($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[minLength]=\"minLength()\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\tappendTo=\"body\">\r\n</p-autoComplete>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAqBM,MAAO,qBAAsB,SAAQ,kBAAkB,CAAA;AAgB5D,IAAA,WAAA,CAAoB,IAAgB,EAAA;AACnC,QAAA,KAAK,EAAE,CAAC;QADW,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAbpC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,EAAE,CAAC,CAAC;AACpC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAwB,IAAI,CAAC,CAAC;AACpD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,UAAU,CAAC,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AACvC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AACjC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,CAAC,CAAC,CAAC;AAE7B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA8B,IAAI,CAAC,CAAC;AACvD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAuB,MAAM,CAAC,CAAC;QAOjD,MAAM,CAAC,MAAK;YACX,IAAI,IAAI,CAAC,cAAc,EAAE;gBAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAEpD,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE,MAAM;gBAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC;AACpD,SAAC,CAAC,CAAC;KACH;IAED,eAAe,GAAA;AACd,QAAA,IAAI,CAAC,eAAe,CAAC,cAAc,GA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A,EAAA,cAAA,EAAA,QAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,OAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,UAAA,EAAA,SAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,aAAA,EAAA,IAAA,EAAA,eAAA,EAAA,uBAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5D,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACN,QAAA,EAAA,mGAAmG,EAEpG,OAAA,EAAA,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,EACzD,cAAA,EAAA,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,+eAAA,EAAA,CAAA;+EAGf,eAAe,EAAA,CAAA;sBAAvC,SAAS;uBAAC,YAAY,CAAA;;;AEtBxB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"aril-ui-autoComplete.mjs","sources":["../../projects/aril/ui/autoComplete/src/auto-complete.component.ts","../../projects/aril/ui/autoComplete/src/auto-complete.component.html","../../projects/aril/ui/autoComplete/aril-ui-autoComplete.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { AfterViewInit, Component, ViewChild, effect, input } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { ObjectUtils } from 'primeng/utils';\r\n\r\nimport { TranslocoService } from '@ngneat/transloco';\r\n\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\nimport { API_CONFIGS } from 'aril/boot/config/api';\r\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\r\n\r\nimport { ReferenceAsset, SelectionItemRequestDTO, SuggestionsDTO } from './interfaces';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-auto-complete[ngModel], aril-auto-complete[formControl], aril-auto-complete[formControlName]',\r\n\ttemplateUrl: './auto-complete.component.html',\r\n\timports: [ReactiveFormsModule, InputErrorMessagePipe, AutoCompleteModule],\r\n\thostDirectives: [ValueAccessorDirective]\r\n})\r\nexport class AutoCompleteComponent extends BaseInputComponent implements AfterViewInit {\r\n\t@ViewChild(AutoComplete) autoCompleteRef!: AutoComplete;\r\n\r\n\titems = input<SuggestionsDTO[]>([]);\r\n\treferenceAsset = input<ReferenceAsset | null>(null);\r\n\tplaceholder = input<string>('Arama...');\r\n\tforceSelection = input<boolean>(false);\r\n\tmultiple = input<boolean>(false);\r\n\tminLength = input<number>(1);\r\n\r\n\toptionValue = input<keyof SuggestionsDTO | null>(null);\r\n\toptionLabel = input<keyof SuggestionsDTO>('text');\r\n\r\n\tselectionItems!: SuggestionsDTO[];\r\n\tfilteredSelectionItems!: SuggestionsDTO[];\r\n\r\n\tconstructor(private http: HttpClient, private translocoService: TranslocoService) {\r\n\t\tsuper();\r\n\t\teffect(() => {\r\n\t\t\tif (this.referenceAsset()) this.getSelectionItems();\r\n\r\n\t\t\tif (this.items()?.length) this.setSelectionItems();\r\n\t\t});\r\n\t}\r\n\r\n\tngAfterViewInit(): void {\r\n\t\tthis.autoCompleteRef.getOptionValue = this.getOptionValue.bind(this);\r\n\t}\r\n\r\n\tgetOptionValue(option: any) {\r\n\t\treturn (\r\n\t\t\tthis.optionValue() ?\r\n\t\t\t\ttypeof option === 'object' ?\r\n\t\t\t\t\tObjectUtils.resolveFieldData(option, this.optionValue())\r\n\t\t\t\t:\toption\r\n\t\t\t:\toption\r\n\t\t);\r\n\t}\r\n\r\n\tsearch(event: any) {\r\n\t\tconst query = event.query;\r\n\r\n\t\tthis.filteredSelectionItems = this.filterSelection(query, this.selectionItems);\r\n\t}\r\n\r\n\tfilterSelection(query: string, selectionItems: SuggestionsDTO[]): SuggestionsDTO[] {\r\n\t\tlet filtered: SuggestionsDTO[] =\r\n\t\t\tthis.multiple() ?\r\n\t\t\t\tselectionItems.filter((t) => this.ngControl.value?.some((v: unknown) => v === t.key)) ?? []\r\n\t\t\t:\t[];\r\n\r\n\t\tconst lang = this.translocoService.getActiveLang();\r\n\t\tconst lowerQuery = query.toLocaleLowerCase(lang);\r\n\t\treturn [\r\n\t\t\t...new Set([\r\n\t\t\t\t...filtered,\r\n\t\t\t\t...selectionItems.filter((selectionItem) => {\r\n\t\t\t\t\treturn selectionItem.text.toLocaleLowerCase(lang).indexOf(lowerQuery) == 0;\r\n\t\t\t\t})\r\n\t\t\t])\r\n\t\t];\r\n\t}\r\n\r\n\tasync getSelectionItems() {\r\n\t\tconst payload: SelectionItemRequestDTO = {\r\n\t\t\tpager: {\r\n\t\t\t\tpageSize: 100,\r\n\t\t\t\tpageNumber: 1\r\n\t\t\t},\r\n\t\t\tasset: {\r\n\t\t\t\talias: 'cp',\r\n\t\t\t\tassetDefinitionCode: this.referenceAsset()!.referringAssetCode\r\n\t\t\t},\r\n\t\t\tattributes: [\r\n\t\t\t\t{\r\n\t\t\t\t\tattribute: {\r\n\t\t\t\t\t\talias: 'cp',\r\n\t\t\t\t\t\tattributeCode: this.referenceAsset()!.referringAttributeCode\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\r\n\t\tconst selectionGroup = await firstValueFrom(this.http.post<any>(API_CONFIGS.api + '/md/search', payload));\r\n\r\n\t\tthis.selectionItems = selectionGroup?.result.map((item: any) => ({\r\n\t\t\tkey: item.id,\r\n\t\t\ttext: String(item.attributes[0].value)\r\n\t\t}));\r\n\r\n\t\tthis.writeValue();\r\n\t}\r\n\r\n\tsetSelectionItems() {\r\n\t\tthis.selectionItems = this.items();\r\n\r\n\t\tthis.writeValue();\r\n\t}\r\n\r\n\tprivate writeValue() {\r\n\t\tif (this.multiple()) {\r\n\t\t\t// BUG issue https://github.com/primefaces/primeng/issues/15495\r\n\t\t\tthis.autoCompleteRef.completeMethod.emit({ originalEvent: null as any, query: '' });\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst selectedItem = this.selectionItems?.find((item) => item.key === this.ngControl.value);\r\n\r\n\t\tif (selectedItem) this.autoCompleteRef.writeValue(this.autoCompleteRef.getOptionLabel(selectedItem));\r\n\t}\r\n}\r\n","<p-autoComplete\r\n\t[optionLabel]=\"optionLabel()\"\r\n\t[optionValue]=\"optionValue()!\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"search($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[minLength]=\"minLength()\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\tappendTo=\"body\">\r\n</p-autoComplete>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAuBM,MAAO,qBAAsB,SAAQ,kBAAkB,CAAA;IAgB5D,WAAoB,CAAA,IAAgB,EAAU,gBAAkC,EAAA;AAC/E,QAAA,KAAK,EAAE,CAAC;QADW,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAAU,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAkB;AAbhF,QAAA,IAAA,CAAA,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AAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,aAAA,EAAA,IAAA,EAAA,eAAA,EAAA,uBAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5D,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACN,QAAA,EAAA,mGAAmG,EAEpG,OAAA,EAAA,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,EACzD,cAAA,EAAA,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,+eAAA,EAAA,CAAA;8GAGf,eAAe,EAAA,CAAA;sBAAvC,SAAS;uBAAC,YAAY,CAAA;;;AExBxB;;AAEG;;;;"}
|
|
@@ -13,7 +13,7 @@ class MultipleRefValueComponent {
|
|
|
13
13
|
this.clickEvent = new EventEmitter();
|
|
14
14
|
}
|
|
15
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MultipleRefValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: MultipleRefValueComponent, isStandalone: true, selector: "aril-multiple-ref-value", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null }, detailPageUrl: { classPropertyName: "detailPageUrl", publicName: "detailPageUrl", isSignal: true, isRequired: false, transformFunction: null }, maxBadgeCount: { classPropertyName: "maxBadgeCount", publicName: "maxBadgeCount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<div class=\"flex align-items-center gap-1\">\r\n\t@for (item of model() | slice: 0 : maxBadgeCount(); track item) {\r\n\t\t<aril-ref-value\r\n\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t[assetId]=\"item.value\"\r\n\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t}\r\n\t@if (model().length > maxBadgeCount()) {\r\n\t\t<i class=\"pi pi-ellipsis-v cursor-pointer\" (click)=\"op.toggle($event)\"></i>\r\n\r\n\t\t<p-overlayPanel #op class=\"shadow-4\" appendTo=\"body\">\r\n\t\t\t<div class=\"flex flex-column gap-2 max-w-30rem max-h-20rem pr-3 overflow-y-auto\">\r\n\t\t\t\t@for (item of model() | slice: maxBadgeCount(); track item) {\r\n\t\t\t\t\t<aril-ref-value\r\n\t\t\t\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t\t\t\t[assetId]=\"item.value\"\r\n\t\t\t\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</p-overlayPanel>\r\n\t}\r\n</div>\r\n", dependencies: [{ kind: "component", type: RefValueComponent, selector: "aril-ref-value", inputs: ["overlayPanelShow", "assetId", "valueDesc", "detailPageUrl"], outputs: ["clickEvent"] }, { kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "ngmodule", type: OverlayPanelModule }, { kind: "component", type: i1.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: MultipleRefValueComponent, isStandalone: true, selector: "aril-multiple-ref-value", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null }, detailPageUrl: { classPropertyName: "detailPageUrl", publicName: "detailPageUrl", isSignal: true, isRequired: false, transformFunction: null }, maxBadgeCount: { classPropertyName: "maxBadgeCount", publicName: "maxBadgeCount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<div class=\"flex align-items-center gap-1\">\r\n\t@for (item of model() | slice: 0 : maxBadgeCount(); track item) {\r\n\t\t<aril-ref-value\r\n\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t[assetId]=\"item.value\"\r\n\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t}\r\n\t@if (model().length > maxBadgeCount()) {\r\n\t\t<i class=\"pi pi-ellipsis-v cursor-pointer\" (click)=\"op.toggle($event)\"></i>\r\n\r\n\t\t<p-overlayPanel #op class=\"shadow-4\" appendTo=\"body\">\r\n\t\t\t<div class=\"flex flex-column gap-2 max-w-30rem max-h-20rem pr-3 overflow-y-auto\">\r\n\t\t\t\t@for (item of model() | slice: maxBadgeCount(); track item) {\r\n\t\t\t\t\t<aril-ref-value\r\n\t\t\t\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t\t\t\t[assetId]=\"item.value\"\r\n\t\t\t\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</p-overlayPanel>\r\n\t}\r\n</div>\r\n", dependencies: [{ kind: "component", type: RefValueComponent, selector: "aril-ref-value", inputs: ["overlayPanelShow", "assetId", "valueDesc", "detailPageUrl", "target"], outputs: ["clickEvent"] }, { kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "ngmodule", type: OverlayPanelModule }, { kind: "component", type: i1.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17
17
|
}
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MultipleRefValueComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-ui-business-multiple-ref-value.mjs","sources":["../../projects/aril/ui-business/multiple-ref-value/src/multiple-ref-value.component.ts","../../projects/aril/ui-business/multiple-ref-value/src/multiple-ref-value.component.html","../../projects/aril/ui-business/multiple-ref-value/aril-ui-business-multiple-ref-value.ts"],"sourcesContent":["import { SlicePipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, EventEmitter, Output, input } from '@angular/core';\r\n\r\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\r\n\r\nimport { RefValueComponent } from 'aril/ui-business/ref-value';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-multiple-ref-value',\r\n\ttemplateUrl: './multiple-ref-value.component.html',\r\n\timports: [RefValueComponent, SlicePipe, OverlayPanelModule],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class MultipleRefValueComponent {\r\n\tmodel = input.required<{ value: any; valueDesc: string }[]>();\r\n\tdetailPageUrl = input<string>('');\r\n\tmaxBadgeCount = input<number>(3);\r\n\r\n\t@Output() clickEvent = new EventEmitter();\r\n}\r\n","<div class=\"flex align-items-center gap-1\">\r\n\t@for (item of model() | slice: 0 : maxBadgeCount(); track item) {\r\n\t\t<aril-ref-value\r\n\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t[assetId]=\"item.value\"\r\n\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t}\r\n\t@if (model().length > maxBadgeCount()) {\r\n\t\t<i class=\"pi pi-ellipsis-v cursor-pointer\" (click)=\"op.toggle($event)\"></i>\r\n\r\n\t\t<p-overlayPanel #op class=\"shadow-4\" appendTo=\"body\">\r\n\t\t\t<div class=\"flex flex-column gap-2 max-w-30rem max-h-20rem pr-3 overflow-y-auto\">\r\n\t\t\t\t@for (item of model() | slice: maxBadgeCount(); track item) {\r\n\t\t\t\t\t<aril-ref-value\r\n\t\t\t\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t\t\t\t[assetId]=\"item.value\"\r\n\t\t\t\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</p-overlayPanel>\r\n\t}\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,yBAAyB,CAAA;AAPtC,IAAA,WAAA,GAAA;AAQC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAuC,CAAC;AAC9D,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAClC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,CAAC,CAAC,CAAC;AAEvB,QAAA,IAAA,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C1C,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,siCAAA,EAAA,CAAA;8BAOrC,UAAU,EAAA,CAAA;sBAAnB,MAAM;;;AEnBR;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"aril-ui-business-multiple-ref-value.mjs","sources":["../../projects/aril/ui-business/multiple-ref-value/src/multiple-ref-value.component.ts","../../projects/aril/ui-business/multiple-ref-value/src/multiple-ref-value.component.html","../../projects/aril/ui-business/multiple-ref-value/aril-ui-business-multiple-ref-value.ts"],"sourcesContent":["import { SlicePipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, EventEmitter, Output, input } from '@angular/core';\r\n\r\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\r\n\r\nimport { RefValueComponent } from 'aril/ui-business/ref-value';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-multiple-ref-value',\r\n\ttemplateUrl: './multiple-ref-value.component.html',\r\n\timports: [RefValueComponent, SlicePipe, OverlayPanelModule],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class MultipleRefValueComponent {\r\n\tmodel = input.required<{ value: any; valueDesc: string }[]>();\r\n\tdetailPageUrl = input<string>('');\r\n\tmaxBadgeCount = input<number>(3);\r\n\r\n\t@Output() clickEvent = new EventEmitter();\r\n}\r\n","<div class=\"flex align-items-center gap-1\">\r\n\t@for (item of model() | slice: 0 : maxBadgeCount(); track item) {\r\n\t\t<aril-ref-value\r\n\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t[assetId]=\"item.value\"\r\n\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t}\r\n\t@if (model().length > maxBadgeCount()) {\r\n\t\t<i class=\"pi pi-ellipsis-v cursor-pointer\" (click)=\"op.toggle($event)\"></i>\r\n\r\n\t\t<p-overlayPanel #op class=\"shadow-4\" appendTo=\"body\">\r\n\t\t\t<div class=\"flex flex-column gap-2 max-w-30rem max-h-20rem pr-3 overflow-y-auto\">\r\n\t\t\t\t@for (item of model() | slice: maxBadgeCount(); track item) {\r\n\t\t\t\t\t<aril-ref-value\r\n\t\t\t\t\t\tclass=\"cursor-pointer\"\r\n\t\t\t\t\t\t[assetId]=\"item.value\"\r\n\t\t\t\t\t\t[valueDesc]=\"item.valueDesc\"\r\n\t\t\t\t\t\t[detailPageUrl]=\"detailPageUrl()\"\r\n\t\t\t\t\t\t(clickEvent)=\"clickEvent.emit($event)\" />\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</p-overlayPanel>\r\n\t}\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,yBAAyB,CAAA;AAPtC,IAAA,WAAA,GAAA;AAQC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAuC,CAAC;AAC9D,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAClC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,CAAC,CAAC,CAAC;AAEvB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAE,CAAC;AAC1C,KAAA;8GANY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,6hBCdtC,siCA0BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDfW,iBAAiB,EAAE,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,kBAAA,EAAA,SAAA,EAAA,WAAA,EAAA,eAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,SAAS,6CAAE,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,OAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,uBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAG9C,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACN,QAAA,EAAA,yBAAyB,EAE1B,OAAA,EAAA,CAAC,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,CAAC,EAC1C,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,siCAAA,EAAA,CAAA;8BAOrC,UAAU,EAAA,CAAA;sBAAnB,MAAM;;;AEnBR;;AAEG;;;;"}
|
|
@@ -11,6 +11,7 @@ class RefValueComponent {
|
|
|
11
11
|
this.assetId = input.required();
|
|
12
12
|
this.valueDesc = input.required();
|
|
13
13
|
this.detailPageUrl = input.required();
|
|
14
|
+
this.target = input('_self');
|
|
14
15
|
this.clickEvent = new EventEmitter();
|
|
15
16
|
this.tagStyle = {
|
|
16
17
|
background: '#f0f0f0',
|
|
@@ -29,11 +30,11 @@ class RefValueComponent {
|
|
|
29
30
|
return 'http://' + this.url + this.detailPageUrl() + '/' + this.assetId();
|
|
30
31
|
}
|
|
31
32
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: RefValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: RefValueComponent, isStandalone: true, selector: "aril-ref-value", inputs: { overlayPanelShow: { classPropertyName: "overlayPanelShow", publicName: "overlayPanelShow", isSignal: true, isRequired: false, transformFunction: null }, assetId: { classPropertyName: "assetId", publicName: "assetId", isSignal: true, isRequired: true, transformFunction: null }, valueDesc: { classPropertyName: "valueDesc", publicName: "valueDesc", isSignal: true, isRequired: true, transformFunction: null }, detailPageUrl: { classPropertyName: "detailPageUrl", publicName: "detailPageUrl", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "@if (detailPageUrl() && valueDesc() && assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<a [href]=\"getFullUrl()\">\r\n\t\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t\t</a>\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<a [href]=\"getFullUrl()\">\r\n\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t</a>\r\n\t}\r\n} @else if (valueDesc() || assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<p-tag\r\n\t\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t\t[style]=\"tagStyle\"\r\n\t\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<p-tag\r\n\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t[style]=\"tagStyle\"\r\n\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t}\r\n} @else {\r\n\t<aril-value type=\"text\" [model]=\"null\" />\r\n}\r\n", dependencies: [{ kind: "component", type: ValueComponent, selector: "aril-value", inputs: ["model", "type", "format", "isClickable", "groupName", "parentSelectionKey", "isTextClamp", "textClampCharacters", "style", "copyable", "shouldShowCopyForClampedText", "arrayTypeDisplayName", "arrayTypeMaxBadgeCount", "bigDecimalRoundingMode", "bigDecimalScale"] }, { kind: "component", type: DetailedOverlayPanelComponent, selector: "aril-detailed-oveylay-panel", inputs: ["assetId", "style", "styleClass", "columns"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i1.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: RefValueComponent, isStandalone: true, selector: "aril-ref-value", inputs: { overlayPanelShow: { classPropertyName: "overlayPanelShow", publicName: "overlayPanelShow", isSignal: true, isRequired: false, transformFunction: null }, assetId: { classPropertyName: "assetId", publicName: "assetId", isSignal: true, isRequired: true, transformFunction: null }, valueDesc: { classPropertyName: "valueDesc", publicName: "valueDesc", isSignal: true, isRequired: true, transformFunction: null }, detailPageUrl: { classPropertyName: "detailPageUrl", publicName: "detailPageUrl", isSignal: true, isRequired: true, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "@if (detailPageUrl() && valueDesc() && assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<a [href]=\"getFullUrl()\" [target]=\"target()\">\r\n\t\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t\t</a>\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<a [href]=\"getFullUrl()\" [target]=\"target()\">\r\n\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t</a>\r\n\t}\r\n} @else if (valueDesc() || assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<p-tag\r\n\t\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t\t[style]=\"tagStyle\"\r\n\t\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<p-tag\r\n\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t[style]=\"tagStyle\"\r\n\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t}\r\n} @else {\r\n\t<aril-value type=\"text\" [model]=\"null\" />\r\n}\r\n", dependencies: [{ kind: "component", type: ValueComponent, selector: "aril-value", inputs: ["model", "type", "format", "isClickable", "groupName", "parentSelectionKey", "isTextClamp", "textClampCharacters", "style", "copyable", "shouldShowCopyForClampedText", "arrayTypeDisplayName", "arrayTypeMaxBadgeCount", "bigDecimalRoundingMode", "bigDecimalScale"] }, { kind: "component", type: DetailedOverlayPanelComponent, selector: "aril-detailed-oveylay-panel", inputs: ["assetId", "style", "styleClass", "columns"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i1.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
33
34
|
}
|
|
34
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: RefValueComponent, decorators: [{
|
|
35
36
|
type: Component,
|
|
36
|
-
args: [{ standalone: true, selector: 'aril-ref-value', imports: [ValueComponent, DetailedOverlayPanelComponent, TagModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (detailPageUrl() && valueDesc() && assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<a [href]=\"getFullUrl()\">\r\n\t\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t\t</a>\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<a [href]=\"getFullUrl()\">\r\n\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t</a>\r\n\t}\r\n} @else if (valueDesc() || assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<p-tag\r\n\t\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t\t[style]=\"tagStyle\"\r\n\t\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<p-tag\r\n\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t[style]=\"tagStyle\"\r\n\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t}\r\n} @else {\r\n\t<aril-value type=\"text\" [model]=\"null\" />\r\n}\r\n" }]
|
|
37
|
+
args: [{ standalone: true, selector: 'aril-ref-value', imports: [ValueComponent, DetailedOverlayPanelComponent, TagModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (detailPageUrl() && valueDesc() && assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<a [href]=\"getFullUrl()\" [target]=\"target()\">\r\n\t\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t\t</a>\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<a [href]=\"getFullUrl()\" [target]=\"target()\">\r\n\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t</a>\r\n\t}\r\n} @else if (valueDesc() || assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<p-tag\r\n\t\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t\t[style]=\"tagStyle\"\r\n\t\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<p-tag\r\n\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t[style]=\"tagStyle\"\r\n\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t}\r\n} @else {\r\n\t<aril-value type=\"text\" [model]=\"null\" />\r\n}\r\n" }]
|
|
37
38
|
}], propDecorators: { clickEvent: [{
|
|
38
39
|
type: Output
|
|
39
40
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-ui-business-ref-value.mjs","sources":["../../projects/aril/ui-business/ref-value/src/ref-value.component.ts","../../projects/aril/ui-business/ref-value/src/ref-value.component.html","../../projects/aril/ui-business/ref-value/aril-ui-business-ref-value.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Output, input } from '@angular/core';\r\n\r\nimport { TagModule } from 'primeng/tag';\r\n\r\nimport { DetailedOverlayPanelComponent } from 'aril/ui-business/detailed-overlay-panel';\r\nimport { ValueComponent } from 'aril/ui/value';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-ref-value',\r\n\ttemplateUrl: './ref-value.component.html',\r\n\timports: [ValueComponent, DetailedOverlayPanelComponent, TagModule],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class RefValueComponent {\r\n\toverlayPanelShow = input<boolean>(true);\r\n\tassetId = input.required<number>();\r\n\tvalueDesc = input.required<string>();\r\n\tdetailPageUrl = input.required<string | undefined>();\r\n\r\n\t@Output() clickEvent = new EventEmitter();\r\n\r\n\tprotected readonly tagStyle = {\r\n\t\tbackground: '#f0f0f0',\r\n\t\tcolor: '-webkit-link',\r\n\t\t'font-size': '0.9rem',\r\n\t\t'text-decoration': 'underline'\r\n\t};\r\n\r\n\tget url(): string {\r\n\t\treturn `${globalThis.location.host}/#/`;\r\n\t}\r\n\r\n\tprotected getDisplayValue(): string {\r\n\t\treturn this.valueDesc() ?? this.assetId().toString();\r\n\t}\r\n\r\n\tprotected getFullUrl(): string {\r\n\t\treturn 'http://' + this.url + this.detailPageUrl() + '/' + this.assetId();\r\n\t}\r\n}\r\n","@if (detailPageUrl() && valueDesc() && assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<a [href]=\"getFullUrl()\">\r\n\t\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t\t</a>\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<a [href]=\"getFullUrl()\">\r\n\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t</a>\r\n\t}\r\n} @else if (valueDesc() || assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<p-tag\r\n\t\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t\t[style]=\"tagStyle\"\r\n\t\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<p-tag\r\n\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t[style]=\"tagStyle\"\r\n\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t}\r\n} @else {\r\n\t<aril-value type=\"text\" [model]=\"null\" />\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,iBAAiB,CAAA;AAP9B,IAAA,WAAA,GAAA;AAQC,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAU,IAAI,CAAC,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;AACnC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;AACrC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"aril-ui-business-ref-value.mjs","sources":["../../projects/aril/ui-business/ref-value/src/ref-value.component.ts","../../projects/aril/ui-business/ref-value/src/ref-value.component.html","../../projects/aril/ui-business/ref-value/aril-ui-business-ref-value.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Output, input } from '@angular/core';\r\n\r\nimport { TagModule } from 'primeng/tag';\r\n\r\nimport { DetailedOverlayPanelComponent } from 'aril/ui-business/detailed-overlay-panel';\r\nimport { ValueComponent } from 'aril/ui/value';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-ref-value',\r\n\ttemplateUrl: './ref-value.component.html',\r\n\timports: [ValueComponent, DetailedOverlayPanelComponent, TagModule],\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class RefValueComponent {\r\n\toverlayPanelShow = input<boolean>(true);\r\n\tassetId = input.required<number>();\r\n\tvalueDesc = input.required<string>();\r\n\tdetailPageUrl = input.required<string | undefined>();\r\n\ttarget = input<string>('_self');\r\n\r\n\t@Output() clickEvent = new EventEmitter();\r\n\r\n\tprotected readonly tagStyle = {\r\n\t\tbackground: '#f0f0f0',\r\n\t\tcolor: '-webkit-link',\r\n\t\t'font-size': '0.9rem',\r\n\t\t'text-decoration': 'underline'\r\n\t};\r\n\r\n\tget url(): string {\r\n\t\treturn `${globalThis.location.host}/#/`;\r\n\t}\r\n\r\n\tprotected getDisplayValue(): string {\r\n\t\treturn this.valueDesc() ?? this.assetId().toString();\r\n\t}\r\n\r\n\tprotected getFullUrl(): string {\r\n\t\treturn 'http://' + this.url + this.detailPageUrl() + '/' + this.assetId();\r\n\t}\r\n}\r\n","@if (detailPageUrl() && valueDesc() && assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<a [href]=\"getFullUrl()\" [target]=\"target()\">\r\n\t\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t\t</a>\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<a [href]=\"getFullUrl()\" [target]=\"target()\">\r\n\t\t\t<p-tag [value]=\"getDisplayValue()\" [style]=\"tagStyle\" />\r\n\t\t</a>\r\n\t}\r\n} @else if (valueDesc() || assetId()) {\r\n\t@if (overlayPanelShow()) {\r\n\t\t<aril-detailed-oveylay-panel [assetId]=\"assetId()\">\r\n\t\t\t<p-tag\r\n\t\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t\t[style]=\"tagStyle\"\r\n\t\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t\t</aril-detailed-oveylay-panel>\r\n\t} @else {\r\n\t\t<p-tag\r\n\t\t\t[value]=\"getDisplayValue()\"\r\n\t\t\t[style]=\"tagStyle\"\r\n\t\t\t(click)=\"clickEvent.emit({ assetId: assetId(), valueDesc: valueDesc() })\" />\r\n\t}\r\n} @else {\r\n\t<aril-value type=\"text\" [model]=\"null\" />\r\n}\r\n","/**\n * Generated bundle index. Do not ed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i4 from '@angular/forms';
|
|
4
4
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i5 from 'primeng/autocomplete';
|
|
6
6
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
7
7
|
import { firstValueFrom } from 'rxjs';
|
|
8
8
|
import { API_CONFIGS } from 'aril/boot/config/api';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i3 from 'aril/ui/lib';
|
|
10
10
|
import { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';
|
|
11
11
|
import { Apps } from 'aril/boot/config/apps';
|
|
12
12
|
import * as i1 from '@angular/common/http';
|
|
13
|
+
import * as i2 from '@ngneat/transloco';
|
|
13
14
|
|
|
14
15
|
class RolePickerComponent extends BaseInputComponent {
|
|
15
|
-
constructor(http) {
|
|
16
|
+
constructor(http, translocoService) {
|
|
16
17
|
super();
|
|
17
18
|
this.http = http;
|
|
19
|
+
this.translocoService = translocoService;
|
|
18
20
|
this.placeholder = input('Arama...');
|
|
19
21
|
this.forceSelection = input(false);
|
|
20
22
|
this.multiple = input(false);
|
|
@@ -51,22 +53,24 @@ class RolePickerComponent extends BaseInputComponent {
|
|
|
51
53
|
}
|
|
52
54
|
filterSelection(query, selectionItems) {
|
|
53
55
|
const filtered = this.multiple() ? (selectionItems.filter((item) => item === query) ?? []) : [];
|
|
56
|
+
const lang = this.translocoService.getActiveLang();
|
|
57
|
+
const lowerQuery = query.toLocaleLowerCase(lang);
|
|
54
58
|
return [
|
|
55
59
|
...new Set([
|
|
56
60
|
...filtered,
|
|
57
61
|
...selectionItems.filter((selectionItem) => {
|
|
58
|
-
return selectionItem.
|
|
62
|
+
return selectionItem.toLocaleLowerCase(lang).indexOf(lowerQuery) == 0;
|
|
59
63
|
})
|
|
60
64
|
])
|
|
61
65
|
];
|
|
62
66
|
}
|
|
63
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: RolePickerComponent, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: RolePickerComponent, isStandalone: true, selector: "aril-role-picker[formControl], aril-role-picker[formControlName]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: false, transformFunction: null }, roleEndPointUrl: { classPropertyName: "roleEndPointUrl", publicName: "roleEndPointUrl", isSignal: true, isRequired: false, transformFunction: null }, client: { classPropertyName: "client", publicName: "client", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { SelectionChanged: "SelectionChanged" }, providers: [InputErrorMessagePipe], usesInheritance: true, hostDirectives: [{ directive:
|
|
67
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: RolePickerComponent, deps: [{ token: i1.HttpClient }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: RolePickerComponent, isStandalone: true, selector: "aril-role-picker[formControl], aril-role-picker[formControlName]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: false, transformFunction: null }, roleEndPointUrl: { classPropertyName: "roleEndPointUrl", publicName: "roleEndPointUrl", isSignal: true, isRequired: false, transformFunction: null }, client: { classPropertyName: "client", publicName: "client", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { SelectionChanged: "SelectionChanged" }, providers: [InputErrorMessagePipe], usesInheritance: true, hostDirectives: [{ directive: i3.ValueAccessorDirective }], ngImport: i0, template: "<p-autoComplete\r\n\t[optionLabel]=\"undefined\"\r\n\t[optionValue]=\"undefined\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"completeMethod($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[autoHighlight]=\"true\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\r\n\tappendTo=\"body\">\r\n<!--\t<ng-template let-item pTemplate=\"item\">\r\n\t\t<div>\r\n\t\t\t<span>{{ item?.text }}</span>\r\n\t\t</div>\r\n\t</ng-template>\r\n\t-->\r\n</p-autoComplete>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i5.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }] }); }
|
|
65
69
|
}
|
|
66
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: RolePickerComponent, decorators: [{
|
|
67
71
|
type: Component,
|
|
68
72
|
args: [{ standalone: true, selector: 'aril-role-picker[formControl], aril-role-picker[formControlName]', imports: [ReactiveFormsModule, AutoCompleteModule], providers: [InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], template: "<p-autoComplete\r\n\t[optionLabel]=\"undefined\"\r\n\t[optionValue]=\"undefined\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"completeMethod($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[autoHighlight]=\"true\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\r\n\tappendTo=\"body\">\r\n<!--\t<ng-template let-item pTemplate=\"item\">\r\n\t\t<div>\r\n\t\t\t<span>{{ item?.text }}</span>\r\n\t\t</div>\r\n\t</ng-template>\r\n\t-->\r\n</p-autoComplete>\r\n" }]
|
|
69
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }], propDecorators: { SelectionChanged: [{
|
|
73
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.TranslocoService }], propDecorators: { SelectionChanged: [{
|
|
70
74
|
type: Output
|
|
71
75
|
}] } });
|
|
72
76
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-ui-business-rolePicker.mjs","sources":["../../projects/aril/ui-business/rolePicker/src/role-picker.component.ts","../../projects/aril/ui-business/rolePicker/src/role-picker.component.html","../../projects/aril/ui-business/rolePicker/aril-ui-business-rolePicker.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Component, EventEmitter, OnInit, Output, effect, input, signal } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\n\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\nimport { API_CONFIGS } from 'aril/boot/config/api';\r\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\r\n\r\nimport { RoleResponseDTO, SelectBoxItem, SuggestionsDTO } from './interface';\r\nimport { Apps } from 'aril/boot/config/apps';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-role-picker[formControl], aril-role-picker[formControlName]',\r\n\ttemplateUrl: './role-picker.component.html',\r\n\timports: [ReactiveFormsModule, AutoCompleteModule],\r\n\tproviders: [InputErrorMessagePipe],\r\n\thostDirectives: [ValueAccessorDirective]\r\n})\r\nexport class RolePickerComponent extends BaseInputComponent {\r\n\tplaceholder = input<string>('Arama...');\r\n\tforceSelection = input<boolean>(false);\r\n\tmultiple = input<boolean>(false);\r\n\r\n\tfilteredSelectionItems!: string[];\r\n\r\n\tbaseUrl = input<string | null>(API_CONFIGS.getExternalAppEndpoint(Apps.MW));\r\n\troleEndPointUrl = input<string>('/user-management/roles/by-client-reference-key?clientReferenceKey=');\r\n\tclient = input<string>('thor');\r\n\troleItems: any = [];\r\n\tselectionItems: string[] = [];\r\n\r\n\t@Output() SelectionChanged = new EventEmitter<SelectBoxItem>();\r\n\r\n\tconstructor(private http: HttpClient) {\r\n\t\tsuper();\r\n\t\teffect(() => {\r\n\t\t\tif (this.client())\r\n\t\t\t\tthis.getRoleItems().then((roleItems) => {\r\n\t\t\t\t\t//const x: string[] = this.ngControl.value;\r\n//\r\n\t\t\t\t\t//const y: { key: string; text: string }[] = roleItems;\r\n//\r\n\t\t\t\t\t//const matched = y.filter((item) => x.includes(item.text));\r\n//\r\n\t\t\t\t\t//this.ngControl.control.setValue(matched);\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tasync getRoleItems() {\r\n\t\tthis.roleItems = await firstValueFrom(\r\n\t\t\tthis.http.get<RoleResponseDTO[]>(this.baseUrl() + this.roleEndPointUrl() + this.client())\r\n\t\t).then((roleItems) => {\r\n\t\t\troleItems.forEach((item: RoleResponseDTO) => {\r\n\t\t\t\tthis.selectionItems.push(\r\n\t\t\t\t item.name\r\n\t\t\t);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\treturn this.selectionItems;\r\n\t}\r\n\r\n\tcompleteMethod(event: any) {\r\n\t\tconst query = event.query;\r\n\r\n\t\tthis.filteredSelectionItems = this.filterSelection(query, this.selectionItems);\r\n\t}\r\n\r\n\tfilterSelection(query: string, selectionItems: string[]): string[] {\r\n\t\tconst filtered: string[] =\r\n\t\t\tthis.multiple() ? (selectionItems.filter((item) => item === query) ?? []) : [];\r\n\r\n\t\treturn [\r\n\t\t\t...new Set([\r\n\t\t\t\t...filtered,\r\n\t\t\t\t...selectionItems.filter((selectionItem) => {\r\n\t\t\t\t\treturn selectionItem.
|
|
1
|
+
{"version":3,"file":"aril-ui-business-rolePicker.mjs","sources":["../../projects/aril/ui-business/rolePicker/src/role-picker.component.ts","../../projects/aril/ui-business/rolePicker/src/role-picker.component.html","../../projects/aril/ui-business/rolePicker/aril-ui-business-rolePicker.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Component, EventEmitter, OnInit, Output, effect, input, signal } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\n\r\nimport { TranslocoService } from '@ngneat/transloco';\r\n\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\nimport { API_CONFIGS } from 'aril/boot/config/api';\r\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\r\n\r\nimport { RoleResponseDTO, SelectBoxItem, SuggestionsDTO } from './interface';\r\nimport { Apps } from 'aril/boot/config/apps';\r\n\r\n@Component({\r\n\tstandalone: true,\r\n\tselector: 'aril-role-picker[formControl], aril-role-picker[formControlName]',\r\n\ttemplateUrl: './role-picker.component.html',\r\n\timports: [ReactiveFormsModule, AutoCompleteModule],\r\n\tproviders: [InputErrorMessagePipe],\r\n\thostDirectives: [ValueAccessorDirective]\r\n})\r\nexport class RolePickerComponent extends BaseInputComponent {\r\n\tplaceholder = input<string>('Arama...');\r\n\tforceSelection = input<boolean>(false);\r\n\tmultiple = input<boolean>(false);\r\n\r\n\tfilteredSelectionItems!: string[];\r\n\r\n\tbaseUrl = input<string | null>(API_CONFIGS.getExternalAppEndpoint(Apps.MW));\r\n\troleEndPointUrl = input<string>('/user-management/roles/by-client-reference-key?clientReferenceKey=');\r\n\tclient = input<string>('thor');\r\n\troleItems: any = [];\r\n\tselectionItems: string[] = [];\r\n\r\n\t@Output() SelectionChanged = new EventEmitter<SelectBoxItem>();\r\n\r\n\tconstructor(private http: HttpClient, private translocoService: TranslocoService) {\r\n\t\tsuper();\r\n\t\teffect(() => {\r\n\t\t\tif (this.client())\r\n\t\t\t\tthis.getRoleItems().then((roleItems) => {\r\n\t\t\t\t\t//const x: string[] = this.ngControl.value;\r\n//\r\n\t\t\t\t\t//const y: { key: string; text: string }[] = roleItems;\r\n//\r\n\t\t\t\t\t//const matched = y.filter((item) => x.includes(item.text));\r\n//\r\n\t\t\t\t\t//this.ngControl.control.setValue(matched);\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tasync getRoleItems() {\r\n\t\tthis.roleItems = await firstValueFrom(\r\n\t\t\tthis.http.get<RoleResponseDTO[]>(this.baseUrl() + this.roleEndPointUrl() + this.client())\r\n\t\t).then((roleItems) => {\r\n\t\t\troleItems.forEach((item: RoleResponseDTO) => {\r\n\t\t\t\tthis.selectionItems.push(\r\n\t\t\t\t item.name\r\n\t\t\t);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\treturn this.selectionItems;\r\n\t}\r\n\r\n\tcompleteMethod(event: any) {\r\n\t\tconst query = event.query;\r\n\r\n\t\tthis.filteredSelectionItems = this.filterSelection(query, this.selectionItems);\r\n\t}\r\n\r\n\tfilterSelection(query: string, selectionItems: string[]): string[] {\r\n\t\tconst filtered: string[] =\r\n\t\t\tthis.multiple() ? (selectionItems.filter((item) => item === query) ?? []) : [];\r\n\r\n\t\tconst lang = this.translocoService.getActiveLang();\r\n\t\tconst lowerQuery = query.toLocaleLowerCase(lang);\r\n\t\treturn [\r\n\t\t\t...new Set([\r\n\t\t\t\t...filtered,\r\n\t\t\t\t...selectionItems.filter((selectionItem) => {\r\n\t\t\t\t\treturn selectionItem.toLocaleLowerCase(lang).indexOf(lowerQuery) == 0;\r\n\t\t\t\t})\r\n\t\t\t])\r\n\t\t];\r\n\t}\r\n}\r\n","<p-autoComplete\r\n\t[optionLabel]=\"undefined\"\r\n\t[optionValue]=\"undefined\"\r\n\t[placeholder]=\"placeholder()\"\r\n\t[multiple]=\"multiple()\"\r\n\t[forceSelection]=\"forceSelection()\"\r\n\t[delay]=\"400\"\r\n\t[suggestions]=\"filteredSelectionItems\"\r\n\t(completeMethod)=\"completeMethod($event)\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t[autoHighlight]=\"true\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\r\n\r\n\tappendTo=\"body\">\r\n<!--\t<ng-template let-item pTemplate=\"item\">\r\n\t\t<div>\r\n\t\t\t<span>{{ item?.text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EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,aAAA,EAAA,IAAA,EAAA,eAAA,EAAA,uBAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIrC,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACN,QAAA,EAAA,kEAAkE,EAEnE,OAAA,EAAA,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,EAAA,SAAA,EACvC,CAAC,qBAAqB,CAAC,EAClB,cAAA,EAAA,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,ioBAAA,EAAA,CAAA;8GAe9B,gBAAgB,EAAA,CAAA;sBAAzB,MAAM;;;AErCR;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aril",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "~17.1.0",
|
|
6
6
|
"@angular/common": "^17.1.0",
|
|
@@ -59,36 +59,36 @@
|
|
|
59
59
|
"esm": "./esm2022/http/aril-http.mjs",
|
|
60
60
|
"default": "./fesm2022/aril-http.mjs"
|
|
61
61
|
},
|
|
62
|
-
"./keycloak": {
|
|
63
|
-
"types": "./keycloak/index.d.ts",
|
|
64
|
-
"esm2022": "./esm2022/keycloak/aril-keycloak.mjs",
|
|
65
|
-
"esm": "./esm2022/keycloak/aril-keycloak.mjs",
|
|
66
|
-
"default": "./fesm2022/aril-keycloak.mjs"
|
|
67
|
-
},
|
|
68
62
|
"./i18n": {
|
|
69
63
|
"types": "./i18n/index.d.ts",
|
|
70
64
|
"esm2022": "./esm2022/i18n/aril-i18n.mjs",
|
|
71
65
|
"esm": "./esm2022/i18n/aril-i18n.mjs",
|
|
72
66
|
"default": "./fesm2022/aril-i18n.mjs"
|
|
73
67
|
},
|
|
68
|
+
"./keycloak": {
|
|
69
|
+
"types": "./keycloak/index.d.ts",
|
|
70
|
+
"esm2022": "./esm2022/keycloak/aril-keycloak.mjs",
|
|
71
|
+
"esm": "./esm2022/keycloak/aril-keycloak.mjs",
|
|
72
|
+
"default": "./fesm2022/aril-keycloak.mjs"
|
|
73
|
+
},
|
|
74
74
|
"./provider": {
|
|
75
75
|
"types": "./provider/index.d.ts",
|
|
76
76
|
"esm2022": "./esm2022/provider/aril-provider.mjs",
|
|
77
77
|
"esm": "./esm2022/provider/aril-provider.mjs",
|
|
78
78
|
"default": "./fesm2022/aril-provider.mjs"
|
|
79
79
|
},
|
|
80
|
-
"./superset": {
|
|
81
|
-
"types": "./superset/index.d.ts",
|
|
82
|
-
"esm2022": "./esm2022/superset/aril-superset.mjs",
|
|
83
|
-
"esm": "./esm2022/superset/aril-superset.mjs",
|
|
84
|
-
"default": "./fesm2022/aril-superset.mjs"
|
|
85
|
-
},
|
|
86
80
|
"./theme": {
|
|
87
81
|
"types": "./theme/index.d.ts",
|
|
88
82
|
"esm2022": "./esm2022/theme/aril-theme.mjs",
|
|
89
83
|
"esm": "./esm2022/theme/aril-theme.mjs",
|
|
90
84
|
"default": "./fesm2022/aril-theme.mjs"
|
|
91
85
|
},
|
|
86
|
+
"./superset": {
|
|
87
|
+
"types": "./superset/index.d.ts",
|
|
88
|
+
"esm2022": "./esm2022/superset/aril-superset.mjs",
|
|
89
|
+
"esm": "./esm2022/superset/aril-superset.mjs",
|
|
90
|
+
"default": "./fesm2022/aril-superset.mjs"
|
|
91
|
+
},
|
|
92
92
|
"./ui": {
|
|
93
93
|
"types": "./ui/index.d.ts",
|
|
94
94
|
"esm2022": "./esm2022/ui/aril-ui.mjs",
|
|
@@ -179,18 +179,18 @@
|
|
|
179
179
|
"esm": "./esm2022/ui/checkbox/aril-ui-checkbox.mjs",
|
|
180
180
|
"default": "./fesm2022/aril-ui-checkbox.mjs"
|
|
181
181
|
},
|
|
182
|
-
"./ui/chip": {
|
|
183
|
-
"types": "./ui/chip/index.d.ts",
|
|
184
|
-
"esm2022": "./esm2022/ui/chip/aril-ui-chip.mjs",
|
|
185
|
-
"esm": "./esm2022/ui/chip/aril-ui-chip.mjs",
|
|
186
|
-
"default": "./fesm2022/aril-ui-chip.mjs"
|
|
187
|
-
},
|
|
188
182
|
"./ui/collapse-reorder-list": {
|
|
189
183
|
"types": "./ui/collapse-reorder-list/index.d.ts",
|
|
190
184
|
"esm2022": "./esm2022/ui/collapse-reorder-list/aril-ui-collapse-reorder-list.mjs",
|
|
191
185
|
"esm": "./esm2022/ui/collapse-reorder-list/aril-ui-collapse-reorder-list.mjs",
|
|
192
186
|
"default": "./fesm2022/aril-ui-collapse-reorder-list.mjs"
|
|
193
187
|
},
|
|
188
|
+
"./ui/chip": {
|
|
189
|
+
"types": "./ui/chip/index.d.ts",
|
|
190
|
+
"esm2022": "./esm2022/ui/chip/aril-ui-chip.mjs",
|
|
191
|
+
"esm": "./esm2022/ui/chip/aril-ui-chip.mjs",
|
|
192
|
+
"default": "./fesm2022/aril-ui-chip.mjs"
|
|
193
|
+
},
|
|
194
194
|
"./ui/dxEditor": {
|
|
195
195
|
"types": "./ui/dxEditor/index.d.ts",
|
|
196
196
|
"esm2022": "./esm2022/ui/dxEditor/aril-ui-dxEditor.mjs",
|
|
@@ -209,47 +209,35 @@
|
|
|
209
209
|
"esm": "./esm2022/ui/editor/aril-ui-editor.mjs",
|
|
210
210
|
"default": "./fesm2022/aril-ui-editor.mjs"
|
|
211
211
|
},
|
|
212
|
+
"./ui/img-viewer": {
|
|
213
|
+
"types": "./ui/img-viewer/index.d.ts",
|
|
214
|
+
"esm2022": "./esm2022/ui/img-viewer/aril-ui-img-viewer.mjs",
|
|
215
|
+
"esm": "./esm2022/ui/img-viewer/aril-ui-img-viewer.mjs",
|
|
216
|
+
"default": "./fesm2022/aril-ui-img-viewer.mjs"
|
|
217
|
+
},
|
|
212
218
|
"./ui/field": {
|
|
213
219
|
"types": "./ui/field/index.d.ts",
|
|
214
220
|
"esm2022": "./esm2022/ui/field/aril-ui-field.mjs",
|
|
215
221
|
"esm": "./esm2022/ui/field/aril-ui-field.mjs",
|
|
216
222
|
"default": "./fesm2022/aril-ui-field.mjs"
|
|
217
223
|
},
|
|
218
|
-
"./ui/fileUpload": {
|
|
219
|
-
"types": "./ui/fileUpload/index.d.ts",
|
|
220
|
-
"esm2022": "./esm2022/ui/fileUpload/aril-ui-fileUpload.mjs",
|
|
221
|
-
"esm": "./esm2022/ui/fileUpload/aril-ui-fileUpload.mjs",
|
|
222
|
-
"default": "./fesm2022/aril-ui-fileUpload.mjs"
|
|
223
|
-
},
|
|
224
224
|
"./ui/form": {
|
|
225
225
|
"types": "./ui/form/index.d.ts",
|
|
226
226
|
"esm2022": "./esm2022/ui/form/aril-ui-form.mjs",
|
|
227
227
|
"esm": "./esm2022/ui/form/aril-ui-form.mjs",
|
|
228
228
|
"default": "./fesm2022/aril-ui-form.mjs"
|
|
229
229
|
},
|
|
230
|
-
"./ui/img-viewer": {
|
|
231
|
-
"types": "./ui/img-viewer/index.d.ts",
|
|
232
|
-
"esm2022": "./esm2022/ui/img-viewer/aril-ui-img-viewer.mjs",
|
|
233
|
-
"esm": "./esm2022/ui/img-viewer/aril-ui-img-viewer.mjs",
|
|
234
|
-
"default": "./fesm2022/aril-ui-img-viewer.mjs"
|
|
235
|
-
},
|
|
236
230
|
"./ui/json-diff-comparison": {
|
|
237
231
|
"types": "./ui/json-diff-comparison/index.d.ts",
|
|
238
232
|
"esm2022": "./esm2022/ui/json-diff-comparison/aril-ui-json-diff-comparison.mjs",
|
|
239
233
|
"esm": "./esm2022/ui/json-diff-comparison/aril-ui-json-diff-comparison.mjs",
|
|
240
234
|
"default": "./fesm2022/aril-ui-json-diff-comparison.mjs"
|
|
241
235
|
},
|
|
242
|
-
"./ui/
|
|
243
|
-
"types": "./ui/
|
|
244
|
-
"esm2022": "./esm2022/ui/
|
|
245
|
-
"esm": "./esm2022/ui/
|
|
246
|
-
"default": "./fesm2022/aril-ui-
|
|
247
|
-
},
|
|
248
|
-
"./ui/loader": {
|
|
249
|
-
"types": "./ui/loader/index.d.ts",
|
|
250
|
-
"esm2022": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
251
|
-
"esm": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
252
|
-
"default": "./fesm2022/aril-ui-loader.mjs"
|
|
236
|
+
"./ui/fileUpload": {
|
|
237
|
+
"types": "./ui/fileUpload/index.d.ts",
|
|
238
|
+
"esm2022": "./esm2022/ui/fileUpload/aril-ui-fileUpload.mjs",
|
|
239
|
+
"esm": "./esm2022/ui/fileUpload/aril-ui-fileUpload.mjs",
|
|
240
|
+
"default": "./fesm2022/aril-ui-fileUpload.mjs"
|
|
253
241
|
},
|
|
254
242
|
"./ui/mask": {
|
|
255
243
|
"types": "./ui/mask/index.d.ts",
|
|
@@ -257,6 +245,12 @@
|
|
|
257
245
|
"esm": "./esm2022/ui/mask/aril-ui-mask.mjs",
|
|
258
246
|
"default": "./fesm2022/aril-ui-mask.mjs"
|
|
259
247
|
},
|
|
248
|
+
"./ui/loader": {
|
|
249
|
+
"types": "./ui/loader/index.d.ts",
|
|
250
|
+
"esm2022": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
251
|
+
"esm": "./esm2022/ui/loader/aril-ui-loader.mjs",
|
|
252
|
+
"default": "./fesm2022/aril-ui-loader.mjs"
|
|
253
|
+
},
|
|
260
254
|
"./ui/multiSelect": {
|
|
261
255
|
"types": "./ui/multiSelect/index.d.ts",
|
|
262
256
|
"esm2022": "./esm2022/ui/multiSelect/aril-ui-multiSelect.mjs",
|
|
@@ -293,6 +287,12 @@
|
|
|
293
287
|
"esm": "./esm2022/ui/password/aril-ui-password.mjs",
|
|
294
288
|
"default": "./fesm2022/aril-ui-password.mjs"
|
|
295
289
|
},
|
|
290
|
+
"./ui/lib": {
|
|
291
|
+
"types": "./ui/lib/index.d.ts",
|
|
292
|
+
"esm2022": "./esm2022/ui/lib/aril-ui-lib.mjs",
|
|
293
|
+
"esm": "./esm2022/ui/lib/aril-ui-lib.mjs",
|
|
294
|
+
"default": "./fesm2022/aril-ui-lib.mjs"
|
|
295
|
+
},
|
|
296
296
|
"./ui/pdf-viewer": {
|
|
297
297
|
"types": "./ui/pdf-viewer/index.d.ts",
|
|
298
298
|
"esm2022": "./esm2022/ui/pdf-viewer/aril-ui-pdf-viewer.mjs",
|
|
@@ -329,18 +329,18 @@
|
|
|
329
329
|
"esm": "./esm2022/ui/switch/aril-ui-switch.mjs",
|
|
330
330
|
"default": "./fesm2022/aril-ui-switch.mjs"
|
|
331
331
|
},
|
|
332
|
-
"./ui/table": {
|
|
333
|
-
"types": "./ui/table/index.d.ts",
|
|
334
|
-
"esm2022": "./esm2022/ui/table/aril-ui-table.mjs",
|
|
335
|
-
"esm": "./esm2022/ui/table/aril-ui-table.mjs",
|
|
336
|
-
"default": "./fesm2022/aril-ui-table.mjs"
|
|
337
|
-
},
|
|
338
332
|
"./ui/table-expand": {
|
|
339
333
|
"types": "./ui/table-expand/index.d.ts",
|
|
340
334
|
"esm2022": "./esm2022/ui/table-expand/aril-ui-table-expand.mjs",
|
|
341
335
|
"esm": "./esm2022/ui/table-expand/aril-ui-table-expand.mjs",
|
|
342
336
|
"default": "./fesm2022/aril-ui-table-expand.mjs"
|
|
343
337
|
},
|
|
338
|
+
"./ui/table": {
|
|
339
|
+
"types": "./ui/table/index.d.ts",
|
|
340
|
+
"esm2022": "./esm2022/ui/table/aril-ui-table.mjs",
|
|
341
|
+
"esm": "./esm2022/ui/table/aril-ui-table.mjs",
|
|
342
|
+
"default": "./fesm2022/aril-ui-table.mjs"
|
|
343
|
+
},
|
|
344
344
|
"./ui/tag": {
|
|
345
345
|
"types": "./ui/tag/index.d.ts",
|
|
346
346
|
"esm2022": "./esm2022/ui/tag/aril-ui-tag.mjs",
|
|
@@ -503,6 +503,12 @@
|
|
|
503
503
|
"esm": "./esm2022/util/pipes/aril-util-pipes.mjs",
|
|
504
504
|
"default": "./fesm2022/aril-util-pipes.mjs"
|
|
505
505
|
},
|
|
506
|
+
"./util/primitive-extensions": {
|
|
507
|
+
"types": "./util/primitive-extensions/index.d.ts",
|
|
508
|
+
"esm2022": "./esm2022/util/primitive-extensions/aril-util-primitive-extensions.mjs",
|
|
509
|
+
"esm": "./esm2022/util/primitive-extensions/aril-util-primitive-extensions.mjs",
|
|
510
|
+
"default": "./fesm2022/aril-util-primitive-extensions.mjs"
|
|
511
|
+
},
|
|
506
512
|
"./util/pub-sub": {
|
|
507
513
|
"types": "./util/pub-sub/index.d.ts",
|
|
508
514
|
"esm2022": "./esm2022/util/pub-sub/aril-util-pub-sub.mjs",
|
|
@@ -515,12 +521,6 @@
|
|
|
515
521
|
"esm": "./esm2022/util/sync-active-tab-route/aril-util-sync-active-tab-route.mjs",
|
|
516
522
|
"default": "./fesm2022/aril-util-sync-active-tab-route.mjs"
|
|
517
523
|
},
|
|
518
|
-
"./util/primitive-extensions": {
|
|
519
|
-
"types": "./util/primitive-extensions/index.d.ts",
|
|
520
|
-
"esm2022": "./esm2022/util/primitive-extensions/aril-util-primitive-extensions.mjs",
|
|
521
|
-
"esm": "./esm2022/util/primitive-extensions/aril-util-primitive-extensions.mjs",
|
|
522
|
-
"default": "./fesm2022/aril-util-primitive-extensions.mjs"
|
|
523
|
-
},
|
|
524
524
|
"./util/unwrap": {
|
|
525
525
|
"types": "./util/unwrap/index.d.ts",
|
|
526
526
|
"esm2022": "./esm2022/util/unwrap/aril-util-unwrap.mjs",
|
|
@@ -143,13 +143,16 @@ export class HistoryService {
|
|
|
143
143
|
|
|
144
144
|
public getHistoryItemsBySearchTerm(searchTerm: string): HistoryItem[] {
|
|
145
145
|
const history = this.getHistoryFromStorage();
|
|
146
|
-
const lowerSearchTerm = searchTerm.toLowerCase();
|
|
147
146
|
const currentLang = this.translocoService.getActiveLang() as 'tr' | 'en';
|
|
147
|
+
const lowerSearchTerm = searchTerm.toLocaleLowerCase(currentLang);
|
|
148
148
|
|
|
149
149
|
return history.filter((item) => {
|
|
150
150
|
// Search in current language title
|
|
151
151
|
const currentTitle = item.multiLanguageTitle?.[currentLang] || item.title;
|
|
152
|
-
return
|
|
152
|
+
return (
|
|
153
|
+
currentTitle.toLocaleLowerCase(currentLang).includes(lowerSearchTerm) ||
|
|
154
|
+
item.url.toLocaleLowerCase(currentLang).includes(lowerSearchTerm)
|
|
155
|
+
);
|
|
153
156
|
});
|
|
154
157
|
}
|
|
155
158
|
}
|