@acorex/platform 18.0.2 → 18.0.4

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 (232) hide show
  1. package/common/lib/app/application.types.d.ts +43 -26
  2. package/common/lib/common.module.d.ts +6 -5
  3. package/common/lib/data/data-provider.types.d.ts +1 -1
  4. package/common/lib/data/dexie-storage.service.d.ts +15 -0
  5. package/common/lib/data/entity-data-provider.d.ts +14 -0
  6. package/common/lib/data/index.d.ts +3 -0
  7. package/common/lib/data/storage-service.d.ts +22 -0
  8. package/common/lib/schema/entity/entity.class.d.ts +3 -0
  9. package/common/lib/utils/data-generator.d.ts +2 -0
  10. package/esm2022/common/lib/app/application.types.mjs +1 -1
  11. package/esm2022/common/lib/common.module.mjs +19 -2
  12. package/esm2022/common/lib/data/data-provider.types.mjs +1 -1
  13. package/esm2022/common/lib/data/dexie-storage.service.mjs +36 -0
  14. package/esm2022/common/lib/data/entity-data-provider.mjs +26 -0
  15. package/esm2022/common/lib/data/index.mjs +4 -1
  16. package/esm2022/common/lib/data/storage-service.mjs +5 -0
  17. package/esm2022/common/lib/schema/entity/entity-registery.service.mjs +2 -2
  18. package/esm2022/common/lib/schema/entity/entity.class.mjs +1 -1
  19. package/esm2022/common/lib/utils/data-generator.mjs +22 -1
  20. package/esm2022/common/lib/workflows/common.workflow.mjs +3 -3
  21. package/esm2022/layout/builder/lib/builder/builder.service.mjs +7 -2
  22. package/esm2022/layout/builder/lib/builder/widget.types.mjs +5 -1
  23. package/esm2022/layout/entity/lib/entity-detail-list.viewmodel.mjs +9 -8
  24. package/esm2022/layout/entity/lib/entity-master-create.viewmodel.mjs +34 -21
  25. package/esm2022/layout/entity/lib/entity-master-list.viewmodel.mjs +23 -15
  26. package/esm2022/layout/entity/lib/entity-master-single.viewmodel.mjs +46 -49
  27. package/esm2022/layout/entity/lib/entity-master-update.viewmodel.mjs +9 -7
  28. package/esm2022/layout/entity/lib/entity-registery.service.mjs +2 -2
  29. package/esm2022/layout/entity/lib/entity.module.mjs +13 -4
  30. package/esm2022/layout/entity/lib/entity.viewmodel.mjs +7 -6
  31. package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.mjs +127 -39
  32. package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.component.mjs +83 -37
  33. package/esm2022/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.viewmodel.mjs +34 -23
  34. package/esm2022/layout/entity/lib/workflows/create-entity.workflow.mjs +17 -20
  35. package/esm2022/layout/entity/lib/workflows/delete-entity.workflow.mjs +17 -15
  36. package/esm2022/layout/entity/lib/workflows/modify-section.workflow.mjs +11 -23
  37. package/esm2022/layout/entity/lib/workflows/show-details.workflow.mjs +3 -3
  38. package/esm2022/layout/entity/lib/workflows/show-list.workflow.mjs +35 -0
  39. package/esm2022/layouts/lib/admin/entity-layout/entity-create-view/entity-create-view.component.mjs +3 -3
  40. package/esm2022/layouts/lib/admin/entity-layout/workflows/delete-entity.workflow.mjs +2 -2
  41. package/esm2022/layouts/lib/layout.module.mjs +3 -3
  42. package/esm2022/themes/default/lib/default.module.mjs +3 -3
  43. package/esm2022/themes/default/lib/entity-reuse.strategy.mjs +2 -2
  44. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.mjs +2 -2
  45. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/{entity-list-view.component.mjs → entity-master-list-view.component.mjs} +8 -2
  46. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-sorting/list-view-option-sorting.component.mjs +2 -1
  47. package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.mjs +1 -1
  48. package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-column.component.mjs +2 -2
  49. package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-edit.component.mjs +21 -12
  50. package/esm2022/widgets/lib/editors/date-time-box-widget/date-time-box-widget-view.component.mjs +3 -2
  51. package/esm2022/widgets/lib/editors/number-box-widget/number-box-widget-column.component.mjs +2 -2
  52. package/esm2022/widgets/lib/editors/number-box-widget/number-box-widget-view.component.mjs +2 -2
  53. package/esm2022/workflow/lib/actions/start-workflow.action.mjs +28 -0
  54. package/esm2022/workflow/lib/workflow.module.mjs +7 -2
  55. package/esm2022/workflow/lib/workflow.service.mjs +53 -6
  56. package/esm2022/workflow/lib/workflow.types.mjs +12 -6
  57. package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-DAmNXjDm.mjs → acorex-platform-common-avatar-widget-edit.component-B-of5ssU.mjs} +3 -2
  58. package/fesm2022/{acorex-platform-common-avatar-widget-edit.component-DAmNXjDm.mjs.map → acorex-platform-common-avatar-widget-edit.component-B-of5ssU.mjs.map} +1 -1
  59. package/fesm2022/{acorex-platform-common-avatar-widget-view.component-BlA_cFkP.mjs → acorex-platform-common-avatar-widget-view.component-CJvrSkTv.mjs} +4 -3
  60. package/fesm2022/acorex-platform-common-avatar-widget-view.component-CJvrSkTv.mjs.map +1 -0
  61. package/fesm2022/{acorex-platform-common-boolean-widget-filter.component-CEqibiML.mjs → acorex-platform-common-boolean-widget-filter.component-BTcOjuUm.mjs} +4 -3
  62. package/fesm2022/acorex-platform-common-boolean-widget-filter.component-BTcOjuUm.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-common-checkbox-widget-column.component-BiUHPDqV.mjs → acorex-platform-common-checkbox-widget-column.component-X9d1iY_F.mjs} +4 -3
  64. package/fesm2022/{acorex-platform-common-checkbox-widget-column.component-BiUHPDqV.mjs.map → acorex-platform-common-checkbox-widget-column.component-X9d1iY_F.mjs.map} +1 -1
  65. package/fesm2022/{acorex-platform-common-checkbox-widget-edit.component-BVG9_XXh.mjs → acorex-platform-common-checkbox-widget-edit.component-_jtT03Vn.mjs} +4 -3
  66. package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-_jtT03Vn.mjs.map +1 -0
  67. package/fesm2022/{acorex-platform-common-checkbox-widget-view.component-CfGkMcDi.mjs → acorex-platform-common-checkbox-widget-view.component-nYmtb8bK.mjs} +4 -3
  68. package/fesm2022/{acorex-platform-common-checkbox-widget-view.component-CfGkMcDi.mjs.map → acorex-platform-common-checkbox-widget-view.component-nYmtb8bK.mjs.map} +1 -1
  69. package/fesm2022/{acorex-platform-common-dateTime-widget-column.component-BlXTU887.mjs → acorex-platform-common-dateTime-widget-column.component-5ljYmtHI.mjs} +4 -3
  70. package/fesm2022/acorex-platform-common-dateTime-widget-column.component-5ljYmtHI.mjs.map +1 -0
  71. package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-B0s6FN-g.mjs → acorex-platform-common-dateTime-widget-edit.component-D8FSiqAo.mjs} +4 -3
  72. package/fesm2022/{acorex-platform-common-dateTime-widget-edit.component-B0s6FN-g.mjs.map → acorex-platform-common-dateTime-widget-edit.component-D8FSiqAo.mjs.map} +1 -1
  73. package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-B7KBCsUt.mjs → acorex-platform-common-dateTime-widget-filter.component-Df0DuDtw.mjs} +4 -3
  74. package/fesm2022/{acorex-platform-common-dateTime-widget-filter.component-B7KBCsUt.mjs.map → acorex-platform-common-dateTime-widget-filter.component-Df0DuDtw.mjs.map} +1 -1
  75. package/fesm2022/{acorex-platform-common-dateTime-widget-view.component-Dy7pAkGG.mjs → acorex-platform-common-dateTime-widget-view.component-CjVjQkPh.mjs} +4 -3
  76. package/fesm2022/{acorex-platform-common-dateTime-widget-view.component-Dy7pAkGG.mjs.map → acorex-platform-common-dateTime-widget-view.component-CjVjQkPh.mjs.map} +1 -1
  77. package/fesm2022/{acorex-platform-common-email-widget-column.component-D_UNn2dW.mjs → acorex-platform-common-email-widget-column.component-BgNdL62k.mjs} +4 -3
  78. package/fesm2022/acorex-platform-common-email-widget-column.component-BgNdL62k.mjs.map +1 -0
  79. package/fesm2022/{acorex-platform-common-email-widget-edit.component-DWT24mCM.mjs → acorex-platform-common-email-widget-edit.component-CgHPGccx.mjs} +4 -3
  80. package/fesm2022/{acorex-platform-common-email-widget-edit.component-DWT24mCM.mjs.map → acorex-platform-common-email-widget-edit.component-CgHPGccx.mjs.map} +1 -1
  81. package/fesm2022/{acorex-platform-common-email-widget-view.component-B6puyycL.mjs → acorex-platform-common-email-widget-view.component-C2aQ14k-.mjs} +4 -3
  82. package/fesm2022/{acorex-platform-common-email-widget-view.component-B6puyycL.mjs.map → acorex-platform-common-email-widget-view.component-C2aQ14k-.mjs.map} +1 -1
  83. package/fesm2022/{acorex-platform-common-file-widget-column.component-C1faGR4K.mjs → acorex-platform-common-file-widget-column.component-CwFzLLHt.mjs} +4 -3
  84. package/fesm2022/acorex-platform-common-file-widget-column.component-CwFzLLHt.mjs.map +1 -0
  85. package/fesm2022/{acorex-platform-common-file-widget-edit.component-CTvS9ls8.mjs → acorex-platform-common-file-widget-edit.component-DxoQR4CU.mjs} +4 -3
  86. package/fesm2022/{acorex-platform-common-file-widget-edit.component-CTvS9ls8.mjs.map → acorex-platform-common-file-widget-edit.component-DxoQR4CU.mjs.map} +1 -1
  87. package/fesm2022/{acorex-platform-common-file-widget-filter.component-D4AMg5M0.mjs → acorex-platform-common-file-widget-filter.component-BvG0iaKU.mjs} +4 -3
  88. package/fesm2022/acorex-platform-common-file-widget-filter.component-BvG0iaKU.mjs.map +1 -0
  89. package/fesm2022/{acorex-platform-common-file-widget-view.component-CHI4VCvt.mjs → acorex-platform-common-file-widget-view.component-BC9l3YrO.mjs} +4 -3
  90. package/fesm2022/{acorex-platform-common-file-widget-view.component-CHI4VCvt.mjs.map → acorex-platform-common-file-widget-view.component-BC9l3YrO.mjs.map} +1 -1
  91. package/fesm2022/{acorex-platform-common-gallery-widget-edit.component-CAOctYzV.mjs → acorex-platform-common-gallery-widget-edit.component-BihOIJ9T.mjs} +4 -3
  92. package/fesm2022/{acorex-platform-common-gallery-widget-edit.component-CAOctYzV.mjs.map → acorex-platform-common-gallery-widget-edit.component-BihOIJ9T.mjs.map} +1 -1
  93. package/fesm2022/{acorex-platform-common-gallery-widget-filter.component-lgaYDZeD.mjs → acorex-platform-common-gallery-widget-filter.component-DS1PCIJp.mjs} +4 -3
  94. package/fesm2022/acorex-platform-common-gallery-widget-filter.component-DS1PCIJp.mjs.map +1 -0
  95. package/fesm2022/{acorex-platform-common-gallery-widget-view.component-Ci50jeO5.mjs → acorex-platform-common-gallery-widget-view.component-CnQONVdg.mjs} +4 -3
  96. package/fesm2022/{acorex-platform-common-gallery-widget-view.component-Ci50jeO5.mjs.map → acorex-platform-common-gallery-widget-view.component-CnQONVdg.mjs.map} +1 -1
  97. package/fesm2022/{acorex-platform-common-largetext-widget-edit.component-DFKG-kum.mjs → acorex-platform-common-largetext-widget-edit.component-BCtGkz1a.mjs} +4 -3
  98. package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BCtGkz1a.mjs.map +1 -0
  99. package/fesm2022/{acorex-platform-common-lookup-widget-column.component-CFzCGcqA.mjs → acorex-platform-common-lookup-widget-column.component-Cl-vO5XW.mjs} +4 -3
  100. package/fesm2022/acorex-platform-common-lookup-widget-column.component-Cl-vO5XW.mjs.map +1 -0
  101. package/fesm2022/{acorex-platform-common-lookup-widget-edit.component-CYTSeEOq.mjs → acorex-platform-common-lookup-widget-edit.component-D9UhViUG.mjs} +4 -3
  102. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-D9UhViUG.mjs.map +1 -0
  103. package/fesm2022/{acorex-platform-common-lookup-widget-filter.component-BkxT9_Hh.mjs → acorex-platform-common-lookup-widget-filter.component-RWweQQaO.mjs} +4 -3
  104. package/fesm2022/acorex-platform-common-lookup-widget-filter.component-RWweQQaO.mjs.map +1 -0
  105. package/fesm2022/{acorex-platform-common-lookup-widget-view.component-5YeixMp7.mjs → acorex-platform-common-lookup-widget-view.component-mXo8VADX.mjs} +4 -3
  106. package/fesm2022/acorex-platform-common-lookup-widget-view.component-mXo8VADX.mjs.map +1 -0
  107. package/fesm2022/{acorex-platform-common-map-widget-edit.component-CE3QQBmX.mjs → acorex-platform-common-map-widget-edit.component-SSrR3xxv.mjs} +4 -3
  108. package/fesm2022/acorex-platform-common-map-widget-edit.component-SSrR3xxv.mjs.map +1 -0
  109. package/fesm2022/{acorex-platform-common-map-widget-view.component-Cv4OCTxz.mjs → acorex-platform-common-map-widget-view.component-DrGG3gzg.mjs} +4 -3
  110. package/fesm2022/acorex-platform-common-map-widget-view.component-DrGG3gzg.mjs.map +1 -0
  111. package/fesm2022/{acorex-platform-common-messenger-widget-column.component-CJdh6TKb.mjs → acorex-platform-common-messenger-widget-column.component-BJ_XzNKc.mjs} +4 -3
  112. package/fesm2022/acorex-platform-common-messenger-widget-column.component-BJ_XzNKc.mjs.map +1 -0
  113. package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-kiEHxJia.mjs → acorex-platform-common-messenger-widget-edit.component-B_FG_n0O.mjs} +4 -3
  114. package/fesm2022/{acorex-platform-common-messenger-widget-edit.component-kiEHxJia.mjs.map → acorex-platform-common-messenger-widget-edit.component-B_FG_n0O.mjs.map} +1 -1
  115. package/fesm2022/{acorex-platform-common-messenger-widget-view.component-DzbjgZA7.mjs → acorex-platform-common-messenger-widget-view.component-EBiPO9ds.mjs} +4 -3
  116. package/fesm2022/{acorex-platform-common-messenger-widget-view.component-DzbjgZA7.mjs.map → acorex-platform-common-messenger-widget-view.component-EBiPO9ds.mjs.map} +1 -1
  117. package/fesm2022/{acorex-platform-common-number-widget-edit.component-BRuIP96Y.mjs → acorex-platform-common-number-widget-edit.component-B1XXga-9.mjs} +4 -3
  118. package/fesm2022/acorex-platform-common-number-widget-edit.component-B1XXga-9.mjs.map +1 -0
  119. package/fesm2022/{acorex-platform-common-number-widget-filter.component-jQ4DaFQH.mjs → acorex-platform-common-number-widget-filter.component-B2JCpDjU.mjs} +4 -3
  120. package/fesm2022/{acorex-platform-common-number-widget-filter.component-jQ4DaFQH.mjs.map → acorex-platform-common-number-widget-filter.component-B2JCpDjU.mjs.map} +1 -1
  121. package/fesm2022/{acorex-platform-common-number-widget-view.component-BzUWjT8m.mjs → acorex-platform-common-number-widget-view.component-DD0tkoc4.mjs} +4 -3
  122. package/fesm2022/acorex-platform-common-number-widget-view.component-DD0tkoc4.mjs.map +1 -0
  123. package/fesm2022/{acorex-platform-common-password-widget-column.component-BRzyuK5c.mjs → acorex-platform-common-password-widget-column.component-eyqgQlAt.mjs} +4 -3
  124. package/fesm2022/{acorex-platform-common-password-widget-column.component-BRzyuK5c.mjs.map → acorex-platform-common-password-widget-column.component-eyqgQlAt.mjs.map} +1 -1
  125. package/fesm2022/{acorex-platform-common-password-widget-edit.component-q6R2dw5k.mjs → acorex-platform-common-password-widget-edit.component-C2yNb9Pl.mjs} +4 -3
  126. package/fesm2022/acorex-platform-common-password-widget-edit.component-C2yNb9Pl.mjs.map +1 -0
  127. package/fesm2022/{acorex-platform-common-password-widget-view.component-CKaQItON.mjs → acorex-platform-common-password-widget-view.component-o9S7pwJW.mjs} +4 -3
  128. package/fesm2022/{acorex-platform-common-password-widget-view.component-CKaQItON.mjs.map → acorex-platform-common-password-widget-view.component-o9S7pwJW.mjs.map} +1 -1
  129. package/fesm2022/{acorex-platform-common-phone-widget-column.component-BD7BScjW.mjs → acorex-platform-common-phone-widget-column.component-BL9Xl2XH.mjs} +4 -3
  130. package/fesm2022/{acorex-platform-common-phone-widget-column.component-BD7BScjW.mjs.map → acorex-platform-common-phone-widget-column.component-BL9Xl2XH.mjs.map} +1 -1
  131. package/fesm2022/{acorex-platform-common-phone-widget-edit.component-D8tGKfNj.mjs → acorex-platform-common-phone-widget-edit.component-DSh9zoZj.mjs} +4 -3
  132. package/fesm2022/{acorex-platform-common-phone-widget-edit.component-D8tGKfNj.mjs.map → acorex-platform-common-phone-widget-edit.component-DSh9zoZj.mjs.map} +1 -1
  133. package/fesm2022/{acorex-platform-common-phone-widget-view.component-CFiMsGOB.mjs → acorex-platform-common-phone-widget-view.component-Br3xbaDd.mjs} +4 -3
  134. package/fesm2022/{acorex-platform-common-phone-widget-view.component-CFiMsGOB.mjs.map → acorex-platform-common-phone-widget-view.component-Br3xbaDd.mjs.map} +1 -1
  135. package/fesm2022/{acorex-platform-common-rich-text-widget-column.component-BPzwY_8L.mjs → acorex-platform-common-rich-text-widget-column.component-DDT58tca.mjs} +4 -3
  136. package/fesm2022/{acorex-platform-common-rich-text-widget-column.component-BPzwY_8L.mjs.map → acorex-platform-common-rich-text-widget-column.component-DDT58tca.mjs.map} +1 -1
  137. package/fesm2022/{acorex-platform-common-rich-text-widget-edit.component-CA2xRfVg.mjs → acorex-platform-common-rich-text-widget-edit.component-Dz1toc21.mjs} +4 -3
  138. package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-Dz1toc21.mjs.map +1 -0
  139. package/fesm2022/{acorex-platform-common-rich-text-widget-view.component-DYfTZ64H.mjs → acorex-platform-common-rich-text-widget-view.component-CxTPcEIQ.mjs} +4 -3
  140. package/fesm2022/acorex-platform-common-rich-text-widget-view.component-CxTPcEIQ.mjs.map +1 -0
  141. package/fesm2022/{acorex-platform-common-selection-list-widget-column.component-_MglaOmo.mjs → acorex-platform-common-selection-list-widget-column.component-BCCmg8MI.mjs} +4 -3
  142. package/fesm2022/{acorex-platform-common-selection-list-widget-column.component-_MglaOmo.mjs.map → acorex-platform-common-selection-list-widget-column.component-BCCmg8MI.mjs.map} +1 -1
  143. package/fesm2022/{acorex-platform-common-selection-list-widget-edit.component-QKw_tyOd.mjs → acorex-platform-common-selection-list-widget-edit.component-B5eUdN2R.mjs} +4 -3
  144. package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B5eUdN2R.mjs.map +1 -0
  145. package/fesm2022/{acorex-platform-common-selection-list-widget-filter.component-DRToTnHQ.mjs → acorex-platform-common-selection-list-widget-filter.component-DPpZq1TB.mjs} +4 -3
  146. package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-DPpZq1TB.mjs.map +1 -0
  147. package/fesm2022/{acorex-platform-common-selection-list-widget-view.component-CjDiuUdj.mjs → acorex-platform-common-selection-list-widget-view.component-Bxvd_AKZ.mjs} +4 -3
  148. package/fesm2022/acorex-platform-common-selection-list-widget-view.component-Bxvd_AKZ.mjs.map +1 -0
  149. package/fesm2022/{acorex-platform-common-signature-pad-widget-edit.component-DF29uWl2.mjs → acorex-platform-common-signature-pad-widget-edit.component-CNjYCEi6.mjs} +4 -3
  150. package/fesm2022/{acorex-platform-common-signature-pad-widget-edit.component-DF29uWl2.mjs.map → acorex-platform-common-signature-pad-widget-edit.component-CNjYCEi6.mjs.map} +1 -1
  151. package/fesm2022/{acorex-platform-common-signature-pad-widget-view.component-BWzoR4HM.mjs → acorex-platform-common-signature-pad-widget-view.component-CsiBv_7i.mjs} +4 -3
  152. package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-CsiBv_7i.mjs.map +1 -0
  153. package/fesm2022/{acorex-platform-common-string-widget-filter.component-Di_GFHme.mjs → acorex-platform-common-string-widget-filter.component-CrGt6Bov.mjs} +4 -3
  154. package/fesm2022/acorex-platform-common-string-widget-filter.component-CrGt6Bov.mjs.map +1 -0
  155. package/fesm2022/{acorex-platform-common-text-widget-column.component-BSYd1CbC.mjs → acorex-platform-common-text-widget-column.component-qXusAevm.mjs} +4 -3
  156. package/fesm2022/{acorex-platform-common-text-widget-column.component-BSYd1CbC.mjs.map → acorex-platform-common-text-widget-column.component-qXusAevm.mjs.map} +1 -1
  157. package/fesm2022/{acorex-platform-common-text-widget-edit.component-K9z9N1qw.mjs → acorex-platform-common-text-widget-edit.component-ed0MUYnD.mjs} +4 -3
  158. package/fesm2022/{acorex-platform-common-text-widget-edit.component-K9z9N1qw.mjs.map → acorex-platform-common-text-widget-edit.component-ed0MUYnD.mjs.map} +1 -1
  159. package/fesm2022/{acorex-platform-common-text-widget-view.component-WbZtm_bf.mjs → acorex-platform-common-text-widget-view.component-BpxTaeQW.mjs} +4 -3
  160. package/fesm2022/{acorex-platform-common-text-widget-view.component-WbZtm_bf.mjs.map → acorex-platform-common-text-widget-view.component-BpxTaeQW.mjs.map} +1 -1
  161. package/fesm2022/{acorex-platform-common-toggle-widget-column.component-ZCBSYMuz.mjs → acorex-platform-common-toggle-widget-column.component-BqiUQrmV.mjs} +4 -3
  162. package/fesm2022/{acorex-platform-common-toggle-widget-column.component-ZCBSYMuz.mjs.map → acorex-platform-common-toggle-widget-column.component-BqiUQrmV.mjs.map} +1 -1
  163. package/fesm2022/{acorex-platform-common-toggle-widget-edit.component-rkDfLA-J.mjs → acorex-platform-common-toggle-widget-edit.component-CDG62BJN.mjs} +4 -3
  164. package/fesm2022/acorex-platform-common-toggle-widget-edit.component-CDG62BJN.mjs.map +1 -0
  165. package/fesm2022/{acorex-platform-common-toggle-widget-view.component-DLDIrci1.mjs → acorex-platform-common-toggle-widget-view.component-DWYcIPTd.mjs} +4 -3
  166. package/fesm2022/{acorex-platform-common-toggle-widget-view.component-DLDIrci1.mjs.map → acorex-platform-common-toggle-widget-view.component-DWYcIPTd.mjs.map} +1 -1
  167. package/fesm2022/acorex-platform-common.mjs +252 -149
  168. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  169. package/fesm2022/acorex-platform-layout-builder.mjs +10 -1
  170. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  171. package/fesm2022/acorex-platform-layout-entity.mjs +445 -261
  172. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  173. package/fesm2022/{acorex-platform-layouts-entity-create-view.component-BmSMt95H.mjs → acorex-platform-layouts-entity-create-view.component-fkKPKxlb.mjs} +3 -3
  174. package/fesm2022/acorex-platform-layouts-entity-create-view.component-fkKPKxlb.mjs.map +1 -0
  175. package/fesm2022/acorex-platform-layouts.mjs +4 -4
  176. package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
  177. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Buanq4is.mjs → acorex-platform-themes-default-entity-master-create-view.component-BxYT9KhH.mjs} +2 -2
  178. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BxYT9KhH.mjs.map +1 -0
  179. package/fesm2022/acorex-platform-themes-default.mjs +13 -6
  180. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  181. package/fesm2022/acorex-platform-widgets.mjs +50 -42
  182. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  183. package/fesm2022/acorex-platform-workflow.mjs +184 -104
  184. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  185. package/layout/builder/lib/builder/widget.types.d.ts +3 -0
  186. package/layout/entity/lib/entity-master-create.viewmodel.d.ts +6 -5
  187. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -0
  188. package/layout/entity/lib/entity-master-single.viewmodel.d.ts +10 -5
  189. package/layout/entity/lib/entity-master-update.viewmodel.d.ts +0 -1
  190. package/layout/entity/lib/entity.viewmodel.d.ts +3 -3
  191. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +18 -3
  192. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.component.d.ts +8 -1
  193. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.viewmodel.d.ts +10 -3
  194. package/layout/entity/lib/workflows/create-entity.workflow.d.ts +0 -2
  195. package/layout/entity/lib/workflows/delete-entity.workflow.d.ts +2 -4
  196. package/layout/entity/lib/workflows/modify-section.workflow.d.ts +2 -5
  197. package/layout/entity/lib/workflows/show-list.workflow.d.ts +10 -0
  198. package/package.json +1 -1
  199. package/widgets/lib/editors/date-time-box-widget/date-time-box-widget-edit.component.d.ts +4 -0
  200. package/workflow/lib/actions/start-workflow.action.d.ts +10 -0
  201. package/workflow/lib/workflow.service.d.ts +4 -2
  202. package/workflow/lib/workflow.types.d.ts +3 -1
  203. package/fesm2022/acorex-platform-common-avatar-widget-view.component-BlA_cFkP.mjs.map +0 -1
  204. package/fesm2022/acorex-platform-common-boolean-widget-filter.component-CEqibiML.mjs.map +0 -1
  205. package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-BVG9_XXh.mjs.map +0 -1
  206. package/fesm2022/acorex-platform-common-dateTime-widget-column.component-BlXTU887.mjs.map +0 -1
  207. package/fesm2022/acorex-platform-common-email-widget-column.component-D_UNn2dW.mjs.map +0 -1
  208. package/fesm2022/acorex-platform-common-file-widget-column.component-C1faGR4K.mjs.map +0 -1
  209. package/fesm2022/acorex-platform-common-file-widget-filter.component-D4AMg5M0.mjs.map +0 -1
  210. package/fesm2022/acorex-platform-common-gallery-widget-filter.component-lgaYDZeD.mjs.map +0 -1
  211. package/fesm2022/acorex-platform-common-largetext-widget-edit.component-DFKG-kum.mjs.map +0 -1
  212. package/fesm2022/acorex-platform-common-lookup-widget-column.component-CFzCGcqA.mjs.map +0 -1
  213. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-CYTSeEOq.mjs.map +0 -1
  214. package/fesm2022/acorex-platform-common-lookup-widget-filter.component-BkxT9_Hh.mjs.map +0 -1
  215. package/fesm2022/acorex-platform-common-lookup-widget-view.component-5YeixMp7.mjs.map +0 -1
  216. package/fesm2022/acorex-platform-common-map-widget-edit.component-CE3QQBmX.mjs.map +0 -1
  217. package/fesm2022/acorex-platform-common-map-widget-view.component-Cv4OCTxz.mjs.map +0 -1
  218. package/fesm2022/acorex-platform-common-messenger-widget-column.component-CJdh6TKb.mjs.map +0 -1
  219. package/fesm2022/acorex-platform-common-number-widget-edit.component-BRuIP96Y.mjs.map +0 -1
  220. package/fesm2022/acorex-platform-common-number-widget-view.component-BzUWjT8m.mjs.map +0 -1
  221. package/fesm2022/acorex-platform-common-password-widget-edit.component-q6R2dw5k.mjs.map +0 -1
  222. package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CA2xRfVg.mjs.map +0 -1
  223. package/fesm2022/acorex-platform-common-rich-text-widget-view.component-DYfTZ64H.mjs.map +0 -1
  224. package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-QKw_tyOd.mjs.map +0 -1
  225. package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-DRToTnHQ.mjs.map +0 -1
  226. package/fesm2022/acorex-platform-common-selection-list-widget-view.component-CjDiuUdj.mjs.map +0 -1
  227. package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-BWzoR4HM.mjs.map +0 -1
  228. package/fesm2022/acorex-platform-common-string-widget-filter.component-Di_GFHme.mjs.map +0 -1
  229. package/fesm2022/acorex-platform-common-toggle-widget-edit.component-rkDfLA-J.mjs.map +0 -1
  230. package/fesm2022/acorex-platform-layouts-entity-create-view.component-BmSMt95H.mjs.map +0 -1
  231. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Buanq4is.mjs.map +0 -1
  232. /package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/{entity-list-view.component.d.ts → entity-master-list-view.component.d.ts} +0 -0
