@wavemaker/app-ng-runtime 11.14.2-rc.6311 → 11.15.0-1.246
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/build-task/bundles/index.umd.js +13 -2
- package/build-task/esm2022/input/default/checkbox/checkbox.build.mjs +9 -2
- package/build-task/esm2022/input/default/radioset/radioset.build.mjs +6 -2
- package/build-task/fesm2022/index.mjs +13 -2
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/components/base/bundles/index.umd.js +271 -128
- package/components/base/esm2022/public_api.mjs +2 -2
- package/components/base/esm2022/utils/autolayout-utils.mjs +252 -0
- package/components/base/esm2022/utils/live-utils.mjs +10 -7
- package/components/base/esm2022/utils/widget-utils.mjs +8 -1
- package/components/base/esm2022/widgets/common/base/base.component.mjs +7 -8
- package/components/base/esm2022/widgets/common/base/partial-container.directive.mjs +4 -1
- package/components/base/esm2022/widgets/common/container/container.directive.mjs +28 -150
- package/components/base/esm2022/widgets/common/container/container.props.mjs +6 -2
- package/components/base/fesm2022/index.mjs +273 -129
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/public_api.d.ts +1 -1
- package/components/base/utils/autolayout-utils.d.ts +29 -0
- package/components/base/utils/widget-utils.d.ts +1 -0
- package/components/base/widgets/common/container/container.directive.d.ts +7 -9
- package/components/basic/label/bundles/index.umd.js +4 -0
- package/components/basic/label/esm2022/label.directive.mjs +5 -1
- package/components/basic/label/fesm2022/index.mjs +4 -0
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/bundles/index.umd.js +13 -11
- package/components/basic/search/esm2022/search.component.mjs +14 -12
- package/components/basic/search/fesm2022/index.mjs +13 -11
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/chart/bundles/index.umd.js +2 -2
- package/components/chart/esm2022/chart.utils.mjs +3 -3
- package/components/chart/fesm2022/index.mjs +2 -2
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +2 -0
- package/components/containers/accordion/accordion.directive.d.ts +4 -0
- package/components/containers/accordion/bundles/index.umd.js +34 -0
- package/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +6 -2
- package/components/containers/accordion/esm2022/accordion.directive.mjs +32 -2
- package/components/containers/accordion/fesm2022/index.mjs +36 -2
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/bundles/index.umd.js +34 -0
- package/components/containers/tabs/esm2022/tab-pane/tab-pane.component.mjs +6 -2
- package/components/containers/tabs/esm2022/tabs.component.mjs +33 -4
- package/components/containers/tabs/fesm2022/index.mjs +36 -2
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/tab-pane/tab-pane.component.d.ts +2 -0
- package/components/containers/tabs/tabs.component.d.ts +5 -1
- package/components/containers/wizard/bundles/index.umd.js +46 -2
- package/components/containers/wizard/esm2022/wizard-step/wizard-step.component.mjs +8 -2
- package/components/containers/wizard/esm2022/wizard.component.mjs +42 -4
- package/components/containers/wizard/fesm2022/index.mjs +48 -4
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/wizard-step/wizard-step.component.d.ts +4 -0
- package/components/containers/wizard/wizard.component.d.ts +1 -0
- package/components/data/form/bundles/index.umd.js +28 -1
- package/components/data/form/esm2022/form-field/form-field.directive.mjs +4 -1
- package/components/data/form/esm2022/form.component.mjs +24 -2
- package/components/data/form/esm2022/form.props.mjs +3 -2
- package/components/data/form/esm2022/live-filter/live-filter.directive.mjs +2 -1
- package/components/data/form/fesm2022/index.mjs +29 -2
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/form.component.d.ts +3 -0
- package/components/data/list/bundles/index.umd.js +0 -9
- package/components/data/list/esm2022/list-item.directive.mjs +1 -10
- package/components/data/list/fesm2022/index.mjs +0 -9
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/bundles/index.umd.js +6 -2
- package/components/data/pagination/esm2022/pagination.component.mjs +7 -3
- package/components/data/pagination/fesm2022/index.mjs +6 -2
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/table/bundles/index.umd.js +21 -4
- package/components/data/table/esm2022/table.component.mjs +22 -5
- package/components/data/table/fesm2022/index.mjs +21 -4
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/alert-dialog/alert-dialog.component.d.ts +6 -2
- package/components/dialogs/alert-dialog/bundles/index.umd.js +18 -8
- package/components/dialogs/alert-dialog/esm2022/alert-dialog.component.mjs +17 -7
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +15 -5
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/bundles/index.umd.js +12 -3
- package/components/input/checkbox/checkbox.component.d.ts +2 -0
- package/components/input/checkbox/esm2022/checkbox.component.mjs +9 -3
- package/components/input/checkbox/esm2022/checkbox.props.mjs +5 -2
- package/components/input/checkbox/fesm2022/index.mjs +12 -3
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/bundles/index.umd.js +12 -1
- package/components/input/checkboxset/checkboxset.component.d.ts +1 -0
- package/components/input/checkboxset/esm2022/checkboxset.component.mjs +11 -1
- package/components/input/checkboxset/esm2022/checkboxset.props.mjs +3 -2
- package/components/input/checkboxset/fesm2022/index.mjs +12 -1
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/base-date-time/base-date-time.component.d.ts +0 -1
- package/components/input/epoch/base-date-time/bundles/index.umd.js +29 -27
- package/components/input/epoch/base-date-time/esm2022/base-date-time.component.mjs +30 -28
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +29 -27
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/bundles/index.umd.js +4 -3
- package/components/input/epoch/date/esm2022/date.component.mjs +5 -4
- package/components/input/epoch/date/fesm2022/index.mjs +4 -3
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time/bundles/index.umd.js +5 -4
- package/components/input/epoch/date-time/esm2022/date-time.component.mjs +7 -6
- package/components/input/epoch/date-time/fesm2022/index.mjs +6 -5
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/bundles/index.umd.js +1 -1
- package/components/input/file-upload/esm2022/file-upload.props.mjs +2 -2
- package/components/input/file-upload/fesm2022/index.mjs +1 -1
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/bundles/index.umd.js +13 -1
- package/components/input/radioset/esm2022/radioset.component.mjs +11 -1
- package/components/input/radioset/esm2022/radioset.props.mjs +4 -2
- package/components/input/radioset/fesm2022/index.mjs +13 -1
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/radioset.component.d.ts +1 -0
- package/components/input/slider/bundles/index.umd.js +86 -16
- package/components/input/slider/esm2022/slider.component.mjs +76 -9
- package/components/input/slider/esm2022/slider.props.mjs +5 -1
- package/components/input/slider/fesm2022/index.mjs +79 -8
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/slider.component.d.ts +12 -3
- package/components/input/text/bundles/index.umd.js +24 -3
- package/components/input/text/esm2022/input-text/input-text.component.mjs +6 -3
- package/components/input/text/esm2022/input-text/input-text.props.mjs +5 -2
- package/components/input/text/esm2022/number-locale/number-locale.mjs +16 -1
- package/components/input/text/fesm2022/index.mjs +24 -3
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/input-text/input-text.component.d.ts +4 -0
- package/components/input/text/number-locale/number-locale.d.ts +12 -0
- package/components/navigation/breadcrumb/bundles/index.umd.js +2 -2
- package/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +3 -3
- package/components/navigation/breadcrumb/fesm2022/index.mjs +2 -2
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/bundles/index.umd.js +12 -0
- package/components/navigation/popover/esm2022/popover.component.mjs +13 -1
- package/components/navigation/popover/fesm2022/index.mjs +12 -0
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/popover.component.d.ts +2 -0
- package/components/page/default/bundles/index.umd.js +0 -4
- package/components/page/default/esm2022/router-outlet.directive.mjs +1 -5
- package/components/page/default/fesm2022/index.mjs +0 -4
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/header/bundles/index.umd.js +4 -3
- package/components/page/header/esm2022/header.component.mjs +5 -4
- package/components/page/header/fesm2022/index.mjs +4 -3
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/header/header.component.d.ts +2 -1
- package/core/bundles/index.umd.js +90 -6
- package/core/enums/enums.d.ts +1 -0
- package/core/esm2022/enums/enums.mjs +2 -1
- package/core/esm2022/utils/build-utils.mjs +5 -1
- package/core/esm2022/utils/utils.mjs +5 -2
- package/core/esm2022/utils/watcher.mjs +83 -4
- package/core/fesm2022/index.mjs +91 -4
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/utils/watcher.d.ts +2 -0
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/esm2022/oAuth.service.mjs +1 -1
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/oAuth.service.d.ts +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +33 -31
- package/runtime/base/components/base-prefab.component.d.ts +6 -4
- package/runtime/base/esm2022/components/app-component/app.component.mjs +1 -1
- package/runtime/base/esm2022/components/base-page.component.mjs +2 -5
- package/runtime/base/esm2022/components/base-partial.component.mjs +2 -2
- package/runtime/base/esm2022/components/base-prefab.component.mjs +20 -12
- package/runtime/base/esm2022/components/base-spa-page.component.mjs +1 -4
- package/runtime/base/esm2022/services/http-interceptor.services.mjs +14 -13
- package/runtime/base/fesm2022/index.mjs +34 -31
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/runtime-base.module.d.ts +2 -1
- package/runtime/dynamic/app/app.config.d.ts +1 -1
- package/runtime/dynamic/bundles/index.umd.js +1 -1
- package/runtime/dynamic/esm2022/app/app.config.mjs +7 -7
- package/runtime/dynamic/fesm2022/index.mjs +2 -2
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/scripts/datatable/datatable.js +17 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Live_Operations, ALLFIELDS, LIVE_CONSTANTS, performDataOperation, refreshDataSource, fetchRelatedFieldData, interpolateBindExpressions, getDistinctFieldProperties, getDistinctValues, fetchDistinctValues, getDistinctValuesForField, getRangeFieldValue, getRangeMatchMode, getEnableEmptyFilter, getEmptyMatchMode, createArrayFrom, applyFilterOnField, transformData } from './utils/data-utils';
|
|
2
2
|
export { getOrderedDataset, transformDataWithKeys, extractDataAsArray, convertDataToObject, transformFormData, getUniqObjsByDataField, setItemByCompare, groupData, filterDate, toggleAllHeaders, handleHeaderClick, configureDnD, DataSetItem } from './utils/form-utils';
|
|
3
3
|
export { EDIT_MODE, setHeaderConfig, setHeaderConfigForTable, getRowOperationsColumn, getFieldLayoutConfig, getDefaultViewModeWidget, parseValueByType, getFieldTypeWidgetTypesMap, getDataTableFilterWidget, getEditModeWidget, getDefaultValue } from './utils/live-utils';
|
|
4
|
-
export { getObjValueByKey, getEvaluatedData, isActiveNavItem, hasLinkToCurrentPage, getOrderByExpr, isDataSetWidget, getImageUrl, getBackGroundImageUrl, provideAs, provideAsWidgetRef, provideAsDialogRef, unsupportedStatePersistenceTypes, NAVIGATION_TYPE, INPUTMODE, AUTOCLOSE_TYPE, getWatchIdentifier, getMatchModeTypesMap, getMatchModeMsgs, getConditionalClasses, prepareFieldDefs, getContainerTargetClass, extractDataSourceName, setFocusTrap, getKeyboardFocusableElements } from './utils/widget-utils';
|
|
4
|
+
export { getObjValueByKey, getEvaluatedData, isActiveNavItem, hasLinkToCurrentPage, getOrderByExpr, isDataSetWidget, getCurrentWidgets, getImageUrl, getBackGroundImageUrl, provideAs, provideAsWidgetRef, provideAsDialogRef, unsupportedStatePersistenceTypes, NAVIGATION_TYPE, INPUTMODE, AUTOCLOSE_TYPE, getWatchIdentifier, getMatchModeTypesMap, getMatchModeMsgs, getConditionalClasses, prepareFieldDefs, getContainerTargetClass, extractDataSourceName, setFocusTrap, getKeyboardFocusableElements } from './utils/widget-utils';
|
|
5
5
|
export { BaseComponent } from './widgets/common/base/base.component';
|
|
6
6
|
export * from './widgets/common/base/base-container.component';
|
|
7
7
|
export { DatasetAwareNavComponent, NavNode } from './widgets/common/base/dataset-aware-nav.component';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare class AutoLayoutUtils {
|
|
2
|
+
direction: 'row' | 'column';
|
|
3
|
+
hasWrap: boolean;
|
|
4
|
+
alignment: string;
|
|
5
|
+
gap: string;
|
|
6
|
+
columngap: string;
|
|
7
|
+
clipContent: string;
|
|
8
|
+
position: string;
|
|
9
|
+
overflowtype: string;
|
|
10
|
+
zIndex: string;
|
|
11
|
+
protected nativeElement: HTMLElement;
|
|
12
|
+
protected $element: any;
|
|
13
|
+
protected parentElement: HTMLElement | null;
|
|
14
|
+
private readonly alignmentMatrix;
|
|
15
|
+
constructor();
|
|
16
|
+
/** Apply direction (row/column) */
|
|
17
|
+
applyDirection(direction: 'row' | 'column'): void;
|
|
18
|
+
/** Apply wrapping */
|
|
19
|
+
applyWrap(wrap: boolean): void;
|
|
20
|
+
/** Apply alignment based on direction */
|
|
21
|
+
applyAlignment(alignmentKey: string): void;
|
|
22
|
+
/** Apply spacing for gap + column gap */
|
|
23
|
+
applySpacing(key: string, nv: string): void;
|
|
24
|
+
onPropertyChange(key: string, nv: any, ov?: any): void;
|
|
25
|
+
applyStyleChange(key: string, nv: any): void;
|
|
26
|
+
private applySize;
|
|
27
|
+
private handleClipBehaviour;
|
|
28
|
+
private handlePosition;
|
|
29
|
+
}
|
|
@@ -117,3 +117,4 @@ export declare const setFocusTrap: (container: any, allowOutsideClick: any, setR
|
|
|
117
117
|
* @returns {Array}
|
|
118
118
|
*/
|
|
119
119
|
export declare const getKeyboardFocusableElements: (element: HTMLElement) => Element[];
|
|
120
|
+
export declare const getCurrentWidgets: (element: any, widgets: any) => any;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
+
import { App } from '@wm/core';
|
|
2
3
|
import { BaseContainerComponent } from "../base/base-container.component";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ContainerDirective extends BaseContainerComponent {
|
|
6
|
+
app?: App;
|
|
5
7
|
static initializeProps: void;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
columngap: string;
|
|
11
|
-
constructor(inj: Injector, explicitContext?: any);
|
|
8
|
+
isPrism: boolean;
|
|
9
|
+
private autoLayoutUtils;
|
|
10
|
+
constructor(inj: Injector, explicitContext?: any, app?: App);
|
|
11
|
+
private initializeAutoLayout;
|
|
12
12
|
onPropertyChange(key: string, nv: any, ov?: any): void;
|
|
13
13
|
protected onStyleChange(key: string, nv: any, ov?: any): void;
|
|
14
|
-
|
|
15
|
-
private applySpacing;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContainerDirective, [null, { optional: true; }]>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContainerDirective, [null, { optional: true; }, null]>;
|
|
17
15
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ContainerDirective, "[wmContainer]", never, {}, {}, never, never, true, never>;
|
|
18
16
|
}
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
i1.styler(this.nativeElement, this);
|
|
55
55
|
}
|
|
56
56
|
onPropertyChange(key, nv, ov) {
|
|
57
|
+
// Guard against property changes after component destruction
|
|
58
|
+
// This can happen when property changes are queued asynchronously
|
|
57
59
|
if (this.isDestroyed) {
|
|
58
60
|
return;
|
|
59
61
|
}
|
|
@@ -75,10 +77,12 @@
|
|
|
75
77
|
core.setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
76
78
|
}
|
|
77
79
|
else {
|
|
80
|
+
// Guard against sanitizePipe being null/undefined (e.g., after ngOnDestroy)
|
|
78
81
|
if (this.sanitizePipe) {
|
|
79
82
|
core.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), i0.SecurityContext.HTML));
|
|
80
83
|
}
|
|
81
84
|
else {
|
|
85
|
+
// Fallback to textContent if sanitizePipe is not available
|
|
82
86
|
core.setProperty(this.nativeElement, 'textContent', insertZWSP(nv));
|
|
83
87
|
}
|
|
84
88
|
}
|
|
@@ -19,6 +19,8 @@ export class LabelDirective extends StylableComponent {
|
|
|
19
19
|
styler(this.nativeElement, this);
|
|
20
20
|
}
|
|
21
21
|
onPropertyChange(key, nv, ov) {
|
|
22
|
+
// Guard against property changes after component destruction
|
|
23
|
+
// This can happen when property changes are queued asynchronously
|
|
22
24
|
if (this.isDestroyed) {
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
@@ -40,10 +42,12 @@ export class LabelDirective extends StylableComponent {
|
|
|
40
42
|
setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
41
43
|
}
|
|
42
44
|
else {
|
|
45
|
+
// Guard against sanitizePipe being null/undefined (e.g., after ngOnDestroy)
|
|
43
46
|
if (this.sanitizePipe) {
|
|
44
47
|
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));
|
|
45
48
|
}
|
|
46
49
|
else {
|
|
50
|
+
// Fallback to textContent if sanitizePipe is not available
|
|
47
51
|
setProperty(this.nativeElement, 'textContent', insertZWSP(nv));
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -84,4 +88,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
84
88
|
}, {
|
|
85
89
|
type: Optional
|
|
86
90
|
}] }] });
|
|
87
|
-
//#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nLCBKU09OLnN0cmluZ2lmeShudikpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpc09iamVjdChudikgJiYgc2FmZVZhbHVlKSB7XG4gICAgICAgICAgICAgICAgc2V0UHJvcGVydHkodGhpcy5uYXRpdmVFbGVtZW50LCAnaW5uZXJIVE1MJywgbnZbT2JqZWN0LmtleXMobnYpWzBdXSk7XG4gICAgICAgICAgICB9ICBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBHdWFyZCBhZ2FpbnN0IHNhbml0aXplUGlwZSBiZWluZyBudWxsL3VuZGVmaW5lZCAoZS5nLiwgYWZ0ZXIgbmdPbkRlc3Ryb3kpXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2FuaXRpemVQaXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHNldFByb3BlcnR5KHRoaXMubmF0aXZlRWxlbWVudCwgJ2lubmVySFRNTCcsIHRoaXMuc2FuaXRpemVQaXBlLnRyYW5zZm9ybShpbnNlcnRaV1NQKG52KSwgU2VjdXJpdHlDb250ZXh0LkhUTUwpKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBGYWxsYmFjayB0byB0ZXh0Q29udGVudCBpZiBzYW5pdGl6ZVBpcGUgaXMgbm90IGF2YWlsYWJsZVxuICAgICAgICAgICAgICAgICAgICBzZXRQcm9wZXJ0eSh0aGlzLm5hdGl2ZUVsZW1lbnQsICd0ZXh0Q29udGVudCcsIGluc2VydFpXU1AobnYpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfSBlbHNlIGlmIChrZXkgPT09ICdyZXF1aXJlZCcpIHtcbiAgICAgICAgICAgIHRvZ2dsZUNsYXNzKHRoaXMubmF0aXZlRWxlbWVudCwgJ3JlcXVpcmVkJywgbnYpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc3VwZXIub25Qcm9wZXJ0eUNoYW5nZShrZXksIG52LCBvdik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgLy8gQ2FsbCBwYXJlbnQgbmdPbkRlc3Ryb3kgZmlyc3QgKHNldHMgaXNEZXN0cm95ZWQgPSB0cnVlKVxuICAgICAgICAvLyBUaGlzIGVuc3VyZXMgb25Qcm9wZXJ0eUNoYW5nZSBjaGVja3MgZmFpbCBmYXN0IGlmIGNhbGxlZCBhc3luY2hyb25vdXNseVxuICAgICAgICBzdXBlci5uZ09uRGVzdHJveSgpO1xuXG4gICAgICAgIC8vIE1FTU9SWSBMRUFLIEZJWDogQ2xlYXIgc2FuaXRpemVQaXBlIHJlZmVyZW5jZSBhZnRlciBkZXN0cnVjdGlvbiBmbGFnIGlzIHNldFxuICAgICAgICAvLyBUaGlzIHJldGFpbnMgcmVmZXJlbmNlcyB0byB0aGUgZW50aXJlIERJIHRyZWVcbiAgICAgICAgdGhpcy5zYW5pdGl6ZVBpcGUgPSBudWxsO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -35,6 +35,8 @@ class LabelDirective extends StylableComponent {
|
|
|
35
35
|
styler(this.nativeElement, this);
|
|
36
36
|
}
|
|
37
37
|
onPropertyChange(key, nv, ov) {
|
|
38
|
+
// Guard against property changes after component destruction
|
|
39
|
+
// This can happen when property changes are queued asynchronously
|
|
38
40
|
if (this.isDestroyed) {
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
@@ -56,10 +58,12 @@ class LabelDirective extends StylableComponent {
|
|
|
56
58
|
setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
57
59
|
}
|
|
58
60
|
else {
|
|
61
|
+
// Guard against sanitizePipe being null/undefined (e.g., after ngOnDestroy)
|
|
59
62
|
if (this.sanitizePipe) {
|
|
60
63
|
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));
|
|
61
64
|
}
|
|
62
65
|
else {
|
|
66
|
+
// Fallback to textContent if sanitizePipe is not available
|
|
63
67
|
setProperty(this.nativeElement, 'textContent', insertZWSP(nv));
|
|
64
68
|
}
|
|
65
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/label/src/label.props.ts","../../../../../projects/components/widgets/basic/label/src/label.directive.ts","../../../../../projects/components/widgets/basic/label/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-label',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', {value: 'Label', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['type', PROP_STRING],\n ['notag', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['required', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, OnDestroy, Optional, SecurityContext} from '@angular/core';\n\nimport {setProperty, toggleClass} from '@wm/core';\nimport {\n DISPLAY_TYPE,\n IWidgetConfig,\n provideAsWidgetRef,\n SanitizePipe,\n StylableComponent,\n styler\n} from '@wm/components/base';\n\nimport {registerProps} from './label.props';\nimport {isObject} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-label';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-label',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Directive({\n standalone: true,\n selector: '[wmLabel]',\n providers: [\n provideAsWidgetRef(LabelDirective)\n ],\n exportAs: 'wmLabel'\n})\nexport class LabelDirective extends StylableComponent implements OnDestroy {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private sanitizePipe:SanitizePipe, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov?) {\n if (this.isDestroyed) {\n return;\n }\n if (key === 'caption') {\n // Check for trustPipe safe values\n let bindContent = this.nativeElement.getAttribute('caption.bind');\n let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;\n const insertZWSP = (value: any): string => {\n if (typeof value !== 'string') return value;\n return value.replace(/\\d{5,}/g, (match) => {\n return match.replace(/(.{9})(?=.)/g, '$1\\u200B');\n });\n };\n if (isObject(nv) && !safeValue) {\n setProperty(this.nativeElement, 'textContent', JSON.stringify(nv));\n } else if (isObject(nv) && safeValue) {\n setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);\n } else {\n if (this.sanitizePipe) {\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/label/src/label.props.ts","../../../../../projects/components/widgets/basic/label/src/label.directive.ts","../../../../../projects/components/widgets/basic/label/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-label',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', {value: 'Label', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['type', PROP_STRING],\n ['notag', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['required', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, OnDestroy, Optional, SecurityContext} from '@angular/core';\n\nimport {setProperty, toggleClass} from '@wm/core';\nimport {\n DISPLAY_TYPE,\n IWidgetConfig,\n provideAsWidgetRef,\n SanitizePipe,\n StylableComponent,\n styler\n} from '@wm/components/base';\n\nimport {registerProps} from './label.props';\nimport {isObject} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-label';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-label',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Directive({\n standalone: true,\n selector: '[wmLabel]',\n providers: [\n provideAsWidgetRef(LabelDirective)\n ],\n exportAs: 'wmLabel'\n})\nexport class LabelDirective extends StylableComponent implements OnDestroy {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private sanitizePipe:SanitizePipe, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov?) {\n // Guard against property changes after component destruction\n // This can happen when property changes are queued asynchronously\n if (this.isDestroyed) {\n return;\n }\n if (key === 'caption') {\n // Check for trustPipe safe values\n let bindContent = this.nativeElement.getAttribute('caption.bind');\n let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;\n const insertZWSP = (value: any): string => {\n if (typeof value !== 'string') return value;\n return value.replace(/\\d{5,}/g, (match) => {\n return match.replace(/(.{9})(?=.)/g, '$1\\u200B');\n });\n };\n if (isObject(nv) && !safeValue) {\n setProperty(this.nativeElement, 'textContent', JSON.stringify(nv));\n } else if (isObject(nv) && safeValue) {\n setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);\n } else {\n // Guard against sanitizePipe being null/undefined (e.g., after ngOnDestroy)\n if (this.sanitizePipe) {\n setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));\n } else {\n // Fallback to textContent if sanitizePipe is not available\n setProperty(this.nativeElement, 'textContent', insertZWSP(nv));\n }\n }\n\n } else if (key === 'required') {\n toggleClass(this.nativeElement, 'required', nv);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n ngOnDestroy() {\n // Call parent ngOnDestroy first (sets isDestroyed = true)\n // This ensures onPropertyChange checks fail fast if called asynchronously\n super.ngOnDestroy();\n\n // MEMORY LEAK FIX: Clear sanitizePipe reference after destruction flag is set\n // This retains references to the entire DI tree\n this.sanitizePipe = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,UAAU,EACV,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,GAAG,WAAW,EAAC,CAAC;QAC7C,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,OAAO,EAAE,YAAY,CAAC;QACvB,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC;AAC1C,KAAA,CACJ,CACJ;AACL,CAAC;;ACND,MAAM,WAAW,GAAG,WAAW;AAC/B,MAAM,aAAa,GAAkB;AACjC,IAAA,UAAU,EAAE,UAAU;AACtB,IAAA,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,YAAY,CAAC;CAC7B;AAUK,MAAO,cAAe,SAAQ,iBAAiB,CAAA;AAC1C,IAAA,SAAA,IAAA,CAAA,eAAe,GAAG,aAAa,EAAhB,CAAmB;AAEzC,IAAA,WAAA,CAAY,GAAa,EAAU,YAAyB,EAA0C,eAAoB,EAAA;AACtH,QAAA,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,eAAe,CAAC;QADX,IAAA,CAAA,YAAY,GAAZ,YAAY;AAG3C,QAAA,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC;IACpC;A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A;AACrB,qBAAA;AACD,oBAAA,QAAQ,EAAE;AACb,iBAAA;;0BAIkE,MAAM;2BAAC,kBAAkB;;0BAAG;;;ACjC/F;;AAEG;;;;"}
|
|
@@ -441,7 +441,9 @@
|
|
|
441
441
|
clearSearch($event, loadOnClear) {
|
|
442
442
|
this.query = '';
|
|
443
443
|
this.onInputChange($event);
|
|
444
|
-
this.dataProvider
|
|
444
|
+
if (this.dataProvider) {
|
|
445
|
+
this.dataProvider.isLastPage = false;
|
|
446
|
+
}
|
|
445
447
|
this.listenQuery = false;
|
|
446
448
|
if (loadOnClear) {
|
|
447
449
|
this.listenQuery = true;
|
|
@@ -573,7 +575,7 @@
|
|
|
573
575
|
return this.showclear && this.showClosebtn;
|
|
574
576
|
}
|
|
575
577
|
loadMoreData(incrementPage) {
|
|
576
|
-
if (this.dataProvider.isLastPage) {
|
|
578
|
+
if (!this.dataProvider || this.dataProvider.isLastPage) {
|
|
577
579
|
return;
|
|
578
580
|
}
|
|
579
581
|
// Increase the page number and trigger force query update
|
|
@@ -698,7 +700,7 @@
|
|
|
698
700
|
const screenHeight = this.$element.closest('.app-content').height();
|
|
699
701
|
dropdownEl.css({ position: 'relative', top: 0, height: screenHeight + 'px' });
|
|
700
702
|
this.showClosebtn = this.query && this.query !== '';
|
|
701
|
-
if (!lodashEs.isUndefined(this.dataProvider.isLastPage) && !this.dataProvider.isLastPage) {
|
|
703
|
+
if (this.dataProvider && !lodashEs.isUndefined(this.dataProvider.isLastPage) && !this.dataProvider.isLastPage) {
|
|
702
704
|
this.triggerSearch();
|
|
703
705
|
}
|
|
704
706
|
}
|
|
@@ -710,7 +712,7 @@
|
|
|
710
712
|
}
|
|
711
713
|
const index = matches.indexOf(this.typeaheadContainer.active);
|
|
712
714
|
// on keydown, if scroll is at the bottom and next page records are available, fetch next page items.
|
|
713
|
-
if (!this._loadingItems && !this.dataProvider.isLastPage && index + 1 > matches.length - 1) {
|
|
715
|
+
if (!this._loadingItems && this.dataProvider && !this.dataProvider.isLastPage && index + 1 > matches.length - 1) {
|
|
714
716
|
// index is saved in order to select the lastSelected item in the dropdown after fetching next page items.
|
|
715
717
|
this.lastSelectedIndex = index;
|
|
716
718
|
this.loadMoreData(true);
|
|
@@ -724,7 +726,7 @@
|
|
|
724
726
|
}
|
|
725
727
|
}
|
|
726
728
|
triggerSearch() {
|
|
727
|
-
if (this.dataProvider.isLastPage || !this.$element.hasClass('full-screen')) {
|
|
729
|
+
if (!this.dataProvider || this.dataProvider.isLastPage || !this.$element.hasClass('full-screen')) {
|
|
728
730
|
return;
|
|
729
731
|
}
|
|
730
732
|
const typeAheadDropDown = this.dropdownEl;
|
|
@@ -864,10 +866,10 @@
|
|
|
864
866
|
// response from dataProvider returns always data object.
|
|
865
867
|
response = response.data || response;
|
|
866
868
|
// for service variable, updating the dataset only if it is not defined or empty
|
|
867
|
-
if ((!i1.isDefined(this.dataset) || !this.dataset.length) && this.dataProvider.updateDataset) {
|
|
869
|
+
if (this.dataProvider && (!i1.isDefined(this.dataset) || !this.dataset.length) && this.dataProvider.updateDataset) {
|
|
868
870
|
this.dataset = response;
|
|
869
871
|
}
|
|
870
|
-
if (this.dataProvider.hasMoreData) {
|
|
872
|
+
if (this.dataProvider && this.dataProvider.hasMoreData) {
|
|
871
873
|
this.formattedDataset = this.formattedDataset.concat(response);
|
|
872
874
|
}
|
|
873
875
|
else {
|
|
@@ -878,7 +880,7 @@
|
|
|
878
880
|
this.typeahead.typeaheadOptionsLimit = this.formattedDataset.length;
|
|
879
881
|
}
|
|
880
882
|
// In mobile, trigger the search by default until the results have height upto page height. Other results can be fetched by scrolling
|
|
881
|
-
if (this._isOpen && this.isMobileAutoComplete() && !lodashEs.isUndefined(this.dataProvider.isLastPage) && !this.dataProvider.isLastPage) {
|
|
883
|
+
if (this.dataProvider && this._isOpen && this.isMobileAutoComplete() && !lodashEs.isUndefined(this.dataProvider.isLastPage) && !this.dataProvider.isLastPage) {
|
|
882
884
|
this.triggerSearch();
|
|
883
885
|
}
|
|
884
886
|
const transformedData = this.getTransformedData(this.formattedDataset, nextItemIndex);
|
|
@@ -934,7 +936,7 @@
|
|
|
934
936
|
onScroll($scrollEl, evt) {
|
|
935
937
|
const totalHeight = $scrollEl.scrollHeight, clientHeight = $scrollEl.clientHeight;
|
|
936
938
|
// If scroll is at the bottom and no request is in progress and next page records are available, fetch next page items.
|
|
937
|
-
if (!this._loadingItems && !this.dataProvider.isLastPage && ($scrollEl.scrollTop + clientHeight >= totalHeight)) {
|
|
939
|
+
if (!this._loadingItems && this.dataProvider && !this.dataProvider.isLastPage && ($scrollEl.scrollTop + clientHeight >= totalHeight)) {
|
|
938
940
|
this.loadMoreData(true);
|
|
939
941
|
}
|
|
940
942
|
}
|
|
@@ -1052,7 +1054,7 @@
|
|
|
1052
1054
|
base.provideAs(SearchComponent, i3.NG_VALUE_ACCESSOR, true),
|
|
1053
1055
|
base.provideAs(SearchComponent, i3.NG_VALIDATORS, true),
|
|
1054
1056
|
base.provideAsWidgetRef(SearchComponent)
|
|
1055
|
-
], viewQueries: [{ propertyName: "typeahead", first: true, predicate: i4.TypeaheadDirective, descendants: true }, { propertyName: "ulElement", first: true, predicate: ["ulElement"], descendants: true }, { propertyName: "liElements", predicate: ["liElements"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #customItemTemplate let-model=\"item\" let-index=\"index\" let-query=\"query\" let-match=\"match\">\n <!-- Default item template -->\n @if (!content) {\n <a>\n @if (model.imgSrc) {\n <img [src]=\"model.imgSrc\" alt=\"Search\" [style.width]=\"imagewidth\">\n }\n <span [title]=\"model.label\" [innerHtml]=\"highlight(match, query) || model.label\"></span>\n </a>\n }\n <!-- Custom partial template -->\n @if (content) {\n <a [ngClass]=\"{customTemplate: content}\" partialContainer [wmItemTemplate]=\"content\" [userComponentParams]=\"match.item\">\n <div partial-container-target></div>\n </a>\n }\n</ng-template>\n\n<ng-template #customListTemplate let-matches=\"matches\" let-itemTemplate=\"itemTemplate\" let-query=\"query\">\n <ul #ulElement class=\"app-search dropdown-menu\" scrollableHandler>\n @for (match of matches; track match; let i = $index) {\n <li #liElements [ngClass]=\"{active: typeaheadContainer && typeaheadContainer.isActive(match), 'list-group-header': match && match.isHeader()}\"\n (mouseenter)=\"typeaheadContainer.selectActive(match);\"\n (click)=\"match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();\">\n <!-- itemTemplate comes from the <input> -->\n @if (match.isHeader()) {\n <h4 class=\"group-title\">{{match.value}}</h4>\n }\n @if (!match.isHeader()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{item: match.item, index: i, match: match, query: query}\">\n </ng-container>\n }\n </li>\n }\n <div class=\"status\" [hidden]=\"_loadingItems || !(datacompletemsg && dataProvider
|
|
1057
|
+
], viewQueries: [{ propertyName: "typeahead", first: true, predicate: i4.TypeaheadDirective, descendants: true }, { propertyName: "ulElement", first: true, predicate: ["ulElement"], descendants: true }, { propertyName: "liElements", predicate: ["liElements"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #customItemTemplate let-model=\"item\" let-index=\"index\" let-query=\"query\" let-match=\"match\">\n <!-- Default item template -->\n @if (!content) {\n <a>\n @if (model.imgSrc) {\n <img [src]=\"model.imgSrc\" alt=\"Search\" [style.width]=\"imagewidth\">\n }\n <span [title]=\"model.label\" [innerHtml]=\"highlight(match, query) || model.label\"></span>\n </a>\n }\n <!-- Custom partial template -->\n @if (content) {\n <a [ngClass]=\"{customTemplate: content}\" partialContainer [wmItemTemplate]=\"content\" [userComponentParams]=\"match.item\">\n <div partial-container-target></div>\n </a>\n }\n</ng-template>\n\n<ng-template #customListTemplate let-matches=\"matches\" let-itemTemplate=\"itemTemplate\" let-query=\"query\">\n <ul #ulElement class=\"app-search dropdown-menu\" scrollableHandler>\n @for (match of matches; track match; let i = $index) {\n <li #liElements [ngClass]=\"{active: typeaheadContainer && typeaheadContainer.isActive(match), 'list-group-header': match && match.isHeader()}\"\n (mouseenter)=\"typeaheadContainer.selectActive(match);\"\n (click)=\"match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();\">\n <!-- itemTemplate comes from the <input> -->\n @if (match.isHeader()) {\n <h4 class=\"group-title\">{{match.value}}</h4>\n }\n @if (!match.isHeader()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{item: match.item, index: i, match: match, query: query}\">\n </ng-container>\n }\n </li>\n }\n <div class=\"status\" [hidden]=\"_loadingItems || !(datacompletemsg && dataProvider?.isLastPage)\">\n <span [textContent]=\"datacompletemsg\"></span>\n </div>\n <div class=\"status\" [hidden]=\"!_loadingItems\">\n <i class=\"fa fa-circle-o-notch fa-spin\"></i>\n <span [textContent]=\"loadingdatamsg\"></span>\n </div>\n </ul>\n</ng-template>\n\n<!--This template is for search inside mobile navbar.-->\n@if (navsearchbar) {\n <input [title]=\"query || ''\" type=\"text\" class=\"app-textbox form-control list-of-objs app-search-input\" [placeholder]=\"placeholder || ''\"\n focus-target\n container=\"body\"\n [disabled]=\"disabled\"\n [attr.accesskey]=\"shortcutkey\"\n autocomplete=\"off\"\n [(ngModel)]=\"query\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [typeahead]=\"typeaheadDataSource\"\n [typeaheadWaitMs]=\"debouncetime\"\n [typeaheadItemTemplate]=\"customItemTemplate\"\n [optionsListTemplate]=\"customListTemplate\"\n (input)=\"onInputChange($event)\"\n (keydown)=\"listenQuery = true\"\n (keydown.enter)=\"$typeaheadEvent = $event;handleEnterEvent($event)\"\n (keydown.arrowdown)=\"selectNext($event)\"\n (blur)=\"invokeOnTouched($event)\"\n (click)=\"handleFocus($event);\"\n (focus)=\"_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event);\"\n (focusout)=\"onFocusOut()\"\n [typeaheadMinLength]=\"minchars\"\n [typeaheadOptionsLimit]=\"limit\"\n (typeaheadLoading)=\"_loadingItems\"\n (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n typeaheadOptionField=\"label\"\n [typeaheadGroupField]=\"groupby ? 'groupby' : null\"\n [typeaheadAsync]=\"true\"\n [typeaheadScrollable]=\"true\"\n [adaptivePosition]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionslimitinscrollableview\"\n [dropup]=\"dropup\"\n [tabindex]=\"tabindex\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel || 'Search field'\"/>\n <i class=\"btn-close wi wi-cancel\" [hidden]=\"!showClosebtn\" (click)=\"clearSearch($event);\"></i>\n} @else {\n <button type=\"button\" class=\"btn btn-icon form-control-feedback back-btn\" aria-hidden=\"true\" (click)=\"closeSearch()\"><i class=\"app-icon {{backsearchiconclass}}\"></i></button>\n <span class=\"sr-only\">Back button</span>\n <input [title]=\"query || ''\" type=\"text\" class=\"app-textbox form-control list-of-objs app-search-input\" [placeholder]=\"placeholder || ''\"\n focus-target\n [container]=\"containerTarget || '.wm-app'\"\n [disabled]=\"disabled\"\n [attr.accesskey]=\"shortcutkey\"\n autocomplete=\"off\"\n [(ngModel)]=\"query\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [typeahead]=\"typeaheadDataSource\"\n [typeaheadWaitMs]=\"debouncetime\"\n [typeaheadItemTemplate]=\"customItemTemplate\"\n [optionsListTemplate]=\"customListTemplate\"\n (input)=\"onInputChange($event)\"\n (keydown)=\"listenQuery = true\"\n (keydown.enter)=\"$typeaheadEvent = $event;handleEnterEvent($event)\"\n (keydown.arrowdown)=\"selectNext($event)\"\n (blur)=\"invokeOnTouched($event); onFocusOut()\"\n (click)=\"handleFocus($event);\"\n (focus)=\"_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event)\"\n [typeaheadMinLength]=\"minchars\"\n [typeaheadOptionsLimit]=\"limit\"\n (typeaheadLoading)=\"_loadingItems\"\n (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n typeaheadOptionField=\"label\"\n [typeaheadGroupField]=\"groupby ? 'groupby' : null\"\n [typeaheadAsync]=\"true\"\n [typeaheadScrollable]=\"true\"\n [adaptivePosition]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionslimitinscrollableview\"\n [tabindex]=\"tabindex\"\n [dropup]=\"dropup\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel || 'Search field'\">\n <input class=\"model-holder\" ng-model=\"proxyModel\" ng-required=\"required\" tabindex=\"-1\" aria-hidden=\"true\">\n @if (_loadingItems) {\n <span aria-hidden=\"true\" class=\"fa fa-circle-o-notch fa-spin form-control-feedback\"></span>\n }\n <button type=\"button\" class=\"btn btn-icon form-control-feedback clear-btn\" [ngClass]=\"{'show-btn': isQueryEntered()}\" (click)=\"clearSearch($event, true)\"><i class=\"app-icon {{clearsearchiconclass}}\"></i></button>\n <span class=\"sr-only\">Clear button</span>\n @if (showsearchicon) {\n <span [ngClass]=\"{'disabled': disabled}\" class=\"input-group-addon\">\n <form>\n <button title=\"Search\" [disabled]=\"disabled\" class=\"app-search-button btn btn-icon\" type=\"submit\"\n (click)=\"onSearchSelect($event)\">\n <i class=\"app-icon {{searchiconclass}}\"></i></button>\n </form>\n </span>\n }\n }\n <!--This template is for both web and fullscreen mode in mobile.-->\n", dependencies: [{ kind: "ngmodule", type: i2.CommonModule }, { kind: "directive", type: i2__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: i3.FormsModule }, { kind: "directive", type: i3__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ScrollableDirective, selector: "[scrollableHandler]" }, { kind: "ngmodule", type: i4.TypeaheadModule }, { kind: "directive", type: i4__namespace.TypeaheadDirective, selector: "[typeahead]", inputs: ["typeahead", "typeaheadMinLength", "adaptivePosition", "isAnimated", "typeaheadWaitMs", "typeaheadOptionsLimit", "typeaheadOptionField", "typeaheadGroupField", "typeaheadOrderBy", "typeaheadAsync", "typeaheadLatinize", "typeaheadSingleWords", "typeaheadWordDelimiters", "typeaheadMultipleSearch", "typeaheadMultipleSearchDelimiters", "typeaheadPhraseDelimiters", "typeaheadItemTemplate", "optionsListTemplate", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadHideResultsOnBlur", "typeaheadSelectFirstItem", "typeaheadIsFirstItemActive", "container", "dropup"], outputs: ["typeaheadLoading", "typeaheadNoResults", "typeaheadOnSelect", "typeaheadOnPreview", "typeaheadOnBlur"], exportAs: ["bs-typeahead"] }, { kind: "directive", type: base.TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "directive", type: base.ItemTemplateDirective, selector: "[wmItemTemplate]", inputs: ["userComponentParams", "wmItemTemplate"], exportAs: ["itemTemplateRef"] }, { kind: "directive", type: base.PartialParamHandlerDirective, selector: "[partialContainer]" }, { kind: "directive", type: base.PartialContainerDirective, selector: "[partialContainer]" }] }); }
|
|
1056
1058
|
}
|
|
1057
1059
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0__namespace, type: SearchComponent, decorators: [{
|
|
1058
1060
|
type: i0.Component,
|
|
@@ -1060,7 +1062,7 @@
|
|
|
1060
1062
|
base.provideAs(SearchComponent, i3.NG_VALUE_ACCESSOR, true),
|
|
1061
1063
|
base.provideAs(SearchComponent, i3.NG_VALIDATORS, true),
|
|
1062
1064
|
base.provideAsWidgetRef(SearchComponent)
|
|
1063
|
-
], template: "<ng-template #customItemTemplate let-model=\"item\" let-index=\"index\" let-query=\"query\" let-match=\"match\">\n <!-- Default item template -->\n @if (!content) {\n <a>\n @if (model.imgSrc) {\n <img [src]=\"model.imgSrc\" alt=\"Search\" [style.width]=\"imagewidth\">\n }\n <span [title]=\"model.label\" [innerHtml]=\"highlight(match, query) || model.label\"></span>\n </a>\n }\n <!-- Custom partial template -->\n @if (content) {\n <a [ngClass]=\"{customTemplate: content}\" partialContainer [wmItemTemplate]=\"content\" [userComponentParams]=\"match.item\">\n <div partial-container-target></div>\n </a>\n }\n</ng-template>\n\n<ng-template #customListTemplate let-matches=\"matches\" let-itemTemplate=\"itemTemplate\" let-query=\"query\">\n <ul #ulElement class=\"app-search dropdown-menu\" scrollableHandler>\n @for (match of matches; track match; let i = $index) {\n <li #liElements [ngClass]=\"{active: typeaheadContainer && typeaheadContainer.isActive(match), 'list-group-header': match && match.isHeader()}\"\n (mouseenter)=\"typeaheadContainer.selectActive(match);\"\n (click)=\"match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();\">\n <!-- itemTemplate comes from the <input> -->\n @if (match.isHeader()) {\n <h4 class=\"group-title\">{{match.value}}</h4>\n }\n @if (!match.isHeader()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{item: match.item, index: i, match: match, query: query}\">\n </ng-container>\n }\n </li>\n }\n <div class=\"status\" [hidden]=\"_loadingItems || !(datacompletemsg && dataProvider
|
|
1065
|
+
], template: "<ng-template #customItemTemplate let-model=\"item\" let-index=\"index\" let-query=\"query\" let-match=\"match\">\n <!-- Default item template -->\n @if (!content) {\n <a>\n @if (model.imgSrc) {\n <img [src]=\"model.imgSrc\" alt=\"Search\" [style.width]=\"imagewidth\">\n }\n <span [title]=\"model.label\" [innerHtml]=\"highlight(match, query) || model.label\"></span>\n </a>\n }\n <!-- Custom partial template -->\n @if (content) {\n <a [ngClass]=\"{customTemplate: content}\" partialContainer [wmItemTemplate]=\"content\" [userComponentParams]=\"match.item\">\n <div partial-container-target></div>\n </a>\n }\n</ng-template>\n\n<ng-template #customListTemplate let-matches=\"matches\" let-itemTemplate=\"itemTemplate\" let-query=\"query\">\n <ul #ulElement class=\"app-search dropdown-menu\" scrollableHandler>\n @for (match of matches; track match; let i = $index) {\n <li #liElements [ngClass]=\"{active: typeaheadContainer && typeaheadContainer.isActive(match), 'list-group-header': match && match.isHeader()}\"\n (mouseenter)=\"typeaheadContainer.selectActive(match);\"\n (click)=\"match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();\">\n <!-- itemTemplate comes from the <input> -->\n @if (match.isHeader()) {\n <h4 class=\"group-title\">{{match.value}}</h4>\n }\n @if (!match.isHeader()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{item: match.item, index: i, match: match, query: query}\">\n </ng-container>\n }\n </li>\n }\n <div class=\"status\" [hidden]=\"_loadingItems || !(datacompletemsg && dataProvider?.isLastPage)\">\n <span [textContent]=\"datacompletemsg\"></span>\n </div>\n <div class=\"status\" [hidden]=\"!_loadingItems\">\n <i class=\"fa fa-circle-o-notch fa-spin\"></i>\n <span [textContent]=\"loadingdatamsg\"></span>\n </div>\n </ul>\n</ng-template>\n\n<!--This template is for search inside mobile navbar.-->\n@if (navsearchbar) {\n <input [title]=\"query || ''\" type=\"text\" class=\"app-textbox form-control list-of-objs app-search-input\" [placeholder]=\"placeholder || ''\"\n focus-target\n container=\"body\"\n [disabled]=\"disabled\"\n [attr.accesskey]=\"shortcutkey\"\n autocomplete=\"off\"\n [(ngModel)]=\"query\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [typeahead]=\"typeaheadDataSource\"\n [typeaheadWaitMs]=\"debouncetime\"\n [typeaheadItemTemplate]=\"customItemTemplate\"\n [optionsListTemplate]=\"customListTemplate\"\n (input)=\"onInputChange($event)\"\n (keydown)=\"listenQuery = true\"\n (keydown.enter)=\"$typeaheadEvent = $event;handleEnterEvent($event)\"\n (keydown.arrowdown)=\"selectNext($event)\"\n (blur)=\"invokeOnTouched($event)\"\n (click)=\"handleFocus($event);\"\n (focus)=\"_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event);\"\n (focusout)=\"onFocusOut()\"\n [typeaheadMinLength]=\"minchars\"\n [typeaheadOptionsLimit]=\"limit\"\n (typeaheadLoading)=\"_loadingItems\"\n (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n typeaheadOptionField=\"label\"\n [typeaheadGroupField]=\"groupby ? 'groupby' : null\"\n [typeaheadAsync]=\"true\"\n [typeaheadScrollable]=\"true\"\n [adaptivePosition]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionslimitinscrollableview\"\n [dropup]=\"dropup\"\n [tabindex]=\"tabindex\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel || 'Search field'\"/>\n <i class=\"btn-close wi wi-cancel\" [hidden]=\"!showClosebtn\" (click)=\"clearSearch($event);\"></i>\n} @else {\n <button type=\"button\" class=\"btn btn-icon form-control-feedback back-btn\" aria-hidden=\"true\" (click)=\"closeSearch()\"><i class=\"app-icon {{backsearchiconclass}}\"></i></button>\n <span class=\"sr-only\">Back button</span>\n <input [title]=\"query || ''\" type=\"text\" class=\"app-textbox form-control list-of-objs app-search-input\" [placeholder]=\"placeholder || ''\"\n focus-target\n [container]=\"containerTarget || '.wm-app'\"\n [disabled]=\"disabled\"\n [attr.accesskey]=\"shortcutkey\"\n autocomplete=\"off\"\n [(ngModel)]=\"query\"\n [ngModelOptions]=\"{standalone: true}\"\n [readonly]=\"readonly\"\n [typeahead]=\"typeaheadDataSource\"\n [typeaheadWaitMs]=\"debouncetime\"\n [typeaheadItemTemplate]=\"customItemTemplate\"\n [optionsListTemplate]=\"customListTemplate\"\n (input)=\"onInputChange($event)\"\n (keydown)=\"listenQuery = true\"\n (keydown.enter)=\"$typeaheadEvent = $event;handleEnterEvent($event)\"\n (keydown.arrowdown)=\"selectNext($event)\"\n (blur)=\"invokeOnTouched($event); onFocusOut()\"\n (click)=\"handleFocus($event);\"\n (focus)=\"_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event)\"\n [typeaheadMinLength]=\"minchars\"\n [typeaheadOptionsLimit]=\"limit\"\n (typeaheadLoading)=\"_loadingItems\"\n (typeaheadOnSelect)=\"typeaheadOnSelect($event)\"\n typeaheadOptionField=\"label\"\n [typeaheadGroupField]=\"groupby ? 'groupby' : null\"\n [typeaheadAsync]=\"true\"\n [typeaheadScrollable]=\"true\"\n [adaptivePosition]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionslimitinscrollableview\"\n [tabindex]=\"tabindex\"\n [dropup]=\"dropup\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel || 'Search field'\">\n <input class=\"model-holder\" ng-model=\"proxyModel\" ng-required=\"required\" tabindex=\"-1\" aria-hidden=\"true\">\n @if (_loadingItems) {\n <span aria-hidden=\"true\" class=\"fa fa-circle-o-notch fa-spin form-control-feedback\"></span>\n }\n <button type=\"button\" class=\"btn btn-icon form-control-feedback clear-btn\" [ngClass]=\"{'show-btn': isQueryEntered()}\" (click)=\"clearSearch($event, true)\"><i class=\"app-icon {{clearsearchiconclass}}\"></i></button>\n <span class=\"sr-only\">Clear button</span>\n @if (showsearchicon) {\n <span [ngClass]=\"{'disabled': disabled}\" class=\"input-group-addon\">\n <form>\n <button title=\"Search\" [disabled]=\"disabled\" class=\"app-search-button btn btn-icon\" type=\"submit\"\n (click)=\"onSearchSelect($event)\">\n <i class=\"app-icon {{searchiconclass}}\"></i></button>\n </form>\n </span>\n }\n }\n <!--This template is for both web and fullscreen mode in mobile.-->\n" }]
|
|
1064
1066
|
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i1__namespace.App }, { type: undefined, decorators: [{
|
|
1065
1067
|
type: i0.Attribute,
|
|
1066
1068
|
args: ['datavalue.bind']
|