cmat 0.0.29 → 0.0.31

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 (164) hide show
  1. package/components/adapter/index.d.ts +8 -9
  2. package/components/breadcrumb/index.d.ts +2 -4
  3. package/components/carousel/index.d.ts +3 -5
  4. package/components/cascade/index.d.ts +6 -7
  5. package/components/chip-input/index.d.ts +2 -2
  6. package/components/custom-formly/index.d.ts +41 -49
  7. package/components/date-range/index.d.ts +5 -6
  8. package/components/drawer/index.d.ts +30 -34
  9. package/components/fullscreen/index.d.ts +1 -2
  10. package/components/highlight/index.d.ts +12 -14
  11. package/components/image-viewer/index.d.ts +4 -5
  12. package/components/json-editor/index.d.ts +2 -3
  13. package/components/knob-input/index.d.ts +8 -8
  14. package/components/material-color-picker/index.d.ts +3 -3
  15. package/components/material-datetimepicker/index.d.ts +89 -93
  16. package/components/navigation/index.d.ts +82 -88
  17. package/components/opt-input/index.d.ts +6 -6
  18. package/components/pagination/index.d.ts +6 -9
  19. package/components/popover/index.d.ts +13 -16
  20. package/components/progress-bar/index.d.ts +3 -5
  21. package/components/rating/index.d.ts +5 -5
  22. package/components/select-search/index.d.ts +16 -17
  23. package/components/select-table/index.d.ts +6 -6
  24. package/components/select-tree/index.d.ts +7 -6
  25. package/components/speed-dial/index.d.ts +2 -3
  26. package/components/timeline/index.d.ts +2 -3
  27. package/components/toast/index.d.ts +14 -16
  28. package/components/transfer-picker/index.d.ts +43 -44
  29. package/components/treetable/index.d.ts +2 -3
  30. package/components/upload/index.d.ts +24 -27
  31. package/directives/animate-on-scroll/index.d.ts +4 -19
  32. package/directives/arrow-cursor/index.d.ts +2 -4
  33. package/directives/autofocus/index.d.ts +2 -2
  34. package/directives/data-exporter/index.d.ts +2 -15
  35. package/directives/digit-only/index.d.ts +4 -4
  36. package/directives/equal-validator/index.d.ts +1 -2
  37. package/fesm2022/cmat-components-adapter.mjs +22 -39
  38. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  39. package/fesm2022/cmat-components-breadcrumb.mjs +19 -21
  40. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  41. package/fesm2022/cmat-components-card.mjs +3 -3
  42. package/fesm2022/cmat-components-carousel.mjs +112 -127
  43. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  44. package/fesm2022/cmat-components-cascade.mjs +61 -73
  45. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  46. package/fesm2022/cmat-components-chip-input.mjs +14 -18
  47. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  48. package/fesm2022/cmat-components-custom-formly.mjs +167 -169
  49. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  50. package/fesm2022/cmat-components-date-range.mjs +17 -17
  51. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  52. package/fesm2022/cmat-components-drawer.mjs +17 -19
  53. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  54. package/fesm2022/cmat-components-fullscreen.mjs +7 -10
  55. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  56. package/fesm2022/cmat-components-highlight.mjs +14 -14
  57. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  58. package/fesm2022/cmat-components-image-viewer.mjs +9 -12
  59. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  60. package/fesm2022/cmat-components-json-editor.mjs +7 -7
  61. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  62. package/fesm2022/cmat-components-knob-input.mjs +12 -19
  63. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  64. package/fesm2022/cmat-components-masonry.mjs +3 -3
  65. package/fesm2022/cmat-components-material-color-picker.mjs +8 -7
  66. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  67. package/fesm2022/cmat-components-material-datetimepicker.mjs +166 -216
  68. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  69. package/fesm2022/cmat-components-navigation.mjs +108 -112
  70. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  71. package/fesm2022/cmat-components-opt-input.mjs +13 -20
  72. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  73. package/fesm2022/cmat-components-org-chart.mjs +9 -9
  74. package/fesm2022/cmat-components-pagination.mjs +32 -34
  75. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  76. package/fesm2022/cmat-components-password-strength.mjs +9 -9
  77. package/fesm2022/cmat-components-popover.mjs +27 -32
  78. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  79. package/fesm2022/cmat-components-progress-bar.mjs +10 -10
  80. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  81. package/fesm2022/cmat-components-rating.mjs +10 -14
  82. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  83. package/fesm2022/cmat-components-select-search.mjs +30 -53
  84. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  85. package/fesm2022/cmat-components-select-table.mjs +28 -33
  86. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  87. package/fesm2022/cmat-components-select-tree.mjs +55 -61
  88. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  89. package/fesm2022/cmat-components-speed-dial.mjs +13 -13
  90. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +18 -20
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +16 -16
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +47 -47
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +11 -12
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +40 -33
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-animate-on-scroll.mjs +13 -14
  102. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-arrow-cursor.mjs +11 -14
  104. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-autofocus.mjs +8 -9
  106. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-data-exporter.mjs +28 -28
  108. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-debounce.mjs +11 -13
  110. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-digit-only.mjs +17 -17
  112. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-equal-validator.mjs +9 -16
  114. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  115. package/fesm2022/cmat-lib-mock-api.mjs +11 -14
  116. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  117. package/fesm2022/cmat-pipes-bytes.mjs +4 -5
  118. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  119. package/fesm2022/cmat-pipes-date-format.mjs +4 -5
  120. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-find-by-key.mjs +4 -5
  122. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-group-by.mjs +4 -5
  124. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-keys.mjs +4 -5
  126. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-secure.mjs +13 -14
  128. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-uppercase.mjs +4 -5
  130. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  131. package/fesm2022/cmat-services-alert.mjs +3 -3
  132. package/fesm2022/cmat-services-config.mjs +10 -12
  133. package/fesm2022/cmat-services-config.mjs.map +1 -1
  134. package/fesm2022/cmat-services-confirmation.mjs +17 -20
  135. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  136. package/fesm2022/cmat-services-data.mjs +10 -11
  137. package/fesm2022/cmat-services-data.mjs.map +1 -1
  138. package/fesm2022/cmat-services-export-as.mjs +3 -3
  139. package/fesm2022/cmat-services-loading.mjs +14 -14
  140. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  141. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  142. package/fesm2022/cmat-services-media-watcher.mjs +10 -10
  143. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  144. package/fesm2022/cmat-services-platform.mjs +8 -8
  145. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  146. package/fesm2022/cmat-services-splash-screen.mjs +9 -13
  147. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  148. package/fesm2022/cmat-services-title.mjs +10 -11
  149. package/fesm2022/cmat-services-title.mjs.map +1 -1
  150. package/fesm2022/cmat-services-translation.mjs +8 -8
  151. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  152. package/fesm2022/cmat-services-utils.mjs +3 -3
  153. package/lib/mock-api/index.d.ts +0 -1
  154. package/package.json +17 -17
  155. package/pipes/secure/index.d.ts +2 -4
  156. package/services/config/index.d.ts +1 -1
  157. package/services/confirmation/index.d.ts +2 -4
  158. package/services/data/index.d.ts +1 -3
  159. package/services/loading/index.d.ts +3 -4
  160. package/services/media-watcher/index.d.ts +2 -3
  161. package/services/platform/index.d.ts +2 -3
  162. package/services/splash-screen/index.d.ts +1 -2
  163. package/services/title/index.d.ts +3 -5
  164. package/services/translation/index.d.ts +1 -2
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-pagination.mjs","sources":["../../../projects/cmat/components/pagination/pagination.service.ts","../../../projects/cmat/components/pagination/pagination.directive.ts","../../../projects/cmat/components/pagination/pagination.component.ts","../../../projects/cmat/components/pagination/pagination.component.html","../../../projects/cmat/components/pagination/pagination.pipe.ts","../../../projects/cmat/components/pagination/cmat-components-pagination.ts"],"sourcesContent":["import { EventEmitter, Injectable } from '@angular/core';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatPaginationService {\r\n public change: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n private _instances: Record<string, CmatPaginationInstance> = {};\r\n private _defaultPaginationId = 'DEFAULT_PAGINATION_ID';\r\n\r\n public defaultId(): string { return this._defaultPaginationId; }\r\n\r\n public register(instance: CmatPaginationInstance): boolean {\r\n instance.id ??= this._defaultPaginationId;\r\n\r\n if (!this._instances[instance.id]) {\r\n this._instances[instance.id] = instance;\r\n return true;\r\n } else {\r\n return this._updateInstance(instance);\r\n }\r\n }\r\n\r\n public getCurrentPage(id: string): number | void {\r\n if (this._instances[id]) {\r\n return this._instances[id].currentPage;\r\n }\r\n }\r\n\r\n public getItemsPerPage(id: string): number | void {\r\n if (this._instances[id]) {\r\n return this._instances[id].itemsPerPage;\r\n }\r\n }\r\n\r\n public setCurrentPage(id: string, page: number): void {\r\n if (this._instances[id]) {\r\n const instance = this._instances[id];\r\n const maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (page <= maxPage && 1 <= page) {\r\n this._instances[id].currentPage = page;\r\n this.change.emit(id);\r\n }\r\n }\r\n }\r\n\r\n public setTotalItems(id: string, totalItems: number): void {\r\n if (this._instances[id] && 0 <= totalItems) {\r\n this._instances[id].totalItems = totalItems;\r\n this.change.emit(id);\r\n }\r\n }\r\n\r\n public setItemsPerPage(id: string, itemsPerPage: number): void {\r\n if (this._instances[id]) {\r\n this._instances[id].itemsPerPage = itemsPerPage;\r\n this.change.emit(id);\r\n }\r\n }\r\n\r\n public getInstance(id: string = this._defaultPaginationId): CmatPaginationInstance {\r\n if (this._instances[id]) {\r\n return this._clone(this._instances[id]);\r\n }\r\n return {} as CmatPaginationInstance;\r\n }\r\n\r\n private _updateInstance(instance: CmatPaginationInstance): boolean {\r\n let changed = false;\r\n if (instance.id) {\r\n for (const prop in this._instances[instance.id]) {\r\n if (instance[prop] !== this._instances[instance.id][prop]) {\r\n this._instances[instance.id][prop] = instance[prop];\r\n changed = true;\r\n }\r\n }\r\n }\r\n return changed;\r\n }\r\n\r\n private _clone(obj: any): any {\r\n const target: any = {};\r\n for (const i in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\r\n target[i] = obj[i];\r\n }\r\n }\r\n return target;\r\n }\r\n}\r\n","import { ChangeDetectorRef, Directive, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subject, takeUntil } from 'rxjs';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\nimport { CmatPaginationService } from './pagination.service';\r\n\r\nexport interface Page {\r\n label: string;\r\n value: any;\r\n}\r\n@Directive({\r\n selector: 'pagination-template,[pagination-template]',\r\n exportAs: 'paginationApi',\r\n standalone: true\r\n})\r\nexport class CmatPaginationDirective implements OnInit, OnChanges, OnDestroy {\r\n @Input() id: string;\r\n @Input() maxSize: number = 7;\r\n @Output() pageChange: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() pageBoundsCorrection: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() perPageCountChange: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n pages: Page[] = [];\r\n\r\n private _unsubscribeAll: Subject<any> = new Subject<any>();\r\n\r\n constructor(private service: CmatPaginationService,\r\n private changeDetectorRef: ChangeDetectorRef) {\r\n this.service.change.pipe(\r\n takeUntil(this._unsubscribeAll))\r\n .subscribe((id) => {\r\n if (this.id === id) {\r\n this._updatePageLinks();\r\n this.changeDetectorRef.markForCheck();\r\n }\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.id ??= this.service.defaultId();\r\n this._updatePageLinks();\r\n }\r\n\r\n ngOnChanges(): void {\r\n this._updatePageLinks();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n previous(): void {\r\n if (!this.isFirstPage()) {\r\n this._checkValidId();\r\n\r\n const current = this.getCurrent();\r\n if (current)\r\n this.setCurrent(current - 1);\r\n }\r\n }\r\n\r\n next(): void {\r\n if (!this.isLastPage()) {\r\n this._checkValidId();\r\n\r\n const current = this.getCurrent();\r\n if (current)\r\n this.setCurrent(current + 1);\r\n }\r\n }\r\n\r\n goFirstPage(): void {\r\n if (!this.isFirstPage()) {\r\n this._checkValidId();\r\n\r\n this.setCurrent(1);\r\n }\r\n }\r\n\r\n goLastPage(): void {\r\n if (!this.isLastPage()) {\r\n this._checkValidId();\r\n\r\n const lastPage = this.getLastPage();\r\n if (lastPage)\r\n this.setCurrent(lastPage);\r\n }\r\n }\r\n\r\n isFirstPage(): boolean {\r\n return this.getCurrent() === 1;\r\n }\r\n\r\n isLastPage(): boolean {\r\n return this.getLastPage() === this.getCurrent();\r\n }\r\n\r\n setCurrent(page: number | string): void {\r\n this.pageChange.emit(page as number);\r\n }\r\n\r\n getCurrent(): number | void {\r\n return this.service.getCurrentPage(this.id);\r\n }\r\n\r\n getLastPage(): number | void {\r\n const inst = this.service.getInstance(this.id);\r\n if (inst.totalItems < 1) {\r\n // when there are 0 or fewer (an error case) items, there are no \"pages\" as such,\r\n // but it makes sense to consider a single, empty page as the last page.\r\n return 1;\r\n }\r\n return Math.ceil(inst.totalItems / inst.itemsPerPage);\r\n }\r\n\r\n getTotalItems(): number | void {\r\n return this.service.getInstance(this.id).totalItems;\r\n }\r\n\r\n setItemsPerPage(count: number): void {\r\n this.service.setItemsPerPage(this.id, count);\r\n\r\n this.perPageCountChange.emit(count);\r\n const inst = this.service.getInstance(this.id);\r\n this.setCurrent(this._outOfBoundCorrection(inst));\r\n }\r\n\r\n private _checkValidId(): void {\r\n if (this.service.getInstance(this.id).id == null) {\r\n console.warn(`PaginationControlsDirective: the specified id \"${this.id}\" does not match any registered PaginationInstance`);\r\n }\r\n }\r\n\r\n private _updatePageLinks(): void {\r\n const inst = this.service.getInstance(this.id);\r\n const correctedCurrentPage = this._outOfBoundCorrection(inst);\r\n\r\n if (correctedCurrentPage !== inst.currentPage) {\r\n setTimeout(() => {\r\n this.pageBoundsCorrection.emit(correctedCurrentPage);\r\n this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n });\r\n } else {\r\n this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n }\r\n }\r\n\r\n private _outOfBoundCorrection(instance: CmatPaginationInstance): number {\r\n const totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (totalPages < instance.currentPage && 0 < totalPages) {\r\n return totalPages;\r\n } else if (instance.currentPage < 1) {\r\n return 1;\r\n }\r\n\r\n return instance.currentPage;\r\n }\r\n\r\n private _createPageArray(currentPage: number, itemsPerPage: number, totalItems: number, paginationRange: number): Page[] {\r\n paginationRange = +paginationRange;\r\n const pages = [];\r\n\r\n const totalPages = Math.max(Math.ceil(totalItems / itemsPerPage), 1);\r\n const halfWay = Math.ceil(paginationRange / 2);\r\n\r\n const isStart = currentPage <= halfWay;\r\n const isEnd = totalPages - halfWay < currentPage;\r\n const isMiddle = !isStart && !isEnd;\r\n\r\n const ellipsesNeeded = paginationRange < totalPages;\r\n let i = 1;\r\n\r\n while (i <= totalPages && i <= paginationRange) {\r\n let label: any;\r\n const pageNumber = this._calculatePageNumber(i, currentPage, paginationRange, totalPages);\r\n const openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));\r\n const closingEllipsesNeeded = (i === paginationRange - 1 && (isMiddle || isStart));\r\n if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {\r\n label = '...';\r\n } else {\r\n label = pageNumber;\r\n }\r\n pages.push({\r\n label: label,\r\n value: pageNumber\r\n });\r\n i++;\r\n }\r\n\r\n return pages;\r\n }\r\n\r\n private _calculatePageNumber(i: number, currentPage: number, paginationRange: number, totalPages: number): number {\r\n const halfWay = Math.ceil(paginationRange / 2);\r\n if (i === paginationRange) {\r\n return totalPages;\r\n } else if (i === 1) {\r\n return i;\r\n } else if (paginationRange < totalPages) {\r\n if (totalPages - halfWay < currentPage) {\r\n return totalPages - paginationRange + i;\r\n } else if (halfWay < currentPage) {\r\n return currentPage - halfWay + i;\r\n } else {\r\n return i;\r\n }\r\n } else {\r\n return i;\r\n }\r\n }\r\n}\r\n","import { DecimalPipe, NgStyle } from '@angular/common';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { Subject, takeUntil } from 'rxjs';\r\nimport { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';\r\nimport { CmatMediaWatcherService } from 'cmat/services/media-watcher';\r\nimport { CmatPaginationDirective } from './pagination.directive';\r\n\r\n@Component({\r\n selector: 'cmat-pagination',\r\n templateUrl: './pagination.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n exportAs: 'cmatPagination',\r\n imports: [CmatPaginationDirective, MatIconModule, NgStyle, MatFormFieldModule, MatInputModule, CmatDigitOnlyDirective, MatSelectModule, DecimalPipe,MatButtonModule]\r\n})\r\nexport class CmatPaginationComponent implements OnInit {\r\n @Output() pageChange: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() pageBoundsCorrection: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() perPageCountChange: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n @Input() id: string;\r\n @Input() maxSize: number = 7;\r\n\r\n @Input() itemsPerPages: number[] = [10, 20, 30];\r\n @Input() initPerPage: number = 10;\r\n\r\n isScreenSmall: boolean;\r\n\r\n private _autoHide: boolean = false;\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n\r\n constructor(private _cmatMediaWatcherService: CmatMediaWatcherService, private _changeDetectorRef: ChangeDetectorRef) {\r\n\r\n }\r\n\r\n @Input()\r\n get autoHide(): boolean {\r\n return this._autoHide;\r\n }\r\n set autoHide(value: boolean) {\r\n this._autoHide = !!value;\r\n }\r\n\r\n ngOnInit(): void {\r\n this._cmatMediaWatcherService.onMediaChange$\r\n .pipe(takeUntil(this._unsubscribeAll))\r\n .subscribe(({ matchingAliases }) => {\r\n this.isScreenSmall = !matchingAliases.includes('md');\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n}\r\n","<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id\"\r\n [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>总计:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n @if (!(autoHide && p.pages.length <= 1)) {\r\n <ul\r\n class=\"flex flex-row items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages; track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"cursor-pointer text-gray-400 hover:text-current\" (click)=\"p.setCurrent(page.value)\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div> \r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block px-2\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\"\r\n [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage()||0\"\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/<div class=\"pl-1\">{{p.getLastPage()}}</div></span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages; track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n </pagination-template>","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { isNil } from 'lodash-es';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\nimport { CmatPaginationService } from './pagination.service';\r\n\r\nconst LARGE_NUMBER = Number.MAX_SAFE_INTEGER;\r\n\r\nexport type Collection<T> = T[];\r\n\r\nexport interface CmatPaginatePipeArgs {\r\n id?: string;\r\n currentPage: string | number;\r\n itemsPerPage: string | number;\r\n totalItems: string | number;\r\n}\r\n\r\nexport interface CmatPipeState {\r\n collection: any[];\r\n size: number;\r\n start?: number;\r\n end?: number;\r\n slice: any[];\r\n}\r\n\r\n@Pipe({\r\n name: 'paginate',\r\n pure: true,\r\n standalone: true\r\n})\r\nexport class CmatPaginatePipe implements PipeTransform {\r\n private state: Record<string, CmatPipeState> = {};\r\n\r\n constructor(private service: CmatPaginationService) {\r\n }\r\n\r\n public transform<T, U extends Collection<T>>(collection: U, args: CmatPaginatePipeArgs): U {\r\n if (!(collection instanceof Array)) {\r\n const _id = args.id ?? this.service.defaultId();\r\n if (this.state[_id]) {\r\n return this.state[_id].slice as U;\r\n } else {\r\n return collection;\r\n }\r\n }\r\n\r\n const serverSideMode = args.totalItems && args.totalItems !== collection.length;\r\n const instance = this.createInstance(collection, args);\r\n\r\n const id = instance.id!;\r\n let start;\r\n let end;\r\n let perPage = args.itemsPerPage;\r\n\r\n const emitChange = this.service.register(instance);\r\n\r\n if (!serverSideMode && collection instanceof Array) {\r\n perPage = +perPage || LARGE_NUMBER;\r\n start = (instance.currentPage - 1) * perPage;\r\n end = start + perPage;\r\n\r\n const isIdentical = this._stateIsIdentical(id, collection, start, end);\r\n if (isIdentical) {\r\n return this.state[id].slice as U;\r\n } else {\r\n const slice = collection.slice(start, end);\r\n this._saveState(id, collection, slice, start, end);\r\n this.service.change.emit(id);\r\n return slice as U;\r\n }\r\n } else {\r\n if (emitChange) {\r\n this.service.change.emit(id);\r\n }\r\n\r\n this._saveState(id, collection, collection, start, end);\r\n\r\n return collection;\r\n }\r\n\r\n }\r\n\r\n private createInstance(collection: any[], config: CmatPaginatePipeArgs): CmatPaginationInstance {\r\n this.checkConfig(config);\r\n\r\n return {\r\n id: !isNil(config.id) ? config.id : this.service.defaultId(),\r\n itemsPerPage: +config.itemsPerPage || 10,\r\n currentPage: +config.currentPage || 1,\r\n totalItems: +config.totalItems || collection.length\r\n };\r\n }\r\n\r\n private checkConfig(config: CmatPaginatePipeArgs): void {\r\n const required = ['itemsPerPage', 'currentPage'];\r\n\r\n const missing = required.filter(prop => !(prop in config));\r\n if (0 < missing.length) {\r\n throw new Error(`PaginatePipe: Argument is missing the following required properties: ${missing.join(', ')}`);\r\n }\r\n }\r\n\r\n private _saveState(id: string, collection: any[], slice: any[], start?: number, end?: number): void {\r\n this.state[id] = {\r\n collection,\r\n size: collection.length,\r\n slice,\r\n start,\r\n end\r\n };\r\n }\r\n\r\n private _stateIsIdentical(id: string, collection: any[], start: number, end: number): boolean {\r\n const state = this.state[id];\r\n if (!state) {\r\n return false;\r\n }\r\n const isMetaDataIdentical = state.size === collection.length &&\r\n state.start === start &&\r\n state.end === end;\r\n\r\n if (!isMetaDataIdentical) {\r\n return false;\r\n }\r\n\r\n return state.slice.every((element, index) => element === collection[start + index]);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CmatPaginationService"],"mappings":";;;;;;;;;;;;;;;;;;MAMa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,MAAM,GAAyB,IAAI,YAAY,EAAU;QAExD,IAAU,CAAA,UAAA,GAA2C,EAAE;QACvD,IAAoB,CAAA,oBAAA,GAAG,uBAAuB;AAiFzD;AA/EU,IAAA,SAAS,KAAa,OAAO,IAAI,CAAC,oBAAoB,CAAC;AAEvD,IAAA,QAAQ,CAAC,QAAgC,EAAA;AAC5C,QAAA,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC,oBAAoB;QAEzC,IAAI,CAAC,IAAI,CAAC,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AAM;YACxD,KAAK,CAAC,KAAK,KAAK,KAAK;AACrB,YAAA,KAAK,CAAC,GAAG,KAAK,GAAG;QAErB,IAAI,CAAC,mBAAmB,EAAE;AACtB,YAAA,OAAO,KAAK;;QAGhB,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,KAAK,OAAO,KAAK,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;;8GA/F9E,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,qBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE,IAAI;AACV,oBAAA,UAAU,EAAE;AACf,iBAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-pagination.mjs","sources":["../../../projects/cmat/components/pagination/pagination.service.ts","../../../projects/cmat/components/pagination/pagination.directive.ts","../../../projects/cmat/components/pagination/pagination.component.ts","../../../projects/cmat/components/pagination/pagination.component.html","../../../projects/cmat/components/pagination/pagination.pipe.ts","../../../projects/cmat/components/pagination/cmat-components-pagination.ts"],"sourcesContent":["import { EventEmitter, Injectable } from '@angular/core';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatPaginationService {\r\n public change: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n private _instances: Record<string, CmatPaginationInstance> = {};\r\n private _defaultPaginationId = 'DEFAULT_PAGINATION_ID';\r\n\r\n public defaultId(): string { return this._defaultPaginationId; }\r\n\r\n public register(instance: CmatPaginationInstance): boolean {\r\n instance.id ??= this._defaultPaginationId;\r\n\r\n if (!this._instances[instance.id]) {\r\n this._instances[instance.id] = instance;\r\n return true;\r\n } else {\r\n return this._updateInstance(instance);\r\n }\r\n }\r\n\r\n public getCurrentPage(id: string): number | void {\r\n if (this._instances[id]) {\r\n return this._instances[id].currentPage;\r\n }\r\n }\r\n\r\n public getItemsPerPage(id: string): number | void {\r\n if (this._instances[id]) {\r\n return this._instances[id].itemsPerPage;\r\n }\r\n }\r\n\r\n public setCurrentPage(id: string, page: number): void {\r\n if (this._instances[id]) {\r\n const instance = this._instances[id];\r\n const maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (page <= maxPage && 1 <= page) {\r\n this._instances[id].currentPage = page;\r\n this.change.emit(id);\r\n }\r\n }\r\n }\r\n\r\n public setTotalItems(id: string, totalItems: number): void {\r\n if (this._instances[id] && 0 <= totalItems) {\r\n this._instances[id].totalItems = totalItems;\r\n this.change.emit(id);\r\n }\r\n }\r\n\r\n public setItemsPerPage(id: string, itemsPerPage: number): void {\r\n if (this._instances[id]) {\r\n this._instances[id].itemsPerPage = itemsPerPage;\r\n this.change.emit(id);\r\n }\r\n }\r\n\r\n public getInstance(id: string = this._defaultPaginationId): CmatPaginationInstance {\r\n if (this._instances[id]) {\r\n return this._clone(this._instances[id]);\r\n }\r\n return {} as CmatPaginationInstance;\r\n }\r\n\r\n private _updateInstance(instance: CmatPaginationInstance): boolean {\r\n let changed = false;\r\n if (instance.id) {\r\n for (const prop in this._instances[instance.id]) {\r\n if (instance[prop] !== this._instances[instance.id][prop]) {\r\n this._instances[instance.id][prop] = instance[prop];\r\n changed = true;\r\n }\r\n }\r\n }\r\n return changed;\r\n }\r\n\r\n private _clone(obj: any): any {\r\n const target: any = {};\r\n for (const i in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\r\n target[i] = obj[i];\r\n }\r\n }\r\n return target;\r\n }\r\n}\r\n","import { ChangeDetectorRef, Directive, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, inject } from '@angular/core';\r\nimport { Subject, takeUntil } from 'rxjs';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\nimport { CmatPaginationService } from './pagination.service';\r\n\r\nexport interface Page {\r\n label: string;\r\n value: any;\r\n}\r\n@Directive({\r\n selector: 'pagination-template,[pagination-template]',\r\n exportAs: 'paginationApi'\r\n})\r\nexport class CmatPaginationDirective implements OnInit, OnChanges, OnDestroy {\r\n @Input() id: string;\r\n @Input() maxSize: number = 7;\r\n @Output() pageChange: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() pageBoundsCorrection: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() perPageCountChange: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n pages: Page[] = [];\r\n\r\n private service = inject(CmatPaginationService);\r\n private changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n private _unsubscribeAll: Subject<any> = new Subject<any>();\r\n\r\n constructor() {\r\n this.service.change.pipe(\r\n takeUntil(this._unsubscribeAll))\r\n .subscribe((id) => {\r\n if (this.id === id) {\r\n this._updatePageLinks();\r\n this.changeDetectorRef.markForCheck();\r\n }\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.id ??= this.service.defaultId();\r\n this._updatePageLinks();\r\n }\r\n\r\n ngOnChanges(): void {\r\n this._updatePageLinks();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n previous(): void {\r\n if (!this.isFirstPage()) {\r\n this._checkValidId();\r\n\r\n const current = this.getCurrent();\r\n if (current)\r\n this.setCurrent(current - 1);\r\n }\r\n }\r\n\r\n next(): void {\r\n if (!this.isLastPage()) {\r\n this._checkValidId();\r\n\r\n const current = this.getCurrent();\r\n if (current)\r\n this.setCurrent(current + 1);\r\n }\r\n }\r\n\r\n goFirstPage(): void {\r\n if (!this.isFirstPage()) {\r\n this._checkValidId();\r\n\r\n this.setCurrent(1);\r\n }\r\n }\r\n\r\n goLastPage(): void {\r\n if (!this.isLastPage()) {\r\n this._checkValidId();\r\n\r\n const lastPage = this.getLastPage();\r\n if (lastPage)\r\n this.setCurrent(lastPage);\r\n }\r\n }\r\n\r\n isFirstPage(): boolean {\r\n return this.getCurrent() === 1;\r\n }\r\n\r\n isLastPage(): boolean {\r\n return this.getLastPage() === this.getCurrent();\r\n }\r\n\r\n setCurrent(page: number | string): void {\r\n this.pageChange.emit(page as number);\r\n }\r\n\r\n getCurrent(): number | void {\r\n return this.service.getCurrentPage(this.id);\r\n }\r\n\r\n getLastPage(): number | void {\r\n const inst = this.service.getInstance(this.id);\r\n if (inst.totalItems < 1) {\r\n // when there are 0 or fewer (an error case) items, there are no \"pages\" as such,\r\n // but it makes sense to consider a single, empty page as the last page.\r\n return 1;\r\n }\r\n return Math.ceil(inst.totalItems / inst.itemsPerPage);\r\n }\r\n\r\n getTotalItems(): number | void {\r\n return this.service.getInstance(this.id).totalItems;\r\n }\r\n\r\n setItemsPerPage(count: number): void {\r\n this.service.setItemsPerPage(this.id, count);\r\n\r\n this.perPageCountChange.emit(count);\r\n const inst = this.service.getInstance(this.id);\r\n this.setCurrent(this._outOfBoundCorrection(inst));\r\n }\r\n\r\n private _checkValidId(): void {\r\n if (this.service.getInstance(this.id).id == null) {\r\n console.warn(`PaginationControlsDirective: the specified id \"${this.id}\" does not match any registered PaginationInstance`);\r\n }\r\n }\r\n\r\n private _updatePageLinks(): void {\r\n const inst = this.service.getInstance(this.id);\r\n const correctedCurrentPage = this._outOfBoundCorrection(inst);\r\n\r\n if (correctedCurrentPage !== inst.currentPage) {\r\n setTimeout(() => {\r\n this.pageBoundsCorrection.emit(correctedCurrentPage);\r\n this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n });\r\n } else {\r\n this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n }\r\n }\r\n\r\n private _outOfBoundCorrection(instance: CmatPaginationInstance): number {\r\n const totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (totalPages < instance.currentPage && 0 < totalPages) {\r\n return totalPages;\r\n } else if (instance.currentPage < 1) {\r\n return 1;\r\n }\r\n\r\n return instance.currentPage;\r\n }\r\n\r\n private _createPageArray(currentPage: number, itemsPerPage: number, totalItems: number, paginationRange: number): Page[] {\r\n paginationRange = +paginationRange;\r\n const pages = [];\r\n\r\n const totalPages = Math.max(Math.ceil(totalItems / itemsPerPage), 1);\r\n const halfWay = Math.ceil(paginationRange / 2);\r\n\r\n const isStart = currentPage <= halfWay;\r\n const isEnd = totalPages - halfWay < currentPage;\r\n const isMiddle = !isStart && !isEnd;\r\n\r\n const ellipsesNeeded = paginationRange < totalPages;\r\n let i = 1;\r\n\r\n while (i <= totalPages && i <= paginationRange) {\r\n let label: any;\r\n const pageNumber = this._calculatePageNumber(i, currentPage, paginationRange, totalPages);\r\n const openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));\r\n const closingEllipsesNeeded = (i === paginationRange - 1 && (isMiddle || isStart));\r\n if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {\r\n label = '...';\r\n } else {\r\n label = pageNumber;\r\n }\r\n pages.push({\r\n label: label,\r\n value: pageNumber\r\n });\r\n i++;\r\n }\r\n\r\n return pages;\r\n }\r\n\r\n private _calculatePageNumber(i: number, currentPage: number, paginationRange: number, totalPages: number): number {\r\n const halfWay = Math.ceil(paginationRange / 2);\r\n if (i === paginationRange) {\r\n return totalPages;\r\n } else if (i === 1) {\r\n return i;\r\n } else if (paginationRange < totalPages) {\r\n if (totalPages - halfWay < currentPage) {\r\n return totalPages - paginationRange + i;\r\n } else if (halfWay < currentPage) {\r\n return currentPage - halfWay + i;\r\n } else {\r\n return i;\r\n }\r\n } else {\r\n return i;\r\n }\r\n }\r\n}\r\n","import { DecimalPipe, NgStyle } from '@angular/common';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { Subject, takeUntil } from 'rxjs';\r\nimport { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';\r\nimport { CmatMediaWatcherService } from 'cmat/services/media-watcher';\r\nimport { CmatPaginationDirective } from './pagination.directive';\r\n\r\n@Component({\r\n selector: 'cmat-pagination',\r\n templateUrl: './pagination.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n exportAs: 'cmatPagination',\r\n imports: [CmatPaginationDirective, MatIconModule, NgStyle, MatFormFieldModule, MatInputModule, CmatDigitOnlyDirective, MatSelectModule, DecimalPipe, MatButtonModule]\r\n})\r\nexport class CmatPaginationComponent implements OnInit {\r\n @Output() pageChange: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() pageBoundsCorrection: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() perPageCountChange: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n @Input() id: string;\r\n @Input() maxSize: number = 7;\r\n\r\n @Input() itemsPerPages: number[] = [10, 20, 30];\r\n @Input() initPerPage: number = 10;\r\n\r\n isScreenSmall: boolean;\r\n\r\n private _cmatMediaWatcherService = inject(CmatMediaWatcherService);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n private _autoHide: boolean = false;\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n\r\n @Input()\r\n get autoHide(): boolean {\r\n return this._autoHide;\r\n }\r\n set autoHide(value: boolean) {\r\n this._autoHide = !!value;\r\n }\r\n\r\n ngOnInit(): void {\r\n this._cmatMediaWatcherService.onMediaChange$\r\n .pipe(takeUntil(this._unsubscribeAll))\r\n .subscribe(({ matchingAliases }) => {\r\n this.isScreenSmall = !matchingAliases.includes('md');\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n}\r\n","<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id\"\r\n [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>总计:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n @if (!(autoHide && p.pages.length <= 1)) {\r\n <ul\r\n class=\"flex flex-row items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages; track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"cursor-pointer text-gray-400 hover:text-current\" (click)=\"p.setCurrent(page.value)\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div> \r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-icon-button [disabled]=\"p.getCurrent()===p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block px-2\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\"\r\n [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage()||0\"\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/<div class=\"pl-1\">{{p.getLastPage()}}</div></span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages; track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n </pagination-template>","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { isNil } from 'lodash-es';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\nimport { CmatPaginationService } from './pagination.service';\r\n\r\nconst LARGE_NUMBER = Number.MAX_SAFE_INTEGER;\r\n\r\nexport type Collection<T> = T[];\r\n\r\nexport interface CmatPaginatePipeArgs {\r\n id?: string;\r\n currentPage: string | number;\r\n itemsPerPage: string | number;\r\n totalItems: string | number;\r\n}\r\n\r\nexport interface CmatPipeState {\r\n collection: any[];\r\n size: number;\r\n start?: number;\r\n end?: number;\r\n slice: any[];\r\n}\r\n\r\n@Pipe({\r\n name: 'paginate',\r\n pure: true\r\n})\r\nexport class CmatPaginatePipe implements PipeTransform {\r\n private service = inject(CmatPaginationService);\r\n\r\n private state: Record<string, CmatPipeState> = {};\r\n\r\n public transform<T, U extends Collection<T>>(collection: U, args: CmatPaginatePipeArgs): U {\r\n if (!(collection instanceof Array)) {\r\n const _id = args.id ?? this.service.defaultId();\r\n if (this.state[_id]) {\r\n return this.state[_id].slice as U;\r\n } else {\r\n return collection;\r\n }\r\n }\r\n\r\n const serverSideMode = args.totalItems && args.totalItems !== collection.length;\r\n const instance = this.createInstance(collection, args);\r\n\r\n const id = instance.id!;\r\n let start;\r\n let end;\r\n let perPage = args.itemsPerPage;\r\n\r\n const emitChange = this.service.register(instance);\r\n\r\n if (!serverSideMode && collection instanceof Array) {\r\n perPage = +perPage || LARGE_NUMBER;\r\n start = (instance.currentPage - 1) * perPage;\r\n end = start + perPage;\r\n\r\n const isIdentical = this._stateIsIdentical(id, collection, start, end);\r\n if (isIdentical) {\r\n return this.state[id].slice as U;\r\n } else {\r\n const slice = collection.slice(start, end);\r\n this._saveState(id, collection, slice, start, end);\r\n this.service.change.emit(id);\r\n return slice as U;\r\n }\r\n } else {\r\n if (emitChange) {\r\n this.service.change.emit(id);\r\n }\r\n\r\n this._saveState(id, collection, collection, start, end);\r\n\r\n return collection;\r\n }\r\n\r\n }\r\n\r\n private createInstance(collection: any[], config: CmatPaginatePipeArgs): CmatPaginationInstance {\r\n this.checkConfig(config);\r\n\r\n return {\r\n id: !isNil(config.id) ? config.id : this.service.defaultId(),\r\n itemsPerPage: +config.itemsPerPage || 10,\r\n currentPage: +config.currentPage || 1,\r\n totalItems: +config.totalItems || collection.length\r\n };\r\n }\r\n\r\n private checkConfig(config: CmatPaginatePipeArgs): void {\r\n const required = ['itemsPerPage', 'currentPage'];\r\n\r\n const missing = required.filter(prop => !(prop in config));\r\n if (0 < missing.length) {\r\n throw new Error(`PaginatePipe: Argument is missing the following required properties: ${missing.join(', ')}`);\r\n }\r\n }\r\n\r\n private _saveState(id: string, collection: any[], slice: any[], start?: number, end?: number): void {\r\n this.state[id] = {\r\n collection,\r\n size: collection.length,\r\n slice,\r\n start,\r\n end\r\n };\r\n }\r\n\r\n private _stateIsIdentical(id: string, collection: any[], start: number, end: number): boolean {\r\n const state = this.state[id];\r\n if (!state) {\r\n return false;\r\n }\r\n const isMetaDataIdentical = state.size === collection.length &&\r\n state.start === start &&\r\n state.end === end;\r\n\r\n if (!isMetaDataIdentical) {\r\n return false;\r\n }\r\n\r\n return state.slice.every((element, index) => element === collection[start + index]);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAMa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,MAAM,GAAyB,IAAI,YAAY,EAAU;QAExD,IAAU,CAAA,UAAA,GAA2C,EAAE;QACvD,IAAoB,CAAA,oBAAA,GAAG,uBAAuB;AAiFzD;AA/EU,IAAA,SAAS,KAAa,OAAO,IAAI,CAAC,oBAAoB,CAAC;AAEvD,IAAA,QAAQ,CAAC,QAAgC,EAAA;AAC5C,QAAA,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC,oBAAoB;QAEzC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;YAC/B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,QAAQ;AACvC,YAAA,OAAO,IAAI;;aACR;AACH,YAAA,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;;;AAItC,IAAA,cAAc,CAAC,EAAU,EAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC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AAA,EAAA,CAAA;kBAJ5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE;AACT,iBAAA;;;AC3BD;;AAEG;;;;"}
@@ -20,10 +20,10 @@ class CmatPassToggleVisibilityComponent {
20
20
  get type() {
21
21
  return this.isVisible ? 'text' : 'password';
22
22
  }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPassToggleVisibilityComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CmatPassToggleVisibilityComponent, isStandalone: true, selector: "cmat-pass-toggle-visibility", inputs: { isVisible: "isVisible", tabindex: "tabindex" }, exportAs: ["cmatPassToggleVisibility"], ngImport: i0, template: "<button type=\"button\" class=\"mat-icon-button cdk-focused cdk-mouse-focused\" mat-icon-button\r\n matRipple [matRippleCentered]=\"true\" [attr.tabindex]=\"tabindex ? tabindex : null\" (click)=\"isVisible = !isVisible\">\r\n <mat-icon svgIcon=\"{{isVisible ? 'mat_outline:visibility' : 'mat_outline:visibility_off' }}\"></mat-icon>\r\n</button>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPassToggleVisibilityComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: CmatPassToggleVisibilityComponent, isStandalone: true, selector: "cmat-pass-toggle-visibility", inputs: { isVisible: "isVisible", tabindex: "tabindex" }, exportAs: ["cmatPassToggleVisibility"], ngImport: i0, template: "<button type=\"button\" class=\"mat-icon-button cdk-focused cdk-mouse-focused\" mat-icon-button\r\n matRipple [matRippleCentered]=\"true\" [attr.tabindex]=\"tabindex ? tabindex : null\" (click)=\"isVisible = !isVisible\">\r\n <mat-icon svgIcon=\"{{isVisible ? 'mat_outline:visibility' : 'mat_outline:visibility_off' }}\"></mat-icon>\r\n</button>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
25
25
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPassToggleVisibilityComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPassToggleVisibilityComponent, decorators: [{
27
27
  type: Component,
28
28
  args: [{ selector: 'cmat-pass-toggle-visibility', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatPassToggleVisibility', imports: [MatButtonModule, MatRippleModule, MatIconModule], template: "<button type=\"button\" class=\"mat-icon-button cdk-focused cdk-mouse-focused\" mat-icon-button\r\n matRipple [matRippleCentered]=\"true\" [attr.tabindex]=\"tabindex ? tabindex : null\" (click)=\"isVisible = !isVisible\">\r\n <mat-icon svgIcon=\"{{isVisible ? 'mat_outline:visibility' : 'mat_outline:visibility_off' }}\"></mat-icon>\r\n</button>" }]
29
29
  }], propDecorators: { isVisible: [{
@@ -257,10 +257,10 @@ class CmatPasswordStrengthComponent {
257
257
  this.calculatePasswordStrength();
258
258
  this.passwordConfirmationFormControl.updateValueAndValidity();
259
259
  }
260
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPasswordStrengthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
261
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CmatPasswordStrengthComponent, isStandalone: true, selector: "cmat-password-strength", inputs: { password: "password", externalError: "externalError", enableLengthRule: "enableLengthRule", enableLowerCaseLetterRule: "enableLowerCaseLetterRule", enableUpperCaseLetterRule: "enableUpperCaseLetterRule", enableDigitRule: "enableDigitRule", enableSpecialCharRule: "enableSpecialCharRule", min: "min", max: "max", customValidator: "customValidator", warnThreshold: "warnThreshold", accentThreshold: "accentThreshold" }, outputs: { strengthChanged: "strengthChanged" }, exportAs: ["cmatPasswordStrength"], usesOnChanges: true, ngImport: i0, template: "<mat-progress-bar mode=\"determinate\" [color]=\"color\" [value]=\"strength\"></mat-progress-bar>", dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
260
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPasswordStrengthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
261
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: CmatPasswordStrengthComponent, isStandalone: true, selector: "cmat-password-strength", inputs: { password: "password", externalError: "externalError", enableLengthRule: "enableLengthRule", enableLowerCaseLetterRule: "enableLowerCaseLetterRule", enableUpperCaseLetterRule: "enableUpperCaseLetterRule", enableDigitRule: "enableDigitRule", enableSpecialCharRule: "enableSpecialCharRule", min: "min", max: "max", customValidator: "customValidator", warnThreshold: "warnThreshold", accentThreshold: "accentThreshold" }, outputs: { strengthChanged: "strengthChanged" }, exportAs: ["cmatPasswordStrength"], usesOnChanges: true, ngImport: i0, template: "<mat-progress-bar mode=\"determinate\" [color]=\"color\" [value]=\"strength\"></mat-progress-bar>", dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
262
262
  }
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPasswordStrengthComponent, decorators: [{
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPasswordStrengthComponent, decorators: [{
264
264
  type: Component,
265
265
  args: [{ selector: 'cmat-password-strength', exportAs: 'cmatPasswordStrength', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatProgressBarModule], template: "<mat-progress-bar mode=\"determinate\" [color]=\"color\" [value]=\"strength\"></mat-progress-bar>" }]
266
266
  }], propDecorators: { password: [{
@@ -352,8 +352,8 @@ class CmatPasswordStrengthInfoComponent {
352
352
  this.minCharsCriteriaMsg = `包含至少 ${this.passwordComponent.min} 个字符`;
353
353
  }
354
354
  }
355
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPasswordStrengthInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
356
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatPasswordStrengthInfoComponent, isStandalone: true, selector: "cmat-password-strength-info", inputs: { passwordComponent: "passwordComponent", enableScoreInfo: "enableScoreInfo", lowerCaseCriteriaMsg: "lowerCaseCriteriaMsg", upperCaseCriteriaMsg: "upperCaseCriteriaMsg", digitsCriteriaMsg: "digitsCriteriaMsg", specialCharsCriteriaMsg: "specialCharsCriteriaMsg", customCharsCriteriaMsg: "customCharsCriteriaMsg", minCharsCriteriaMsg: "minCharsCriteriaMsg" }, exportAs: ["cmatPasswordStrengthInfo"], ngImport: i0, template: "<mat-card @list class=\"info-card\">\r\n <mat-card-content>\r\n @if (passwordComponent.enableLowerCaseLetterRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneLowerCaseLetter) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{lowerCaseCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableUpperCaseLetterRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneUpperCaseLetter) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{upperCaseCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableDigitRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneDigit) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{digitsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableSpecialCharRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneSpecialChar) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{specialCharsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableLengthRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastMinChars) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{minCharsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.customValidator) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtCustomChars) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{customCharsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (enableScoreInfo) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.strength === 100) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>\u5BC6\u7801\u5F3A\u5EA6= {{passwordComponent.strength}} %100</span>\r\n </div>\r\n }\r\n\r\n </mat-card-content>\r\n</mat-card>", styles: ["cmat-password-strength-info{margin-top:20px}cmat-password-strength-info .mat-mdc-card{display:flex;flex-direction:row;flex:1 1 0%;margin:.5rem;box-sizing:border-box;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content{display:flex;flex-direction:column;box-sizing:border-box;max-width:100%;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .mat-icon{margin-right:1rem}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .info-row{display:flex;flex-direction:row;box-sizing:border-box;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPasswordStrengthInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
356
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.2", type: CmatPasswordStrengthInfoComponent, isStandalone: true, selector: "cmat-password-strength-info", inputs: { passwordComponent: "passwordComponent", enableScoreInfo: "enableScoreInfo", lowerCaseCriteriaMsg: "lowerCaseCriteriaMsg", upperCaseCriteriaMsg: "upperCaseCriteriaMsg", digitsCriteriaMsg: "digitsCriteriaMsg", specialCharsCriteriaMsg: "specialCharsCriteriaMsg", customCharsCriteriaMsg: "customCharsCriteriaMsg", minCharsCriteriaMsg: "minCharsCriteriaMsg" }, exportAs: ["cmatPasswordStrengthInfo"], ngImport: i0, template: "<mat-card @list class=\"info-card\">\r\n <mat-card-content>\r\n @if (passwordComponent.enableLowerCaseLetterRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneLowerCaseLetter) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{lowerCaseCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableUpperCaseLetterRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneUpperCaseLetter) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{upperCaseCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableDigitRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneDigit) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{digitsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableSpecialCharRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastOneSpecialChar) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{specialCharsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.enableLengthRule) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtLeastMinChars) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{minCharsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent.customValidator) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.containAtCustomChars) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>{{customCharsCriteriaMsg}}</span>\r\n </div>\r\n }\r\n\r\n @if (enableScoreInfo) {\r\n <div @items class=\"info-row\">\r\n @if (passwordComponent.strength === 100) {\r\n <mat-icon @positiveState color=\"primary\" svgIcon=\"mat_outline:done\"></mat-icon>\r\n } @else {\r\n <mat-icon @negativeState color=\"warn\" svgIcon=\"mat_outline:error\"></mat-icon>\r\n }\r\n <span>\u5BC6\u7801\u5F3A\u5EA6= {{passwordComponent.strength}} %100</span>\r\n </div>\r\n }\r\n\r\n </mat-card-content>\r\n</mat-card>", styles: ["cmat-password-strength-info{margin-top:20px}cmat-password-strength-info .mat-mdc-card{display:flex;flex-direction:row;flex:1 1 0%;margin:.5rem;box-sizing:border-box;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content{display:flex;flex-direction:column;box-sizing:border-box;max-width:100%;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .mat-icon{margin-right:1rem}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .info-row{display:flex;flex-direction:row;box-sizing:border-box;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
357
357
  // nice stagger effect when showing existing elements
358
358
  trigger('list', [
359
359
  transition(':enter', [
@@ -407,7 +407,7 @@ class CmatPasswordStrengthInfoComponent {
407
407
  ]),
408
408
  ], encapsulation: i0.ViewEncapsulation.None }); }
409
409
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPasswordStrengthInfoComponent, decorators: [{
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPasswordStrengthInfoComponent, decorators: [{
411
411
  type: Component,
412
412
  args: [{ selector: 'cmat-password-strength-info', exportAs: 'cmatPasswordStrengthInfo', encapsulation: ViewEncapsulation.None, animations: [
413
413
  // nice stagger effect when showing existing elements
@@ -1,13 +1,12 @@
1
- import * as i2 from '@angular/cdk/a11y';
1
+ import * as i1 from '@angular/cdk/a11y';
2
2
  import { A11yModule, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
3
+ import { Directionality } from '@angular/cdk/bidi';
3
4
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
5
  import { NgStyle, NgClass } from '@angular/common';
5
6
  import * as i0 from '@angular/core';
6
- import { EventEmitter, TemplateRef, Input, HostBinding, ViewChild, Output, Optional, ViewEncapsulation, ChangeDetectionStrategy, Component, HostListener, Directive } from '@angular/core';
7
+ import { EventEmitter, inject, ElementRef, TemplateRef, Input, HostBinding, ViewChild, Output, ViewEncapsulation, ChangeDetectionStrategy, Component, ViewContainerRef, ChangeDetectorRef, HostListener, Directive } from '@angular/core';
7
8
  import { cmatAnimations } from 'cmat/animations';
8
- import * as i1 from '@angular/cdk/bidi';
9
- import * as i1$1 from '@angular/cdk/overlay';
10
- import { OverlayConfig } from '@angular/cdk/overlay';
9
+ import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
11
10
  import { TemplatePortal } from '@angular/cdk/portal';
12
11
  import { Subject } from 'rxjs';
13
12
  import { takeUntil } from 'rxjs/operators';
@@ -40,9 +39,7 @@ function throwCmatPopoverInvalidPositionEnd() {
40
39
  }
41
40
 
42
41
  class CmatPopoverComponent {
43
- constructor(_dir, _elementRef) {
44
- this._dir = _dir;
45
- this._elementRef = _elementRef;
42
+ constructor() {
46
43
  /** Event emitted when the popover is closed. */
47
44
  this.closed = new EventEmitter();
48
45
  this.role = 'dialog';
@@ -60,6 +57,8 @@ class CmatPopoverComponent {
60
57
  this.classList = {};
61
58
  /** Emits the current animation state whenever it changes. */
62
59
  this._onAnimationStateChange = new EventEmitter();
60
+ this._dir = inject(Directionality, { optional: true });
61
+ this._elementRef = inject(ElementRef);
63
62
  /** Settings for popover, view setters and getters for more detail */
64
63
  this._position = ['below', 'after'];
65
64
  this._triggerEvent = 'hover';
@@ -320,15 +319,13 @@ class CmatPopoverComponent {
320
319
  this.classList['cmat-popover-below-center'] = pos[0] === 'below' && pos[1] === 'center';
321
320
  this.classList['cmat-popover-below-after'] = pos[0] === 'below' && pos[1] === 'after';
322
321
  }
323
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPopoverComponent, deps: [{ token: i1.Directionality, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
324
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CmatPopoverComponent, isStandalone: true, selector: "cmat-popover", inputs: { popoverPanelStyles: "popoverPanelStyles", popoverArrowStyles: "popoverArrowStyles", popoverContentStyles: "popoverContentStyles", position: "position", triggerEvent: "triggerEvent", scrollStrategy: "scrollStrategy", enterDelay: "enterDelay", leaveDelay: "leaveDelay", xOffset: "xOffset", yOffset: "yOffset", arrowOffsetX: "arrowOffsetX", arrowOffsetY: "arrowOffsetY", arrowWidth: "arrowWidth", arrowHeight: "arrowHeight", closeOnPanelClick: "closeOnPanelClick", closeOnBackdropClick: "closeOnBackdropClick", disableAnimation: "disableAnimation", focusTrapEnabled: "focusTrapEnabled", focusTrapAutoCaptureEnabled: "focusTrapAutoCaptureEnabled", panelClass: "panelClass" }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "this.role" } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["cmatPopover"], ngImport: i0, template: "<ng-template>\r\n <div class=\"cmat-popover-panel shadow\" role=\"dialog\" [ngClass]=\"classList\" [ngStyle]=\"popoverPanelStyles\"\r\n [@.disabled]=\"disableAnimation\" [@transform]=\"'enter'\" (keydown)=\"handleKeydown($event)\" (click)=\"onClick()\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseOver()\" (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"cmat-popover-direction-arrow\" [ngStyle]=\"popoverArrowStyles\"></div>\r\n <div class=\"cmat-popover-content\" [ngStyle]=\"popoverContentStyles\" [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".cmat-popover-panel{max-height:calc(100vh - 48px);padding:.5rem;border-radius:.5rem;font-size:1rem}.cmat-popover-panel[class*=cmat-popover-below]{margin-top:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-above]{margin-bottom:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.cmat-popover-direction-arrow{position:absolute}.cmat-popover-direction-arrow:before,.cmat-popover-direction-arrow:after{position:absolute;display:inline-block;border-style:solid;content:\"\"}.cmat-popover-direction-arrow:before{border-width:.5em;border-color:var(--cmat-divider)}.cmat-popover-direction-arrow:after{border-width:calc(.5em - 1px);border-color:var(--cmat-bg-card)}[class*=cmat-popover-below] .cmat-popover-direction-arrow,[class*=cmat-popover-above] .cmat-popover-direction-arrow{width:1em}[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{left:1px}[dir=rtl] [class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-above] .cmat-popover-direction-arrow:after{right:1px;left:auto}[class*=cmat-popover-below] .cmat-popover-direction-arrow:before,[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:before,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{border-left-color:transparent;border-right-color:transparent}[class*=cmat-popover-below] .cmat-popover-direction-arrow{top:0}[class*=cmat-popover-below] .cmat-popover-direction-arrow:before,[class*=cmat-popover-below] .cmat-popover-direction-arrow:after{bottom:0;border-top-width:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow{bottom:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow:before,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{top:0;border-bottom-width:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow,[class*=cmat-popover-after] .cmat-popover-direction-arrow{height:1em}[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{top:1px}[class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-top-color:transparent;border-bottom-color:transparent}[class*=cmat-popover-before] .cmat-popover-direction-arrow{right:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[class*=cmat-popover-before] .cmat-popover-direction-arrow:after{left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=cmat-popover-after] .cmat-popover-direction-arrow{left:0}[class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [cmatAnimations], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
322
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
323
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.2", type: CmatPopoverComponent, isStandalone: true, selector: "cmat-popover", inputs: { popoverPanelStyles: "popoverPanelStyles", popoverArrowStyles: "popoverArrowStyles", popoverContentStyles: "popoverContentStyles", position: "position", triggerEvent: "triggerEvent", scrollStrategy: "scrollStrategy", enterDelay: "enterDelay", leaveDelay: "leaveDelay", xOffset: "xOffset", yOffset: "yOffset", arrowOffsetX: "arrowOffsetX", arrowOffsetY: "arrowOffsetY", arrowWidth: "arrowWidth", arrowHeight: "arrowHeight", closeOnPanelClick: "closeOnPanelClick", closeOnBackdropClick: "closeOnBackdropClick", disableAnimation: "disableAnimation", focusTrapEnabled: "focusTrapEnabled", focusTrapAutoCaptureEnabled: "focusTrapAutoCaptureEnabled", panelClass: "panelClass" }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "this.role" } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["cmatPopover"], ngImport: i0, template: "<ng-template>\r\n <div class=\"cmat-popover-panel shadow\" role=\"dialog\" [ngClass]=\"classList\" [ngStyle]=\"popoverPanelStyles\"\r\n [@.disabled]=\"disableAnimation\" [@transform]=\"'enter'\" (keydown)=\"handleKeydown($event)\" (click)=\"onClick()\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseOver()\" (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"cmat-popover-direction-arrow\" [ngStyle]=\"popoverArrowStyles\"></div>\r\n <div class=\"cmat-popover-content\" [ngStyle]=\"popoverContentStyles\" [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".cmat-popover-panel{max-height:calc(100vh - 48px);padding:.5rem;border-radius:.5rem;font-size:1rem}.cmat-popover-panel[class*=cmat-popover-below]{margin-top:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-above]{margin-bottom:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.cmat-popover-direction-arrow{position:absolute}.cmat-popover-direction-arrow:before,.cmat-popover-direction-arrow:after{position:absolute;display:inline-block;border-style:solid;content:\"\"}.cmat-popover-direction-arrow:before{border-width:.5em;border-color:var(--cmat-divider)}.cmat-popover-direction-arrow:after{border-width:calc(.5em - 1px);border-color:var(--cmat-bg-card)}[class*=cmat-popover-below] .cmat-popover-direction-arrow,[class*=cmat-popover-above] .cmat-popover-direction-arrow{width:1em}[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{left:1px}[dir=rtl] [class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-above] .cmat-popover-direction-arrow:after{right:1px;left:auto}[class*=cmat-popover-below] .cmat-popover-direction-arrow:before,[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:before,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{border-left-color:transparent;border-right-color:transparent}[class*=cmat-popover-below] .cmat-popover-direction-arrow{top:0}[class*=cmat-popover-below] .cmat-popover-direction-arrow:before,[class*=cmat-popover-below] .cmat-popover-direction-arrow:after{bottom:0;border-top-width:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow{bottom:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow:before,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{top:0;border-bottom-width:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow,[class*=cmat-popover-after] .cmat-popover-direction-arrow{height:1em}[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{top:1px}[class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-top-color:transparent;border-bottom-color:transparent}[class*=cmat-popover-before] .cmat-popover-direction-arrow{right:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[class*=cmat-popover-before] .cmat-popover-direction-arrow:after{left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=cmat-popover-after] .cmat-popover-direction-arrow{left:0}[class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [cmatAnimations], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
325
324
  }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPopoverComponent, decorators: [{
325
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPopoverComponent, decorators: [{
327
326
  type: Component,
328
327
  args: [{ selector: 'cmat-popover', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [cmatAnimations], exportAs: 'cmatPopover', imports: [NgStyle, NgClass, A11yModule], template: "<ng-template>\r\n <div class=\"cmat-popover-panel shadow\" role=\"dialog\" [ngClass]=\"classList\" [ngStyle]=\"popoverPanelStyles\"\r\n [@.disabled]=\"disableAnimation\" [@transform]=\"'enter'\" (keydown)=\"handleKeydown($event)\" (click)=\"onClick()\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseOver()\" (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"cmat-popover-direction-arrow\" [ngStyle]=\"popoverArrowStyles\"></div>\r\n <div class=\"cmat-popover-content\" [ngStyle]=\"popoverContentStyles\" [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".cmat-popover-panel{max-height:calc(100vh - 48px);padding:.5rem;border-radius:.5rem;font-size:1rem}.cmat-popover-panel[class*=cmat-popover-below]{margin-top:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-above]{margin-bottom:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.cmat-popover-panel[class*=cmat-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .cmat-popover-panel[class*=cmat-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.cmat-popover-direction-arrow{position:absolute}.cmat-popover-direction-arrow:before,.cmat-popover-direction-arrow:after{position:absolute;display:inline-block;border-style:solid;content:\"\"}.cmat-popover-direction-arrow:before{border-width:.5em;border-color:var(--cmat-divider)}.cmat-popover-direction-arrow:after{border-width:calc(.5em - 1px);border-color:var(--cmat-bg-card)}[class*=cmat-popover-below] .cmat-popover-direction-arrow,[class*=cmat-popover-above] .cmat-popover-direction-arrow{width:1em}[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{left:1px}[dir=rtl] [class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[dir=rtl] [class*=cmat-popover-above] .cmat-popover-direction-arrow:after{right:1px;left:auto}[class*=cmat-popover-below] .cmat-popover-direction-arrow:before,[class*=cmat-popover-below] .cmat-popover-direction-arrow:after,[class*=cmat-popover-above] .cmat-popover-direction-arrow:before,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{border-left-color:transparent;border-right-color:transparent}[class*=cmat-popover-below] .cmat-popover-direction-arrow{top:0}[class*=cmat-popover-below] .cmat-popover-direction-arrow:before,[class*=cmat-popover-below] .cmat-popover-direction-arrow:after{bottom:0;border-top-width:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow{bottom:0}[class*=cmat-popover-above] .cmat-popover-direction-arrow:before,[class*=cmat-popover-above] .cmat-popover-direction-arrow:after{top:0;border-bottom-width:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow,[class*=cmat-popover-after] .cmat-popover-direction-arrow{height:1em}[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{top:1px}[class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[class*=cmat-popover-before] .cmat-popover-direction-arrow:after,[class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-top-color:transparent;border-bottom-color:transparent}[class*=cmat-popover-before] .cmat-popover-direction-arrow{right:0}[class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[class*=cmat-popover-before] .cmat-popover-direction-arrow:after{left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before,[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=cmat-popover-before] .cmat-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=cmat-popover-after] .cmat-popover-direction-arrow{left:0}[class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[class*=cmat-popover-after] .cmat-popover-direction-arrow:after{right:0;border-left-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before,[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=cmat-popover-after] .cmat-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n"] }]
329
- }], ctorParameters: () => [{ type: i1.Directionality, decorators: [{
330
- type: Optional
331
- }] }, { type: i0.ElementRef }], propDecorators: { closed: [{
328
+ }], ctorParameters: () => [], propDecorators: { closed: [{
332
329
  type: Output
333
330
  }], templateRef: [{
334
331
  type: ViewChild,
@@ -383,12 +380,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
383
380
  * responsible for toggling the display of the provided popover instance.
384
381
  */
385
382
  class CmatPopoverTriggerDirective {
386
- constructor(_overlay, _elementRef, _viewContainerRef, _dir, _changeDetectorRef) {
387
- this._overlay = _overlay;
388
- this._elementRef = _elementRef;
389
- this._viewContainerRef = _viewContainerRef;
390
- this._dir = _dir;
391
- this._changeDetectorRef = _changeDetectorRef;
383
+ constructor() {
392
384
  this.ariaHaspopup = true;
393
385
  /** Event emitted when the associated popover is opened. */
394
386
  this.popoverOpened = new EventEmitter();
@@ -396,6 +388,11 @@ class CmatPopoverTriggerDirective {
396
388
  this.popoverClosed = new EventEmitter();
397
389
  this.popoverOpened$ = new Subject();
398
390
  this.popoverClosed$ = new Subject();
391
+ this._overlay = inject(Overlay);
392
+ this._elementRef = inject(ElementRef);
393
+ this._viewContainerRef = inject(ViewContainerRef);
394
+ this._dir = inject(Directionality, { optional: true });
395
+ this._changeDetectorRef = inject(ChangeDetectorRef);
399
396
  this._overlayRef = null;
400
397
  this._popoverOpen = false;
401
398
  this._halt = false;
@@ -768,19 +765,17 @@ class CmatPopoverTriggerDirective {
768
765
  }
769
766
  this.popover.setCurrentStyles();
770
767
  }
771
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPopoverTriggerDirective, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
772
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CmatPopoverTriggerDirective, isStandalone: true, selector: "[cmatPopoverTriggerFor],[cmatPopoverTargetAt],[cmatPopoverTriggerOn]", inputs: { popover: ["cmatPopoverTriggerFor", "popover"], targetElement: ["cmatPopoverTargetAt", "targetElement"], triggerEvent: ["cmatPopoverTriggerOn", "triggerEvent"] }, outputs: { popoverOpened: "popoverOpened", popoverClosed: "popoverClosed" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)", "mousedown": "handleMousedown($event)" }, properties: { "attr.aria-haspopup": "this.ariaHaspopup" } }, exportAs: ["cmatPopoverTrigger"], ngImport: i0 }); }
768
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPopoverTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
769
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.2", type: CmatPopoverTriggerDirective, isStandalone: true, selector: "[cmatPopoverTriggerFor],[cmatPopoverTargetAt],[cmatPopoverTriggerOn]", inputs: { popover: ["cmatPopoverTriggerFor", "popover"], targetElement: ["cmatPopoverTargetAt", "targetElement"], triggerEvent: ["cmatPopoverTriggerOn", "triggerEvent"] }, outputs: { popoverOpened: "popoverOpened", popoverClosed: "popoverClosed" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)", "mousedown": "handleMousedown($event)" }, properties: { "attr.aria-haspopup": "this.ariaHaspopup" } }, exportAs: ["cmatPopoverTrigger"], ngImport: i0 }); }
773
770
  }
774
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPopoverTriggerDirective, decorators: [{
771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPopoverTriggerDirective, decorators: [{
775
772
  type: Directive,
776
773
  args: [{
777
774
  selector: '[cmatPopoverTriggerFor],[cmatPopoverTargetAt],[cmatPopoverTriggerOn]',
778
775
  standalone: true,
779
776
  exportAs: 'cmatPopoverTrigger'
780
777
  }]
781
- }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1.Directionality, decorators: [{
782
- type: Optional
783
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { ariaHaspopup: [{
778
+ }], propDecorators: { ariaHaspopup: [{
784
779
  type: HostBinding,
785
780
  args: ['attr.aria-haspopup']
786
781
  }], popover: [{
@@ -811,20 +806,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
811
806
  }] } });
812
807
 
813
808
  class CmatPopoverTargetDirective {
814
- constructor(elementRef) {
815
- this.elementRef = elementRef;
809
+ constructor() {
810
+ this.elementRef = inject(ElementRef);
816
811
  }
817
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPopoverTargetDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
818
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: CmatPopoverTargetDirective, isStandalone: true, selector: "cmat-popover-target, [cmatPopoverTarget]", exportAs: ["cmatPopoverTarget"], ngImport: i0 }); }
812
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPopoverTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
813
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.2", type: CmatPopoverTargetDirective, isStandalone: true, selector: "cmat-popover-target, [cmatPopoverTarget]", exportAs: ["cmatPopoverTarget"], ngImport: i0 }); }
819
814
  }
820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPopoverTargetDirective, decorators: [{
815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatPopoverTargetDirective, decorators: [{
821
816
  type: Directive,
822
817
  args: [{
823
818
  selector: 'cmat-popover-target, [cmatPopoverTarget]',
824
819
  standalone: true,
825
820
  exportAs: 'cmatPopoverTarget',
826
821
  }]
827
- }], ctorParameters: () => [{ type: i0.ElementRef }] });
822
+ }] });
828
823
 
829
824
  /**
830
825
  * Generated bundle index. Do not edit.