@@ -14,15 +14,16 @@ import '@angular/common';
14
14
  import '@acorex/components/button';
15
15
  import '@acorex/core/platform';
16
16
  import '@acorex/components/toast';
17
+ import '@acorex/platform/workflow';
18
+ import '@acorex/components/dialog';
17
19
  import 'lodash-es';
20
+ import 'dexie';
18
21
  import '@acorex/components/skeleton';
19
22
  import '@angular/cdk/portal';
20
23
  import '@acorex/components/data-table';
21
24
  import '@acorex/core/utils';
22
25
  import '@acorex/core/format';
23
26
  import 'rxjs/operators';
24
- import '@acorex/components/dialog';
25
- import '@acorex/platform/workflow';
26
27
 
27
28
  class AXPCheckboxWidgetViewComponent extends AXPWidgetBase {
28
29
  render() {
@@ -67,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
67
68
  }] });
68
69
 
69
70
  export { AXPCheckboxWidgetViewComponent };
70
- //# sourceMappingURL=acorex-platform-common-checkbox-widget-view.component-CfGkMcDi.mjs.map
71
+ //# sourceMappingURL=acorex-platform-common-checkbox-widget-view.component-nYmtb8bK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-checkbox-widget-view.component-CfGkMcDi.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/checkbox/checkbox-widget-view.component.ts"],"sourcesContent":["import { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n@Component({\r\n template: ` <div>\r\n @if(value){ @if(trulyText){\r\n <span [class]=\"negative ? 'ax-text-danger' : 'ax-text-success'\">{{ trulyText }}</span>\r\n }@else {\r\n\r\n <ax-icon class=\"fa-solid fa-check ax-text-success\"> </ax-icon>\r\n } }@else { @if(falsyText){\r\n <span [class]=\"negative ? 'ax-text-success' : 'ax-text-danger'\">{{ falsyText }}</span>\r\n }@else {\r\n\r\n <ax-icon class=\"fa-solid fa-xmark ax-text-danger\"> </ax-icon>\r\n } }\r\n </div>`,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [AXDecoratorModule],\r\n inputs: ['trulyText', 'falsyText', 'negative'],\r\n})\r\nexport class AXPCheckboxWidgetViewComponent extends AXPWidgetBase {\r\n protected value!: boolean;\r\n protected negative!: boolean;\r\n protected trulyText!: boolean;\r\n protected falsyText!: boolean;\r\n\r\n protected override render(): void {\r\n this.value = !!this.rawValue;\r\n }\r\n}\r\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAO,8BAA+B,SAAQ,aAAa,CAAA;IAM5C,MAAM,GAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;KAC9B;8GARU,8BAA8B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,EAlB/B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;AAYH,QAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAGG,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,wBAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAnB1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;AAYH,QAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC5B,oBAAA,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC;AAC/C,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-checkbox-widget-view.component-nYmtb8bK.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/checkbox/checkbox-widget-view.component.ts"],"sourcesContent":["import { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n@Component({\r\n template: ` <div>\r\n @if(value){ @if(trulyText){\r\n <span [class]=\"negative ? 'ax-text-danger' : 'ax-text-success'\">{{ trulyText }}</span>\r\n }@else {\r\n\r\n <ax-icon class=\"fa-solid fa-check ax-text-success\"> </ax-icon>\r\n } }@else { @if(falsyText){\r\n <span [class]=\"negative ? 'ax-text-success' : 'ax-text-danger'\">{{ falsyText }}</span>\r\n }@else {\r\n\r\n <ax-icon class=\"fa-solid fa-xmark ax-text-danger\"> </ax-icon>\r\n } }\r\n </div>`,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [AXDecoratorModule],\r\n inputs: ['trulyText', 'falsyText', 'negative'],\r\n})\r\nexport class AXPCheckboxWidgetViewComponent extends AXPWidgetBase {\r\n protected value!: boolean;\r\n protected negative!: boolean;\r\n protected trulyText!: boolean;\r\n protected falsyText!: boolean;\r\n\r\n protected override render(): void {\r\n this.value = !!this.rawValue;\r\n }\r\n}\r\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAO,8BAA+B,SAAQ,aAAa,CAAA;IAM5C,MAAM,GAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;KAC9B;8GARU,8BAA8B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,EAlB/B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;AAYH,QAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAGG,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,wBAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAnB1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;AAYH,QAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC5B,oBAAA,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC;AAC/C,iBAAA,CAAA;;;;;"}
@@ -14,14 +14,15 @@ import '@angular/common';
14
14
  import '@acorex/components/button';
