@acorex/platform 18.0.6 → 18.0.8

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.
Files changed (149) hide show
  1. package/auth/lib/auth.strategy.d.ts +1 -1
  2. package/auth/lib/session.service.d.ts +0 -1
  3. package/common/lib/data/data-provider.types.d.ts +1 -1
  4. package/common/lib/schema/entity/entity.class.d.ts +1 -0
  5. package/common/lib/schema/widgets/lookup/lookup-widget-column.component.d.ts +1 -1
  6. package/common/lib/schema/widgets/lookup/lookup-widget-edit.component.d.ts +3 -1
  7. package/common/lib/schema/widgets/phone/phone-widget-edit.component.d.ts +3 -1
  8. package/esm2022/auth/lib/auth.guard.mjs +4 -4
  9. package/esm2022/auth/lib/auth.strategy.mjs +1 -1
  10. package/esm2022/auth/lib/session.service.mjs +14 -15
  11. package/esm2022/common/lib/data/data-provider.types.mjs +1 -1
  12. package/esm2022/common/lib/schema/entity/entity.class.mjs +1 -1
  13. package/esm2022/common/lib/schema/widgets/avatar/avatar-widget-edit.component.mjs +2 -2
  14. package/esm2022/common/lib/schema/widgets/avatar/avatar-widget-view.component.mjs +2 -2
  15. package/esm2022/common/lib/schema/widgets/common-widget-filter/boolean-widget-filter.component.mjs +1 -1
  16. package/esm2022/common/lib/schema/widgets/dateTime/dateTime-widget-edit.component.mjs +2 -2
  17. package/esm2022/common/lib/schema/widgets/dateTime/dateTime-widget-filter.component.mjs +2 -2
  18. package/esm2022/common/lib/schema/widgets/email/email-widget-edit.component.mjs +2 -2
  19. package/esm2022/common/lib/schema/widgets/file/file-widget-filter.component.mjs +2 -2
  20. package/esm2022/common/lib/schema/widgets/gallery/gallery-widget-filter.component.mjs +2 -2
  21. package/esm2022/common/lib/schema/widgets/lookup/lookup-widget-column.component.mjs +3 -3
  22. package/esm2022/common/lib/schema/widgets/lookup/lookup-widget-edit.component.mjs +23 -19
  23. package/esm2022/common/lib/schema/widgets/lookup/lookup-widget-filter.component.mjs +2 -2
  24. package/esm2022/common/lib/schema/widgets/messenger/messenger-widget-edit.component.mjs +1 -1
  25. package/esm2022/common/lib/schema/widgets/phone/phone-widget-edit.component.mjs +8 -4
  26. package/esm2022/common/lib/schema/widgets/selection-list/selection-list-widget-filter.component.mjs +2 -2
  27. package/esm2022/layout/entity/lib/entity-master-list.viewmodel.mjs +56 -61
  28. package/esm2022/layout/entity/lib/entity-master-single.viewmodel.mjs +4 -2
  29. package/esm2022/layout/entity/lib/entity.module.mjs +16 -19
  30. package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.mjs +62 -55
  31. package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.component.mjs +83 -61
  32. package/esm2022/layout/entity/lib/workflows/create-entity.workflow.mjs +10 -8
  33. package/esm2022/layouts/lib/admin/admin.module.mjs +9 -2
  34. package/esm2022/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.component.mjs +6 -3
  35. package/esm2022/layouts/lib/admin/entity-layout/entity-details-view/entity-details-view.component.mjs +7 -5
  36. package/esm2022/layouts/lib/admin/entity-layout/entity-import-view/entity-import-view.component.mjs +91 -0
  37. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/entity-custom-view/entity-custom-view.component.mjs +4 -3
  38. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-columns/list-view-option-columns.component.mjs +4 -3
  39. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-conditions.component.mjs +4 -3
  40. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-conditions/list-view-option-filter-operator.component.mjs +1 -1
  41. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/components/list-view-option-sorting/list-view-option-sorting.component.mjs +4 -3
  42. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/entity-list-view.component.mjs +18 -6
  43. package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/list-view.module.mjs +9 -5
  44. package/esm2022/layouts/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.mjs +6 -3
  45. package/esm2022/layouts/lib/admin/entity-layout/workflows/create-entity.workflow.mjs +5 -3
  46. package/esm2022/layouts/lib/admin/entity-layout/workflows/import-entity.workflow.mjs +77 -0
  47. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.mjs +8 -5
  48. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.mjs +29 -13
  49. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-columns/list-view-option-columns.component.mjs +17 -13
  50. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-sorting/list-view-option-sorting.component.mjs +13 -9
  51. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-modify-view/entity-master-modify-view.component.mjs +8 -5
  52. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.mjs +8 -5
  53. package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-edit.component.mjs +2 -2
  54. package/esm2022/widgets/lib/editors/email-box-widget/email-box-widget-edit.component.mjs +2 -2
  55. package/esm2022/widgets/lib/editors/link-widget/index.mjs +8 -0
  56. package/esm2022/widgets/lib/editors/link-widget/link-widget-column.component.mjs +19 -0
  57. package/esm2022/widgets/lib/editors/link-widget/link-widget-designer.component.mjs +19 -0
  58. package/esm2022/widgets/lib/editors/link-widget/link-widget-edit.component.mjs +391 -0
  59. package/esm2022/widgets/lib/editors/link-widget/link-widget-filter.component.mjs +20 -0
  60. package/esm2022/widgets/lib/editors/link-widget/link-widget-print.component.mjs +19 -0
  61. package/esm2022/widgets/lib/editors/link-widget/link-widget-view.component.mjs +120 -0
  62. package/esm2022/widgets/lib/editors/link-widget/link-widget.config.mjs +24 -0
  63. package/esm2022/widgets/lib/editors/number-box-widget/number-box-widget-edit.component.mjs +10 -7
  64. package/esm2022/widgets/lib/editors/phone-box-widget/phone-box-widget-edit.component.mjs +5 -3
  65. package/esm2022/widgets/lib/editors/select-box-widget/select-box-widget-edit.component.mjs +2 -2
  66. package/esm2022/widgets/lib/editors/signature-pad-widget/signature-pad-widget-edit.component.mjs +13 -3
  67. package/esm2022/widgets/lib/editors/signature-pad-widget/signature-pad-widget-view.component.mjs +3 -3
  68. package/esm2022/widgets/lib/widgets.module.mjs +4 -1
  69. package/fesm2022/acorex-platform-auth.mjs +14 -15
  70. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  71. package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-B8txzrTw.mjs → acorex-platform-common-avatar-widget-edit.component-BtnVjoMi.mjs} +2 -2
  72. package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-B8txzrTw.mjs.map → acorex-platform-common-avatar-widget-edit.component-BtnVjoMi.mjs.map} +1 -1
  73. package/fesm2022/{acorex-platform-common-avatar-widget-view.component-B3Ubyw3X.mjs → acorex-platform-common-avatar-widget-view.component-0-hGLYLK.mjs} +2 -2
  74. package/fesm2022/{acorex-platform-common-avatar-widget-view.component-B3Ubyw3X.mjs.map → acorex-platform-common-avatar-widget-view.component-0-hGLYLK.mjs.map} +1 -1
  75. package/fesm2022/{acorex-platform-common-boolean-widget-filter.component-CcJ5Vj4q.mjs → acorex-platform-common-boolean-widget-filter.component-CMkjO_x1.mjs} +2 -2
  76. package/fesm2022/{acorex-platform-common-boolean-widget-filter.component-CcJ5Vj4q.mjs.map → acorex-platform-common-boolean-widget-filter.component-CMkjO_x1.mjs.map} +1 -1
  77. package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-DRsoJMVG.mjs → acorex-platform-common-dateTime-widget-edit.component-DdqtbOY1.mjs} +2 -2
  78. package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-DRsoJMVG.mjs.map → acorex-platform-common-dateTime-widget-edit.component-DdqtbOY1.mjs.map} +1 -1
  79. package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-uB7iwji0.mjs → acorex-platform-common-dateTime-widget-filter.component-BjtIJkeC.mjs} +2 -2
  80. package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-uB7iwji0.mjs.map → acorex-platform-common-dateTime-widget-filter.component-BjtIJkeC.mjs.map} +1 -1
  81. package/fesm2022/{acorex-platform-common-email-widget-edit.component-CY-Nu0xD.mjs → acorex-platform-common-email-widget-edit.component-CLl0gmdM.mjs} +2 -2
  82. package/fesm2022/{acorex-platform-common-email-widget-edit.component-CY-Nu0xD.mjs.map → acorex-platform-common-email-widget-edit.component-CLl0gmdM.mjs.map} +1 -1
  83. package/fesm2022/{acorex-platform-common-file-widget-filter.component-qL-PznYm.mjs → acorex-platform-common-file-widget-filter.component-DqYmxdx_.mjs} +2 -2
  84. package/fesm2022/{acorex-platform-common-file-widget-filter.component-qL-PznYm.mjs.map → acorex-platform-common-file-widget-filter.component-DqYmxdx_.mjs.map} +1 -1
  85. package/fesm2022/{acorex-platform-common-gallery-widget-filter.component-Bvy3nmy6.mjs → acorex-platform-common-gallery-widget-filter.component-Btrq4HP9.mjs} +2 -2
  86. package/fesm2022/{acorex-platform-common-gallery-widget-filter.component-Bvy3nmy6.mjs.map → acorex-platform-common-gallery-widget-filter.component-Btrq4HP9.mjs.map} +1 -1
  87. package/fesm2022/{acorex-platform-common-lookup-widget-column.component-Cl-vO5XW.mjs → acorex-platform-common-lookup-widget-column.component-CtvP7V_w.mjs} +3 -3
  88. package/fesm2022/acorex-platform-common-lookup-widget-column.component-CtvP7V_w.mjs.map +1 -0
  89. package/fesm2022/{acorex-platform-common-lookup-widget-edit.component-CpzTuRyJ.mjs → acorex-platform-common-lookup-widget-edit.component-JjtWsg2g.mjs} +23 -19
  90. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-JjtWsg2g.mjs.map +1 -0
  91. package/fesm2022/{acorex-platform-common-lookup-widget-filter.component-i8oRoMWh.mjs → acorex-platform-common-lookup-widget-filter.component-B4C5JB_p.mjs} +2 -2
  92. package/fesm2022/{acorex-platform-common-lookup-widget-filter.component-i8oRoMWh.mjs.map → acorex-platform-common-lookup-widget-filter.component-B4C5JB_p.mjs.map} +1 -1
  93. package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-WHM8ANuQ.mjs → acorex-platform-common-messenger-widget-edit.component-BjqtP0ls.mjs} +2 -2
  94. package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-WHM8ANuQ.mjs.map → acorex-platform-common-messenger-widget-edit.component-BjqtP0ls.mjs.map} +1 -1
  95. package/fesm2022/{acorex-platform-common-phone-widget-edit.component-BdxXFoxc.mjs → acorex-platform-common-phone-widget-edit.component-Dj_tdhZw.mjs} +8 -4
  96. package/fesm2022/acorex-platform-common-phone-widget-edit.component-Dj_tdhZw.mjs.map +1 -0
  97. package/fesm2022/{acorex-platform-common-selection-list-widget-filter.component-NDAFZhfE.mjs → acorex-platform-common-selection-list-widget-filter.component-hbxBcirf.mjs} +2 -2
  98. package/fesm2022/{acorex-platform-common-selection-list-widget-filter.component-NDAFZhfE.mjs.map → acorex-platform-common-selection-list-widget-filter.component-hbxBcirf.mjs.map} +1 -1
  99. package/fesm2022/acorex-platform-common.mjs +15 -15
  100. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  101. package/fesm2022/acorex-platform-layout-entity.mjs +309 -289
  102. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  103. package/fesm2022/acorex-platform-layouts-entity-create-view.component-DgPPnU8S.mjs +110 -0
  104. package/fesm2022/acorex-platform-layouts-entity-create-view.component-DgPPnU8S.mjs.map +1 -0
  105. package/fesm2022/acorex-platform-layouts-entity-import-view.component-V50y5Jjs.mjs +93 -0
  106. package/fesm2022/acorex-platform-layouts-entity-import-view.component-V50y5Jjs.mjs.map +1 -0
  107. package/fesm2022/{acorex-platform-layouts-entity-modify-view.component-C-dS2HFl.mjs → acorex-platform-layouts-entity-modify-view.component-Bwz4yVpK.mjs} +6 -3
  108. package/fesm2022/acorex-platform-layouts-entity-modify-view.component-Bwz4yVpK.mjs.map +1 -0
  109. package/fesm2022/acorex-platform-layouts.mjs +130 -35
  110. package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
  111. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-qOxuoK6c.mjs +99 -0
  112. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-qOxuoK6c.mjs.map +1 -0
  113. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DHmUvWx8.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BJcpG94Q.mjs} +9 -6
  114. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BJcpG94Q.mjs.map +1 -0
  115. package/fesm2022/acorex-platform-themes-default.mjs +50 -31
  116. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  117. package/fesm2022/acorex-platform-widgets.mjs +628 -14
  118. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  119. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +7 -6
  120. package/layout/entity/lib/entity-master-single.viewmodel.d.ts +1 -0
  121. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +5 -4
  122. package/layout/entity/lib/workflows/create-entity.workflow.d.ts +1 -0
  123. package/layouts/lib/admin/entity-layout/entity-import-view/entity-import-view.component.d.ts +27 -0
  124. package/layouts/lib/admin/entity-layout/entity-list-view/entity-list-view.component.d.ts +2 -0
  125. package/layouts/lib/admin/entity-layout/entity-list-view/list-view.module.d.ts +2 -1
  126. package/layouts/lib/admin/entity-layout/workflows/create-entity.workflow.d.ts +1 -0
  127. package/layouts/lib/admin/entity-layout/workflows/import-entity.workflow.d.ts +27 -0
  128. package/package.json +4 -1
  129. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +3 -0
  130. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-columns/list-view-option-columns.component.d.ts +1 -1
  131. package/widgets/lib/editors/link-widget/index.d.ts +7 -0
  132. package/widgets/lib/editors/link-widget/link-widget-column.component.d.ts +6 -0
  133. package/widgets/lib/editors/link-widget/link-widget-designer.component.d.ts +6 -0
  134. package/widgets/lib/editors/link-widget/link-widget-edit.component.d.ts +45 -0
  135. package/widgets/lib/editors/link-widget/link-widget-filter.component.d.ts +6 -0
  136. package/widgets/lib/editors/link-widget/link-widget-print.component.d.ts +6 -0
  137. package/widgets/lib/editors/link-widget/link-widget-view.component.d.ts +13 -0
  138. package/widgets/lib/editors/link-widget/link-widget.config.d.ts +2 -0
  139. package/widgets/lib/editors/number-box-widget/number-box-widget-edit.component.d.ts +4 -1
  140. package/widgets/lib/editors/signature-pad-widget/signature-pad-widget-edit.component.d.ts +2 -0
  141. package/fesm2022/acorex-platform-common-lookup-widget-column.component-Cl-vO5XW.mjs.map +0 -1
  142. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-CpzTuRyJ.mjs.map +0 -1
  143. package/fesm2022/acorex-platform-common-phone-widget-edit.component-BdxXFoxc.mjs.map +0 -1
  144. package/fesm2022/acorex-platform-layouts-entity-create-view.component-Bxkv579D.mjs +0 -107
  145. package/fesm2022/acorex-platform-layouts-entity-create-view.component-Bxkv579D.mjs.map +0 -1
  146. package/fesm2022/acorex-platform-layouts-entity-modify-view.component-C-dS2HFl.mjs.map +0 -1
  147. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CTlj-QBs.mjs +0 -96
  148. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CTlj-QBs.mjs.map +0 -1
  149. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DHmUvWx8.mjs.map +0 -1
