@acorex/platform 20.3.0-next.15 → 20.3.0-next.17

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.
@@ -1,6 +1,6 @@
1
1
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, InjectionToken, computed, Injector, runInInjectionContext, viewChildren, linkedSignal, effect, untracked, HostBinding, ViewChild, NgModule, DestroyRef } from '@angular/core';
3
+ import { inject, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, InjectionToken, computed, Injector, runInInjectionContext, viewChildren, linkedSignal, effect, untracked, HostBinding, ViewChild, NgModule } from '@angular/core';
4
4
  import { Router, RouterModule, ROUTES } from '@angular/router';
5
5
  import * as i3 from '@acorex/components/button';
6
6
  import { AXButtonModule } from '@acorex/components/button';
@@ -15,7 +15,7 @@ import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistr
15
15
  import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
16
16
  import * as i5 from '@angular/common';
17
17
  import { CommonModule } from '@angular/common';
18
- import { castArray, get, cloneDeep, set, merge, isNil, isEmpty, sortBy } from 'lodash-es';
18
+ import { castArray, get, cloneDeep, set, merge, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
19
19
  import { AXDataSource } from '@acorex/cdk/common';
20
20
  import { AXFormatService } from '@acorex/core/format';
21
21
  import { AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPReloadEvent, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
@@ -37,21 +37,21 @@ import { AXDropdownModule } from '@acorex/components/dropdown';
37
37
  import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY, AXP_ALLOW_CLEAR_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXPFileUploaderWidgetService } from '@acorex/platform/layout/widgets';
38
38
  import * as i1$1 from '@angular/forms';
39
39
  import { FormsModule } from '@angular/forms';
40
- import * as i1 from '@acorex/components/badge';
41
- import { AXBadgeModule } from '@acorex/components/badge';
42
40
  import * as i5$1 from '@acorex/components/form';
43
41
  import { AXFormModule } from '@acorex/components/form';
44
- import * as i6$2 from '@acorex/components/search-box';
45
- import { AXSearchBoxComponent, AXSearchBoxModule } from '@acorex/components/search-box';
46
42
  import * as i7 from '@acorex/components/select-box';
47
43
  import { AXSelectBoxModule } from '@acorex/components/select-box';
44
+ import * as i2$1 from '@acorex/components/text-box';
45
+ import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
46
+ import { AXValidationModule } from '@acorex/core/validation';
47
+ import * as i1 from '@acorex/components/badge';
48
+ import { AXBadgeModule } from '@acorex/components/badge';
49
+ import * as i6$2 from '@acorex/components/search-box';
50
+ import { AXSearchBoxComponent, AXSearchBoxModule } from '@acorex/components/search-box';
48
51
  import * as i6$1 from '@acorex/components/tag-box';
49
52
  import { AXTagBoxComponent, AXTagBoxModule } from '@acorex/components/tag-box';
50
- import { AXValidationModule } from '@acorex/core/validation';
51
53
  import { AXPDataSelectorService, AXPWidgetPropertyViewerComponent, AXPDynamicFormBuilderService } from '@acorex/platform/layout/components';
52
- import * as i2$1 from '@acorex/components/text-box';
53
- import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
54
- import { transform, isEqual } from 'lodash';
54
+ import { transform, isEqual as isEqual$1 } from 'lodash';
55
55
 
56
56
  //#endregion
57
57
  //#region ---- Entity Open Details Command ----
@@ -5436,6 +5436,121 @@ const AXPEntityReferenceWidget = {
5436
5436
  },
5437
5437
  };
5438
5438
 