15
15
  import '@acorex/core/platform';
16
16
  import '@acorex/components/toast';
17
+ import '@acorex/platform/workflow';
18
+ import '@acorex/components/dialog';
17
19
  import 'lodash-es';
20
+ import 'dexie';
18
21
  import '@acorex/components/skeleton';
19
22
  import '@angular/cdk/portal';
20
23
  import '@acorex/components/data-table';
21
24
  import '@acorex/core/utils';
22
25
  import 'rxjs/operators';
23
- import '@acorex/components/dialog';
24
- import '@acorex/platform/workflow';
25
26
 
26
27
  class AXPDateTimeWidgetColumnComponent extends AXPWidgetBase {
27
28
  render() {
@@ -63,4 +64,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
63
64
  }] });
64
65
 
65
66
  export { AXPDateTimeWidgetColumnComponent };
66
- //# sourceMappingURL=acorex-platform-common-dateTime-widget-column.component-BlXTU887.mjs.map
67
+ //# sourceMappingURL=acorex-platform-common-dateTime-widget-column.component-5ljYmtHI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-common-dateTime-widget-column.component-5ljYmtHI.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-column.component.ts"],"sourcesContent":["import { AXDateTimeModule } from '@acorex/core/date-time';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: ` <span [title]=\"convertedValue\">{{ convertedValue }}</span> `,\r\n standalone: true,\r\n imports: [AXFormatModule, AXDateTimeModule],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n inputs: ['context', 'value', 'multiple', 'width', 'format', 'allowResizing'],\r\n})\r\nexport class AXPDateTimeWidgetColumnComponent extends AXPWidgetBase {\r\n protected convertedValue!: string | null;\r\n protected multiple!: boolean;\r\n\r\n override render() {\r\n const rawValue = this.rawValue;\r\n if (rawValue == null) {\r\n this.convertedValue = null;\r\n return;\r\n }\r\n if (this.isArray(rawValue)) {\r\n this.convertedValue = rawValue.map((item: Date) => this.formatValue(new Date(item))).join(', ');\r\n } else {\r\n this.convertedValue = this.formatValue(new Date(rawValue));\r\n }\r\n }\r\n\r\n protected formatValue(value: Date) {\r\n if (this.formats?.default) {\r\n return this.formatService.format(value, 'datetime', { format: this.formats.default });\r\n } else {\r\n return value.toISOString();\r\n }\r\n }\r\n\r\n protected isArray(val: any) {\r\n return Array.isArray(val);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAYM,MAAO,gCAAiC,SAAQ,aAAa,CAAA;IAIxD,MAAM,GAAA;AACb,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;AAC/B,QAAA,IAAI,QAAQ,IAAI,IAAI,EAAE;AACpB,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC3B,OAAO;SACR;AACD,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EA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AAA,EAAA,QAAA,EAAA,CAAA,4DAAA,CAA8D,EAE9D,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,cAAc,8BAAE,gBAAgB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAI/B,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAP5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,CAA8D,4DAAA,CAAA;AACxE,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC;AAC7E,iBAAA,CAAA;;;;;"}
@@ -24,14 +24,15 @@ import 'rxjs';
24
24
  import '@acorex/components/image';
25
25
  import '@acorex/core/platform';
26
26
  import '@acorex/components/toast';
27
+ import '@acorex/platform/workflow';
28
+ import '@acorex/components/dialog';
27
29
  import 'lodash-es';
30
+ import 'dexie';
28
31
  import '@acorex/components/skeleton';
29
32
  import '@angular/cdk/portal';
30
33
  import '@acorex/components/data-table';
31
34
  import '@acorex/core/utils';
32
35
  import 'rxjs/operators';
33
- import '@acorex/components/dialog';
34
- import '@acorex/platform/workflow';
35
36
 
36
37
  class AXPDateTimeWidgetEditComponent extends AXPWidgetEditBase {
37
38
  constructor() {
@@ -195,4 +196,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
195
196
  }] });
196
197
 
197
198
  export { AXPDateTimeWidgetEditComponent };
