@wavemaker-ai/app-ng-runtime 1.0.0-rc.314 → 1.0.0-rc.319
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 +16 -7
- package/build-task/fesm2022/index.mjs +16 -7
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/components/base/bundles/index.umd.js +301 -4
- package/components/base/fesm2022/index.mjs +300 -4
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/index.d.ts +106 -2
- package/components/basic/anchor/bundles/index.umd.js +4 -5
- package/components/basic/anchor/fesm2022/index.mjs +4 -5
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/index.d.ts +1 -0
- package/components/basic/icon/bundles/index.umd.js +3 -3
- package/components/basic/icon/fesm2022/index.mjs +4 -4
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/index.d.ts +1 -0
- package/components/basic/search/bundles/index.umd.js +6 -3
- package/components/basic/search/fesm2022/index.mjs +7 -4
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/index.d.ts +3 -0
- package/components/basic/spinner/bundles/index.umd.js +5 -3
- package/components/basic/spinner/fesm2022/index.mjs +6 -4
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/index.d.ts +1 -0
- package/components/chart/bundles/index.umd.js +4 -3
- package/components/chart/fesm2022/index.mjs +5 -4
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/index.d.ts +1 -0
- package/components/containers/accordion/bundles/index.umd.js +4 -3
- package/components/containers/accordion/fesm2022/index.mjs +5 -4
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/index.d.ts +1 -0
- package/components/containers/panel/bundles/index.umd.js +3 -3
- package/components/containers/panel/fesm2022/index.mjs +4 -4
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/index.d.ts +3 -0
- package/components/containers/tabs/bundles/index.umd.js +5 -4
- package/components/containers/tabs/fesm2022/index.mjs +6 -5
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/bundles/index.umd.js +8 -6
- package/components/containers/wizard/fesm2022/index.mjs +9 -7
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/index.d.ts +2 -0
- package/components/data/card/bundles/index.umd.js +3 -3
- package/components/data/card/fesm2022/index.mjs +4 -4
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/form/bundles/index.umd.js +6 -3
- package/components/data/form/fesm2022/index.mjs +7 -4
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/index.d.ts +2 -0
- package/components/data/list/bundles/index.umd.js +5 -3
- package/components/data/list/fesm2022/index.mjs +6 -4
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/index.d.ts +2 -0
- package/components/data/table/bundles/index.umd.js +4 -3
- package/components/data/table/fesm2022/index.mjs +5 -4
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/index.d.ts +1 -0
- package/components/dialogs/default/bundles/index.umd.js +2 -2
- package/components/dialogs/default/fesm2022/index.mjs +3 -3
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/input/button/bundles/index.umd.js +4 -5
- package/components/input/button/fesm2022/index.mjs +4 -5
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button/index.d.ts +3 -0
- package/components/input/checkbox/bundles/index.umd.js +6 -4
- package/components/input/checkbox/fesm2022/index.mjs +7 -5
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/index.d.ts +2 -0
- package/components/input/file-upload/bundles/index.umd.js +5 -3
- package/components/input/file-upload/fesm2022/index.mjs +6 -4
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/index.d.ts +3 -0
- package/components/input/rating/bundles/index.umd.js +9 -3
- package/components/input/rating/fesm2022/index.mjs +10 -4
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/index.d.ts +6 -0
- package/components/input/slider/bundles/index.umd.js +5 -3
- package/components/input/slider/fesm2022/index.mjs +6 -4
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/index.d.ts +2 -0
- package/components/input/switch/bundles/index.umd.js +6 -3
- package/components/input/switch/fesm2022/index.mjs +7 -4
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/index.d.ts +2 -0
- package/components/input/text/bundles/index.umd.js +7 -5
- package/components/input/text/fesm2022/index.mjs +8 -6
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/index.d.ts +2 -0
- package/components/navigation/menu/bundles/index.umd.js +4 -3
- package/components/navigation/menu/fesm2022/index.mjs +5 -4
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/index.d.ts +1 -0
- package/components/navigation/navbar/bundles/index.umd.js +5 -5
- package/components/navigation/navbar/fesm2022/index.mjs +5 -5
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/index.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +23 -1
- package/runtime/base/fesm2022/index.mjs +23 -1
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/index.d.ts +5 -0
- package/transpiler/bundles/index.umd.js +2 -0
- package/transpiler/fesm2022/index.mjs +2 -0
- package/transpiler/fesm2022/index.mjs.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { PipeTransform, InjectionToken, OnDestroy, OnInit, AfterViewInit, AfterContentInit, Injector, ViewContainerRef, ElementRef, EnvironmentInjector, SecurityContext, TemplateRef } from '@angular/core';
|
|
2
|
+
import { PipeTransform, InjectionToken, OnDestroy, OnInit, AfterViewInit, AfterContentInit, Injector, ViewContainerRef, ElementRef, EnvironmentInjector, SecurityContext, TemplateRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
3
|
import { DecimalPipe, DatePipe } from '@angular/common';
|
|
4
4
|
import { CustomPipeManager, App, AbstractI18nService, PartialRefProvider, CustomWidgetRefProvider, Viewport, IDGenerator } from '@wm/core';
|
|
5
5
|
import * as _wavemaker_focus_trap from '@wavemaker/focus-trap';
|
|
@@ -1425,6 +1425,110 @@ declare class ShowInDeviceDirective implements OnDestroy {
|
|
|
1425
1425
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ShowInDeviceDirective, "[wmShowInDevice]", never, { "wmShowInDevice": { "alias": "wmShowInDevice"; "required": false; }; }, {}, never, never, true, never>;
|
|
1426
1426
|
}
|
|
1427
1427
|
|
|
1428
|
+
declare function isSvgIconUrl(url: string | null | undefined): boolean;
|
|
1429
|
+
/**
|
|
1430
|
+
* Renders the SVG fetched from `iconUrl` inline on the host element so the
|
|
1431
|
+
* markup behaves like a font icon - it can be sized via `font-size`, supports
|
|
1432
|
+
* `:hover` / transitions on the host, and (for SVGs authored with
|
|
1433
|
+
* `currentColor`) inherits `color` from CSS.
|
|
1434
|
+
*
|
|
1435
|
+
* Usage:
|
|
1436
|
+
* <i class="wm-icon" [iconUrl]="url"></i>
|
|
1437
|
+
*
|
|
1438
|
+
* The incoming URL is first run through `ImagePipe` (so relative project
|
|
1439
|
+
* paths, CDN rewrites, etc. work the same way as `<img [src]>`), then fetched
|
|
1440
|
+
* as text via `HttpClient`. The fetched markup is normalized so the root
|
|
1441
|
+
* `<svg>` gets `width="1em"` / `height="1em"` if not already specified (so
|
|
1442
|
+
* the icon scales with the host's `font-size`) and a root `fill="currentColor"`
|
|
1443
|
+
* fallback when no `fill` attribute is declared.
|
|
1444
|
+
*
|
|
1445
|
+
* Original `fill` / `stroke` values inside the SVG are preserved verbatim so
|
|
1446
|
+
* a multi-color SVG renders with its source colors. To make an SVG themeable
|
|
1447
|
+
* via the host's CSS `color`, author the source with `fill="currentColor"`
|
|
1448
|
+
* (the convention used by Material Icons, Heroicons, Font Awesome, etc.).
|
|
1449
|
+
*/
|
|
1450
|
+
declare class SvgIconDirective implements OnChanges, OnDestroy {
|
|
1451
|
+
iconUrl: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Bound to the host's `innerHTML`. Set to a `SafeHtml` value produced by
|
|
1454
|
+
* `DomSanitizer.bypassSecurityTrustHtml` so Angular's renderer skips
|
|
1455
|
+
* re-sanitization and inlines the SVG as-is.
|
|
1456
|
+
*/
|
|
1457
|
+
hostInnerHtml: SafeHtml | null;
|
|
1458
|
+
private readonly http;
|
|
1459
|
+
private readonly sanitizer;
|
|
1460
|
+
private readonly imagePipe;
|
|
1461
|
+
private sub?;
|
|
1462
|
+
private lastResolvedUrl;
|
|
1463
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1464
|
+
ngOnDestroy(): void;
|
|
1465
|
+
private loadSvg;
|
|
1466
|
+
private applySvg;
|
|
1467
|
+
private cancelInflight;
|
|
1468
|
+
/**
|
|
1469
|
+
* Make the fetched SVG behave like a font icon:
|
|
1470
|
+
* - replace any non-"none" fill/stroke attributes (single- or
|
|
1471
|
+
* double-quoted) with currentColor so CSS `color` controls the icon
|
|
1472
|
+
* - replace any non-"none" inline `fill:` / `stroke:` style values with
|
|
1473
|
+
* currentColor
|
|
1474
|
+
* - on the root <svg> tag, add `width="1em"`, `height="1em"`, and a
|
|
1475
|
+
* default `fill="currentColor"` if missing so the icon scales with
|
|
1476
|
+
* the host element's `font-size`
|
|
1477
|
+
*/
|
|
1478
|
+
private normalizeSvg;
|
|
1479
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SvgIconDirective, never>;
|
|
1480
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SvgIconDirective, "[iconUrl]", ["svgIcon"], { "iconUrl": { "alias": "iconUrl"; "required": false; }; }, {}, never, never, true, never>;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Single, reusable renderer for the SVG / image / font 3-way icon branch
|
|
1485
|
+
* that used to be duplicated across every widget that accepts an
|
|
1486
|
+
* `iconclass` + `iconurl` pair (anchor, button, panel header, card,
|
|
1487
|
+
* dialog-header, form, list, table, chart, accordion, file-upload,
|
|
1488
|
+
* rating, switch, menu, navbar, search, tabs, ...).
|
|
1489
|
+
*
|
|
1490
|
+
* Decision order:
|
|
1491
|
+
* 1. `iconurl` ending in `.svg` -> inline SVG via `[iconUrl]` directive
|
|
1492
|
+
* 2. `iconurl` (anything else) -> `<img [src]="url | image">`
|
|
1493
|
+
* 3. `iconclass` -> `<i class="app-icon {{iconclass}}">`
|
|
1494
|
+
* 4. `defaultIconClass` (if set) -> same as #3 with the fallback class
|
|
1495
|
+
* 5. otherwise -> nothing
|
|
1496
|
+
*
|
|
1497
|
+
* Notes:
|
|
1498
|
+
* - `iconurl` wins over `iconclass` when both are set: a widget owner that
|
|
1499
|
+
* bothered to configure a URL almost certainly wants it visible. Where the
|
|
1500
|
+
* old behavior was "render both" (anchor, button), use TWO `<wm-app-icon>`
|
|
1501
|
+
* elements - one with only `iconurl`, one with only `iconclass`.
|
|
1502
|
+
* - The host is `display: contents` so existing CSS selectors targeting
|
|
1503
|
+
* `.app-icon` directly inside the parent (e.g. `.btn .app-icon`) keep
|
|
1504
|
+
* working - the wrapper element is layout-transparent.
|
|
1505
|
+
*/
|
|
1506
|
+
declare class WmAppIconComponent {
|
|
1507
|
+
/** Font-icon CSS class (e.g. `wi wi-user`). Lowest priority. */
|
|
1508
|
+
iconclass: string | null | undefined;
|
|
1509
|
+
/** Icon URL. `.svg` -> inline SVG, anything else -> `<img>`. Wins over `iconclass`. */
|
|
1510
|
+
iconurl: string | null | undefined;
|
|
1511
|
+
/** Fallback font-icon class used when both `iconclass` and `iconurl` are empty. */
|
|
1512
|
+
defaultIconClass: string | null | undefined;
|
|
1513
|
+
/** Extra classes appended to the rendered icon element on every branch (e.g. `'panel-icon'`). */
|
|
1514
|
+
defaultClasses: string | string[] | null | undefined;
|
|
1515
|
+
/** Forwarded to `ngStyle` on the rendered icon element. */
|
|
1516
|
+
iconStyle: {
|
|
1517
|
+
[k: string]: any;
|
|
1518
|
+
} | null | undefined;
|
|
1519
|
+
/** `alt` text for the `<img>` branch. */
|
|
1520
|
+
alt: string | null | undefined;
|
|
1521
|
+
get _isSvg(): boolean;
|
|
1522
|
+
get _isImage(): boolean;
|
|
1523
|
+
get _fontClass(): string;
|
|
1524
|
+
private _extras;
|
|
1525
|
+
get _svgClasses(): string[];
|
|
1526
|
+
get _imageClasses(): string[];
|
|
1527
|
+
get _fontClasses(): string[];
|
|
1528
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WmAppIconComponent, never>;
|
|
1529
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WmAppIconComponent, "wm-app-icon", never, { "iconclass": { "alias": "iconclass"; "required": false; }; "iconurl": { "alias": "iconurl"; "required": false; }; "defaultIconClass": { "alias": "defaultIconClass"; "required": false; }; "defaultClasses": { "alias": "defaultClasses"; "required": false; }; "iconStyle": { "alias": "iconStyle"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; }, {}, never, never, true, never>;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1428
1532
|
declare function AutoLayout(options?: {
|
|
1429
1533
|
targetSelector?: string;
|
|
1430
1534
|
bindParent?: string;
|
|
@@ -1432,5 +1536,5 @@ declare function AutoLayout(options?: {
|
|
|
1432
1536
|
|
|
1433
1537
|
declare const AUTO_LAYOUT_PROPS: Map<string, any>;
|
|
1434
1538
|
|
|
1435
|
-
export { ALLFIELDS, APPLY_STYLES_TYPE, AUTOCLOSE_TYPE, AUTO_LAYOUT_PROPS, AutoLayout, BaseComponent, BaseContainerComponent, BaseFieldValidations, ContainerDirective, Context, CustomPipe, CustomWidgetContainerDirective, DEBOUNCE_TIMES, DISPLAY_TYPE, DataSetItem, DatasetAwareNavComponent, DialogRef, DialogServiceImpl, EDIT_MODE, EVENTS_MAP, FileExtensionFromMimePipe, FileIconClassPipe, FileSizePipe, FilterPipe, INPUTMODE, ImagePipe, ItemTemplateDirective, LIVE_CONSTANTS, LazyLoadDirective, Live_Operations, MessageComponent, NAVIGATION_TYPE, NumberToStringPipe, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, PROP_TYPE, PartialContainerDirective, PartialDirective, PartialParamDirective, PartialParamHandlerDirective, PrefixPipe, PullToRefresh, RedrawableDirective, RepeatTemplateDirective, SanitizePipe, ShowInDeviceDirective, StateClassPipe, StringToNumberPipe, StylableComponent, SuffixPipe, TemplateReplacePipe, TextContentDirective, TimeFromNowPipe, ToCurrencyPipe, ToDatePipe, ToNumberPipe, TrailingZeroDecimalPipe, TrustAsPipe, WidgetConfig, WidgetRef, applyFilterOnField, configureDnD, convertDataToObject, createArrayFrom, extractDataAsArray, extractDataSourceName, fetchDistinctValues, fetchRelatedFieldData, filterDate, getBackGroundImageUrl, getConditionalClasses, getContainerTargetClass, getCurrentWidgets, getDataTableFilterWidget, getDefaultValue, getDefaultViewModeWidget, getDistinctFieldProperties, getDistinctValues, getDistinctValuesForField, getEditModeWidget, getEmptyMatchMode, getEnableEmptyFilter, getEvaluatedData, getFieldLayoutConfig, getFieldTypeWidgetTypesMap, getImageUrl, getKeyboardFocusableElements, getMatchModeMsgs, getMatchModeTypesMap, getObjValueByKey, getOrderByExpr, getOrderedDataset, getRangeFieldValue, getRangeMatchMode, getRowOperationsColumn, getUniqObjsByDataField, getWatchIdentifier, getWidgetPropsByType, groupData, handleHeaderClick, hasLinkToCurrentPage, interpolateBindExpressions, isActiveNavItem, isBooleanAttr, isDataSetWidget, isDimensionProp, isStyle, parseValueByType, performDataOperation, prepareFieldDefs, propNameCSSKeyMap, provideAs, provideAsDialogRef, provideAsWidgetRef, refreshDataSource, register, registerFormWidget, setFocusTrap, setHeaderConfig, setHeaderConfigForTable, setItemByCompare, styler, toggleAllHeaders, transformData, transformDataWithKeys, transformFormData, unsupportedStatePersistenceTypes, updateDeviceView, widgetIdGenerator };
|
|
1539
|
+
export { ALLFIELDS, APPLY_STYLES_TYPE, AUTOCLOSE_TYPE, AUTO_LAYOUT_PROPS, AutoLayout, BaseComponent, BaseContainerComponent, BaseFieldValidations, ContainerDirective, Context, CustomPipe, CustomWidgetContainerDirective, DEBOUNCE_TIMES, DISPLAY_TYPE, DataSetItem, DatasetAwareNavComponent, DialogRef, DialogServiceImpl, EDIT_MODE, EVENTS_MAP, FileExtensionFromMimePipe, FileIconClassPipe, FileSizePipe, FilterPipe, INPUTMODE, ImagePipe, ItemTemplateDirective, LIVE_CONSTANTS, LazyLoadDirective, Live_Operations, MessageComponent, NAVIGATION_TYPE, NumberToStringPipe, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, PROP_TYPE, PartialContainerDirective, PartialDirective, PartialParamDirective, PartialParamHandlerDirective, PrefixPipe, PullToRefresh, RedrawableDirective, RepeatTemplateDirective, SanitizePipe, ShowInDeviceDirective, StateClassPipe, StringToNumberPipe, StylableComponent, SuffixPipe, SvgIconDirective, TemplateReplacePipe, TextContentDirective, TimeFromNowPipe, ToCurrencyPipe, ToDatePipe, ToNumberPipe, TrailingZeroDecimalPipe, TrustAsPipe, WidgetConfig, WidgetRef, WmAppIconComponent, applyFilterOnField, configureDnD, convertDataToObject, createArrayFrom, extractDataAsArray, extractDataSourceName, fetchDistinctValues, fetchRelatedFieldData, filterDate, getBackGroundImageUrl, getConditionalClasses, getContainerTargetClass, getCurrentWidgets, getDataTableFilterWidget, getDefaultValue, getDefaultViewModeWidget, getDistinctFieldProperties, getDistinctValues, getDistinctValuesForField, getEditModeWidget, getEmptyMatchMode, getEnableEmptyFilter, getEvaluatedData, getFieldLayoutConfig, getFieldTypeWidgetTypesMap, getImageUrl, getKeyboardFocusableElements, getMatchModeMsgs, getMatchModeTypesMap, getObjValueByKey, getOrderByExpr, getOrderedDataset, getRangeFieldValue, getRangeMatchMode, getRowOperationsColumn, getUniqObjsByDataField, getWatchIdentifier, getWidgetPropsByType, groupData, handleHeaderClick, hasLinkToCurrentPage, interpolateBindExpressions, isActiveNavItem, isBooleanAttr, isDataSetWidget, isDimensionProp, isStyle, isSvgIconUrl, parseValueByType, performDataOperation, prepareFieldDefs, propNameCSSKeyMap, provideAs, provideAsDialogRef, provideAsWidgetRef, refreshDataSource, register, registerFormWidget, setFocusTrap, setHeaderConfig, setHeaderConfigForTable, setItemByCompare, styler, toggleAllHeaders, transformData, transformDataWithKeys, transformFormData, unsupportedStatePersistenceTypes, updateDeviceView, widgetIdGenerator };
|
|
1436
1540
|
export type { ChangeListener, IDialog, IRedrawableComponent, IWidgetConfig, NavNode };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@wm/core'), require('@wm/components/base')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@angular/core', '@wm/core', '@wm/components/base'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.basic = global.wm.components.basic || {}, global.wm.components.basic.anchor = {}), global.ng.common, global.ng.core, global.wm.core, global.wm.components.base));
|
|
5
|
-
})(this, (function (exports,
|
|
5
|
+
})(this, (function (exports, common, i0, i1, base) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
return Object.freeze(n);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);
|
|
25
24
|
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
26
25
|
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
27
26
|
|
|
@@ -175,13 +174,13 @@
|
|
|
175
174
|
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: AnchorComponent, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.App }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
176
175
|
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AnchorComponent, isStandalone: true, selector: "a[wmAnchor]", host: { properties: { "target": "this.target", "attr.accesskey": "this.shortcutkey", "attr.icon-position": "this.iconposition" } }, providers: [
|
|
177
176
|
base.provideAsWidgetRef(AnchorComponent)
|
|
178
|
-
], exportAs: ["wmAnchor"], usesInheritance: true, ngImport: i0__namespace, template: "
|
|
177
|
+
], exportAs: ["wmAnchor"], usesInheritance: true, ngImport: i0__namespace, template: "\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n", dependencies: [{ kind: "ngmodule", type: common.CommonModule }, { kind: "directive", type: base.TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: base.WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
179
178
|
}
|
|
180
179
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: AnchorComponent, decorators: [{
|
|
181
180
|
type: i0.Component,
|
|
182
|
-
args: [{ standalone: true, imports: [
|
|
181
|
+
args: [{ standalone: true, imports: [common.CommonModule, base.TextContentDirective, base.WmAppIconComponent], selector: 'a[wmAnchor]', providers: [
|
|
183
182
|
base.provideAsWidgetRef(AnchorComponent)
|
|
184
|
-
], exportAs: 'wmAnchor', template: "
|
|
183
|
+
], exportAs: 'wmAnchor', template: "\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n" }]
|
|
185
184
|
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i1__namespace.App }, { type: undefined, decorators: [{
|
|
186
185
|
type: i0.Inject,
|
|
187
186
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { HostBinding, Inject, Optional, Component } from '@angular/core';
|
|
5
4
|
import * as i1 from '@wm/core';
|
|
6
5
|
import { EventNotifier, App, setAttr, encodeUrl, addClass, getRouteNameFromLink, removeClass, removeAttr } from '@wm/core';
|
|
7
|
-
import { register, PROP_STRING, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, DISPLAY_TYPE, StylableComponent, styler, TextContentDirective,
|
|
6
|
+
import { register, PROP_STRING, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, DISPLAY_TYPE, StylableComponent, styler, TextContentDirective, WmAppIconComponent, provideAsWidgetRef } from '@wm/components/base';
|
|
8
7
|
|
|
9
8
|
const registerProps = () => {
|
|
10
9
|
register('wm-anchor', new Map([
|
|
@@ -156,13 +155,13 @@ class AnchorComponent extends StylableComponent {
|
|
|
156
155
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnchorComponent, deps: [{ token: i0.Injector }, { token: i1.App }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
156
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AnchorComponent, isStandalone: true, selector: "a[wmAnchor]", host: { properties: { "target": "this.target", "attr.accesskey": "this.shortcutkey", "attr.icon-position": "this.iconposition" } }, providers: [
|
|
158
157
|
provideAsWidgetRef(AnchorComponent)
|
|
159
|
-
], exportAs: ["wmAnchor"], usesInheritance: true, ngImport: i0, template: "
|
|
158
|
+
], exportAs: ["wmAnchor"], usesInheritance: true, ngImport: i0, template: "\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
160
159
|
}
|
|
161
160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnchorComponent, decorators: [{
|
|
162
161
|
type: Component,
|
|
163
|
-
args: [{ standalone: true, imports: [CommonModule,
|
|
162
|
+
args: [{ standalone: true, imports: [CommonModule, TextContentDirective, WmAppIconComponent], selector: 'a[wmAnchor]', providers: [
|
|
164
163
|
provideAsWidgetRef(AnchorComponent)
|
|
165
|
-
], exportAs: 'wmAnchor', template: "
|
|
164
|
+
], exportAs: 'wmAnchor', template: "\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n}\n" }]
|
|
166
165
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1.App }, { type: undefined, decorators: [{
|
|
167
166
|
type: Inject,
|
|
168
167
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/anchor/src/anchor.props.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.html","../../../../../projects/components/widgets/basic/anchor/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-anchor',\n new Map(\n [\n ['animation', PROP_STRING],\n ['badgevalue', PROP_STRING],\n ['caption', {value: 'Link', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['encodeurl', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['hyperlink', {value: '', ...PROP_STRING}],\n ['iconclass', PROP_STRING],\n ['iconheight', PROP_STRING],\n ['iconmargin', PROP_STRING],\n ['iconposition', PROP_STRING],\n ['iconurl', PROP_STRING],\n ['iconwidth', PROP_STRING],\n ['name', PROP_STRING],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['target', {value: '_self', ...PROP_STRING}]\n ]\n )\n );\n};\n","import { CommonModule } from '@angular/common';\nimport {AfterViewInit, Component, HostBinding, Inject, Injector, OnDestroy, Optional} from '@angular/core';\n\nimport {\n addClass,\n App,\n encodeUrl,\n EventNotifier,\n getRouteNameFromLink,\n removeAttr,\n removeClass,\n setAttr\n} from '@wm/core';\nimport {DISPLAY_TYPE, ImagePipe, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TextContentDirective} from '@wm/components/base';\n\nimport {registerProps} from './anchor.props'; \n\nconst DEFAULT_CLS = 'app-anchor';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-anchor',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\nconst regex = /Actions.goToPage_(\\w+)\\.invoke\\(\\)/g;\nexport const disableContextMenu = ($event: Event) => {\n $event.preventDefault();\n};\n\n@Component({\n standalone: true,\n imports: [CommonModule, ImagePipe, TextContentDirective],\n selector: 'a[wmAnchor]',\n templateUrl: './anchor.component.html',\n providers: [\n provideAsWidgetRef(AnchorComponent)\n ],\n exportAs: 'wmAnchor'\n})\nexport class AnchorComponent extends StylableComponent implements AfterViewInit, OnDestroy {\n static initializeProps = registerProps();\n\n private hasNavigationToCurrentPageExpr: boolean;\n private hasGoToPageExpr: boolean;\n private goToPageName: string;\n private cancelSubscription: any;\n\n public encodeurl;\n public hyperlink;\n public iconheight: string;\n public iconwidth: string;\n public iconurl: string;\n public iconclass: string;\n public caption: any;\n public badgevalue: string;\n public arialabel: string;\n\n @HostBinding('target') target: string;\n @HostBinding('attr.accesskey') shortcutkey: string;\n @HostBinding('attr.icon-position') iconposition: string;\n private _eventNotifier = new EventNotifier();\n\n constructor(\n inj: Injector,\n private app: App,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n\n protected processEventAttr(eventName: string, expr: string, meta?: string) {\n\n super.processEventAttr(eventName, expr, meta);\n\n if (!this.hasNavigationToCurrentPageExpr) {\n const app = this.inj.get(App);\n const fns = expr.split(';').map(Function.prototype.call, String.prototype.trim);\n if (fns.some(fn => {\n regex.lastIndex = 0;\n const matches = regex.exec(fn);\n\n const hasGoToPageExpr = matches && (matches.length > 0);\n if(hasGoToPageExpr && !this.hasGoToPageExpr) {\n this.hasGoToPageExpr = true;\n this.goToPageName = matches[1];\n }\n\n return hasGoToPageExpr && matches[1] === app.activePageName;\n })) {\n this.hasNavigationToCurrentPageExpr = true;\n }\n }\n }\n\n public onActive(callback: (data: any) =>void) {\n this._eventNotifier.subscribe('on-active', callback);\n }\n\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any, meta?: string) {\n super.handleEvent(\n node,\n eventName,\n e => {\n if (this.hasGoToPageExpr && locals.$event) {\n locals.$event.preventDefault();\n }\n eventCallback();\n },\n locals,\n meta\n );\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'hyperlink') {\n if (!nv) {\n setAttr(this.nativeElement, 'href', 'javascript:void(0)');\n this.nativeElement.addEventListener('contextmenu', disableContextMenu);\n return;\n }\n if (this.encodeurl) {\n nv = encodeUrl(nv);\n }\n // if hyperlink starts with 'www.' append '//' in the beginning\n if (nv.startsWith('www.')) {\n nv = `//${nv}`;\n }\n setAttr(this.nativeElement, 'href', nv);\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n init() {\n if (this.hasNavigationToCurrentPageExpr) {\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n if (this.hyperlink && getRouteNameFromLink(this.hyperlink) === `/${this.app.activePageName}`\n || this.hasNavigationToCurrentPageExpr) {\n this._eventNotifier.notify(\"on-active\", {});\n }\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.init();\n if(this.hasGoToPageExpr) {\n // Clean up any existing subscription before creating a new one\n if (this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // In SPA, it highlights active page link when we navigate within the same layout\n this.cancelSubscription = this.app.subscribe(\"highlightActiveLink\", (data) => {\n if(this.hasNavigationToCurrentPageExpr && this.goToPageName !== this.app.activePageName) {\n this.hasNavigationToCurrentPageExpr = false;\n removeClass(this.nativeElement, 'active');\n removeAttr(this.nativeElement, 'aria-current');\n }\n if (this.goToPageName === data.pageName) {\n this.hasNavigationToCurrentPageExpr = true;\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n });\n }\n }\n\n ngOnAttach() {\n this.init();\n super.ngOnAttach();\n }\n\n public ngOnDestroy() {\n // Unsubscribe from app event first to prevent any callbacks during destruction\n if(this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // Destroy local event notifier\n this._eventNotifier.destroy();\n \n // Remove event listener if it exists\n if (this.nativeElement) {\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n }\n super.ngOnDestroy();\n }\n}\n","@if (iconurl) {\n <img data-identifier=\"img\" alt=\"Image\" class=\"anchor-image-icon\" [src]=\"iconurl | image\" [ngStyle]=\"{width:iconwidth, height:iconheight, margin:iconmargin}\"/>\n}\n@if (iconclass) {\n <i class=\"app-icon {{iconclass}}\" aria-hidden=\"true\" [ngStyle]=\"{width:iconwidth, height:iconheight, margin:iconmargin}\"></i>\n}\n@if (iconclass) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\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,WAAW,EACX,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QAC5C,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,WAAW,EAAE,YAAY,CAAC;QAC3B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,EAAE,EAAE,GAAG,WAAW,EAAC,CAAC;QAC1C,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,cAAc,EAAE,WAAW,CAAC;QAC7B,CAAC,SAAS,EAAE,WAAW,CAAC;QACxB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,aAAa,EAAE,WAAW,CAAC;QAC5B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EA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,EACS,UAAU,EAAA,QAAA,EAAA,yoBAAA,EAAA;;0BA4Bf,MAAM;2BAAC,kBAAkB;;0BAAG;;sBARhC,WAAW;uBAAC,QAAQ;;sBACpB,WAAW;uBAAC,gBAAgB;;sBAC5B,WAAW;uBAAC,oBAAoB;;;AE3DrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/anchor/src/anchor.props.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.ts","../../../../../projects/components/widgets/basic/anchor/src/anchor.component.html","../../../../../projects/components/widgets/basic/anchor/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-anchor',\n new Map(\n [\n ['animation', PROP_STRING],\n ['badgevalue', PROP_STRING],\n ['caption', {value: 'Link', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['encodeurl', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['hyperlink', {value: '', ...PROP_STRING}],\n ['iconclass', PROP_STRING],\n ['iconheight', PROP_STRING],\n ['iconmargin', PROP_STRING],\n ['iconposition', PROP_STRING],\n ['iconurl', PROP_STRING],\n ['iconwidth', PROP_STRING],\n ['name', PROP_STRING],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['target', {value: '_self', ...PROP_STRING}]\n ]\n )\n );\n};\n","import { CommonModule } from '@angular/common';\nimport {AfterViewInit, Component, HostBinding, Inject, Injector, OnDestroy, Optional} from '@angular/core';\n\nimport {\n addClass,\n App,\n encodeUrl,\n EventNotifier,\n getRouteNameFromLink,\n removeAttr,\n removeClass,\n setAttr\n} from '@wm/core';\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TextContentDirective, WmAppIconComponent} from '@wm/components/base';\n\nimport {registerProps} from './anchor.props'; \n\nconst DEFAULT_CLS = 'app-anchor';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-anchor',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\nconst regex = /Actions.goToPage_(\\w+)\\.invoke\\(\\)/g;\nexport const disableContextMenu = ($event: Event) => {\n $event.preventDefault();\n};\n\n@Component({\n standalone: true,\n imports: [CommonModule, TextContentDirective, WmAppIconComponent],\n selector: 'a[wmAnchor]',\n templateUrl: './anchor.component.html',\n providers: [\n provideAsWidgetRef(AnchorComponent)\n ],\n exportAs: 'wmAnchor'\n})\nexport class AnchorComponent extends StylableComponent implements AfterViewInit, OnDestroy {\n static initializeProps = registerProps();\n\n private hasNavigationToCurrentPageExpr: boolean;\n private hasGoToPageExpr: boolean;\n private goToPageName: string;\n private cancelSubscription: any;\n\n public encodeurl;\n public hyperlink;\n public iconheight: string;\n public iconwidth: string;\n public iconmargin: string;\n public iconurl: string;\n public iconclass: string;\n public caption: any;\n public badgevalue: string;\n public arialabel: string;\n\n @HostBinding('target') target: string;\n @HostBinding('attr.accesskey') shortcutkey: string;\n @HostBinding('attr.icon-position') iconposition: string;\n private _eventNotifier = new EventNotifier();\n\n constructor(\n inj: Injector,\n private app: App,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n }\n\n protected processEventAttr(eventName: string, expr: string, meta?: string) {\n\n super.processEventAttr(eventName, expr, meta);\n\n if (!this.hasNavigationToCurrentPageExpr) {\n const app = this.inj.get(App);\n const fns = expr.split(';').map(Function.prototype.call, String.prototype.trim);\n if (fns.some(fn => {\n regex.lastIndex = 0;\n const matches = regex.exec(fn);\n\n const hasGoToPageExpr = matches && (matches.length > 0);\n if(hasGoToPageExpr && !this.hasGoToPageExpr) {\n this.hasGoToPageExpr = true;\n this.goToPageName = matches[1];\n }\n\n return hasGoToPageExpr && matches[1] === app.activePageName;\n })) {\n this.hasNavigationToCurrentPageExpr = true;\n }\n }\n }\n\n public onActive(callback: (data: any) =>void) {\n this._eventNotifier.subscribe('on-active', callback);\n }\n\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any, meta?: string) {\n super.handleEvent(\n node,\n eventName,\n e => {\n if (this.hasGoToPageExpr && locals.$event) {\n locals.$event.preventDefault();\n }\n eventCallback();\n },\n locals,\n meta\n );\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'hyperlink') {\n if (!nv) {\n setAttr(this.nativeElement, 'href', 'javascript:void(0)');\n this.nativeElement.addEventListener('contextmenu', disableContextMenu);\n return;\n }\n if (this.encodeurl) {\n nv = encodeUrl(nv);\n }\n // if hyperlink starts with 'www.' append '//' in the beginning\n if (nv.startsWith('www.')) {\n nv = `//${nv}`;\n }\n setAttr(this.nativeElement, 'href', nv);\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n init() {\n if (this.hasNavigationToCurrentPageExpr) {\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n if (this.hyperlink && getRouteNameFromLink(this.hyperlink) === `/${this.app.activePageName}`\n || this.hasNavigationToCurrentPageExpr) {\n this._eventNotifier.notify(\"on-active\", {});\n }\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.init();\n if(this.hasGoToPageExpr) {\n // Clean up any existing subscription before creating a new one\n if (this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // In SPA, it highlights active page link when we navigate within the same layout\n this.cancelSubscription = this.app.subscribe(\"highlightActiveLink\", (data) => {\n if(this.hasNavigationToCurrentPageExpr && this.goToPageName !== this.app.activePageName) {\n this.hasNavigationToCurrentPageExpr = false;\n removeClass(this.nativeElement, 'active');\n removeAttr(this.nativeElement, 'aria-current');\n }\n if (this.goToPageName === data.pageName) {\n this.hasNavigationToCurrentPageExpr = true;\n addClass(this.nativeElement, 'active');\n setAttr(this.nativeElement, 'aria-current', 'page');\n }\n });\n }\n }\n\n ngOnAttach() {\n this.init();\n super.ngOnAttach();\n }\n\n public ngOnDestroy() {\n // Unsubscribe from app event first to prevent any callbacks during destruction\n if(this.cancelSubscription) {\n this.cancelSubscription();\n this.cancelSubscription = null;\n }\n \n // Destroy local event notifier\n this._eventNotifier.destroy();\n \n // Remove event listener if it exists\n if (this.nativeElement) {\n this.nativeElement.removeEventListener('contextmenu', disableContextMenu);\n }\n super.ngOnDestroy();\n }\n}\n","\n<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\" [defaultClasses]=\"iconurl ? 'anchor-image-icon' : ''\" [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\" alt=\"Anchor icon\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n}\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n@if (badgevalue) {\n <span class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\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,WAAW,EACX,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QAC5C,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,W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EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDqBc,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oBAAoB,mFAAE,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,SAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAQvD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;iCACM,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,EAAA,QAAA,EACvD,aAAa,EAAA,SAAA,EAEZ;AACP,wBAAA,kBAAkB,CAAA,eAAA;AACrB,qBAAA,EAAA,QAAA,EACS,UAAU,EAAA,QAAA,EAAA,kjBAAA,EAAA;;0BA6Bf,MAAM;2BAAC,kBAAkB;;0BAAG;;sBARhC,WAAW;uBAAC,QAAQ;;sBACpB,WAAW;uBAAC,gBAAgB;;sBAC5B,WAAW;uBAAC,oBAAoB;;;AE5DrC;;AAEG;;;;"}
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: IconComponent, deps: [{ token: i0__namespace.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
56
56
|
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: IconComponent, isStandalone: true, selector: "[wmIcon]", host: { properties: { "attr.icon-position": "this.iconposition", "style.fontSize": "this.iconsize" } }, providers: [
|
|
57
57
|
base.provideAsWidgetRef(IconComponent)
|
|
58
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<
|
|
58
|
+
], usesInheritance: true, ngImport: i0__namespace, template: "<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]=\"caption\" aria-hidden=\"true\" class=\"app-label\"></label>\n}\n", dependencies: [{ kind: "directive", type: base.TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: base.WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
59
59
|
}
|
|
60
60
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: IconComponent, decorators: [{
|
|
61
61
|
type: i0.Component,
|
|
62
|
-
args: [{ standalone: true, imports: [base.TextContentDirective], selector: '[wmIcon]', providers: [
|
|
62
|
+
args: [{ standalone: true, imports: [base.TextContentDirective, base.WmAppIconComponent], selector: '[wmIcon]', providers: [
|
|
63
63
|
base.provideAsWidgetRef(IconComponent)
|
|
64
|
-
], template: "<
|
|
64
|
+
], template: "<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]=\"caption\" aria-hidden=\"true\" class=\"app-label\"></label>\n}\n" }]
|
|
65
65
|
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
|
|
66
66
|
type: i0.Inject,
|
|
67
67
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { HostBinding, Inject, Optional, Component } from '@angular/core';
|
|
3
|
-
import { register, PROP_STRING, PROP_ANY, PROP_BOOLEAN, StylableComponent, styler, TextContentDirective, provideAsWidgetRef } from '@wm/components/base';
|
|
3
|
+
import { register, PROP_STRING, PROP_ANY, PROP_BOOLEAN, StylableComponent, styler, TextContentDirective, WmAppIconComponent, provideAsWidgetRef } from '@wm/components/base';
|
|
4
4
|
|
|
5
5
|
const registerProps = () => {
|
|
6
6
|
register('wm-icon', new Map([
|
|
@@ -34,13 +34,13 @@ class IconComponent extends StylableComponent {
|
|
|
34
34
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IconComponent, deps: [{ token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
35
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: IconComponent, isStandalone: true, selector: "[wmIcon]", host: { properties: { "attr.icon-position": "this.iconposition", "style.fontSize": "this.iconsize" } }, providers: [
|
|
36
36
|
provideAsWidgetRef(IconComponent)
|
|
37
|
-
], usesInheritance: true, ngImport: i0, template: "<
|
|
37
|
+
], usesInheritance: true, ngImport: i0, template: "<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]=\"caption\" aria-hidden=\"true\" class=\"app-label\"></label>\n}\n", dependencies: [{ kind: "directive", type: TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
38
38
|
}
|
|
39
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IconComponent, decorators: [{
|
|
40
40
|
type: Component,
|
|
41
|
-
args: [{ standalone: true, imports: [TextContentDirective], selector: '[wmIcon]', providers: [
|
|
41
|
+
args: [{ standalone: true, imports: [TextContentDirective, WmAppIconComponent], selector: '[wmIcon]', providers: [
|
|
42
42
|
provideAsWidgetRef(IconComponent)
|
|
43
|
-
], template: "<
|
|
43
|
+
], template: "<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]=\"caption\" aria-hidden=\"true\" class=\"app-label\"></label>\n}\n" }]
|
|
44
44
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
|
|
45
45
|
type: Inject,
|
|
46
46
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/icon/src/icon.props.ts","../../../../../projects/components/widgets/basic/icon/src/icon.component.ts","../../../../../projects/components/widgets/basic/icon/src/icon.component.html","../../../../../projects/components/widgets/basic/icon/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-icon',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', PROP_STRING],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['iconclass', {value: 'wm-sl-l sl-user', ...PROP_STRING}],\n ['iconposition', {value: 'left', ...PROP_STRING}],\n ['iconsize', PROP_STRING],\n ['iconurl', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Component, HostBinding, Inject, Injector, Optional} from '@angular/core';\n\nimport {IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TextContentDirective} from '@wm/components/base';\nimport {registerProps} from './icon.props';\n\nconst DEFAULT_CLS = 'app-icon-wrapper';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-icon',\n hostClass: DEFAULT_CLS\n};\n\n@Component({\n standalone: true,\n imports: [TextContentDirective],\n selector: '[wmIcon]',\n templateUrl: './icon.component.html',\n providers: [\n provideAsWidgetRef(IconComponent)\n ]\n})\nexport class IconComponent extends StylableComponent {\n static initializeProps = registerProps();\n\n public iconclass: any;\n public caption: string;\n public hint: string;\n public arialabel: string;\n @HostBinding('attr.icon-position') iconposition: string;\n @HostBinding('style.fontSize') iconsize: string;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n}\n","<
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/icon/src/icon.props.ts","../../../../../projects/components/widgets/basic/icon/src/icon.component.ts","../../../../../projects/components/widgets/basic/icon/src/icon.component.html","../../../../../projects/components/widgets/basic/icon/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-icon',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', PROP_STRING],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['iconclass', {value: 'wm-sl-l sl-user', ...PROP_STRING}],\n ['iconposition', {value: 'left', ...PROP_STRING}],\n ['iconsize', PROP_STRING],\n ['iconurl', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Component, HostBinding, Inject, Injector, Optional} from '@angular/core';\n\nimport {IWidgetConfig, provideAsWidgetRef, StylableComponent, styler, TextContentDirective, WmAppIconComponent} from '@wm/components/base';\nimport {registerProps} from './icon.props';\n\nconst DEFAULT_CLS = 'app-icon-wrapper';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-icon',\n hostClass: DEFAULT_CLS\n};\n\n@Component({\n standalone: true,\n imports: [TextContentDirective, WmAppIconComponent],\n selector: '[wmIcon]',\n templateUrl: './icon.component.html',\n providers: [\n provideAsWidgetRef(IconComponent)\n ]\n})\nexport class IconComponent extends StylableComponent {\n static initializeProps = registerProps();\n\n public iconclass: any;\n public caption: string;\n public hint: string;\n public arialabel: string;\n public iconurl: string;\n\n @HostBinding('attr.icon-position') iconposition: string;\n @HostBinding('style.fontSize') iconsize: string;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n}\n","<wm-app-icon [iconclass]=\"iconclass\" [iconurl]=\"iconurl\"></wm-app-icon>\n@if (iconclass || iconurl) {\n <span class=\"sr-only\">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n}\n@if (caption) {\n <label [textContent]=\"caption\" aria-hidden=\"true\" class=\"app-label\"></label>\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,SAAS,EACT,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,SAAS,EAAE,WAAW,CAAC;QACxB,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,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,WAAW,EAAE,EAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,WAAW,EAAC,CAAC;QACzD,CAAC,cAAc,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAC,CAAC;QACjD,CAAC,UAAU,EAAE,W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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBL,+SAOA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDMc,oBAAoB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,SAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAOzC,aAAa,EAAA,UAAA,EAAA,CAAA;kBATzB,SAAS;iCACM,IAAI,EAAA,OAAA,EACP,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,EAAA,QAAA,EACzC,UAAU,EAAA,SAAA,EAET;AACP,wBAAA,kBAAkB,CAAA,aAAA;AACrB,qBAAA,EAAA,QAAA,EAAA,+SAAA,EAAA;;0BAc2B,MAAM;2BAAC,kBAAkB;;0BAAG;;sBAHvD,WAAW;uBAAC,oBAAoB;;sBAChC,WAAW;uBAAC,gBAAgB;;;AE9BjC;;AAEG;;;;"}
|
|
@@ -114,6 +114,9 @@
|
|
|
114
114
|
['clearsearchiconclass', { value: 'wi wi-close', ...base.PROP_STRING }],
|
|
115
115
|
['backsearchiconclass', { value: 'wi wi-arrow-left', ...base.PROP_STRING }],
|
|
116
116
|
['searchiconclass', { value: 'wm-sl-l sl-search', ...base.PROP_STRING }],
|
|
117
|
+
['clearsearchiconurl', base.PROP_STRING],
|
|
118
|
+
['backsearchiconurl', base.PROP_STRING],
|
|
119
|
+
['searchiconurl', base.PROP_STRING],
|
|
117
120
|
]);
|
|
118
121
|
const registerProps = () => {
|
|
119
122
|
base.register('wm-search', searchProps);
|
|
@@ -1054,15 +1057,15 @@
|
|
|
1054
1057
|
base.provideAs(SearchComponent, i3.NG_VALUE_ACCESSOR, true),
|
|
1055
1058
|
base.provideAs(SearchComponent, i3.NG_VALIDATORS, true),
|
|
1056
1059
|
base.provideAsWidgetRef(SearchComponent)
|
|
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]" }] }); }
|
|
1060
|
+
], 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()\">\n <wm-app-icon [iconclass]=\"backsearchiconclass\" [iconurl]=\"backsearchiconurl\" alt=\"Back\"></wm-app-icon>\n </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)\">\n <wm-app-icon [iconclass]=\"clearsearchiconclass\" [iconurl]=\"clearsearchiconurl\" alt=\"Clear\"></wm-app-icon>\n </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 <wm-app-icon [iconclass]=\"searchiconclass\" [iconurl]=\"searchiconurl\" alt=\"Search\"></wm-app-icon>\n </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]" }, { kind: "component", type: base.WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
1058
1061
|
}
|
|
1059
1062
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: SearchComponent, decorators: [{
|
|
1060
1063
|
type: i0.Component,
|
|
1061
|
-
args: [{ standalone: true, imports: [i2.CommonModule, i3.FormsModule, ScrollableDirective, i4.TypeaheadModule, base.TextContentDirective, base.ItemTemplateDirective, base.PartialParamHandlerDirective, base.PartialContainerDirective], selector: '[wmSearch]', providers: [
|
|
1064
|
+
args: [{ standalone: true, imports: [i2.CommonModule, i3.FormsModule, ScrollableDirective, i4.TypeaheadModule, base.TextContentDirective, base.ItemTemplateDirective, base.PartialParamHandlerDirective, base.PartialContainerDirective, base.WmAppIconComponent], selector: '[wmSearch]', providers: [
|
|
1062
1065
|
base.provideAs(SearchComponent, i3.NG_VALUE_ACCESSOR, true),
|
|
1063
1066
|
base.provideAs(SearchComponent, i3.NG_VALIDATORS, true),
|
|
1064
1067
|
base.provideAsWidgetRef(SearchComponent)
|
|
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()\"
|
|
1068
|
+
], 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()\">\n <wm-app-icon [iconclass]=\"backsearchiconclass\" [iconurl]=\"backsearchiconurl\" alt=\"Back\"></wm-app-icon>\n </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)\">\n <wm-app-icon [iconclass]=\"clearsearchiconclass\" [iconurl]=\"clearsearchiconurl\" alt=\"Clear\"></wm-app-icon>\n </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 <wm-app-icon [iconclass]=\"searchiconclass\" [iconurl]=\"searchiconurl\" alt=\"Search\"></wm-app-icon>\n </button>\n </form>\n </span>\n }\n }\n <!--This template is for both web and fullscreen mode in mobile.-->\n" }]
|
|
1066
1069
|
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: i1__namespace.App }, { type: undefined, decorators: [{
|
|
1067
1070
|
type: i0.Attribute,
|
|
1068
1071
|
args: ['datavalue.bind']
|