@@ -4,40 +4,43 @@ import * as i0 from '@angular/core';
4
4
  import { InjectionToken, inject, Injectable, computed, signal, Injector, Component, ChangeDetectionStrategy, DestroyRef, ViewChild, NgModule } from '@angular/core';
5
5
  import * as i1$2 from '@acorex/platform/workflow';
6
6
  import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowService, ofType, AXPWorkflowModule } from '@acorex/platform/workflow';
7
- import { AXPSessionService } from '@acorex/platform/auth';
7
+ import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
8
8
  import { resolveActionLook, AXPLayoutService, AXPEntityCommandScope, AXPWorkflowNavigateAction } from '@acorex/platform/common';
9
9
  import { AXDialogService } from '@acorex/components/dialog';
10
10
  import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
11
11
  import { AXPopupService } from '@acorex/components/popup';
12
12
  import { AXPlatform } from '@acorex/core/platform';
13
- import * as i1 from '@acorex/components/common';
13
+ import * as i2 from '@acorex/components/common';
14
14
  import { AXDataSource, AXCommonModule } from '@acorex/components/common';
15
15
  import { Subject, takeUntil } from 'rxjs';
16
- import { RouterModule, ROUTES } from '@angular/router';
17
- import * as i6 from '@acorex/platform/layout/builder';
16
+ import * as i8 from '@acorex/core/translation';
17
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
18
+ import * as i7 from '@acorex/platform/layout/builder';
18
19
  import { AXPWidgetBase, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPColumnWidgetBase } from '@acorex/platform/layout/builder';