198
- //# sourceMappingURL=acorex-platform-common-dateTime-widget-edit.component-B0s6FN-g.mjs.map
199
+ //# sourceMappingURL=acorex-platform-common-dateTime-widget-edit.component-D8FSiqAo.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-dateTime-widget-edit.component-B0s6FN-g.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { MockDataService } from '@acorex/platform/mocks';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n selector: 'axp-datetime-widget-edit',\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\r\n @if(multiple){ @for(item of convertedValue();track $index){\r\n <ng-container [ngTemplateOutlet]=\"textBoxTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\r\n } } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"textBoxTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: convertedValue()[0] }\"\r\n ></ng-container>\r\n }\r\n <ng-template #textBoxTemplate let-item>\r\n <ax-datetime-box\r\n [(ngModel)]=\"item.value\"\r\n (onValueChanged)=\"handleValueChange($event, item.id)\"\r\n [format]=\"calendarFormat\"\r\n [minValue]=\"minValue\"\r\n [maxValue]=\"maxValue\"\r\n [placeholder]=\"prop.description\"\r\n [class]=\"multiple ? 'ax-col-start-1 ax-col-end-11 lg:ax-col-end-12' : 'ax-col-start-1 ax-col-end-13'\"\r\n >\r\n @for(vl of validations;track $index) {\r\n <ax-validation-rule [rule]=\"vl.rule\" [options]=\"vl.options\"></ax-validation-rule>\r\n }\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n @if(multiple){\r\n <ax-button\r\n look=\"twotone\"\r\n color=\"danger\"\r\n (onClick)=\"handleRemoveItem(item)\"\r\n class=\" ax-col-start-11 lg:ax-col-start-12 ax-col-end-13 ax-justify-self-end\"\r\n >\r\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\r\n </ax-button>\r\n }\r\n </ng-template>\r\n @if(multiple){\r\n <ax-button\r\n [text]=\"!convertedValue().length ? 'Add New' : 'Add Another'\"\r\n look=\"twotone\"\r\n (onClick)=\"handleAddItem()\"\r\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\r\n >\r\n <ax-prefix>\r\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n }\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, FormsModule, AXFormatModule, AXDateTimeBoxModule, AXDecoratorModule, AXButtonModule, AXFormModule],\r\n inputs: ['multiple'],\r\n})\r\nexport class AXPDateTimeWidgetEditComponent extends AXPWidgetEditBase {\r\n protected mockerService = inject(MockDataService);\r\n\r\n public multiple!: boolean;\r\n public autoSetToday!: boolean;\r\n\r\n\r\n protected minValue: any;\r\n protected maxValue: any;\r\n protected format: string = 'dateTime';\r\n protected calendarFormat!: string;\r\n protected convertedValue: WritableSignal<{ value: Date | null; id: string }[]> = signal([]);\r\n\r\n private changeValueEffect = effect(() => {\r\n if (this.multiple) {\r\n this.value = this.convertedValue().map((i) => i.value);\r\n } else {\r\n this.value = this.convertedValue().map((i) => i.value)[0];\r\n }\r\n });\r\n\r\n ngOnInit(): void {\r\n // ****** Set Format ******\r\n if (this.format === 'date') this.calendarFormat = 'dd/MM/yyyy';\r\n else if (this.format === 'time') this.calendarFormat = 'HH:mm';\r\n else this.calendarFormat = 'dd/MM/yyyy HH:mm';\r\n // ****** Set Value ******\r\n if (!this.value || this.value?.length == 0) {\r\n this.convertedValue.set([{ value: this.getInitValue(), id: this.mockerService.uid() }]);\r\n } else if (Array.isArray(this.value)) {\r\n this.convertedValue.set(this.value.map((item) => ({ value: item ? new Date(item) : this.getInitValue(), id: this.mockerService.uid() })));\r\n } else {\r\n this.convertedValue.set([{ value: this.value ? new Date(this.value) : this.getInitValue(), id: this.mockerService.uid() }]);\r\n }\r\n }\r\n\r\n protected handleAddItem() {\r\n this.convertedValue.update((prev) => [...prev, { value: this.getInitValue(), id: this.mockerService.uid() }]);\r\n }\r\n\r\n protected handleRemoveItem(item: any) {\r\n this.convertedValue.update((prev) => prev.filter((c: any) => c != item));\r\n }\r\n protected handleValueChange(e: AXValueChangedEvent, id: string) {\r\n if (e.isUserInteraction) {\r\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { value: e.value, id: i.id } : i)));\r\n }\r\n }\r\n\r\n private getInitValue(): Date | null {\r\n return this.autoSetToday ? new Date() : null;\r\n }\r\n}\r\n"],"names":["i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEM,MAAO,8BAA+B,SAAQ,iBAAiB,CAAA;AAzDrE,IAAA,WAAA,GAAA;;AA0DY,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAQxC,IAAM,CAAA,MAAA,GAAW,UAAU,CAAC;AAE5B,QAAA,IAAA,CAAA,cAAc,GAAyD,MAAM,CAAC,EAAE,CAAC,CAAC;AAEpF,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,MAAK;AACtC,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;aACxD;iBAAM;gBACL,IAAI,C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EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAG9G,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAzD1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDT,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,CAAC;oBAC1H,MAAM,EAAE,CAAC,UAAU,CAAC;AACrB,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-dateTime-widget-edit.component-D8FSiqAo.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { MockDataService } from '@acorex/platform/mocks';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n selector: 'axp-datetime-widget-edit',\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\r\n @if(multiple){ @for(item of convertedValue();track $index){\r\n <ng-container [ngTemplateOutlet]=\"textBoxTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\r\n } } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"textBoxTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: convertedValue()[0] }\"\r\n ></ng-container>\r\n }\r\n <ng-template #textBoxTemplate let-item>\r\n <ax-datetime-box\r\n [(ngModel)]=\"item.value\"\r\n (onValueChanged)=\"handleValueChange($event, item.id)\"\r\n [format]=\"calendarFormat\"\r\n [minValue]=\"minValue\"\r\n [maxValue]=\"maxValue\"\r\n [placeholder]=\"prop.description\"\r\n [class]=\"multiple ? 'ax-col-start-1 ax-col-end-11 lg:ax-col-end-12' : 'ax-col-start-1 ax-col-end-13'\"\r\n >\r\n @for(vl of validations;track $index) {\r\n <ax-validation-rule [rule]=\"vl.rule\" [options]=\"vl.options\"></ax-validation-rule>\r\n }\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n @if(multiple){\r\n <ax-button\r\n look=\"twotone\"\r\n color=\"danger\"\r\n (onClick)=\"handleRemoveItem(item)\"\r\n class=\" ax-col-start-11 lg:ax-col-start-12 ax-col-end-13 ax-justify-self-end\"\r\n >\r\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\r\n </ax-button>\r\n }\r\n </ng-template>\r\n @if(multiple){\r\n <ax-button\r\n [text]=\"!convertedValue().length ? 'Add New' : 'Add Another'\"\r\n look=\"twotone\"\r\n (onClick)=\"handleAddItem()\"\r\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\r\n >\r\n <ax-prefix>\r\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n }\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, FormsModule, AXFormatModule, AXDateTimeBoxModule, AXDecoratorModule, AXButtonModule, AXFormModule],\r\n inputs: ['multiple'],\r\n})\r\nexport class AXPDateTimeWidgetEditComponent extends AXPWidgetEditBase {\r\n protected mockerService = inject(MockDataService);\r\n\r\n public multiple!: boolean;\r\n public autoSetToday!: boolean;\r\n\r\n\r\n protected minValue: any;\r\n protected maxValue: any;\r\n protected format: string = 'dateTime';\r\n protected calendarFormat!: string;\r\n protected convertedValue: WritableSignal<{ value: Date | null; id: string }[]> = signal([]);\r\n\r\n private changeValueEffect = effect(() => {\r\n if (this.multiple) {\r\n this.value = this.convertedValue().map((i) => i.value);\r\n } else {\r\n this.value = this.convertedValue().map((i) => i.value)[0];\r\n }\r\n });\r\n\r\n ngOnInit(): void {\r\n // ****** Set Format ******\r\n if (this.format === 'date') this.calendarFormat = 'dd/MM/yyyy';\r\n else if (this.format === 'time') this.calendarFormat = 'HH:mm';\r\n else this.calendarFormat = 'dd/MM/yyyy HH:mm';\r\n // ****** Set Value ******\r\n if (!this.value || this.value?.length == 0) {\r\n this.convertedValue.set([{ value: this.getInitValue(), id: this.mockerService.uid() }]);\r\n } else if (Array.isArray(this.value)) {\r\n this.convertedValue.set(this.value.map((item) => ({ value: item ? new Date(item) : this.getInitValue(), id: this.mockerService.uid() })));\r\n } else {\r\n this.convertedValue.set([{ value: this.value ? new Date(this.value) : this.getInitValue(), id: this.mockerService.uid() }]);\r\n }\r\n }\r\n\r\n protected handleAddItem() {\r\n this.convertedValue.update((prev) => [...prev, { value: this.getInitValue(), id: this.mockerService.uid() }]);\r\n }\r\n\r\n protected handleRemoveItem(item: any) {\r\n this.convertedValue.update((prev) => prev.filter((c: any) => c != item));\r\n }\r\n protected handleValueChange(e: AXValueChangedEvent, id: string) {\r\n if (e.isUserInteraction) {\r\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { value: e.value, id: i.id } : i)));\r\n }\r\n }\r\n\r\n private getInitValue(): Date | null {\r\n return this.autoSetToday ? new Date() : null;\r\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}
@@ -21,14 +21,15 @@ import '@acorex/components/image';
21
21
  import '@acorex/components/button';
22
22
  import '@acorex/core/platform';
23
23
  import '@acorex/components/toast';
24
+ import '@acorex/platform/workflow';
25
+ import '@acorex/components/dialog';
24
26
  import 'lodash-es';
27
+ import 'dexie';
25
28
  import '@acorex/components/skeleton';
26
29
  import '@angular/cdk/portal';
27
30
  import '@acorex/components/data-table';
28
31
  import '@acorex/core/utils';
29
32
  import 'rxjs/operators';
30
- import '@acorex/components/dialog';
31
- import '@acorex/platform/workflow';
32
33
 
33
34
  class AXPDateTimeWidgetFilterComponent extends AXPWidgetFilterBase {
34
35
  constructor() {
@@ -230,4 +231,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
230
231
  }] });
231
232
 
232
233
  export { AXPDateTimeWidgetFilterComponent };