5439
+ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
5440
+ constructor() {
5441
+ super(...arguments);
5442
+ //#region ---- Computed Properties ----
5443
+ this.editorPath = `__${this.path}EditorValue`;
5444
+ this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
5445
+ this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
5446
+ this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
5447
+ // protected expose = computed<string | undefined | any[]>(() => this.options()['expose'] as string);
5448
+ this.customFilter = computed(() => this.options()['filter'], ...(ngDevMode ? [{ debugName: "customFilter" }] : []));
5449
+ this.multiple = computed(() => (this.options()['multiple'] ?? false), ...(ngDevMode ? [{ debugName: "multiple" }] : []));
5450
+ //#endregion
5451
+ //#region ---- Lookup Node ----
5452
+ this.lookupNode = signal({
5453
+ type: 'lookup-editor',
5454
+ defaultValue: undefined,
5455
+ path: this.path,
5456
+ options: {},
5457
+ }, ...(ngDevMode ? [{ debugName: "lookupNode" }] : []));
5458
+ //#endregion
5459
+ //#region ---- Effects ----
5460
+ this.#efUpdateLookupNode = effect(() => {
5461
+ // console.log('path:', this.path, this.expose());
5462
+ const node = {
5463
+ type: 'lookup-editor',
5464
+ // defaultValue: this.getValue()?.value,
5465
+ path: this.editorPath,
5466
+ options: {
5467
+ entity: this.entity(),
5468
+ expose: [
5469
+ {
5470
+ source: this.textField(),
5471
+ target: `${this.path}EditorObj.title`,
5472
+ },
5473
+ {
5474
+ source: this.valueField(),
5475
+ target: `${this.path}EditorObj.id`,
5476
+ },
5477
+ ],
5478
+ look: 'select',
5479
+ multiple: this.multiple(),
5480
+ textField: this.textField(),
5481
+ filter: this.customFilter(),
5482
+ allowClear: true,
5483
+ },
5484
+ };
5485
+ this.lookupNode.set(node);
5486
+ }, ...(ngDevMode ? [{ debugName: "#efUpdateLookupNode" }] : []));
5487
+ this.#efUpdateValue = effect(() => {
5488
+ const newValueObj = this.contextService.getValue(`${this.path}EditorObj`);
5489
+ const prevValue = untracked(() => this.getValue()?.value);
5490
+ if (isEqual(prevValue, newValueObj?.[this.valueField()])) {
5491
+ return;
5492
+ }
5493
+ const value = this.multiple()
5494
+ ? newValueObj?.[this.valueField()].map((v) => v[this.valueField()])
5495
+ : newValueObj?.[this.valueField()];
5496
+ const displayText = this.multiple()
5497
+ ? newValueObj?.[this.textField()].map((v) => v[this.textField()]).join(',')
5498
+ : newValueObj?.[this.textField()];
5499
+ this.setValue({
5500
+ value: value,
5501
+ operation: {
5502
+ type: this.multiple() ? 'in' : 'equal',
5503
+ },
5504
+ displayText: displayText,
5505
+ });
5506
+ }, ...(ngDevMode ? [{ debugName: "#efUpdateValue" }] : []));
5507
+ }
5508
+ //#endregion
5509
+ //#region ---- Effects ----
5510
+ #efUpdateLookupNode;
5511
+ #efUpdateValue;
5512
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5513
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPLookupFilterWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ` <ng-container axp-widget-renderer [node]="lookupNode()" [mode]="'edit'"></ng-container> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5514
+ }
5515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
5516
+ type: Component,
5517
+ args: [{
5518
+ template: ` <ng-container axp-widget-renderer [node]="lookupNode()" [mode]="'edit'"></ng-container> `,
5519
+ changeDetection: ChangeDetectionStrategy.OnPush,
5520
+ imports: [
5521
+ FormsModule,
5522
+ AXSelectBoxModule,
5523
+ AXTextBoxModule,
5524
+ AXButtonModule,
5525
+ AXDecoratorModule,
5526
+ AXLoadingModule,
5527
+ AXValidationModule,
5528
+ AXFormModule,
5529
+ AXPWidgetCoreModule,
5530
+ ],
5531
+ }]
5532
+ }] });
5533
+
5534
+ var lookupFilterWidgetEdit_component = /*#__PURE__*/Object.freeze({
5535
+ __proto__: null,
5536
+ AXPLookupFilterWidgetEditComponent: AXPLookupFilterWidgetEditComponent
5537
+ });
5538
+
5539
+ const AXPLookupFilterWidget = {
5540
+ name: 'lookup-filter',
5541
+ title: 'Lookup Filter',
5542
+ // categories: AXP_WIDGETS_FILTER_CATEGORY,
5543
+ type: 'filter',
5544
+ groups: [AXPWidgetGroupEnum.EntityWidget],
5545
+ icon: 'fa-light fa-square',
5546
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
5547
+ components: {
5548
+ edit: {
5549
+ component: () => Promise.resolve().then(function () { return lookupFilterWidgetEdit_component; }).then((c) => c.AXPLookupFilterWidgetEditComponent),
5550
+ },
5551
+ },
5552
+ };
5553
+
5439
5554
  class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
5440
5555
  constructor() {
5441
5556
  super(...arguments);
@@ -6288,6 +6403,7 @@ const AXPLookupWidget = {
6288
6403
  groups: [AXPWidgetGroupEnum.EntityWidget],
6289
6404
  defaultFilterWidgetName: 'lookup-filter',
6290
6405
  type: 'editor',
6406
+ icon: 'fa-light fa-list-radio',
6291
6407
  properties: [
6292
6408
  AXP_DISABLED_PROPERTY,
6293
6409
  AXP_ALLOW_CLEAR_PROPERTY,
@@ -6320,7 +6436,7 @@ const AXPLookupWidget = {
6320
6436
  },
6321
6437
  visible: true,
6322
6438
  },
6323
- AXP_ALLOW_MULTIPLE_PROPERTY
6439
+ AXP_ALLOW_MULTIPLE_PROPERTY,
6324
6440
  ],
6325
6441
  components: {
6326
6442
  view: {
@@ -7360,6 +7476,7 @@ class AXPEntityModule {
7360
7476
  AXPWidgetCoreModule.forChild({
7361
7477
  widgets: [
7362
7478
  AXPLookupWidget,
7479
+ AXPLookupFilterWidget,
7363
7480
  AXPWidgetSelectorWidget,
7364
7481
  AXPTagableBoxWidget,
7365
7482
  AXPEntityListWidget,
@@ -7402,6 +7519,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
7402
7519
  AXPWidgetCoreModule.forChild({
7403
7520
  widgets: [
7404
7521
  AXPLookupWidget,
7522
+ AXPLookupFilterWidget,
7405
7523
  AXPWidgetSelectorWidget,
7406
7524
  AXPTagableBoxWidget,
7407
7525
  AXPEntityListWidget,
@@ -8100,7 +8218,7 @@ function entityDetailsReferenceCreateActions(type) {
8100
8218
  */
8101
8219
  function detectEntityChanges(oldObj, newObj) {
8102
8220
  return transform(newObj, (result, value, key) => {
8103
- if (!isEqual(value, oldObj[key])) {
8221
+ if (!isEqual$1(value, oldObj[key])) {
8104
8222
  const oldValue = oldObj[key];
8105
8223
  if (Array.isArray(value) || Array.isArray(oldValue)) {
8106
8224
  const oldArray = Array.isArray(oldValue) ? oldValue : [];
@@ -8112,8 +8230,8 @@ function detectEntityChanges(oldObj, newObj) {
8112
8230
  result[key] = { oldValue, newValue: value, added, removed };
8113
8231
  }
8114
8232
  else {
8115
- const added = newArray.filter((item) => !oldArray.some((oldItem) => isEqual(item, oldItem)));
8116
- const removed = oldArray.filter((item) => !newArray.some((newItem) => isEqual(item, newItem)));
8233
+ const added = newArray.filter((item) => !oldArray.some((oldItem) => isEqual$1(item, oldItem)));
8234
+ const removed = oldArray.filter((item) => !newArray.some((newItem) => isEqual$1(item, newItem)));
8117
8235
  result[key] = { oldValue, newValue: value, added, removed };
8118
8236
  }
8119
8237
  }
@@ -8125,290 +8243,6 @@ function detectEntityChanges(oldObj, newObj) {
8125
8243
  }
8126
8244
  //#endregion
8127
8245
 
8128
- class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
8129
- constructor() {
8130
- super(...arguments);
8131
- this.injector = inject(Injector);
8132
- this.entityResolver = inject(AXPEntityResolver);
8133
- this.formatService = inject(AXFormatService);
8134
- this.popupService = inject(AXPopupService);
8135
- this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
8136
- this.destroyRef = inject(DestroyRef);
8137
- this.translateService = inject(AXTranslationService);
8138
- this.expose = computed(() => this.options()['expose'], ...(ngDevMode ? [{ debugName: "expose" }] : []));
8139
- this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
8140
- this.textField = computed(() => {
8141
- return (this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title');
8142
- }, ...(ngDevMode ? [{ debugName: "textField" }] : []));
8143
- this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
8144
- this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
8145
- this.displayText = signal('', ...(ngDevMode ? [{ debugName: "displayText" }] : []));
8146
- this.selectedItem = signal(null, ...(ngDevMode ? [{ debugName: "selectedItem" }] : []));
8147
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
8148
- this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
8149
- this.placeholder = computed(() => {
8150
- return this.translateService.translateSync('widget.lookup.search');
8151
- }, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
8152
- this.efDisplay = effect(async () => {
8153
- const value = this.getValue();
8154
- if (isNil(value)) {
8155
- this.displayText.set('');
8156
- }
8157
- else if (typeof value == 'object' && !Array.isArray(value)) {
8158
- this.displayText.set(this.formatService.format(this.textField(), 'string', value));
8159
- }
8160
- else if (value != null) {
8161
- await this.findByValue();
8162
- }
8163
- }, ...(ngDevMode ? [{ debugName: "efDisplay" }] : []));
8164
- this.efEntity = effect(async () => {
8165
- const [module, entity] = this.entity().split('.');
8166
- this.entityDef.set(await this.entityResolver.get(module, entity));
8167
- }, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
8168
- }
8169
- ngOnInit() {
8170
- super.ngOnInit();
8171
- //
8172
- // this.builderService.onContextChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async (c) => {
8173
- // if (c.path == this.path) {
8174
- // if (this.getValue()) {
8175
- // await this.findByValue();
8176
- // }
8177
- // }
8178
- // });
8179
- }
8180
- async findByValue() {
8181
- this.isLoading.set(true);
8182
- const byKey = this.entityDef()?.queries.byKey?.execute;
8183
- if (byKey) {
8184
- const item = await byKey(this.getValue());
8185
- this.setItems(item);
8186
- }
8187
- this.isLoading.set(false);
8188
- }
8189
- handleOnClick(e) {
8190
- this.showSelector();
8191
- }
8192
- async showSelector() {
8193
- this.isOpen.set(true);
8194
- try {
8195
- const result = await this.entityDataSelectorService.open({
8196
- entity: this.entityDef(),
8197
- title: `${this.translateService.translateSync('@general:widgets.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural)}`,
8198
- allowMultiple: false,
8199
- filters: this.filter,
8200
- parentFilters: null,
8201
- columns: [],
8202
- allowCreate: false
8203
- });
8204
- if (result && 'items' in result && result.items.length > 0) {
8205
- this.setItems(result.items[0]);
8206
- }
8207
- }
8208
- catch (error) {
8209
- console.error('Error opening entity data selector:', error);
8210
- }
8211
- finally {
8212
- this.isOpen.set(false);
8213
- this.textbox.focus();
8214
- }
8215
- }
8216
- handleValueChange(e) {
8217
- this.searchTerm.set(e.value);
8218
- }
8219
- handleOnBlur(e) {
8220
- const com = e.component;
8221
- const input = com['input'].nativeElement;
8222
- setTimeout(() => {
8223
- if (this.selectedItem()) {
8224
- input.value = this.displayText();
8225
- }
8226
- else {
8227
- if (!this.isOpen()) {
8228
- input.value = '';
8229
- this.searchTerm.set(null);
8230
- }
8231
- }
8232
- }, 100);
8233
- }
8234
- async handleKeyDown(e) {
8235
- const keyEvent = e.nativeEvent;
8236
- const value = this.searchTerm()?.trim();
8237
- if ((keyEvent.code == 'Enter' || keyEvent.code == 'NumpadEnter') && value) {
8238
- this.isLoading.set(true);
8239
- const result = await this.searchByValue(value);
8240
- if (result?.total == 1) {
8241
- this.setItems(result.items[0]);
8242
- }
8243
- else {
8244
- this.showSelector();
8245
- }
8246
- this.isLoading.set(false);
8247
- }
8248
- }
8249
- setItems(item) {
8250
- this.searchTerm.set(null);
8251
- this.displayText.set('');
8252
- this.selectedItem.set(item);
8253
- const text = this.formatService.format(this.textField(), 'string', item);
8254
- this.displayText.set(text);
8255
- this.setValue(item.id);
8256
- // extract data from valueField and set context by expose path
8257
- if (this.expose()) {
8258
- if (typeof this.expose() == 'string') {
8259
- this.contextService.update(this.expose(), item);
8260
- }
8261
- // support multiple expose items
8262
- else if (Array.isArray(this.expose())) {
8263
- this.expose().forEach((i) => {
8264
- if (typeof i == 'string') {
8265
- this.contextService.update(i, item);
8266
- }
8267
- else {
8268
- // extract data from item by source path and set context by target path
8269
- const key = get(item, i.source);
8270
- this.contextService.update(i.target, key);
8271
- }
8272
- });
8273
- }
8274
- // extract data from item by source path and set context by target path
8275
- else if (typeof this.expose() == 'object') {
8276
- const i = this.expose();
8277
- const key = get(item, i.source);
8278
- this.contextService.update(i.target, key);
8279
- }
8280
- }
8281
- }
8282
- handleClearClick() {
8283
- this.clear();
8284
- }
8285
- async searchByValue(value) {
8286
- if (!this.entityDef())
8287
- return null;
8288
- const entity = this.entityDef();
8289
- const searchFields = entity.properties.filter(p => p.options?.filter?.inline?.enabled);
8290
- const inlineFilters = {
8291
- field: null,
8292
- logic: 'or',
8293
- operator: null,
8294
- filters: [],
8295
- };
8296
- if (value && searchFields.length > 0) {
8297
- searchFields.forEach((p) => {
8298
- inlineFilters.filters?.push({
8299
- field: p.name,
8300
- operator: { type: 'contains' },
8301
- value,
8302
- });
8303
- });
8304
- }
8305
- const func = entity.queries.list?.execute;
8306
- return await func({ filter: inlineFilters, take: 10 });
8307
- }
8308
- clear() {
8309
- this.setValue(null);
8310
- this.searchTerm.set('');
8311
- this.selectedItem.set(null);
8312
- }
8313
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8314
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPLookupFilterWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
8315
- <ax-text-box
8316
- [ngModel]="displayText()"
8317
- (onValueChanged)="handleValueChange($event)"
8318
- [placeholder]="placeholder()"
8319
- (onKeyUp)="handleKeyDown($event)"
8320
- (onBlur)="handleOnBlur($event)"
8321
- >
8322
- @for (validation of validationRules(); track $index) {
8323
- <ax-validation-rule
8324
- [rule]="validation.rule"
8325
- [message]="validation.options?.message"
8326
- [options]="validation.options"
8327
- ></ax-validation-rule>
8328
- }
8329
- <ax-clear-button (click)="handleClearClick()"></ax-clear-button>
8330
-
8331
- <ax-suffix>
8332
- <ax-button color="ghost" look="twotone" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
8333
- @if (isLoading()) {
8334
- <ax-loading></ax-loading>
8335
- } @else {
8336
- <ax-icon icon="far fa-search"> </ax-icon>
8337
- }
8338
- </ax-button>
8339
- </ax-suffix>
8340
- </ax-text-box>
8341
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8342
- }
8343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
8344
- type: Component,
8345
- args: [{
8346
- template: `
8347
- <ax-text-box
8348
- [ngModel]="displayText()"
8349
- (onValueChanged)="handleValueChange($event)"
8350
- [placeholder]="placeholder()"
8351
- (onKeyUp)="handleKeyDown($event)"
8352
- (onBlur)="handleOnBlur($event)"
8353
- >
8354
- @for (validation of validationRules(); track $index) {
8355
- <ax-validation-rule
8356
- [rule]="validation.rule"
8357
- [message]="validation.options?.message"
8358
- [options]="validation.options"
8359
- ></ax-validation-rule>
8360
- }
8361
- <ax-clear-button (click)="handleClearClick()"></ax-clear-button>
8362
-
8363
- <ax-suffix>
8364
- <ax-button color="ghost" look="twotone" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
8365
- @if (isLoading()) {
8366
- <ax-loading></ax-loading>
8367
- } @else {
8368
- <ax-icon icon="far fa-search"> </ax-icon>
8369
- }
8370
- </ax-button>
8371
- </ax-suffix>
8372
- </ax-text-box>
8373
- `,
8374
- standalone: true,
8375
- changeDetection: ChangeDetectionStrategy.OnPush,
8376
- imports: [
8377
- FormsModule,
8378
- AXSelectBoxModule,
8379
- AXTextBoxModule,
8380
- AXButtonModule,
8381
- AXDecoratorModule,
8382
- AXLoadingModule,
8383
- AXValidationModule,
8384
- AXFormModule,
8385
- ],
8386
- }]
8387
- }], propDecorators: { textbox: [{
8388
- type: ViewChild,
8389
- args: [AXTextBoxComponent]
8390
- }] } });
8391
-
8392
- var lookupFilterWidgetEdit_component = /*#__PURE__*/Object.freeze({
8393
- __proto__: null,
8394
- AXPLookupFilterWidgetEditComponent: AXPLookupFilterWidgetEditComponent
8395
- });
8396
-
8397
- const AXPLookupFilterWidget = {
8398
- name: 'lookup-filter',
8399
- title: 'Lookup Filter',
8400
- // categories: AXP_WIDGETS_FILTER_CATEGORY,
8401
- type: 'filter',
8402
- groups: [AXPWidgetGroupEnum.EntityWidget],
8403
- icon: 'fa-light fa-square',
8404
- properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
8405
- components: {
8406
- edit: {
8407
- component: () => Promise.resolve().then(function () { return lookupFilterWidgetEdit_component; }).then((c) => c.AXPLookupFilterWidgetEditComponent),
8408
- },
8409
- },
8410
- };
8411
-
8412
8246
  /**
8413
8247
  * Generated bundle index. Do not edit.
8414
8248
  */