20
+ import { RouterModule, ROUTES } from '@angular/router';
21
+ import * as i1 from '@angular/common';
19
22
  import { CommonModule } from '@angular/common';
20
- import { AXSelectBoxModule } from '@acorex/components/select-box';
21
- import * as i1$1 from '@angular/forms';
22
- import { FormsModule } from '@angular/forms';
23
- import * as i2$1 from '@acorex/components/text-box';
24
- import { AXTextBoxComponent, AXTextBoxModule } from '@acorex/components/text-box';
25
- import * as i3 from '@acorex/components/decorators';
26
- import { AXDecoratorModule } from '@acorex/components/decorators';
27
- import * as i2 from '@acorex/components/button';
23
+ import * as i3 from '@acorex/components/button';
28
24
  import { AXButtonModule } from '@acorex/components/button';
29
- import * as i4 from '@acorex/components/data-table';
30
- import { AXDataTableModule } from '@acorex/components/data-table';
31
- import * as i5 from '@acorex/components/search-box';
32
- import { AXSearchBoxModule } from '@acorex/components/search-box';
33
- import { AXBasePageComponent } from '@acorex/components/page';
34
- import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
25
+ import * as i4 from '@acorex/components/decorators';
26
+ import { AXDecoratorModule } from '@acorex/components/decorators';
35
27
  import * as i6$1 from '@acorex/components/form';
36
28
  import { AXFormModule } from '@acorex/components/form';
37
29
  import * as i5$1 from '@acorex/components/loading';
38
30
  import { AXLoadingModule } from '@acorex/components/loading';
31
+ import { AXSelectBoxModule } from '@acorex/components/select-box';
32
+ import * as i2$1 from '@acorex/components/text-box';
33
+ import { AXTextBoxComponent, AXTextBoxModule } from '@acorex/components/text-box';
39
34
  import { AXValidationModule } from '@acorex/core/validation';
40
35
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
36
+ import * as i1$1 from '@angular/forms';
37
+ import { FormsModule } from '@angular/forms';
38
+ import * as i5 from '@acorex/components/data-table';
39
+ import { AXDataTableModule } from '@acorex/components/data-table';
40
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
41
+ import { AXBasePageComponent } from '@acorex/components/page';
42
+ import * as i6 from '@acorex/components/search-box';
43
+ import { AXSearchBoxModule } from '@acorex/components/search-box';
41
44
 
42
45
  const AXP_ENTITY_CONFIG_TOKEN = new InjectionToken('AXP_ENTITY_CONFIG_TOKEN');
43
46
  const AXP_ENTITY_DEFINITION_LOADER = new InjectionToken('AXP_ENTITY_DEFINITION_LOADER');