233
- //# sourceMappingURL=acorex-platform-common-dateTime-widget-filter.component-B7KBCsUt.mjs.map
234
+ //# sourceMappingURL=acorex-platform-common-dateTime-widget-filter.component-Df0DuDtw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-dateTime-widget-filter.component-B7KBCsUt.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-filter.component.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\r\nimport { AXCalendarService } from '@acorex/core/date-time';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetFilterBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n selector: 'axp-datetime-widget-filter',\r\n template: `\r\n <div class=\"ax-flex-1\">\r\n <ax-select-box [ngModel]=\"selectedItem()\" placeholder=\"Select ...\" (onValueChanged)=\"changeSelectedItem($event)\" [dataSource]=\"dataSource\">\r\n </ax-select-box>\r\n @if(selectedItem()==\"Between\"){\r\n <div class=\"ax-flex ax-gap-2 ax-mt-2\">\r\n <ax-datetime-box\r\n placeholder=\"From\"\r\n [(ngModel)]=\"value.from\"\r\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\r\n >\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n <ax-datetime-box\r\n placeholder=\"To\"\r\n [(ngModel)]=\"value.to\"\r\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\r\n >\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n </div>\r\n } @if(selectedItem()==\"Greater Than\" || selectedItem()==\"Less Than\"){\r\n <div class=\"ax-mt-2\">\r\n <ax-datetime-box [(ngModel)]=\"value\" class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\">\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n </div>\r\n }\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, FormsModule, AXFormatModule, AXDateTimeBoxModule, AXDecoratorModule, AXSelectBoxModule],\r\n outputs: ['valueChange', 'operatorChange'],\r\n inputs: ['value', 'operator'],\r\n})\r\nexport class AXPDateTimeWidgetFilterComponent extends AXPWidgetFilterBase {\r\n protected selectedItem: WritableSignal<string> = signal('');\r\n dataSource: string[] = [];\r\n\r\n private calendarService = inject(AXCalendarService);\r\n private changeValueEffect = effect(() => {\r\n this.getSelectedItemValue(this.selectedItem());\r\n });\r\n\r\n ngOnInit(): void {\r\n if (this.operator == 'greaterThan' || this.operator == 'lessThan') {\r\n this.selectedItem.set(this.convertToTitleCase(this.operator));\r\n } else {\r\n this.selectedItem.set(this.convertToTitleCase(this.value));\r\n }\r\n this.dataSource = [\r\n 'Today',\r\n 'This Week',\r\n 'This Month',\r\n 'Yesterday',\r\n 'Last Week',\r\n 'Last Month',\r\n 'Tomorrow',\r\n 'Next Week',\r\n 'Next Month',\r\n 'Between',\r\n 'Greater Than',\r\n 'Less Than',\r\n ];\r\n }\r\n\r\n protected changeSelectedItem(e: AXValueChangedEvent) {\r\n if (e.isUserInteraction) {\r\n this.selectedItem.set(e.value);\r\n }\r\n }\r\n\r\n protected getSelectedItemValue(itemTitle: string): void {\r\n this.operator = 'between';\r\n const currentDate = this.calendarService.now().date;\r\n const calendar = this.calendarService.calendar;\r\n switch (itemTitle) {\r\n case 'Today':\r\n this.value = {\r\n from: calendar.startOf(currentDate, 'day').date,\r\n to: calendar.endOf(currentDate, 'day').date,\r\n };\r\n break;\r\n case 'This Week':\r\n this.value = {\r\n from: calendar.startOf(currentDate, 'week').date,\r\n to: calendar.endOf(currentDate, 'week').date,\r\n };\r\n break;\r\n case 'This Month':\r\n this.value = {\r\n from: calendar.startOf(currentDate, 'month').date,\r\n to: calendar.endOf(currentDate, 'month').date,\r\n };\r\n break;\r\n case 'Yesterday':\r\n const yesterDay = calendar.add(currentDate, 'day', -1);\r\n this.value = {\r\n from: yesterDay.startOf('day').date,\r\n to: yesterDay.endOf('day').date,\r\n };\r\n break;\r\n case 'Last Week':\r\n const lastWeek = calendar.add(currentDate, 'week', -1);\r\n this.value = {\r\n from: lastWeek.startOf('week').date,\r\n to: lastWeek.endOf('week').date,\r\n };\r\n break;\r\n case 'Last Month':\r\n const lastMonth = calendar.add(currentDate, 'month', -1);\r\n this.value = {\r\n from: lastMonth.startOf('month').date,\r\n to: lastMonth.endOf('month').date,\r\n };\r\n break;\r\n case 'Tomorrow':\r\n const tomorrow = calendar.add(currentDate, 'day', 1);\r\n this.value = {\r\n from: tomorrow.startOf('day').date,\r\n to: tomorrow.endOf('day').date,\r\n };\r\n break;\r\n case 'Next Week':\r\n const nextWeek = calendar.add(currentDate, 'week', 1);\r\n this.value = {\r\n from: nextWeek.startOf('week').date,\r\n to: nextWeek.endOf('week').date,\r\n };\r\n break;\r\n case 'Next Month':\r\n const nextMonth = calendar.add(currentDate, 'month', -1);\r\n this.value = {\r\n from: nextMonth.startOf('month').date,\r\n to: nextMonth.endOf('month').date,\r\n };\r\n break;\r\n case 'Between':\r\n this.value = {\r\n from: '',\r\n to: '',\r\n };\r\n break;\r\n case 'Greater Than':\r\n this.operator = 'greaterThan';\r\n break;\r\n case 'Less Than':\r\n this.operator = 'lessThan';\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n protected convertToTitleCase(str: string) {\r\n return str\r\n .replace(/[A-Z]/g, (match) => ` ${match}`)\r\n .trim()\r\n .replace(/^\\w/, (match) => match.toUpperCase())\r\n .replace(/\\b\\w/g, (match) => match.toUpperCase());\r\n }\r\n}\r\n"],"names":["i1","i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDM,MAAO,gCAAiC,SAAQ,mBAAmB,CAAA;AAtCzE,IAAA,WAAA,GAAA;;AAuCY,QAAA,IAAA,CAAA,YAAY,GAA2B,MAAM,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAU,CAAA,UAAA,GAAa,EAAE,CAAC;AAElB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC5C,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,MAAK;YACtC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;AACjD,SAAC,CAAC,CAAC;AAsHJ,KAAA;IApHC,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,QAAQ,IAAI,aAAa,IAAI,IAAI,CAAC,QAAQ,IAAI,UAAU,EAAE;AACjE,YAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CA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AA,EAAA,OAAA,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,UAAA,EAAA,YAAA,EAAA,WAAA,EAAA,YAAA,EAAA,SAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAInG,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAtC5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;AAC/G,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC;AAC1C,oBAAA,MAAM,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;AAC9B,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-dateTime-widget-filter.component-Df0DuDtw.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-filter.component.ts"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\r\nimport { AXCalendarService } from '@acorex/core/date-time';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetFilterBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n selector: 'axp-datetime-widget-filter',\r\n template: `\r\n <div class=\"ax-flex-1\">\r\n <ax-select-box [ngModel]=\"selectedItem()\" placeholder=\"Select ...\" (onValueChanged)=\"changeSelectedItem($event)\" [dataSource]=\"dataSource\">\r\n </ax-select-box>\r\n @if(selectedItem()==\"Between\"){\r\n <div class=\"ax-flex ax-gap-2 ax-mt-2\">\r\n <ax-datetime-box\r\n placeholder=\"From\"\r\n [(ngModel)]=\"value.from\"\r\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\r\n >\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n <ax-datetime-box\r\n placeholder=\"To\"\r\n [(ngModel)]=\"value.to\"\r\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\"\r\n >\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n </div>\r\n } @if(selectedItem()==\"Greater Than\" || selectedItem()==\"Less Than\"){\r\n <div class=\"ax-mt-2\">\r\n <ax-datetime-box [(ngModel)]=\"value\" class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-5 xl:ax-col-end-4 2xl:ax-col-end-3\">\r\n <ax-clear-button></ax-clear-button>\r\n </ax-datetime-box>\r\n </div>\r\n }\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, FormsModule, AXFormatModule, AXDateTimeBoxModule, AXDecoratorModule, AXSelectBoxModule],\r\n outputs: ['valueChange', 'operatorChange'],\r\n inputs: ['value', 'operator'],\r\n})\r\nexport class AXPDateTimeWidgetFilterComponent extends AXPWidgetFilterBase {\r\n protected selectedItem: WritableSignal<string> = signal('');\r\n dataSource: string[] = [];\r\n\r\n private calendarService = inject(AXCalendarService);\r\n private changeValueEffect = effect(() => {\r\n this.getSelectedItemValue(this.selectedItem());\r\n });\r\n\r\n ngOnInit(): void {\r\n if (this.operator == 'greaterThan' || this.operator == 'lessThan') {\r\n this.selectedItem.set(this.convertToTitleCase(this.operator));\r\n } else {\r\n this.selectedItem.set(this.convertToTitleCase(this.value));\r\n }\r\n this.dataSource = [\r\n 'Today',\r\n 'This Week',\r\n 'This Month',\r\n 'Yesterday',\r\n 'Last Week',\r\n 'Last Month',\r\n 'Tomorrow',\r\n 'Next Week',\r\n 'Next Month',\r\n 'Between',\r\n 'Greater Than',\r\n 'Less Than',\r\n ];\r\n }\r\n\r\n protected changeSelectedItem(e: AXValueChangedEvent) {\r\n if (e.isUserInteraction) {\r\n this.selectedItem.set(e.value);\r\n }\r\n }\r\n\r\n protected getSelectedItemValue(itemTitle: string): void {\r\n this.operator = 'between';\r\n const currentDate = this.calendarService.now().date;\r\n const calendar = this.calendarService.calendar;\r\n switch (itemTitle) {\r\n case 'Today':\r\n this.value = {\r\n from: calendar.startOf(currentDate, 'day').date,\r\n to: calendar.endOf(currentDate, 'day').date,\r\n };\r\n break;\r\n case 'This Week':\r\n this.value = {\r\n from: calendar.startOf(currentDate, 'week').date,\r\n to: calendar.endOf(currentDate, 'week').date,\r\n };\r\n break;\r\n case 'This Month':\r\n this.value = {\r\n from: calendar.startOf(currentDate, 'month').date,\r\n to: calendar.endOf(currentDate, 'month').date,\r\n };\r\n break;\r\n case 'Yesterday':\r\n const yesterDay = calendar.add(currentDate, 'day', -1);\r\n this.value = {\r\n from: yesterDay.startOf('day').date,\r\n to: yesterDay.endOf('day').date,\r\n };\r\n break;\r\n case 'Last Week':\r\n const lastWeek = calendar.add(currentDate, 'week', -1);\r\n this.value = {\r\n from: lastWeek.startOf('week').date,\r\n to: lastWeek.endOf('week').date,\r\n };\r\n break;\r\n case 'Last Month':\r\n const lastMonth = calendar.add(currentDate, 'month', -1);\r\n this.value = {\r\n from: lastMonth.startOf('month').date,\r\n to: lastMonth.endOf('month').date,\r\n };\r\n break;\r\n case 'Tomorrow':\r\n const tomorrow = calendar.add(currentDate, 'day', 1);\r\n this.value = {\r\n from: tomorrow.startOf('day').date,\r\n to: tomorrow.endOf('day').date,\r\n };\r\n break;\r\n case 'Next Week':\r\n const nextWeek = calendar.add(currentDate, 'week', 1);\r\n this.value = {\r\n from: nextWeek.startOf('week').date,\r\n to: nextWeek.endOf('week').date,\r\n };\r\n break;\r\n case 'Next Month':\r\n const nextMonth = calendar.add(currentDate, 'month', -1);\r\n this.value = {\r\n from: nextMonth.startOf('month').date,\r\n to: nextMonth.endOf('month').date,\r\n };\r\n break;\r\n case 'Between':\r\n this.value = {\r\n from: '',\r\n to: '',\r\n };\r\n break;\r\n case 'Greater Than':\r\n this.operator = 'greaterThan';\r\n break;\r\n case 'Less Than':\r\n this.operator = 'lessThan';\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n protected convertToTitleCase(str: string) {\r\n return str\r\n .replace(/[A-Z]/g, (match) => ` ${match}`)\r\n .trim()\r\n .replace(/^\\w/, (match) => match.toUpperCase())\r\n .replace(/\\b\\w/g, (match) => match.toUpperCase());\r\n }\r\n}\r\n"],"names":["i1","i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDM,MAAO,gCAAiC,SAAQ,mBAAmB,CAAA;AAtCzE,IAAA,WAAA,GAAA;;AAuCY,QAAA,IAAA,CAAA,YAAY,GAA2B,MAAM,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAU,CAAA,UAAA,GAAa,EAAE,CAAC;AAElB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC5C,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAA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-14,14 +14,15 @@ import '@angular/common';
14
14
  import '@acorex/components/button';
15
15
  import '@acorex/core/platform';
16
16
  import '@acorex/components/toast';
17
+ import '@acorex/platform/workflow';
18
+ import '@acorex/components/dialog';
17
19
  import 'lodash-es';
20
+ import 'dexie';
18
21
  import '@acorex/components/skeleton';
19
22
  import '@angular/cdk/portal';
20
23
  import '@acorex/components/data-table';
21
24
  import '@acorex/core/utils';
22
25
  import 'rxjs/operators';
23
- import '@acorex/components/dialog';
24
- import '@acorex/platform/workflow';
25
26
 
26
27
  class AXPDateTimeWidgetViewComponent extends AXPWidgetBase {
27
28
  render() {
@@ -90,4 +91,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
90
91
  }] });
91
92
 
92
93
  export { AXPDateTimeWidgetViewComponent };
93
- //# sourceMappingURL=acorex-platform-common-dateTime-widget-view.component-Dy7pAkGG.mjs.map
94
+ //# sourceMappingURL=acorex-platform-common-dateTime-widget-view.component-CjVjQkPh.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-dateTime-widget-view.component-Dy7pAkGG.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-view.component.ts"],"sourcesContent":["import { AXDateTimeModule } from '@acorex/core/date-time';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: `\r\n @if(multiple && isArray(convertedValue)){\r\n <div class=\"ax-flex ax-flex-col ax-gap-1\">\r\n @for(value of convertedValue; track $index){\r\n <span>{{ value }}</span>\r\n }\r\n </div>\r\n }@else{\r\n <span>{{ convertedValue }}</span>\r\n }\r\n `,\r\n standalone: true,\r\n imports: [AXFormatModule, AXDateTimeModule],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n inputs: ['context', 'value', 'multiple'],\r\n})\r\nexport class AXPDateTimeWidgetViewComponent extends AXPWidgetBase {\r\n protected convertedValue!: string | null;\r\n protected multiple!: boolean;\r\n\r\n override render() {\r\n const rawValue = this.rawValue;\r\n if (rawValue == null) {\r\n this.convertedValue = null;\r\n return;\r\n }\r\n if (this.isArray(rawValue)) {\r\n // if (this.multiple) {\r\n console.log(rawValue);\r\n this.convertedValue = rawValue.map((item: Date) => this.formatValue(new Date(item)));\r\n // } else {\r\n // this.convertedValue = this.formatValue(rawValue[0]);\r\n // }\r\n } else {\r\n this.convertedValue = this.formatValue(new Date(rawValue));\r\n }\r\n\r\n // const value = new Date(rawValue);\r\n // this.formatValue(value);\r\n }\r\n\r\n protected formatValue(value: Date) {\r\n if (this.formats?.default) {\r\n return this.formatService.format(new Date(value), 'datetime', { format: this.formats.default });\r\n } else {\r\n return value.toISOString();\r\n }\r\n }\r\n\r\n protected isArray(val: any) {\r\n return Array.isArray(val);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAO,8BAA+B,SAAQ,aAAa,CAAA;IAItD,MAAM,GAAA;AACb,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;AAC/B,QAAA,IAAI,QAAQ,IAAI,IAAI,EAAE;AACpB,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC3B,OAAO;SACR;AACD,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;;AAE1B,YAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACtB,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAU,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;;;SAItF;aAAM;AACL,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC5D;;;KAIF;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A;;;;;;;;;;AAUT,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC;AACzC,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-dateTime-widget-view.component-CjVjQkPh.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/dateTime/dateTime-widget-view.component.ts"],"sourcesContent":["import { AXDateTimeModule } from '@acorex/core/date-time';\r\nimport { AXFormatModule } from '@acorex/core/format';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: `\r\n @if(multiple && isArray(convertedValue)){\r\n <div class=\"ax-flex ax-flex-col ax-gap-1\">\r\n @for(value of convertedValue; track $index){\r\n <span>{{ value }}</span>\r\n }\r\n </div>\r\n }@else{\r\n <span>{{ convertedValue }}</span>\r\n }\r\n `,\r\n standalone: true,\r\n imports: [AXFormatModule, AXDateTimeModule],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n inputs: ['context', 'value', 'multiple'],\r\n})\r\nexport class AXPDateTimeWidgetViewComponent extends AXPWidgetBase {\r\n protected convertedValue!: string | null;\r\n protected multiple!: boolean;\r\n\r\n override render() {\r\n const rawValue = this.rawValue;\r\n if (rawValue == null) {\r\n this.convertedValue = null;\r\n return;\r\n }\r\n if (this.isArray(rawValue)) {\r\n // if (this.multiple) {\r\n console.log(rawValue);\r\n this.convertedValue = rawValue.map((item: Date) => this.formatValue(new Date(item)));\r\n // } else {\r\n // this.convertedValue = this.formatValue(rawValue[0]);\r\n // }\r\n } else {\r\n this.convertedValue = this.formatValue(new Date(rawValue));\r\n }\r\n\r\n // const value = new Date(rawValue);\r\n // this.formatValue(value);\r\n }\r\n\r\n protected formatValue(value: Date) {\r\n if (this.formats?.default) {\r\n return this.formatService.format(new Date(value), 'datetime', { format: this.formats.default });\r\n } else {\r\n return value.toISOString();\r\n }\r\n }\r\n\r\n protected isArray(val: any) {\r\n return Array.isArray(val);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAO,8BAA+B,SAAQ,aAAa,CAAA;IAItD,MAAM,GAAA;AACb,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;AAC/B,QAAA,IAAI,QAAQ,IAAI,IAAI,EAAE;AACpB,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC3B,OAAO;SACR;AACD,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;;AAE1B,YAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACtB,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAU,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;;;SAItF;aAAM;AACL,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC5D;;;KAIF;AAES,IAAA,WAAW,CAAC,KAAW,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE;YACzB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;SACjG;aAAM;AACL,YAAA,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;SAC5B;KACF;AAES,IAAA,OAAO,CAAC,GAAQ,EAAA;AACxB,QAAA,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;KAC3B;8GAnCU,8BAA8B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,EAhB/B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;GAUT,EAES,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,cAAc,8BAAE,gBAAgB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAI/B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAjB1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;AAUT,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC;AACzC,iBAAA,CAAA;;;;;"}
@@ -14,15 +14,16 @@ import '@angular/common';
14
14
  import '@acorex/components/button';
15
15
  import '@acorex/core/platform';
16
16
  import '@acorex/components/toast';
17
+ import '@acorex/platform/workflow';
18
+ import '@acorex/components/dialog';
17
19
  import 'lodash-es';
20
+ import 'dexie';
18
21
  import '@acorex/components/skeleton';
19
22
  import '@angular/cdk/portal';
20
23
  import '@acorex/components/data-table';
21
24
  import '@acorex/core/utils';
22
25
  import '@acorex/core/format';
23
26
  import 'rxjs/operators';
24
- import '@acorex/components/dialog';
25
- import '@acorex/platform/workflow';
26
27
 
27
28
  class AXPEmailWidgetColumnComponent extends AXPWidgetBase {
28
29
  constructor() {
@@ -94,4 +95,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
94
95
  }] });
95
96
 
96
97
  export { AXPEmailWidgetColumnComponent };
97
- //# sourceMappingURL=acorex-platform-common-email-widget-column.component-D_UNn2dW.mjs.map
98
+ //# sourceMappingURL=acorex-platform-common-email-widget-column.component-BgNdL62k.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-common-email-widget-column.component-BgNdL62k.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-column.component.ts"],"sourcesContent":["import { AXTooltipModule } from '@acorex/components/tooltip';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n@Component({\r\n selector: 'axp-email-widget-column',\r\n template: `<div>\r\n @if(multiple && list.length>1){\r\n <div [title]=\"text\">{{ dot3(text) }}</div>\r\n }@else {\r\n <div>\r\n @if(list && list.length){\r\n {{ list[0].value }}\r\n }@else { - }\r\n </div>\r\n\r\n }\r\n </div>`,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [AXTooltipModule],\r\n inputs: ['context', 'multiple', 'width', 'hasLabel', 'allowResizing'],\r\n})\r\nexport class AXPEmailWidgetColumnComponent extends AXPWidgetBase {\r\n protected list: { value: string; label: string }[] = [];\r\n protected text: string = '';\r\n protected multiple!: boolean;\r\n protected hasLabel!: boolean;\r\n\r\n protected dot3(text: string) {\r\n if (this.multiple) return text.split('\\n')[0] + '...';\r\n else return text.split('\\n')[0];\r\n }\r\n\r\n protected override render(): void {\r\n if (this.rawValue) {\r\n const rawValue = this.rawValue;\r\n this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];\r\n this.text = this.list.map((item) => item.value).join('\\n');\r\n }\r\n }\r\n\r\n private extractItem(item: any): any {\r\n return typeof item == 'object'\r\n ? {\r\n value: item.value ?? '-',\r\n type: item.type ?? 'primary',\r\n label: item.label,\r\n }\r\n : {\r\n value: item,\r\n type: 'primary',\r\n label: null,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAO,6BAA8B,SAAQ,aAAa,CAAA;AAnBhE,IAAA,WAAA,GAAA;;QAoBY,IAAI,CAAA,IAAA,GAAuC,EAAE,CAAC;QAC9C,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;AA8B7B,KAAA;AA1BW,IAAA,IAAI,CAAC,IAAY,EAAA;QACzB,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;;YACjD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KACjC;IAEkB,MAAM,GAAA;AACvB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;AAC/B,YAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC9G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAA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AA;kBAnBzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;AAWH,QAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,CAAC;AACtE,iBAAA,CAAA;;;;;"}
@@ -25,15 +25,16 @@ import '@ngrx/store';
25
25
  import 'rxjs';
26
26
  import '@acorex/components/image';
27
27
  import '@acorex/components/toast';
28
+ import '@acorex/platform/workflow';
29
+ import '@acorex/components/dialog';
28
30
  import 'lodash-es';
31
+ import 'dexie';
29
32
  import '@acorex/components/skeleton';
30
33
  import '@angular/cdk/portal';
31
34
  import '@acorex/components/data-table';
32
35
  import '@acorex/core/utils';
33
36
  import '@acorex/core/format';
34
37
  import 'rxjs/operators';
35
- import '@acorex/components/dialog';
36
- import '@acorex/platform/workflow';
37
38
 
38
39
  class AXPEmailWidgetEditComponent extends AXPWidgetEditBase {
39
40
  constructor() {
@@ -266,4 +267,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
266
267
  }] });
267
268
 
268
269
  export { AXPEmailWidgetEditComponent };
269
- //# sourceMappingURL=acorex-platform-common-email-widget-edit.component-DWT24mCM.mjs.map
270
+ //# sourceMappingURL=acorex-platform-common-email-widget-edit.component-CgHPGccx.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-email-widget-edit.component-DWT24mCM.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\nimport { MockDataService } from '@acorex/platform/mocks';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\r\n <ng-container *ngIf=\"multiple\">\r\n @for(item of convertedValue();track item?.value) {\r\n <ax-text-box\r\n [(ngModel)]=\"item.value\"\r\n (onValueChanged)=\"handleEmailChange($event, item.id)\"\r\n type=\"email\"\r\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-8\"\r\n [class.lg:!ax-col-end-12]=\"!hasLabel\"\r\n >\r\n </ax-text-box>\r\n @if(hasLabel){\r\n <ax-select-box\r\n [dataSource]=\"['Primary', 'Secondary']\"\r\n [(ngModel)]=\"item.label\"\r\n (onValueChanged)=\"handleLabelChange($event, item.id)\"\r\n class=\"ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-12\"\r\n >\r\n </ax-select-box>\r\n }\r\n <ax-button\r\n look=\"twotone\"\r\n color=\"danger\"\r\n (onClick)=\"handleRemoveItem(item)\"\r\n class=\"ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 lg:ax-col-end-13 ax-justify-self-end\"\r\n >\r\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\r\n </ax-button>\r\n }\r\n </ng-container>\r\n <ng-container *ngIf=\"!multiple\">\r\n <div class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-8\" [class.lg:!ax-col-end-13]=\"!hasLabel\">\r\n <ax-text-box\r\n [(ngModel)]=\"convertedValue()[0].value\"\r\n (onValueChanged)=\"handleEmailChange($event, convertedValue()[0].id)\"\r\n type=\"email\"\r\n >\r\n @for(vl of validations;track $index) {\r\n <ax-validation-rule [rule]=\"vl.rule\" [options]=\"vl.options\"></ax-validation-rule>\r\n }\r\n </ax-text-box>\r\n </div>\r\n @if(hasLabel){\r\n <ax-select-box\r\n [dataSource]=\"['Primary', 'Secondary']\"\r\n [(ngModel)]=\"convertedValue()[0].label\"\r\n (onValueChanged)=\"handleLabelChange($event, convertedValue()[0].id)\"\r\n class=\"ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-13\"\r\n >\r\n </ax-select-box>\r\n }\r\n </ng-container>\r\n\r\n <ax-button\r\n *ngIf=\"multiple\"\r\n [text]=\"convertedValue().length == 0 ? 'Add New' : 'Add Another'\"\r\n look=\"twotone\"\r\n (onClick)=\"handleAddItem()\"\r\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\r\n >\r\n <ax-prefix>\r\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n CommonModule,\r\n AXButtonModule,\r\n FormsModule,\r\n AXTextBoxModule,\r\n AXDecoratorModule,\r\n AXSelectBoxModule,\r\n AXFormModule,\r\n ],\r\n inputs: ['multiple', 'hasLabel'],\r\n})\r\nexport class AXPEmailWidgetEditComponent extends AXPWidgetEditBase<any> {\r\n protected mockerService = inject(MockDataService);\r\n\r\n protected platform = inject(AXPlatform);\r\n protected multiple!: boolean;\r\n protected hasLabel!: boolean;\r\n protected convertedValue: WritableSignal<{ value: string; label?: string; id: string }[]> = signal([]);\r\n\r\n private changeValueEffect = effect(() => {\r\n if (this.multiple) {\r\n if (this.hasLabel) this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }));\r\n else this.value = this.convertedValue().map((i) => i.value);\r\n } else {\r\n if (this.hasLabel) this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }))[0];\r\n else this.value = this.convertedValue().map((i) => i.value)[0];\r\n }\r\n });\r\n\r\n protected handleEmailChange(e: AXValueChangedEvent, id: string) {\r\n if (e.isUserInteraction) {\r\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, value: e.value } : i)));\r\n }\r\n }\r\n protected handleLabelChange(e: AXValueChangedEvent, id: string) {\r\n if (e.isUserInteraction) {\r\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, label: e.value } : i)));\r\n }\r\n }\r\n\r\n protected handleAddItem() {\r\n // this.value.push({ label: 'Primary', value: undefined });\r\n this.convertedValue.update((prev) => [\r\n ...prev,\r\n { label: this.hasLabel ? 'Primary' : '', value: '', id: this.mockerService.uid() },\r\n ]);\r\n }\r\n\r\n protected handleRemoveItem(item: any) {\r\n this.convertedValue.update((prev) => prev.filter((c) => c != item));\r\n }\r\n\r\n ngOnInit(): void {\r\n // Initialize with an empty array if there's no value or it's empty\r\n if (!this.value || this.value.length === 0) {\r\n this.initializeEmptyValue();\r\n return;\r\n }\r\n\r\n // Process the input based on `multiple` and `hasLabel`\r\n if (this.multiple) {\r\n this.handleMultipleValue();\r\n } else {\r\n this.handleSingleValue();\r\n }\r\n }\r\n\r\n private initializeEmptyValue(): void {\r\n this.convertedValue.set([{ value: '', label: '', id: this.mockerService.uid() }]);\r\n }\r\n\r\n private handleMultipleValue(): void {\r\n const newValue = this.value.map((item: any) => ({\r\n value: this.hasLabel ? item.value : item,\r\n label: this.hasLabel ? item.label : null,\r\n id: this.mockerService.uid(),\r\n }));\r\n this.convertedValue.set(newValue);\r\n }\r\n\r\n private handleSingleValue(): void {\r\n const newValue = [\r\n {\r\n value: this.hasLabel ? this.value.value : this.value,\r\n label: this.hasLabel ? this.value.label : null,\r\n id: this.mockerService.uid(),\r\n },\r\n ];\r\n this.convertedValue.set(newValue);\r\n }\r\n}\r\n"],"names":["i3","i5","i7"],"mappings":";;;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;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,YAAY;AACb,qBAAA;AACD,oBAAA,MAAM,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;AACjC,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-email-widget-edit.component-CgHPGccx.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXValueChangedEvent } from '@acorex/components/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXFormModule } from '@acorex/components/form';\r\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\nimport { MockDataService } from '@acorex/platform/mocks';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, WritableSignal, effect, inject, signal } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\r\n <ng-container *ngIf=\"multiple\">\r\n @for(item of convertedValue();track item?.value) {\r\n <ax-text-box\r\n [(ngModel)]=\"item.value\"\r\n (onValueChanged)=\"handleEmailChange($event, item.id)\"\r\n type=\"email\"\r\n class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-8\"\r\n [class.lg:!ax-col-end-12]=\"!hasLabel\"\r\n >\r\n </ax-text-box>\r\n @if(hasLabel){\r\n <ax-select-box\r\n [dataSource]=\"['Primary', 'Secondary']\"\r\n [(ngModel)]=\"item.label\"\r\n (onValueChanged)=\"handleLabelChange($event, item.id)\"\r\n class=\"ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-12\"\r\n >\r\n </ax-select-box>\r\n }\r\n <ax-button\r\n look=\"twotone\"\r\n color=\"danger\"\r\n (onClick)=\"handleRemoveItem(item)\"\r\n class=\"ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 lg:ax-col-end-13 ax-justify-self-end\"\r\n >\r\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\r\n </ax-button>\r\n }\r\n </ng-container>\r\n <ng-container *ngIf=\"!multiple\">\r\n <div class=\"ax-col-start-1 ax-col-end-13 lg:ax-col-end-8\" [class.lg:!ax-col-end-13]=\"!hasLabel\">\r\n <ax-text-box\r\n [(ngModel)]=\"convertedValue()[0].value\"\r\n (onValueChanged)=\"handleEmailChange($event, convertedValue()[0].id)\"\r\n type=\"email\"\r\n >\r\n @for(vl of validations;track $index) {\r\n <ax-validation-rule [rule]=\"vl.rule\" [options]=\"vl.options\"></ax-validation-rule>\r\n }\r\n </ax-text-box>\r\n </div>\r\n @if(hasLabel){\r\n <ax-select-box\r\n [dataSource]=\"['Primary', 'Secondary']\"\r\n [(ngModel)]=\"convertedValue()[0].label\"\r\n (onValueChanged)=\"handleLabelChange($event, convertedValue()[0].id)\"\r\n class=\"ax-col-start-1 ax-col-end-11 lg:ax-col-start-8 lg:ax-col-end-13\"\r\n >\r\n </ax-select-box>\r\n }\r\n </ng-container>\r\n\r\n <ax-button\r\n *ngIf=\"multiple\"\r\n [text]=\"convertedValue().length == 0 ? 'Add New' : 'Add Another'\"\r\n look=\"twotone\"\r\n (onClick)=\"handleAddItem()\"\r\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\r\n >\r\n <ax-prefix>\r\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n CommonModule,\r\n AXButtonModule,\r\n FormsModule,\r\n AXTextBoxModule,\r\n AXDecoratorModule,\r\n AXSelectBoxModule,\r\n AXFormModule,\r\n ],\r\n inputs: ['multiple', 'hasLabel'],\r\n})\r\nexport class AXPEmailWidgetEditComponent extends AXPWidgetEditBase<any> {\r\n protected mockerService = inject(MockDataService);\r\n\r\n protected platform = inject(AXPlatform);\r\n protected multiple!: boolean;\r\n protected hasLabel!: boolean;\r\n protected convertedValue: WritableSignal<{ value: string; label?: string; id: string }[]> = signal([]);\r\n\r\n private changeValueEffect = effect(() => {\r\n if (this.multiple) {\r\n if (this.hasLabel) this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }));\r\n else this.value = this.convertedValue().map((i) => i.value);\r\n } else {\r\n if (this.hasLabel) this.value = this.convertedValue().map((i) => ({ value: i.value, label: i.label }))[0];\r\n else this.value = this.convertedValue().map((i) => i.value)[0];\r\n }\r\n });\r\n\r\n protected handleEmailChange(e: AXValueChangedEvent, id: string) {\r\n if (e.isUserInteraction) {\r\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, value: e.value } : i)));\r\n }\r\n }\r\n protected handleLabelChange(e: AXValueChangedEvent, id: string) {\r\n if (e.isUserInteraction) {\r\n this.convertedValue.update((prev) => prev.map((i) => (i.id === id ? { ...i, label: e.value } : i)));\r\n }\r\n }\r\n\r\n protected handleAddItem() {\r\n // this.value.push({ label: 'Primary', value: undefined });\r\n this.convertedValue.update((prev) => [\r\n ...prev,\r\n { label: this.hasLabel ? 'Primary' : '', value: '', id: this.mockerService.uid() },\r\n ]);\r\n }\r\n\r\n protected handleRemoveItem(item: any) {\r\n this.convertedValue.update((prev) => prev.filter((c) => c != item));\r\n }\r\n\r\n ngOnInit(): void {\r\n // Initialize with an empty array if there's no value or it's empty\r\n if (!this.value || this.value.length === 0) {\r\n this.initializeEmptyValue();\r\n return;\r\n }\r\n\r\n // Process the input based on `multiple` and `hasLabel`\r\n if (this.multiple) {\r\n this.handleMultipleValue();\r\n } else {\r\n this.handleSingleValue();\r\n }\r\n }\r\n\r\n private initializeEmptyValue(): void {\r\n this.convertedValue.set([{ value: '', label: '', id: this.mockerService.uid() }]);\r\n }\r\n\r\n private handleMultipleValue(): void {\r\n const newValue = this.value.map((item: any) => ({\r\n value: this.hasLabel ? item.value : item,\r\n label: this.hasLabel ? item.label : null,\r\n id: this.mockerService.uid(),\r\n }));\r\n this.convertedValue.set(newValue);\r\n }\r\n\r\n private handleSingleValue(): void {\r\n const newValue = [\r\n {\r\n value: this.hasLabel ? this.value.value : this.value,\r\n label: this.hasLabel ? this.value.label : null,\r\n id: this.mockerService.uid(),\r\n },\r\n ];\r\n this.convertedValue.set(newValue);\r\n }\r\n}\r\n"],"names":["i3","i5","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FM,MAAO,2BAA4B,SAAQ,iBAAsB,CAAA;AAjFvE,IAAA,WAAA,GAAA;;AAkFY,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAExC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAG9B,QAAA,IAAA,CAAA,cAAc,GAAoE,MAAM,CAAC,EAAE,CAAC,CAAC;AAE/F,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,MAAK;AACtC,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,IAAI,IAAI,CAAC,QAAQ;AAAE,oBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;;AAClG,oBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;aAC7D;iBAAM;gBACL,IAAI,IAAI,CAAC,QAAQ;AAAE,oBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,GA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2B,EAAA,UAAA,EAAA,CAAA;kBAjFvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkET,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,eAAe;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,YAAY;AACb,qBAAA;AACD,oBAAA,MAAM,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;AACjC,iBAAA,CAAA;;;;;"}
@@ -16,15 +16,16 @@ import '@acorex/components/image';
16
16
  import '@acorex/components/button';