@@ -677,6 +680,7 @@ class AXPEntityMasterSingleViewModel {
677
680
  this.formatService = this.injector.get(AXFormatService);
678
681
  this.workflow = this.injector.get(AXPWorkflowService);
679
682
  this.destroyed = new Subject();
683
+ this.translateService = this.injector.get(AXTranslationService);
680
684
  this.events$ = new Subject();
681
685
  this.context = signal(cloneDeep(this.entityData));
682
686
  this.actions = computed(() => {
@@ -711,7 +715,7 @@ class AXPEntityMasterSingleViewModel {
711
715
  this.beardcrumbs = computed(() => {
712
716
  return [
713
717
  {
714
- title: "Home",
718
+ title: this.translateService.translateSync('entity.home'),
715
719
  icon: "fa-solid fa-home ax-text-xs ax-me-2",
716
720
  url: [`/${this.session.application?.name}`]
717
721
  },
@@ -972,6 +976,7 @@ class AXPEntityMasterListViewModel {
972
976
  this.session = this.injector.get(AXPSessionService);
973
977
  this.workflow = this.injector.get(AXPWorkflowService);
974
978
  this.destroyed = new Subject();
979
+ this.translateService = this.injector.get(AXTranslationService);
975
980
  this.events$ = new Subject();
976
981
  this.dataSource = new AXDataSource({
977
982
  byKey: (key) => {
@@ -983,7 +988,7 @@ class AXPEntityMasterListViewModel {
983
988
  return func(e);
984
989
  },
985
990
  pageSize: 10,
986
- key: 'id'
991
+ key: 'id',
987
992
  });
988
993
  this.selectedItems = signal([]);
989
994
  this.hasSelectedItems = computed(() => {
@@ -999,7 +1004,7 @@ class AXPEntityMasterListViewModel {
999
1004
  });
1000
1005
  //****************** Inline filter ******************//
1001
1006
  this.inlineFiltersPlaceholders = computed(() => {
1002
- return this.entityDef.properties.filter(p => p.options?.filter?.inline?.enabled).map(c => c.title);
1007
+ return this.entityDef.properties.filter((p) => p.options?.filter?.inline?.enabled).map((c) => c.title);
1003
1008
  });
1004
1009
  this.hasInlineFilters = computed(() => {
1005
1010
  return this.inlineFiltersPlaceholders().length > 0;
@@ -1008,50 +1013,46 @@ class AXPEntityMasterListViewModel {
1008
1013
  this.beardcrumbs = computed(() => {
1009
1014
  return [
1010
1015
  {
1011
- title: "Home",
1012
- icon: "fa-solid fa-home ax-text-xs ax-me-2",
1013
- url: [`/${this.session.application?.name}`]
1016
+ title: this.translateService.translateSync('entity.home'),
1017
+ icon: 'fa-solid fa-home ax-text-xs ax-me-2',
1018
+ url: [`/${this.session.application?.name}`],
1014
1019
  },
1015
1020
  {
1016
1021
  title: this.title(),
1017
- url: [`/${this.session.application?.name}`, 'm', `${this.entityDef.module}`, 'e', `${this.entityDef.name}`, 'list']
1018
- }
1022
+ url: [`/${this.session.application?.name}`, 'm', `${this.entityDef.module}`, 'e', `${this.entityDef.name}`, 'list'],
1023
+ },
1019
1024
  ];
1020
1025
  });
1021
1026
  //****************** Actions ******************//
1022
1027
  this.allActions = computed(() => {
1023
1028
  const list = this.entityDef.interfaces?.master?.list?.actions ?? [];
1024
- return list
1025
- .map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
1029
+ return list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
1026
1030
  });
1027
1031
  this.primaryActions = computed(() => {
1028
- return this.allActions()
1029
- .filter(a => (a.priority == 'primary') &&
1032
+ return this.allActions().filter((a) => a.priority == 'primary' &&
1030
1033
  ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
1031
1034
  (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
1032
1035
  });
1033
1036
  this.secondaryActions = computed(() => {
1034
- return this.allActions()
1035
- .filter(a => (a.priority == 'secondary') &&
1037
+ return this.allActions().filter((a) => a.priority == 'secondary' &&
1036
1038
  ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
1037
1039
  (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
1038
1040
  });
1039
1041
  this.rowActions = computed(() => {
1040
- return this.allActions()
1041
- .filter(a => (a.scope == AXPEntityCommandScope.Individual));
1042
+ return this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual);
1042
1043
  });
1043
1044
  //****************** Filter ******************//
1044
1045
  this.inlineFilters = {
1045
1046
  field: null,
1046
1047
  logic: 'or',
1047
1048
  operator: null,
1048
- filters: []
1049
+ filters: [],
1049
1050
  };
1050
1051
  this.advanceFilters = {
1051
1052
  field: null,
1052
1053
  logic: 'and',
1053
1054
  operator: null,
1054
- filters: []
1055
+ filters: [],
1055
1056
  };
1056
1057
  //****************** Columns ******************//
1057
1058
  this.allAvailableColumns = () => {
@@ -1060,28 +1061,28 @@ class AXPEntityMasterListViewModel {
1060
1061
  const visiblePropNames = new Set(visibleProperties.map(({ name }) => name));
1061
1062
  return columns
1062
1063
  .filter(({ name }) => visiblePropNames.has(name))
1063
- .map(column => {
1064
+ .map((column) => {
1064
1065
  const property = visibleProperties.find(({ name }) => name === column.name);
1065
1066
  return new AXPEntityListViewColumnViewModel(property, column);
1066
1067
  });
1067
1068
  };
1068
1069
  this.visibleColumnCount = () => {
1069
- return this.columns().filter(c => c.visible == true).length;
1070
+ return this.columns().filter((c) => c.visible == true).length;
1070
1071
  };
1071
1072
  this.columns = signal([]);
1072
1073
  //****************** Sort ******************//
1073
1074
  this.sortableFields = () => {
1074
- const props = this.entityDef.properties.filter(c => c.options?.sort?.enabled);
1075
- return props.map(e => {
1075
+ const props = this.entityDef.properties.filter((c) => c.options?.sort?.enabled);
1076
+ return props.map((e) => {
1076
1077
  return {
1077
1078
  name: e.name,
1078
1079
  title: e.title,
1079
- dir: 'asc'
1080
+ dir: 'asc',
1080
1081
  };
1081
1082
  });
1082
1083
  };
1083
1084
  this.sortableFieldsCount = () => {
1084
- return this.entityDef.properties.filter(c => c.options?.sort?.enabled).length ?? 0;
1085
+ return this.entityDef.properties.filter((c) => c.options?.sort?.enabled).length ?? 0;
1085
1086
  };
1086
1087
  this.canSort = () => {
1087
1088
  return this.sortableFieldsCount() > 0;
@@ -1095,7 +1096,7 @@ class AXPEntityMasterListViewModel {
1095
1096
  this.sortedFields = signal([]);
1096
1097
  this.views = computed(() => {
1097
1098
  const views = this.entityDef.interfaces?.master?.list?.views ?? [];
1098
- return views.map(v => {
1099
+ return views.map((v) => {
1099
1100
  return new AXPEntityMasterListViewQueryViewModel(this.entityDef, this, v);
1100
1101
  });
1101
1102
  });
@@ -1104,10 +1105,10 @@ class AXPEntityMasterListViewModel {
1104
1105
  .pipe(ofType(AXPEntityDeletedEvent))
1105
1106
  .pipe(takeUntil(this.destroyed))
1106
1107
  .subscribe((event) => {
1107
- debugger;
1108
+ // debugger
1108
1109
  if (event.payload.entity == this.entityDef.source) {
1109
1110
  this.selectedItems.set([]);
1110
- this.events$.next({ action: "refresh" });
1111
+ this.events$.next({ action: 'refresh' });
1111
1112
  }
1112
1113
  });
1113
1114
  }
@@ -1115,16 +1116,16 @@ class AXPEntityMasterListViewModel {
1115
1116
  this.selectedItems.set([]);
1116
1117
  }
1117
1118
  applyInlineFilter(value) {
1118
- const props = this.entityDef.properties.filter(c => c.options?.filter?.inline?.enabled);
1119
+ const props = this.entityDef.properties.filter((c) => c.options?.filter?.inline?.enabled);
1119
1120
  this.inlineFilters.filters = [];
1120
1121
  if (value) {
1121
- props.forEach(p => {
1122
+ props.forEach((p) => {
1122
1123
  this.inlineFilters.filters?.push({
1123
1124
  field: p.name,
1124
1125
  operator: {
1125
- type: 'contains'
1126
+ type: 'contains',
1126
1127
  },
1127
- value
1128
+ value,
1128
1129
  });
1129
1130
  });
1130
1131
  }
@@ -1133,12 +1134,12 @@ class AXPEntityMasterListViewModel {
1133
1134
  applyFilterAndSort() {
1134
1135
  this.dataSource.clearFilter();
1135
1136
  //
1136
- this.dataSource.sort(...this.sortedFields().map(s => ({ dir: s.dir, field: s.name })));
1137
+ this.dataSource.sort(...this.sortedFields().map((s) => ({ dir: s.dir, field: s.name })));
1137
1138
  //
1138
- this.advanceFilters.filters = this.view().conditions.map(f => ({
1139
+ this.advanceFilters.filters = this.view().conditions.map((f) => ({
1139
1140
  field: f.name,
1140
1141
  operator: f.operator,
1141
- value: f.value
1142
+ value: f.value,
1142
1143
  }));
1143
1144
  //
1144
1145
  const inline = this.inlineFilters.filters?.length ?? 0;
@@ -1154,7 +1155,7 @@ class AXPEntityMasterListViewModel {
1154
1155
  field: null,
1155
1156
  logic: 'and',
1156
1157
  operator: null,
1157
- filters: [this.inlineFilters, this.advanceFilters]
1158
+ filters: [this.inlineFilters, this.advanceFilters],
1158
1159
  });
1159
1160
  }
1160
1161
  //
@@ -1168,12 +1169,11 @@ class AXPEntityMasterListViewModel {
1168
1169
  }
1169
1170
  applyViewColumns() {
1170
1171
  const cols = this.view().columns;
1171
- const cloned = this.allAvailableColumns()
1172
- .map(c => {
1173
- const column = this.entityDef.columns?.find(cc => cc.name == c.name);
1174
- const prop = this.entityDef.properties.find(p => p.name == c.name);
1172
+ const cloned = this.allAvailableColumns().map((c) => {
1173
+ const column = this.entityDef.columns?.find((cc) => cc.name == c.name);
1174
+ const prop = this.entityDef.properties.find((p) => p.name == c.name);
1175
1175
  const col = new AXPEntityListViewColumnViewModel(prop, column);
1176
- col.visible = !cols.some(c => c == col.name) && col.visible != false;
1176
+ col.visible = !cols.some((c) => c == col.name) && col.visible != false;
1177
1177
  return col;
1178
1178
  });
1179
1179
  this.columns.set(cloned);
@@ -1185,26 +1185,26 @@ class AXPEntityMasterListViewModel {
1185
1185
  this.applyFilterAndSort();
1186
1186
  }
1187
1187
  addSort() {
1188
- const prop = this.sortableFields().find(c => !this.sortedFields().some(s => s.name == c.name));
1188
+ const prop = this.sortableFields().find((c) => !this.sortedFields().some((s) => s.name == c.name));
1189
1189
  if (prop) {
1190
1190
  this.sortedFields.set([...this.sortedFields(), ...[prop]]);
1191
1191
  }
1192
1192
  }
1193
1193
  removeSort(name) {
1194
- this.sortedFields.set(this.sortedFields().filter(c => c.name != name));
1194
+ this.sortedFields.set(this.sortedFields().filter((c) => c.name != name));
1195
1195
  }
1196
1196
  applyViewSorts() {
1197
- const fileds = this.view().sorts.map(c => ({
1197
+ const fileds = this.view().sorts.map((c) => ({
1198
1198
  name: c.name,
1199
1199
  title: c.name,
1200
- dir: c.dir ?? 'asc'
1200
+ dir: c.dir ?? 'asc',
1201
1201
  }));
1202
1202
  this.sortedFields.set(fileds);
1203
1203
  }
1204
1204
  //****************** Views ******************//
1205
1205
  setView(viewName = null) {
1206
1206
  if (viewName != this.view().name) {
1207
- this.view.set(this.views().find(c => c.name == viewName) ?? this.views()[0]);
1207
+ this.view.set(this.views().find((c) => c.name == viewName) ?? this.views()[0]);
1208
1208
  this.applyViewSorts();
1209
1209
  this.applyViewColumns();
1210
1210
  this.applyFilterAndSort();
@@ -1212,14 +1212,12 @@ class AXPEntityMasterListViewModel {
1212
1212
  }
1213
1213
  //****************** Commands ******************//
1214
1214
  async executeCommand(commandName, data = null) {
1215
- const action = this.allActions().find(c => c.name == commandName &&
1216
- ((this.selectedItems().length ?
1217
- c.scope == AXPEntityCommandScope.Selected :
1218
- c.scope == AXPEntityCommandScope.Individual) ||
1215
+ const action = this.allActions().find((c) => c.name == commandName &&
1216
+ ((this.selectedItems().length ? c.scope == AXPEntityCommandScope.Selected : c.scope == AXPEntityCommandScope.Individual) ||
1219
1217
  c.scope == AXPEntityCommandScope.TypeLevel));
1220
1218
  await this.workflow.execute(commandName, {
1221
1219
  entity: this.entityDef.source,
1222
- data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data
1220
+ data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
1223
1221
  });
1224
1222
  }
1225
1223
  //
@@ -1255,118 +1253,6 @@ const AXPEntityListViewModelResolver = (route, state, service = inject(AXPEntity
1255
1253
  return service.create(moduleName, entityName);
1256
1254
  };
1257
1255
 
1258
- const AXPEntityCreateEvent = createWorkFlowEvent('[Entity] Created!');
1259
- class AXPEntityCreatePopupAction extends AXPWorkflowAction {
1260
- constructor() {
1261
- super(...arguments);
1262
- this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
1263
- this.popupService = inject(AXPopupService);
1264
- this.platform = inject(AXPlatform);
1265
- this.factory = inject(AXPEntityCreateViewModelFactory);
1266
- this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
1267
- }
1268
- async execute(context) {
1269
- const [module, entity] = context.getVariable('entity').split(".");
1270
- const data = context.getVariable('data');
1271
- const entityRef = await this.entityRegistery.resolve(module, entity);
1272
- const com = await this.config.viewers.master.create();
1273
- const result = await this.popupService.open(com, {
1274
- title: `Create New ${entityRef.formats.individual}`,
1275
- size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
1276
- data: {
1277
- vm: await this.factory.create(module, entity, data),
1278
- entity,
1279
- },
1280
- });
1281
- context.setOutput('result', false);
1282
- if (result.data?.save) {
1283
- context.setOutput('result', true);
1284
- context.setVariable('data', result.data.item);
1285
- }
1286
- }
1287
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1288
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityCreatePopupAction }); }
1289
- }
1290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
1291
- type: Injectable
1292
- }] });
1293
- class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
1294
- async execute(context) {
1295
- debugger;
1296
- this.dispatch(AXPEntityCreateEvent({ entity: context.getVariable('entity') }));
1297
- }
1298
- }
1299
- const AXPCreateEntityWorkflow = {
1300
- startStepId: 'show-popup',
1301
- steps: {
1302
- "show-popup": {
1303
- action: 'AXPEntityCreatePopupAction',
1304
- nextSteps: [
1305
- {
1306
- conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
1307
- nextStepId: 'show-toast',
1308
- },
1309
- ],
1310
- },
1311
- "show-toast": {
1312
- action: 'AXPToastAction',
1313
- input: {
1314
- color: 'success',
1315
- title: 'Entity Created',
1316
- content: 'New Record has been successfully created.',
1317
- },
1318
- nextSteps: [
1319
- {
1320
- conditions: [],
1321
- nextStepId: 'dispatch-event',
1322
- },
1323
- ],
1324
- },
1325
- "dispatch-event": {
1326
- action: 'AXPEntityCreateSubmittedAction',
1327
- nextSteps: [
1328
- {
1329
- conditions: [{ type: 'SINGLE', expression: 'context.getVariable("redirect") != false' }],
1330
- nextStepId: 'show-entity',
1331
- },
1332
- ],
1333
- },
1334
- "show-entity": {
1335
- action: 'AXPShowDetailViewAction',
1336
- },
1337
- },
1338
- };
1339
-
1340
- class AXPShowDetailViewAction extends AXPWorkflowAction {
1341
- constructor() {
1342
- super(...arguments);
1343
- this.navigation = inject(AXPWorkflowNavigateAction);
1344
- this.sessionService = inject(AXPSessionService);
1345
- }
1346
- async execute(context) {
1347
- const [module, entity] = context.getVariable('entity').split(".");
1348
- const { id } = context.getVariable('data');
1349
- const newPayload = {
1350
- commands: `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${id}/view`,
1351
- };
1352
- context.setVariable('payload', newPayload);
1353
- this.navigation.execute(context);
1354
- }
1355
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1356
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPShowDetailViewAction }); }
1357
- }
1358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
1359
- type: Injectable
1360
- }] });
1361
- const AXPShowDetailsViewWorkflow = {
1362
- startStepId: 'showDetailView',
1363
- steps: {
1364
- showDetailView: {
1365
- action: 'AXPShowDetailViewAction',
1366
- },
1367
- },
1368
- };
1369
-
1370
1256
  class AXPLookupWidgetViewComponent extends AXPWidgetBase {
1371
1257
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1372
1258
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -1428,79 +1314,97 @@ class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
1428
1314
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLookupWidgetSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1429
1315
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXPLookupWidgetSelectorComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1430
1316
  <div class="ax-p-4 ax-flex ax-flex-col ax-gap-4 ax-overflow-hidden">
1431
- @if(vm.hasInlineFilters())
1432
- {
1433
- <div class="ax-w-full" >
1434
- <ax-search-box [placeholder]="'Search on '+vm.inlineFiltersPlaceholders().join(', ')" [value]="searchTerm"
1435
- (onValueChanged)="handleChangeSearchValue($event)" [axAutoFocus]="true"><ax-clear-button></ax-clear-button></ax-search-box>
1317
+ @if(vm.hasInlineFilters()) {
1318
+ <div class="ax-w-full">
1319
+ <ax-search-box
1320
+ [placeholder]="('widget.lookup.search' | translate) + vm.inlineFiltersPlaceholders().join(', ')"
1321
+ [value]="searchTerm"
1322
+ (onValueChanged)="handleChangeSearchValue($event)"
1323
+ [axAutoFocus]="true"
1324
+ ><ax-clear-button></ax-clear-button
1325
+ ></ax-search-box>
1436
1326
  </div>
1437
1327
  }
1438
- <ax-data-table #grid [showFooter]="false" class="ax-h-[50vh]" [paging]="true" [fetchDataMode]="'manual'"
1439
- [loading]="{ enabled: true, animation: true }" [dataSource]="vm.dataSource"
1440
- (selectedRowsChange)="handleSelectedRowsChange($event)" (onRowClick)="handleRowClick($event)" (onRowDbClick)="handleRowDbClick($event)">
1328
+ <ax-data-table
1329
+ #grid
1330
+ [showFooter]="false"
1331
+ class="ax-h-[50vh]"
1332
+ [paging]="true"
1333
+ [fetchDataMode]="'manual'"
1334
+ [loading]="{ enabled: true, animation: true }"
1335
+ [dataSource]="vm.dataSource"
1336
+ (selectedRowsChange)="handleSelectedRowsChange($event)"
1337
+ (onRowClick)="handleRowClick($event)"
1338
+ (onRowDbClick)="handleRowDbClick($event)"
1339
+ >
1441
1340
  <!-- <ax-select-column fixed="start" [width]="'50px'"></ax-select-column> -->
1442
- @for(col of vm.columns();track col.name) {
1443
- @if(col.visible)
1444
- {
1341
+ @for(col of vm.columns();track col.name) { @if(col.visible) {
1445
1342
  <axp-widget-column-renderer [caption]="col.title" [node]="col.node()"></axp-widget-column-renderer>
1446
- }
1447
- }
1343
+ } }
1448
1344
  </ax-data-table>
1449
1345
  </div>
1450
- <ax-footer>
1451
- <ax-suffix>
1452
- <ax-button look="solid" color="ghost" text="Close" (onClick)="handleCloseClick()"> </ax-button>
1453
- <ax-button look="solid" color="primary" text="Select" (onClick)="handleSelectClick()" [disabled]="focusedRow==null"> </ax-button>
1454
- @if(!vm.canCreate())
1455
- {
1456
- <ax-button look="solid" color="primary" text="Create New" (onClick)="handleCreateNewClick()">
1346
+ <ax-footer>
1347
+ <ax-suffix>
1348
+ <ax-button look="solid" color="ghost" text="Close" (onClick)="handleCloseClick()"> </ax-button>
1349
+ <ax-button look="solid" color="primary" text="Select" (onClick)="handleSelectClick()" [disabled]="focusedRow == null"> </ax-button>
1350
+ @if(!vm.canCreate()) {
1351
+ <ax-button look="solid" color="primary" [text]="'Create-New' | translate | async" (onClick)="handleCreateNewClick()">
1457
1352
  <ax-prefix>
1458
- <ax-icon icon="fa-solid fa-add"></ax-icon>
1353
+ <ax-icon icon="fa-solid fa-add"></ax-icon>
1459
1354
  </ax-prefix>
1460
1355
  </ax-button>
1461
- }
1462
- </ax-suffix>
1463
- </ax-footer>
1464
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i1.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i4.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i5.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i6.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "node", "footerTemplate", "cellTemplate", "headerTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1356
+ }
1357
+ </ax-suffix>
1358
+ </ax-footer>
1359
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i2.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i5.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i7.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "node", "footerTemplate", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1465
1360
  }
1466
1361
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
1467
1362
  type: Component,
1468
1363
  args: [{
1469
1364
  template: `
1470
1365
  <div class="ax-p-4 ax-flex ax-flex-col ax-gap-4 ax-overflow-hidden">
1471
- @if(vm.hasInlineFilters())
1472
- {
1473
- <div class="ax-w-full" >
1474
- <ax-search-box [placeholder]="'Search on '+vm.inlineFiltersPlaceholders().join(', ')" [value]="searchTerm"
1475
- (onValueChanged)="handleChangeSearchValue($event)" [axAutoFocus]="true"><ax-clear-button></ax-clear-button></ax-search-box>
1366
+ @if(vm.hasInlineFilters()) {
1367
+ <div class="ax-w-full">
1368
+ <ax-search-box
1369
+ [placeholder]="('widget.lookup.search' | translate) + vm.inlineFiltersPlaceholders().join(', ')"
1370
+ [value]="searchTerm"
1371
+ (onValueChanged)="handleChangeSearchValue($event)"
1372
+ [axAutoFocus]="true"
1373
+ ><ax-clear-button></ax-clear-button
1374
+ ></ax-search-box>
1476
1375
  </div>
1477
1376
  }
1478
- <ax-data-table #grid [showFooter]="false" class="ax-h-[50vh]" [paging]="true" [fetchDataMode]="'manual'"
1479
- [loading]="{ enabled: true, animation: true }" [dataSource]="vm.dataSource"
1480
- (selectedRowsChange)="handleSelectedRowsChange($event)" (onRowClick)="handleRowClick($event)" (onRowDbClick)="handleRowDbClick($event)">
1377
+ <ax-data-table
1378
+ #grid
1379
+ [showFooter]="false"
1380
+ class="ax-h-[50vh]"
1381
+ [paging]="true"
1382
+ [fetchDataMode]="'manual'"
1383
+ [loading]="{ enabled: true, animation: true }"
1384
+ [dataSource]="vm.dataSource"
1385
+ (selectedRowsChange)="handleSelectedRowsChange($event)"
1386
+ (onRowClick)="handleRowClick($event)"
1387
+ (onRowDbClick)="handleRowDbClick($event)"
1388
+ >
1481
1389
  <!-- <ax-select-column fixed="start" [width]="'50px'"></ax-select-column> -->
1482
- @for(col of vm.columns();track col.name) {
1483
- @if(col.visible)
1484
- {
1390
+ @for(col of vm.columns();track col.name) { @if(col.visible) {
1485
1391
  <axp-widget-column-renderer [caption]="col.title" [node]="col.node()"></axp-widget-column-renderer>
1486
- }
1487
- }
1392
+ } }
1488
1393
  </ax-data-table>
1489
1394
  </div>
1490
- <ax-footer>
1491
- <ax-suffix>
1492
- <ax-button look="solid" color="ghost" text="Close" (onClick)="handleCloseClick()"> </ax-button>
1493
- <ax-button look="solid" color="primary" text="Select" (onClick)="handleSelectClick()" [disabled]="focusedRow==null"> </ax-button>
1494
- @if(!vm.canCreate())
1495
- {
1496
- <ax-button look="solid" color="primary" text="Create New" (onClick)="handleCreateNewClick()">
1395
+ <ax-footer>
1396
+ <ax-suffix>
1397
+ <ax-button look="solid" color="ghost" text="Close" (onClick)="handleCloseClick()"> </ax-button>
1398
+ <ax-button look="solid" color="primary" text="Select" (onClick)="handleSelectClick()" [disabled]="focusedRow == null"> </ax-button>
1399
+ @if(!vm.canCreate()) {
1400
+ <ax-button look="solid" color="primary" [text]="'Create-New' | translate | async" (onClick)="handleCreateNewClick()">
1497
1401
  <ax-prefix>
1498
- <ax-icon icon="fa-solid fa-add"></ax-icon>
1402
+ <ax-icon icon="fa-solid fa-add"></ax-icon>
1499
1403
  </ax-prefix>
1500
1404
  </ax-button>
1501
- }
1502
- </ax-suffix>
1503
- </ax-footer>
1405
+ }
1406
+ </ax-suffix>
1407
+ </ax-footer>
1504
1408
  `,
1505
1409
  standalone: true,
1506
1410
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -1513,9 +1417,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
1513
1417
  AXDropdownButtonModule,
1514
1418
  AXDataTableModule,
1515
1419
  AXSearchBoxModule,
1516
- AXPLayoutBuilderModule
1420
+ AXPLayoutBuilderModule,
1421
+ AXTranslationModule,
1517
1422
  ],
1518
- inputs: []
1423
+ inputs: [],
1519
1424
  }]
1520
1425
  }] });
1521
1426
 
@@ -1626,7 +1531,7 @@ class AXPLookupWidgetSelectorViewModel {
1626
1531
  class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1627
1532
  constructor() {
1628
1533
  super(...arguments);
1629
- this.textField = "title";
1534
+ this.textField = 'title';
1630
1535
  this.validationRules = [];
1631
1536
  this.injector = inject(Injector);
1632
1537
  this.loader = inject(AXP_ENTITY_DEFINITION_LOADER);
@@ -1634,14 +1539,15 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1634
1539
  this.popupService = inject(AXPopupService);
1635
1540
  this.builderService = inject(AXPLayoutBuilderService);
1636
1541
  this.destroyRef = inject(DestroyRef);
1637
- this.displayText = signal("");
1542
+ this.translateService = inject(AXTranslationService);
1543
+ this.displayText = signal('');
1638
1544
  this.selectedItem = signal(null);
1639
1545
  this.searchTerm = signal(null);
1640
1546
  this.isLoading = signal(false);
1641
1547
  this.isOpen = signal(false);
1642
1548
  this.vm = signal(null);
1643
1549
  this.placeholder = computed(() => {
1644
- return 'Search on ' + this.vm()?.inlineFiltersPlaceholders().join(', ');
1550
+ return this.translateService.translateSync('widget.lookup.search') + this.vm()?.inlineFiltersPlaceholders().join(', ');
1645
1551
  });
1646
1552
  }
1647
1553
  async ngOnInit() {
@@ -1652,18 +1558,15 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1652
1558
  //
1653
1559
  this.vm.set(new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef, this.filter));
1654
1560
  //
1655
- this.textField = this.entityDef?.formats.lookup ?? this.entityDef?.properties.find(c => c.name != 'id')?.name ?? "title";
1561
+ this.textField = this.entityDef?.formats.lookup ?? this.entityDef?.properties.find((c) => c.name != 'id')?.name ?? 'title';
1656
1562
  const value = this.getValue();
1657
1563
  if (typeof value == 'object')
1658
- this.displayText.set(this.formatService.format(this.textField, "string", value));
1564
+ this.displayText.set(this.formatService.format(this.textField, 'string', value));
1659
1565
  else if (value != null) {
1660
1566
  await this.findByValue();
1661
1567
  }
1662
1568
  //
1663
- this.builderService
1664
- .onChanged
1665
- .pipe(takeUntilDestroyed(this.destroyRef))
1666
- .subscribe(async (c) => {
1569
+ this.builderService.onChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async (c) => {
1667
1570
  if (c.path == this.path) {
1668
1571
  if (this.getValue())
1669
1572
  await this.findByValue();
@@ -1682,14 +1585,16 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1682
1585
  }
1683
1586
  showSelector() {
1684
1587
  this.isOpen.set(true);
1685
- this.popupService.open(AXPLookupWidgetSelectorComponent, {
1588
+ this.popupService
1589
+ .open(AXPLookupWidgetSelectorComponent, {
1686
1590
  title: `${this.entityDef?.formats.plural} Lookup`,
1687
1591
  size: (this.vm()?.columns().length ?? 0) > 3 ? 'lg' : 'md',
1688
1592
  data: {
1689
1593
  vm: new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef, this.filter),
1690
- searchTerm: this.searchTerm() == this.displayText() ? null : this.searchTerm()
1691
- }
1692
- }).then((e) => {
1594
+ searchTerm: this.searchTerm() == this.displayText() ? null : this.searchTerm(),
1595
+ },
1596
+ })
1597
+ .then((e) => {
1693
1598
  this.isOpen.set(false);
1694
1599
  this.textbox.focus();
1695
1600
  if (e.data?.items) {
@@ -1718,7 +1623,7 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1718
1623
  async handleKeyDown(e) {
1719
1624
  const keyEvent = e.nativeEvent;
1720
1625
  const value = this.searchTerm()?.trim();
1721
- if ((keyEvent.code == "Enter" || keyEvent.code == "NumpadEnter") && value) {
1626
+ if ((keyEvent.code == 'Enter' || keyEvent.code == 'NumpadEnter') && value) {
1722
1627
  this.isLoading.set(true);
1723
1628
  const result = await this.vm()?.find(value);
1724
1629
  if (result?.total == 1) {
@@ -1734,7 +1639,7 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1734
1639
  this.searchTerm.set(null);
1735
1640
  this.displayText.set('');
1736
1641
  this.selectedItem.set(item);
1737
- const text = this.formatService.format(this.textField, "string", item);
1642
+ const text = this.formatService.format(this.textField, 'string', item);
1738
1643
  this.displayText.set(text);
1739
1644
  this.setValue(item.id);
1740
1645
  if (this.expose) {
@@ -1742,8 +1647,8 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1742
1647
  this.builderService.setValue(this.expose, item);
1743
1648
  }
1744
1649
  else if (Array.isArray(this.expose)) {
1745
- this.expose.forEach(i => {
1746
- if (typeof i == "string") {
1650
+ this.expose.forEach((i) => {
1651
+ if (typeof i == 'string') {
1747
1652
  this.builderService.setValue(i, item);
1748
1653
  }
1749
1654
  else {
@@ -1765,48 +1670,54 @@ class AXPLookupWidgetEditComponent extends AXPWidgetBase {
1765
1670
  }
1766
1671
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1767
1672
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "ng-component", inputs: { entity: "entity", conditions: "conditions", expose: "expose" }, viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
1768
- <ax-text-box [ngModel]="displayText()" (onValueChanged)="handleValueChange($event)" [placeholder]="placeholder()" (onKeyUp)="handleKeyDown($event)" (onBlur)="handleOnBlur($event)">
1673
+ <ax-text-box
1674
+ [ngModel]="displayText()"
1675
+ (onValueChanged)="handleValueChange($event)"
1676
+ [placeholder]="placeholder()"
1677
+ (onKeyUp)="handleKeyDown($event)"
1678
+ (onBlur)="handleOnBlur($event)"
1679
+ >
1769
1680
  @for (validation of validationRules; track $index) {
1770
- <ax-validation-rule [rule]="validation.rule" [message]="validation.options?.message" [options]="validation.options"></ax-validation-rule>
1681
+ <ax-validation-rule [rule]="validation.rule" [message]="validation.options?.message" [options]="validation.options"></ax-validation-rule>
1771
1682
  }
1772
1683
  <ax-clear-button (click)="handleClearClick()"></ax-clear-button>
1773
1684
 
1774
1685
  <ax-suffix>
1775
- <ax-button color="ghost" look="twotone" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
1776
- @if(isLoading())
1777
- {
1778
- <ax-loading></ax-loading>
1779
- }
1780
- @else {
1781
- <ax-icon icon="far fa-search">
1782
- </ax-icon>
1783
- }
1784
- </ax-button>
1686
+ <ax-button color="ghost" look="twotone" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
1687
+ @if(isLoading()) {
1688
+ <ax-loading></ax-loading>
1689
+ } @else {
1690
+ <ax-icon icon="far fa-search"> </ax-icon>
1691
+ }
1692
+ </ax-button>
1785
1693
  </ax-suffix>
1786
1694
  </ax-text-box>
1787
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i5$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1695
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i5$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1788
1696
  }
1789
1697
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
1790
1698
  type: Component,
1791
1699
  args: [{
1792
1700
  template: `
1793
- <ax-text-box [ngModel]="displayText()" (onValueChanged)="handleValueChange($event)" [placeholder]="placeholder()" (onKeyUp)="handleKeyDown($event)" (onBlur)="handleOnBlur($event)">
1701
+ <ax-text-box
1702
+ [ngModel]="displayText()"
1703
+ (onValueChanged)="handleValueChange($event)"
1704
+ [placeholder]="placeholder()"
1705
+ (onKeyUp)="handleKeyDown($event)"
1706
+ (onBlur)="handleOnBlur($event)"
1707
+ >
1794
1708
  @for (validation of validationRules; track $index) {
1795
- <ax-validation-rule [rule]="validation.rule" [message]="validation.options?.message" [options]="validation.options"></ax-validation-rule>
1709
+ <ax-validation-rule [rule]="validation.rule" [message]="validation.options?.message" [options]="validation.options"></ax-validation-rule>
1796
1710
  }
1797
1711
  <ax-clear-button (click)="handleClearClick()"></ax-clear-button>
1798
1712
 
1799
1713
  <ax-suffix>
1800
- <ax-button color="ghost" look="twotone" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
1801
- @if(isLoading())
1802
- {
1803
- <ax-loading></ax-loading>
1804
- }
1805
- @else {
1806
- <ax-icon icon="far fa-search">
1807
- </ax-icon>
1808
- }
1809
- </ax-button>
1714
+ <ax-button color="ghost" look="twotone" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
1715
+ @if(isLoading()) {
1716
+ <ax-loading></ax-loading>
1717
+ } @else {
1718
+ <ax-icon icon="far fa-search"> </ax-icon>
1719
+ }
1720
+ </ax-button>
1810
1721
  </ax-suffix>
1811
1722
  </ax-text-box>
1812
1723
  `,
@@ -1821,9 +1732,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
1821
1732
  AXDecoratorModule,
1822
1733
  AXLoadingModule,
1823
1734
  AXValidationModule,
1824
- AXFormModule
1735
+ AXFormModule,
1825
1736
  ],
1826
- inputs: ["entity", "conditions", "expose"]
1737
+ inputs: ['entity', 'conditions', 'expose'],
1827
1738
  }]
1828
1739
  }], propDecorators: { textbox: [{
1829
1740
  type: ViewChild,
@@ -1939,6 +1850,119 @@ const AXPLookupWidget = {
1939
1850
  }
1940
1851
  };
1941
1852
 
1853
+ const AXPEntityCreateEvent = createWorkFlowEvent('[Entity] Created!');
1854
+ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
1855
+ constructor() {
1856
+ super(...arguments);
1857
+ this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
1858
+ this.popupService = inject(AXPopupService);
1859
+ this.platform = inject(AXPlatform);
1860
+ this.factory = inject(AXPEntityCreateViewModelFactory);
1861
+ this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
1862
+ this.translateService = inject(AXTranslationService);
1863
+ }
1864
+ async execute(context) {
1865
+ const [module, entity] = context.getVariable('entity').split('.');
1866
+ const data = context.getVariable('data');
1867
+ const entityRef = await this.entityRegistery.resolve(module, entity);
1868
+ const com = await this.config.viewers.master.create();
1869
+ const result = await this.popupService.open(com, {
1870
+ title: this.translateService.translateSync('create-new') + ' ' + entityRef.formats.individual,
1871
+ size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
1872
+ data: {
1873
+ vm: await this.factory.create(module, entity, data),
1874
+ entity,
1875
+ },
1876
+ });
1877
+ context.setOutput('result', false);
1878
+ if (result.data?.save) {
1879
+ context.setOutput('result', true);
1880
+ context.setVariable('data', result.data.item);
1881
+ }
1882
+ }
1883
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1884
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityCreatePopupAction }); }
1885
+ }
1886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
1887
+ type: Injectable
1888
+ }] });
1889
+ class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
1890
+ async execute(context) {
1891
+ // debugger
1892
+ this.dispatch(AXPEntityCreateEvent({ entity: context.getVariable('entity') }));
1893
+ }
1894
+ }
1895
+ const AXPCreateEntityWorkflow = {
1896
+ startStepId: 'show-popup',
1897
+ steps: {
1898
+ 'show-popup': {
1899
+ action: 'AXPEntityCreatePopupAction',
1900
+ nextSteps: [
1901
+ {
1902
+ conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
1903
+ nextStepId: 'show-toast',
1904
+ },
1905
+ ],
1906
+ },
1907
+ 'show-toast': {
1908
+ action: 'AXPToastAction',
1909
+ input: {
1910
+ color: 'success',
1911
+ title: 'Entity Created',
1912
+ content: 'New Record has been successfully created.',
1913
+ },
1914
+ nextSteps: [
1915
+ {
1916
+ conditions: [],
1917
+ nextStepId: 'dispatch-event',
1918
+ },
1919
+ ],
1920
+ },
1921
+ 'dispatch-event': {
1922
+ action: 'AXPEntityCreateSubmittedAction',
1923
+ nextSteps: [
1924
+ {
1925
+ conditions: [{ type: 'SINGLE', expression: 'context.getVariable("redirect") != false' }],
1926
+ nextStepId: 'show-entity',
1927
+ },
1928
+ ],
1929
+ },
1930
+ 'show-entity': {
1931
+ action: 'AXPShowDetailViewAction',
1932
+ },
1933
+ },
1934
+ };
1935
+
1936
+ class AXPShowDetailViewAction extends AXPWorkflowAction {
1937
+ constructor() {
1938
+ super(...arguments);
1939
+ this.navigation = inject(AXPWorkflowNavigateAction);
1940
+ this.sessionService = inject(AXPSessionService);
1941
+ }
1942
+ async execute(context) {
1943
+ const [module, entity] = context.getVariable('entity').split(".");
1944
+ const { id } = context.getVariable('data');
1945
+ const newPayload = {
1946
+ commands: `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${id}/view`,
1947
+ };
1948
+ context.setVariable('payload', newPayload);
1949
+ this.navigation.execute(context);
1950
+ }
1951
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1952
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPShowDetailViewAction }); }
1953
+ }
1954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
1955
+ type: Injectable
1956
+ }] });
1957
+ const AXPShowDetailsViewWorkflow = {
1958
+ startStepId: 'showDetailView',
1959
+ steps: {
1960
+ showDetailView: {
1961
+ action: 'AXPShowDetailViewAction',
1962
+ },
1963
+ },
1964
+ };
1965
+
1942
1966
  class AXPShowListViewAction extends AXPWorkflowAction {
1943
1967
  constructor() {
1944
1968
  super(...arguments);
@@ -1976,7 +2000,7 @@ function routesFacory() {
1976
2000
  {
1977
2001
  path: ':app/m',
1978
2002
  component: config.viewers.root(),
1979
- // canActivate: [AXPAuthGuard],
2003
+ canActivate: [AXPAuthGuard],
1980
2004
  children: [
1981
2005
  {
1982
2006
  path: ':module',
@@ -2021,7 +2045,7 @@ function routesFacory() {
2021
2045
  }
2022
2046
  class AXPEntityModule {
2023
2047
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2024
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i1$2.AXPWorkflowModule, i6.AXPLayoutBuilderModule] }); }
2048
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i1$2.AXPWorkflowModule, i7.AXPLayoutBuilderModule] }); }
2025
2049
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityModule, providers: [
2026
2050
  {
2027
2051
  provide: ROUTES,
@@ -2033,25 +2057,23 @@ class AXPEntityModule {
2033
2057
  actions: {
2034
2058
  AXPEntityCreatePopupAction,
2035
2059
  AXPEntityPerformDeleteAction,
2036
- "entity-perform-delete": AXPEntityPerformDeleteAction,
2060
+ 'entity-perform-delete': AXPEntityPerformDeleteAction,
2037
2061
  AXPEntityModifySectionPopupAction,
2038
2062
  AXPEntityModifyConfirmedAction,
2039
2063
  AXPShowDetailViewAction,
2040
2064
  AXPEntityCreateSubmittedAction,
2041
- AXPShowListViewAction
2065
+ AXPShowListViewAction,
2042
2066
  },
2043
2067
  workflows: {
2044
2068
  'create-entity': AXPCreateEntityWorkflow,
2045
2069
  'delete-entity': AXPDeleteEntityWorkflow,
2046
2070
  'modify-entity-section': AXPModifyEntitySectionWorkflow,
2047
2071
  'open-entity': AXPShowDetailsViewWorkflow,
2048
- 'show-list-view': AXPShowListViewWorkflow
2072
+ 'show-list-view': AXPShowListViewWorkflow,
2049
2073
  },
2050
2074
  }),
2051
2075
  AXPLayoutBuilderModule.forChild({
2052
- widgets: [
2053
- AXPLookupWidget,
2054
- ],
2076
+ widgets: [AXPLookupWidget],
2055
2077
  })] }); }
2056
2078
  }
2057
2079
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXPEntityModule, decorators: [{
@@ -2063,25 +2085,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
2063
2085
  actions: {
2064
2086
  AXPEntityCreatePopupAction,
2065
2087
  AXPEntityPerformDeleteAction,
2066
- "entity-perform-delete": AXPEntityPerformDeleteAction,
2088
+ 'entity-perform-delete': AXPEntityPerformDeleteAction,
2067
2089
  AXPEntityModifySectionPopupAction,
2068
2090
  AXPEntityModifyConfirmedAction,
2069
2091
  AXPShowDetailViewAction,
2070
2092
  AXPEntityCreateSubmittedAction,
2071
- AXPShowListViewAction
2093
+ AXPShowListViewAction,
2072
2094
  },
2073
2095
  workflows: {
2074
2096
  'create-entity': AXPCreateEntityWorkflow,
2075
2097
  'delete-entity': AXPDeleteEntityWorkflow,
2076
2098
  'modify-entity-section': AXPModifyEntitySectionWorkflow,
2077
2099
  'open-entity': AXPShowDetailsViewWorkflow,
2078
- 'show-list-view': AXPShowListViewWorkflow
2100
+ 'show-list-view': AXPShowListViewWorkflow,
2079
2101
  },
2080
2102
  }),
2081
2103
  AXPLayoutBuilderModule.forChild({
2082
- widgets: [
2083
- AXPLookupWidget,
2084
- ],
2104
+ widgets: [AXPLookupWidget],
2085
2105
  }),
2086
2106
  ],
2087
2107
  exports: [],