17
17
  import '@acorex/core/platform';
18
18
  import '@acorex/components/toast';
19
+ import '@acorex/platform/workflow';
20
+ import '@acorex/components/dialog';
19
21
  import 'lodash-es';
22
+ import 'dexie';
20
23
  import '@acorex/components/skeleton';
21
24
  import '@angular/cdk/portal';
22
25
  import '@acorex/components/data-table';
23
26
  import '@acorex/core/utils';
24
27
  import '@acorex/core/format';
25
28
  import 'rxjs/operators';
26
- import '@acorex/components/dialog';
27
- import '@acorex/platform/workflow';
28
29
 
29
30
  class AXPEmailWidgetViewComponent extends AXPWidgetBase {
30
31
  constructor() {
@@ -127,4 +128,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
127
128
  }] });
128
129
 
129
130
  export { AXPEmailWidgetViewComponent };
130
- //# sourceMappingURL=acorex-platform-common-email-widget-view.component-B6puyycL.mjs.map
131
+ //# sourceMappingURL=acorex-platform-common-email-widget-view.component-C2aQ14k-.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-email-widget-view.component-B6puyycL.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-view.component.ts"],"sourcesContent":["import { AXBadgeModule } from '@acorex/components/badge';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Component, inject } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\nimport { AXPClipBoardService } from '../../../utils';\r\n\r\n@Component({\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-2 \">\r\n <ng-container *ngIf=\"multiple\">\r\n @for(item of list;track item?.value) {\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: item }\"></ng-template>\r\n }\r\n </ng-container>\r\n <ng-container *ngIf=\"!multiple\">\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: list[0] }\"></ng-template>\r\n </ng-container>\r\n <ng-template #itemTemplate let-item=\"data\">\r\n <ng-container *ngIf=\"item\">\r\n <div class=\"ax-col-start-1 ax-col-end-10 lg:ax-col-end-7\">\r\n <div class=\"ax-flex ax-flex-1 ax-gap-1 lg:ax-gap-3 ax-group ax-items-center ax-w-max\">\r\n <div class=\"ax-w-6 ax-h-6 ax-flex ax-items-center ax-justify-center\">\r\n <i class=\"fa-solid ax-text-neutral-400 fa-envelope\"></i>\r\n </div>\r\n <a class=\"group-hover:!ax-text-primary-500\" href=\"tel:{{ item.value }}\">{{ item.value }}</a>\r\n <span\r\n class=\"ax-text-neutral-400 ax-cursor-pointer ax-invisible group-hover:ax-visible hover:!ax-text-primary-500\"\r\n (click)=\"clipboard.copy('Email', item.value)\"\r\n >\r\n <i class=\"fa-solid fa-copy \"></i>\r\n </span>\r\n @if(hasLabel){\r\n <ax-badge color=\"primary\" [look]=\"'twotone'\" [text]=\"item.label\"></ax-badge>\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </div>\r\n `,\r\n standalone: true,\r\n imports: [CommonModule, AXBadgeModule],\r\n inputs: ['context', 'value', 'multiple', 'hasLabel'],\r\n})\r\nexport class AXPEmailWidgetViewComponent extends AXPWidgetBase {\r\n protected clipboard = inject(AXPClipBoardService);\r\n protected multiple!: boolean;\r\n protected hasLabel!: boolean;\r\n\r\n protected list: { value: string; label: string }[] = [];\r\n\r\n override render() {\r\n const rawValue = this.rawValue;\r\n if (rawValue == null) return;\r\n this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];\r\n }\r\n\r\n private extractItem(item: any): any {\r\n return typeof item == 'object'\r\n ? {\r\n value: item.value ?? '-',\r\n label: item.label ?? 'Primary',\r\n }\r\n : {\r\n value: item,\r\n label: 'Primary',\r\n };\r\n }\r\n}\r\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CM,MAAO,2BAA4B,SAAQ,aAAa,CAAA;AAtC9D,IAAA,WAAA,GAAA;;AAuCY,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAIxC,IAAI,CAAA,IAAA,GAAuC,EAAE,CAAC;AAmBzD,KAAA;IAjBU,MAAM,GAAA;AACb,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,QAAQ,IAAI,IAAI;YAAE,OAAO;AAC7B,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC/G;AAEO,IAAA,WAAW,CAAC,IAAS,EAAA;QAC3B,OAAO,OAAO,IAAI,IAAI,QAAQ;AAC5B,cAAE;AACA,gBAAA,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,GAAG;AACxB,gBAAA,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;AAC/B,aAAA;AACD,cAAE;AACA,g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,EAAE,UAAU,CAAC;AACrD,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-email-widget-view.component-C2aQ14k-.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/email/email-widget-view.component.ts"],"sourcesContent":["import { AXBadgeModule } from '@acorex/components/badge';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Component, inject } from '@angular/core';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\nimport { AXPClipBoardService } from '../../../utils';\r\n\r\n@Component({\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-2 \">\r\n <ng-container *ngIf=\"multiple\">\r\n @for(item of list;track item?.value) {\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: item }\"></ng-template>\r\n }\r\n </ng-container>\r\n <ng-container *ngIf=\"!multiple\">\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: list[0] }\"></ng-template>\r\n </ng-container>\r\n <ng-template #itemTemplate let-item=\"data\">\r\n <ng-container *ngIf=\"item\">\r\n <div class=\"ax-col-start-1 ax-col-end-10 lg:ax-col-end-7\">\r\n <div class=\"ax-flex ax-flex-1 ax-gap-1 lg:ax-gap-3 ax-group ax-items-center ax-w-max\">\r\n <div class=\"ax-w-6 ax-h-6 ax-flex ax-items-center ax-justify-center\">\r\n <i class=\"fa-solid ax-text-neutral-400 fa-envelope\"></i>\r\n </div>\r\n <a class=\"group-hover:!ax-text-primary-500\" href=\"tel:{{ item.value }}\">{{ item.value }}</a>\r\n <span\r\n class=\"ax-text-neutral-400 ax-cursor-pointer ax-invisible group-hover:ax-visible hover:!ax-text-primary-500\"\r\n (click)=\"clipboard.copy('Email', item.value)\"\r\n >\r\n <i class=\"fa-solid fa-copy \"></i>\r\n </span>\r\n @if(hasLabel){\r\n <ax-badge color=\"primary\" [look]=\"'twotone'\" [text]=\"item.label\"></ax-badge>\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </div>\r\n `,\r\n standalone: true,\r\n imports: [CommonModule, AXBadgeModule],\r\n inputs: ['context', 'value', 'multiple', 'hasLabel'],\r\n})\r\nexport class AXPEmailWidgetViewComponent extends AXPWidgetBase {\r\n protected clipboard = inject(AXPClipBoardService);\r\n protected multiple!: boolean;\r\n protected hasLabel!: boolean;\r\n\r\n protected list: { value: string; label: string }[] = [];\r\n\r\n override render() {\r\n const rawValue = this.rawValue;\r\n if (rawValue == null) return;\r\n this.list = Array.isArray(rawValue) ? rawValue.map((c) => this.extractItem(c)) : [this.extractItem(rawValue)];\r\n }\r\n\r\n private extractItem(item: any): any {\r\n return typeof item == 'object'\r\n ? {\r\n value: item.value ?? '-',\r\n label: item.label ?? 'Primary',\r\n }\r\n : {\r\n value: item,\r\n label: 'Primary',\r\n };\r\n }\r\n}\r\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CM,MAAO,2BAA4B,SAAQ,aAAa,CAAA;AAtC9D,IAAA,WAAA,GAAA;;AAuCY,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAIxC,IAAI,CAAA,IAAA,GAAuC,EAAE,CAAC;AAmBzD,KAAA;IAjBU,MAAM,GAAA;AACb,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,QAAQ,IAAI,IAAI;YAAE,OAAO;AAC7B,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC/G;AAEO,IAAA,WAAW,CAAC,IAAS,EAAA;QAC3B,OAAO,OAAO,IAAI,IAAI,QAAQ;AAC5B,cAAE;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AACD,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;AACrD,iBAAA,CAAA;;;;;"}
@@ -14,14 +14,15 @@ import '@acorex/components/image';
14
14
  import '@acorex/components/button';
15
15
  import '@acorex/core/platform';
16
16
  import '@acorex/components/toast';
17
+ import '@acorex/platform/workflow';
18
+ import '@acorex/components/dialog';
19
+ import 'dexie';
17
20
  import '@acorex/components/skeleton';
18
21
  import '@angular/cdk/portal';
19
22
  import '@acorex/components/data-table';
20
23
  import '@acorex/core/utils';
21
24
  import '@acorex/core/format';
22
25
  import 'rxjs/operators';
23
- import '@acorex/components/dialog';
24
- import '@acorex/platform/workflow';
25
26
 
26
27
  class AXPFileWidgetColumnComponent extends AXPWidgetBase {
27
28
  constructor() {
@@ -46,4 +47,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
46
47
  }] });
47
48
 
48
49
  export { AXPFileWidgetColumnComponent };
49
- //# sourceMappingURL=acorex-platform-common-file-widget-column.component-C1faGR4K.mjs.map
50
+ //# sourceMappingURL=acorex-platform-common-file-widget-column.component-CwFzLLHt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-common-file-widget-column.component-CwFzLLHt.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/file/file-widget-column.component.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { AXPWidgetBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: ` <i class=\"fa-regular fa-paperclip-vertical fa-xl ax-cursor-pointer\"></i> `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule],\r\n inputs: ['context', 'multiple', 'width', 'allowResizing'],\r\n})\r\nexport class AXPFileWidgetColumnComponent extends AXPWidgetBase {\r\n protected hasFile: boolean = false;\r\n\r\n override render() {\r\n this.hasFile = !isEmpty(this.rawValue);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAYM,MAAO,4BAA6B,SAAQ,aAAa,CAAA;AAP/D,IAAA,WAAA,GAAA;;QAQY,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;AAKpC,KAAA;IAHU,MAAM,GAAA;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACxC;8GALU,4BAA4B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAN7B,CAA4E,0EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAG5E,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGX,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAPxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,CAA4E,0EAAA,CAAA;AACtF,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC;AAC1D,iBAAA,CAAA;;;;;"}
@@ -19,15 +19,16 @@ import 'rxjs';
19
19
  import '@acorex/components/image';
20
20
  import '@acorex/core/platform';
21
21
  import '@acorex/components/toast';
22
+ import '@acorex/platform/workflow';
23
+ import '@acorex/components/dialog';
22
24
  import 'lodash-es';
25
+ import 'dexie';
23
26
  import '@acorex/components/skeleton';
24
27
  import '@angular/cdk/portal';
25
28
  import '@acorex/components/data-table';
26
29
  import '@acorex/core/utils';
27
30
  import '@acorex/core/format';
28
31
  import 'rxjs/operators';
29
- import '@acorex/components/dialog';
30
- import '@acorex/platform/workflow';
31
32
 
32
33
  class AXPFileWidgetEditComponent extends AXPWidgetEditBase {
33
34
  handleAddItem() { }
@@ -218,4 +219,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
218
219
  }] });
219
220
 
220
221
  export { AXPFileWidgetEditComponent };
221
- //# sourceMappingURL=acorex-platform-common-file-widget-edit.component-CTvS9ls8.mjs.map
222
+ //# sourceMappingURL=acorex-platform-common-file-widget-edit.component-DxoQR4CU.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-common-file-widget-edit.component-CTvS9ls8.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/file/file-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\r\n <ng-container *ngIf=\"multiple\">\r\n @for(item of value;track item?.value) {\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: item }\" ]></ng-template>\r\n }\r\n </ng-container>\r\n <ng-container *ngIf=\"!multiple\">\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: value[0] }\" ]></ng-template>\r\n </ng-container>\r\n <ng-template #itemTemplate let-item=\"data\">\r\n <div\r\n *ngIf=\"item\"\r\n class=\"ax-flex ax-items-center ax-justify-between ax-p-2 ax-border ax-rounded-lg ax-bg-surface ax-col-start-1 ax-col-end-11 lg:ax-col-end-12\"\r\n >\r\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\r\n <ng-container *ngIf=\"getFileInfo(item.name) as fileInfo\">\r\n <div\r\n class=\"ax-w-10 ax-h-10 ax-rounded-lg ax-flex ax-items-center ax-justify-center\"\r\n [ngClass]=\"[fileInfo.color]\"\r\n >\r\n <i [ngClass]=\"['fa-solid', 'ax-text-xl', fileInfo.icon]\"></i>\r\n </div>\r\n </ng-container>\r\n <div>\r\n <div class=\"ax-leading-6\">{{ item.name }}</div>\r\n <p class=\"ax-text-sm ax-text-neutral-400\">250 KB</p>\r\n </div>\r\n </div>\r\n <ax-button look=\"blank\" color=\"ghost\" class=\"!ax-text-neutral-400 hover:!ax-text-neutral-600\">\r\n <ax-icon>\r\n <i class=\"fa-solid fa-download\"></i>\r\n </ax-icon>\r\n </ax-button>\r\n </div>\r\n <ax-button\r\n *ngIf=\"multiple\"\r\n look=\"twotone\"\r\n color=\"danger\"\r\n (onClick)=\"handleRemoveItem(item)\"\r\n class=\"ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 ax-justify-self-end ax-items ax-self-center\"\r\n >\r\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\r\n </ax-button>\r\n </ng-template>\r\n <ax-button\r\n *ngIf=\"multiple\"\r\n [text]=\"value.length == 0 ? 'Add New' : 'Add Another'\"\r\n look=\"twotone\"\r\n (onClick)=\"handleAddItem()\"\r\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\r\n >\r\n <ax-prefix>\r\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, AXButtonModule, FormsModule, AXTextBoxModule, AXDecoratorModule, AXSelectBoxModule],\r\n inputs: ['multiple'],\r\n})\r\nexport class AXPFileWidgetEditComponent extends AXPWidgetEditBase<\r\n { value?: string | null; label?: string | undefined }[]\r\n> {\r\n protected multiple!: boolean;\r\n\r\n protected handleAddItem() { }\r\n\r\n protected handleRemoveItem(item: any) {\r\n this.value = this.value.filter((c) => c != item);\r\n }\r\n\r\n protected getFileInfo(fileName: string): { icon: string; color: string } {\r\n const extension = fileName?.split('.')?.pop()?.toLowerCase();\r\n\r\n switch (extension) {\r\n case 'txt':\r\n return { icon: 'fa-file-alt', color: 'ax-bg-blue-100 ax-text-blue-500' };\r\n\r\n case 'pdf':\r\n return { icon: 'fa-file-pdf', color: 'ax-bg-red-100 ax-text-red-500' };\r\n\r\n case 'doc':\r\n case 'docx':\r\n return { icon: 'fa-file-word', color: 'ax-bg-blue-200 ax-text-blue-600' };\r\n\r\n case 'xls':\r\n case 'xlsx':\r\n return { icon: 'fa-file-excel', color: 'ax-bg-green-100 ax-text-green-500' };\r\n\r\n case 'ppt':\r\n case 'pptx':\r\n return { icon: 'fa-file-powerpoint', color: 'ax-bg-orange-100 ax-text-orange-500' };\r\n\r\n case 'jpg':\r\n case 'jpeg':\r\n case 'png':\r\n case 'gif':\r\n case 'bmp':\r\n return { icon: 'fa-file-image', color: 'ax-bg-purple-100 ax-text-purple-500' };\r\n\r\n case 'zip':\r\n case 'rar':\r\n case '7z':\r\n return { icon: 'fa-file-archive', color: 'ax-bg-yellow-100 ax-text-yellow-500' };\r\n\r\n case 'mp3':\r\n case 'wav':\r\n case 'ogg':\r\n return { icon: 'fa-file-audio', color: 'ax-bg-pink-100 ax-text-pink-500' };\r\n\r\n case 'mp4':\r\n case 'avi':\r\n case 'mkv':\r\n case 'mov':\r\n return { icon: 'fa-file-video', color: 'ax-bg-blue-100 ax-text-blue-500' };\r\n\r\n case 'js':\r\n case 'jsx':\r\n case 'ts':\r\n case 'tsx':\r\n return { icon: 'fa-file-code', color: 'ax-bg-yellow-100 ax-text-yellow-500' };\r\n\r\n // Add more cases as needed for other file types\r\n\r\n default:\r\n return { icon: 'fa-file', color: 'ax-bg-gray-100 ax-text-gray-500' };\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n if (!this.value || this.value?.length == 0) {\r\n this.value = [\r\n {\r\n label: 'Mobile',\r\n value: '',\r\n },\r\n ];\r\n }\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEM,MAAO,0BAA2B,SAAQ,iBAE/C,CAAA;AAGW,IAAA,aAAa,MAAM;AAEnB,IAAA,gBAAgB,CAAC,IAAS,EAAA;AAClC,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;KAClD;AAES,IAAA,WAAW,CAAC,QAAgB,EAAA;AACpC,QAAA,MAAM,SAAS,GAAG,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,CAAC;QAE7D,QAAQ,SAAS;AACf,YAAA,KAAK,KAAK;gBACR,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;AAE3E,YAAA,KAAK,KAAK;gBACR,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC;AAEzE,YAAA,KAAK,KAAK,CAAC;AACX,YAAA,KAAK,MAAM;gBAC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A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDT,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;oBAC3G,MAAM,EAAE,CAAC,UAAU,CAAC;AACrB,iBAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-common-file-widget-edit.component-DxoQR4CU.mjs","sources":["../../../../libs/platform/common/src/lib/schema/widgets/file/file-widget-edit.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\r\nimport { AXTextBoxModule } from '@acorex/components/text-box';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AXPWidgetEditBase } from '../../widget/widget-base';\r\n\r\n@Component({\r\n template: `\r\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4\">\r\n <ng-container *ngIf=\"multiple\">\r\n @for(item of value;track item?.value) {\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: item }\" ]></ng-template>\r\n }\r\n </ng-container>\r\n <ng-container *ngIf=\"!multiple\">\r\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ data: value[0] }\" ]></ng-template>\r\n </ng-container>\r\n <ng-template #itemTemplate let-item=\"data\">\r\n <div\r\n *ngIf=\"item\"\r\n class=\"ax-flex ax-items-center ax-justify-between ax-p-2 ax-border ax-rounded-lg ax-bg-surface ax-col-start-1 ax-col-end-11 lg:ax-col-end-12\"\r\n >\r\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\r\n <ng-container *ngIf=\"getFileInfo(item.name) as fileInfo\">\r\n <div\r\n class=\"ax-w-10 ax-h-10 ax-rounded-lg ax-flex ax-items-center ax-justify-center\"\r\n [ngClass]=\"[fileInfo.color]\"\r\n >\r\n <i [ngClass]=\"['fa-solid', 'ax-text-xl', fileInfo.icon]\"></i>\r\n </div>\r\n </ng-container>\r\n <div>\r\n <div class=\"ax-leading-6\">{{ item.name }}</div>\r\n <p class=\"ax-text-sm ax-text-neutral-400\">250 KB</p>\r\n </div>\r\n </div>\r\n <ax-button look=\"blank\" color=\"ghost\" class=\"!ax-text-neutral-400 hover:!ax-text-neutral-600\">\r\n <ax-icon>\r\n <i class=\"fa-solid fa-download\"></i>\r\n </ax-icon>\r\n </ax-button>\r\n </div>\r\n <ax-button\r\n *ngIf=\"multiple\"\r\n look=\"twotone\"\r\n color=\"danger\"\r\n (onClick)=\"handleRemoveItem(item)\"\r\n class=\"ax-col-start-11 ax-col-end-13 lg:ax-col-start-12 ax-justify-self-end ax-items ax-self-center\"\r\n >\r\n <ax-icon icon=\"fa-regular fa-xmark\"></ax-icon>\r\n </ax-button>\r\n </ng-template>\r\n <ax-button\r\n *ngIf=\"multiple\"\r\n [text]=\"value.length == 0 ? 'Add New' : 'Add Another'\"\r\n look=\"twotone\"\r\n (onClick)=\"handleAddItem()\"\r\n class=\"ax-col-start-8 lg:ax-col-start-10 2xl:ax-col-start-10 ax-col-end-13\"\r\n >\r\n <ax-prefix>\r\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n </div>\r\n `,\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, AXButtonModule, FormsModule, AXTextBoxModule, AXDecoratorModule, AXSelectBoxModule],\r\n inputs: ['multiple'],\r\n})\r\nexport class AXPFileWidgetEditComponent extends AXPWidgetEditBase<\r\n { value?: string | null; label?: string | undefined }[]\r\n> {\r\n protected multiple!: boolean;\r\n\r\n protected handleAddItem() { }\r\n\r\n protected handleRemoveItem(item: any) {\r\n this.value = this.value.filter((c) => c != item);\r\n }\r\n\r\n protected getFileInfo(fileName: string): { icon: string; color: string } {\r\n const extension = fileName?.split('.')?.pop()?.toLowerCase();\r\n\r\n switch (extension) {\r\n case 'txt':\r\n return { icon: 'fa-file-alt', color: 'ax-bg-blue-100 ax-text-blue-500' };\r\n\r\n case 'pdf':\r\n return { icon: 'fa-file-pdf', color: 'ax-bg-red-100 ax-text-red-500' };\r\n\r\n case 'doc':\r\n case 'docx':\r\n return { icon: 'fa-file-word', color: 'ax-bg-blue-200 ax-text-blue-600' };\r\n\r\n case 'xls':\r\n case 'xlsx':\r\n return { icon: 'fa-file-excel', color: 'ax-bg-green-100 ax-text-green-500' };\r\n\r\n case 'ppt':\r\n case 'pptx':\r\n return { icon: 'fa-file-powerpoint', color: 'ax-bg-orange-100 ax-text-orange-500' };\r\n\r\n case 'jpg':\r\n case 'jpeg':\r\n case 'png':\r\n case 'gif':\r\n case 'bmp':\r\n return { icon: 'fa-file-image', color: 'ax-bg-purple-100 ax-text-purple-500' };\r\n\r\n case 'zip':\r\n case 'rar':\r\n case '7z':\r\n return { icon: 'fa-file-archive', color: 'ax-bg-yellow-100 ax-text-yellow-500' };\r\n\r\n case 'mp3':\r\n case 'wav':\r\n case 'ogg':\r\n return { icon: 'fa-file-audio', color: 'ax-bg-pink-100 ax-text-pink-500' };\r\n\r\n case 'mp4':\r\n case 'avi':\r\n case 'mkv':\r\n case 'mov':\r\n return { icon: 'fa-file-video', color: 'ax-bg-blue-100 ax-text-blue-500' };\r\n\r\n case 'js':\r\n case 'jsx':\r\n case 'ts':\r\n case 'tsx':\r\n return { icon: 'fa-file-code', color: 'ax-bg-yellow-100 ax-text-yellow-500' };\r\n\r\n // Add more cases as needed for other file types\r\n\r\n default:\r\n return { icon: 'fa-file', color: 'ax-bg-gray-100 ax-text-gray-500' };\r\n }\r\n }\r\n\r\n ngOnInit():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