@elite.framework/ng.core 1.0.62 → 1.0.65

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 (127) hide show
  1. package/fesm2022/elite.framework-ng.core-src-lib-components-attachments.mjs +204 -0
  2. package/fesm2022/elite.framework-ng.core-src-lib-components-attachments.mjs.map +1 -0
  3. package/fesm2022/elite.framework-ng.core-src-lib-components-breadcrumb.mjs +132 -0
  4. package/fesm2022/elite.framework-ng.core-src-lib-components-breadcrumb.mjs.map +1 -0
  5. package/fesm2022/elite.framework-ng.core-src-lib-components-color-picker.mjs +76 -0
  6. package/fesm2022/elite.framework-ng.core-src-lib-components-color-picker.mjs.map +1 -0
  7. package/fesm2022/elite.framework-ng.core-src-lib-components-column-settings-popover.mjs +172 -0
  8. package/fesm2022/elite.framework-ng.core-src-lib-components-column-settings-popover.mjs.map +1 -0
  9. package/fesm2022/elite.framework-ng.core-src-lib-components-condition-editor.mjs +794 -0
  10. package/fesm2022/elite.framework-ng.core-src-lib-components-condition-editor.mjs.map +1 -0
  11. package/fesm2022/elite.framework-ng.core-src-lib-components-custom-switch.mjs +110 -0
  12. package/fesm2022/elite.framework-ng.core-src-lib-components-custom-switch.mjs.map +1 -0
  13. package/fesm2022/elite.framework-ng.core-src-lib-components-deactivation-reason.mjs +130 -0
  14. package/fesm2022/elite.framework-ng.core-src-lib-components-deactivation-reason.mjs.map +1 -0
  15. package/fesm2022/elite.framework-ng.core-src-lib-components-form-button.mjs +50 -0
  16. package/fesm2022/elite.framework-ng.core-src-lib-components-form-button.mjs.map +1 -0
  17. package/fesm2022/elite.framework-ng.core-src-lib-components-form-field.mjs +154 -0
  18. package/fesm2022/elite.framework-ng.core-src-lib-components-form-field.mjs.map +1 -0
  19. package/fesm2022/elite.framework-ng.core-src-lib-components-form-template.mjs +24 -0
  20. package/fesm2022/elite.framework-ng.core-src-lib-components-form-template.mjs.map +1 -0
  21. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-avatar-image.mjs +100 -0
  22. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-avatar-image.mjs.map +1 -0
  23. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-avatar-label.mjs +78 -0
  24. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-avatar-label.mjs.map +1 -0
  25. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-button-selector.mjs +167 -0
  26. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-button-selector.mjs.map +1 -0
  27. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-button.mjs +62 -0
  28. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-button.mjs.map +1 -0
  29. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-split-button.mjs +50 -0
  30. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-split-button.mjs.map +1 -0
  31. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-username-with-domain.mjs +76 -0
  32. package/fesm2022/elite.framework-ng.core-src-lib-components-formly-username-with-domain.mjs.map +1 -0
  33. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-autocomplete.mjs +163 -0
  34. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-autocomplete.mjs.map +1 -0
  35. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-button.mjs +133 -0
  36. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-button.mjs.map +1 -0
  37. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-card.mjs +214 -0
  38. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-card.mjs.map +1 -0
  39. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-crud-table.mjs +385 -0
  40. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-crud-table.mjs.map +1 -0
  41. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-errormessage.mjs +23 -0
  42. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-errormessage.mjs.map +1 -0
  43. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-formly-fields.mjs +53 -0
  44. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-formly-fields.mjs.map +1 -0
  45. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-loadingspinner.mjs +23 -0
  46. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-loadingspinner.mjs.map +1 -0
  47. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-search.mjs +85 -0
  48. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-search.mjs.map +1 -0
  49. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-selector.mjs +430 -0
  50. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-selector.mjs.map +1 -0
  51. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-table.mjs +216 -0
  52. package/fesm2022/elite.framework-ng.core-src-lib-components-generic-table.mjs.map +1 -0
  53. package/fesm2022/elite.framework-ng.core-src-lib-components-header-wrapper.mjs +18 -0
  54. package/fesm2022/elite.framework-ng.core-src-lib-components-header-wrapper.mjs.map +1 -0
  55. package/fesm2022/elite.framework-ng.core-src-lib-components-icon-picker.mjs +195 -0
  56. package/fesm2022/elite.framework-ng.core-src-lib-components-icon-picker.mjs.map +1 -0
  57. package/fesm2022/elite.framework-ng.core-src-lib-components-input-switch.mjs +94 -0
  58. package/fesm2022/elite.framework-ng.core-src-lib-components-input-switch.mjs.map +1 -0
  59. package/fesm2022/elite.framework-ng.core-src-lib-components-input-with-icon.mjs +55 -0
  60. package/fesm2022/elite.framework-ng.core-src-lib-components-input-with-icon.mjs.map +1 -0
  61. package/fesm2022/elite.framework-ng.core-src-lib-components-label-type.mjs +112 -0
  62. package/fesm2022/elite.framework-ng.core-src-lib-components-label-type.mjs.map +1 -0
  63. package/fesm2022/elite.framework-ng.core-src-lib-components-odata-query-builder.mjs +297 -0
  64. package/fesm2022/elite.framework-ng.core-src-lib-components-odata-query-builder.mjs.map +1 -0
  65. package/fesm2022/elite.framework-ng.core-src-lib-components-repeat.mjs +135 -0
  66. package/fesm2022/elite.framework-ng.core-src-lib-components-repeat.mjs.map +1 -0
  67. package/fesm2022/elite.framework-ng.core-src-lib-components-sidebar-cards.mjs +40 -0
  68. package/fesm2022/elite.framework-ng.core-src-lib-components-sidebar-cards.mjs.map +1 -0
  69. package/fesm2022/elite.framework-ng.core-src-lib-components-sidebar-toggles.mjs +41 -0
  70. package/fesm2022/elite.framework-ng.core-src-lib-components-sidebar-toggles.mjs.map +1 -0
  71. package/fesm2022/elite.framework-ng.core-src-lib-components-tabs.mjs +45 -0
  72. package/fesm2022/elite.framework-ng.core-src-lib-components-tabs.mjs.map +1 -0
  73. package/fesm2022/elite.framework-ng.core-src-lib-components-tag-type.mjs +192 -0
  74. package/fesm2022/elite.framework-ng.core-src-lib-components-tag-type.mjs.map +1 -0
  75. package/fesm2022/elite.framework-ng.core-src-lib-components-text-editor.mjs +44 -0
  76. package/fesm2022/elite.framework-ng.core-src-lib-components-text-editor.mjs.map +1 -0
  77. package/fesm2022/elite.framework-ng.core-src-lib-components-wrappers.mjs +174 -0
  78. package/fesm2022/elite.framework-ng.core-src-lib-components-wrappers.mjs.map +1 -0
  79. package/fesm2022/elite.framework-ng.core-src-lib-directives.mjs +59 -0
  80. package/fesm2022/elite.framework-ng.core-src-lib-directives.mjs.map +1 -0
  81. package/fesm2022/elite.framework-ng.core-src-lib-pipes.mjs +135 -0
  82. package/fesm2022/elite.framework-ng.core-src-lib-pipes.mjs.map +1 -0
  83. package/fesm2022/elite.framework-ng.core.mjs +1371 -6371
  84. package/fesm2022/elite.framework-ng.core.mjs.map +1 -1
  85. package/index.d.ts +347 -1274
  86. package/package.json +162 -22
  87. package/src/lib/components/attachments/index.d.ts +31 -0
  88. package/src/lib/components/breadcrumb/index.d.ts +10 -0
  89. package/src/lib/components/color-picker/index.d.ts +9 -0
  90. package/src/lib/components/column-settings-popover/index.d.ts +39 -0
  91. package/src/lib/components/condition-editor/index.d.ts +73 -0
  92. package/src/lib/components/custom-switch/index.d.ts +12 -0
  93. package/src/lib/components/deactivation-reason/index.d.ts +24 -0
  94. package/src/lib/components/form-button/index.d.ts +10 -0
  95. package/src/lib/components/form-field/index.d.ts +30 -0
  96. package/src/lib/components/form-template/index.d.ts +9 -0
  97. package/src/lib/components/formly-avatar-image/index.d.ts +11 -0
  98. package/src/lib/components/formly-avatar-label/index.d.ts +29 -0
  99. package/src/lib/components/formly-button/index.d.ts +13 -0
  100. package/src/lib/components/formly-button-selector/index.d.ts +28 -0
  101. package/src/lib/components/formly-split-button/index.d.ts +16 -0
  102. package/src/lib/components/formly-username-with-domain/index.d.ts +12 -0
  103. package/src/lib/components/generic-autocomplete/index.d.ts +34 -0
  104. package/src/lib/components/generic-button/index.d.ts +35 -0
  105. package/src/lib/components/generic-card/index.d.ts +90 -0
  106. package/src/lib/components/generic-crud-table/index.d.ts +120 -0
  107. package/src/lib/components/generic-errormessage/index.d.ts +10 -0
  108. package/src/lib/components/generic-formly-fields/index.d.ts +22 -0
  109. package/src/lib/components/generic-loadingspinner/index.d.ts +9 -0
  110. package/src/lib/components/generic-search/index.d.ts +29 -0
  111. package/src/lib/components/generic-selector/index.d.ts +66 -0
  112. package/src/lib/components/generic-table/index.d.ts +60 -0
  113. package/src/lib/components/header-wrapper/index.d.ts +8 -0
  114. package/src/lib/components/icon-picker/index.d.ts +23 -0
  115. package/src/lib/components/input-switch/index.d.ts +9 -0
  116. package/src/lib/components/input-with-icon/index.d.ts +10 -0
  117. package/src/lib/components/label-type/index.d.ts +19 -0
  118. package/src/lib/components/odata-query-builder/index.d.ts +81 -0
  119. package/src/lib/components/repeat/index.d.ts +17 -0
  120. package/src/lib/components/sidebar-cards/index.d.ts +18 -0
  121. package/src/lib/components/sidebar-toggles/index.d.ts +18 -0
  122. package/src/lib/components/tabs/index.d.ts +10 -0
  123. package/src/lib/components/tag-type/index.d.ts +27 -0
  124. package/src/lib/components/text-editor/index.d.ts +9 -0
  125. package/src/lib/components/wrappers/index.d.ts +24 -0
  126. package/src/lib/directives/index.d.ts +23 -0
  127. package/src/lib/pipes/index.d.ts +20 -0
@@ -0,0 +1,204 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i3 from '@angular/forms';
6
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
7
+ import { FieldType } from '@ngx-formly/core';
8
+ import * as i4 from 'primeng/fileupload';
9
+ import { FileUploadModule } from 'primeng/fileupload';
10
+ import * as i5 from 'primeng/button';
11
+ import { ButtonModule } from 'primeng/button';
12
+ import * as i1 from 'primeng/api';
13
+ import { MessageService } from 'primeng/api';
14
+ import * as i6 from 'primeng/inputtext';
15
+ import { InputTextModule } from 'primeng/inputtext';
16
+ import { ENVIRONMENT, AttachmentDto } from '@elite.framework/ng.core';
17
+
18
+ class AttachmentTypeComponent extends FieldType {
19
+ messageService;
20
+ defaultAcceptTypes = '.pdf,application/pdf,image/*,.txt,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel';
21
+ maxFileSize = 1 * 1024 * 1024; // 1 MB
22
+ tenantId = 0;
23
+ env = inject(ENVIRONMENT);
24
+ constructor(messageService) {
25
+ super();
26
+ this.messageService = messageService;
27
+ }
28
+ get url() {
29
+ return this.env.apiUrl + (this.props['apiUrl'] ?? '/api/files');
30
+ }
31
+ get attachments() {
32
+ return Array.isArray(this.formControl.value)
33
+ ? this.formControl.value
34
+ : (this.formControl.value ? [this.formControl.value] : []);
35
+ }
36
+ set attachments(value) {
37
+ if (this.props['multiple']) {
38
+ this.formControl.setValue(value);
39
+ }
40
+ else {
41
+ this.formControl.setValue(value?.[0] || null);
42
+ }
43
+ }
44
+ get attachment() {
45
+ return Array.isArray(this.formControl.value)
46
+ ? (this.formControl.value[0] || null)
47
+ : this.formControl.value || null;
48
+ }
49
+ set attachment(value) {
50
+ if (this.props['multiple']) {
51
+ const arr = Array.isArray(this.formControl.value)
52
+ ? [...this.formControl.value]
53
+ : (this.formControl.value ? [this.formControl.value] : []);
54
+ if (value)
55
+ arr.push(value);
56
+ this.formControl.setValue(arr);
57
+ }
58
+ else {
59
+ this.formControl.setValue(value);
60
+ }
61
+ }
62
+ async onUpload(event) {
63
+ const files = event.files;
64
+ const isMultiple = this.props['multiple'] ?? true;
65
+ const allowedTypes = this.props['accept'] || '';
66
+ for (const file of files) {
67
+ if (file.size > this.maxFileSize) {
68
+ this.messageService.add({
69
+ severity: 'error',
70
+ summary: 'خطأ',
71
+ detail: `الملف "${file.name}" يتجاوز الحد الأقصى (1MB)`,
72
+ });
73
+ continue;
74
+ }
75
+ if (allowedTypes && !this.isFileTypeAllowed(file, allowedTypes)) {
76
+ this.messageService.add({
77
+ severity: 'error',
78
+ summary: 'نوع الملف غير مسموح',
79
+ detail: `الملف "${file.name}" ليس من الأنواع المسموحة`,
80
+ });
81
+ continue;
82
+ }
83
+ if (isMultiple && this.attachments.some(a => a.fileName === file.name)) {
84
+ continue;
85
+ }
86
+ const base64 = await this.fileToBase64(file);
87
+ const attachment = new AttachmentDto();
88
+ attachment.fileName = file.name;
89
+ attachment.mimeType = file.type;
90
+ attachment.base64 = base64;
91
+ if (isMultiple) {
92
+ this.attachments = [...this.attachments, attachment];
93
+ }
94
+ else {
95
+ this.attachment = attachment;
96
+ }
97
+ }
98
+ }
99
+ remove(index) {
100
+ const copy = [...this.attachments];
101
+ copy.splice(index, 1);
102
+ this.attachments = copy;
103
+ }
104
+ choose(event, callback) {
105
+ callback();
106
+ }
107
+ fileToBase64(file) {
108
+ return new Promise((resolve, reject) => {
109
+ const reader = new FileReader();
110
+ reader.readAsDataURL(file);
111
+ reader.onload = () => resolve(reader.result.split(',')[1]);
112
+ reader.onerror = err => reject(err);
113
+ });
114
+ }
115
+ isFileTypeAllowed(file, allowedTypes) {
116
+ const accepted = allowedTypes.split(',').map(t => t.trim());
117
+ return accepted.some(type => {
118
+ if (type === '*/*')
119
+ return true;
120
+ if (type.endsWith('/*')) {
121
+ return file.type.startsWith(type.split('/')[0] + '/');
122
+ }
123
+ return file.type === type;
124
+ });
125
+ }
126
+ getFileLabel(mime) {
127
+ if (!mime)
128
+ return 'FILE';
129
+ if (mime.includes('pdf'))
130
+ return 'PDF';
131
+ if (mime.includes('excel') || mime.includes('spreadsheet'))
132
+ return 'XLS';
133
+ if (mime.includes('word'))
134
+ return 'DOC';
135
+ if (mime.includes('image'))
136
+ return 'IMG';
137
+ if (mime.includes('zip'))
138
+ return 'ZIP';
139
+ if (mime.includes('csv'))
140
+ return 'CSV';
141
+ if (mime.includes('text'))
142
+ return 'TXT';
143
+ return 'FILE';
144
+ }
145
+ getLabelClass(mime) {
146
+ if (mime.includes('pdf'))
147
+ return 'bg-red-600 text-white';
148
+ if (mime.includes('excel'))
149
+ return 'bg-green-600 text-white';
150
+ if (mime.includes('word'))
151
+ return 'bg-blue-600 text-white';
152
+ if (mime.includes('image'))
153
+ return 'bg-yellow-500 text-white';
154
+ if (mime.includes('zip'))
155
+ return 'bg-pink-600 text-white';
156
+ return 'bg-gray-400 text-white';
157
+ }
158
+ getIconColor(mime) {
159
+ if (mime.includes('pdf'))
160
+ return 'text-red-400';
161
+ if (mime.includes('excel'))
162
+ return 'text-green-500';
163
+ if (mime.includes('word'))
164
+ return 'text-blue-500';
165
+ if (mime.includes('image'))
166
+ return 'text-yellow-500';
167
+ if (mime.includes('zip'))
168
+ return 'text-pink-500';
169
+ return 'text-gray-400';
170
+ }
171
+ getFileIcon(mime) {
172
+ if (mime.includes('pdf'))
173
+ return 'pi pi-file-pdf';
174
+ if (mime.includes('excel') || mime.includes('spreadsheet'))
175
+ return 'pi pi-file-excel';
176
+ if (mime.includes('word'))
177
+ return 'pi pi-file-word';
178
+ if (mime.includes('image'))
179
+ return 'pi pi-image';
180
+ if (mime.includes('zip'))
181
+ return 'pi pi-file-zip';
182
+ return 'pi pi-file';
183
+ }
184
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AttachmentTypeComponent, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Component });
185
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AttachmentTypeComponent, isStandalone: true, selector: "attachment-type", providers: [MessageService], usesInheritance: true, ngImport: i0, template: "<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0631\u0641\u0627\u0642\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n style=\"height: 7rem;\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n style=\"top: 3px;right: 3px;\"\n type=\"button\"\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"\u062D\u0630\u0641\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div style=\"max-width: 85%;\" class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n\n <div class=\"truncate\">{{ file.fileName }}</div>\n </div>\n\n <!-- Download icon -->\n <a\n *ngIf=\"file.binaryObjectId\"\n style=\"bottom: 3px;right: 3px;\"\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"\u062A\u062D\u0645\u064A\u0644\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n type=\"button\"\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"\u0623\u0636\u0641 \u0648\u0635\u0641\u0627\u064B\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u0650\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u062A\u062D\u0645\u064A\u0644.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i4.FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }] });
186
+ }
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AttachmentTypeComponent, decorators: [{
188
+ type: Component,
189
+ args: [{ selector: 'attachment-type', standalone: true, imports: [
190
+ CommonModule,
191
+ ReactiveFormsModule,
192
+ FormsModule,
193
+ FileUploadModule,
194
+ ButtonModule,
195
+ InputTextModule
196
+ ], providers: [MessageService], template: "<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0631\u0641\u0627\u0642\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n style=\"height: 7rem;\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n style=\"top: 3px;right: 3px;\"\n type=\"button\"\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"\u062D\u0630\u0641\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div style=\"max-width: 85%;\" class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n\n <div class=\"truncate\">{{ file.fileName }}</div>\n </div>\n\n <!-- Download icon -->\n <a\n *ngIf=\"file.binaryObjectId\"\n style=\"bottom: 3px;right: 3px;\"\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"\u062A\u062D\u0645\u064A\u0644\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n type=\"button\"\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"\u0623\u0636\u0641 \u0648\u0635\u0641\u0627\u064B\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u0650\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u062A\u062D\u0645\u064A\u0644.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n" }]
197
+ }], ctorParameters: () => [{ type: i1.MessageService }] });
198
+
199
+ /**
200
+ * Generated bundle index. Do not edit.
201
+ */
202
+
203
+ export { AttachmentTypeComponent };
204
+ //# sourceMappingURL=elite.framework-ng.core-src-lib-components-attachments.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elite.framework-ng.core-src-lib-components-attachments.mjs","sources":["../../../projects/core/src/lib/components/attachments/attachment-type.ts","../../../projects/core/src/lib/components/attachments/attachment-type.html","../../../projects/core/src/lib/components/attachments/elite.framework-ng.core-src-lib-components-attachments.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\n\nimport { FieldType } from '@ngx-formly/core';\n\nimport { FileUploadModule } from 'primeng/fileupload';\nimport { ButtonModule } from 'primeng/button';\nimport { MessageService } from 'primeng/api';\n\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ENVIRONMENT } from '@elite.framework/ng.core';\nimport { AttachmentDto } from '@elite.framework/ng.core';\n\n\n@Component({\n selector: 'attachment-type',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n FileUploadModule,\n ButtonModule,\n InputTextModule\n ],\n providers: [MessageService],\n templateUrl: './attachment-type.html',\n})\nexport class AttachmentTypeComponent extends FieldType {\n defaultAcceptTypes = '.pdf,application/pdf,image/*,.txt,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel';\n\n maxFileSize = 1 * 1024 * 1024; // 1 MB\n tenantId = 0;\n private env = inject(ENVIRONMENT);\n\n constructor(private messageService: MessageService) {\n super();\n\n }\n get url():string{\n return this.env.apiUrl + (this.props['apiUrl'] ?? '/api/files');\n }\n get attachments(): AttachmentDto[] {\n return Array.isArray(this.formControl.value)\n ? this.formControl.value\n : (this.formControl.value ? [this.formControl.value] : []);\n }\n\n set attachments(value: AttachmentDto[]) {\n if (this.props['multiple']) {\n this.formControl.setValue(value);\n } else {\n this.formControl.setValue(value?.[0] || null);\n }\n }\n\n get attachment(): AttachmentDto | null {\n return Array.isArray(this.formControl.value)\n ? (this.formControl.value[0] || null)\n : this.formControl.value || null;\n }\n\n\n set attachment(value: AttachmentDto | null) {\n if (this.props['multiple']) {\n const arr = Array.isArray(this.formControl.value)\n ? [...this.formControl.value]\n : (this.formControl.value ? [this.formControl.value] : []);\n if (value) arr.push(value);\n this.formControl.setValue(arr);\n } else {\n this.formControl.setValue(value);\n }\n }\n\n async onUpload(event: any) {\n const files: File[] = event.files;\n const isMultiple = this.props['multiple'] ?? true;\n const allowedTypes = (this.props['accept'] as string) || '';\n\n for (const file of files) {\n if (file.size > this.maxFileSize) {\n this.messageService.add({\n severity: 'error',\n summary: 'خطأ',\n detail: `الملف \"${file.name}\" يتجاوز الحد الأقصى (1MB)`,\n });\n continue;\n }\n\n if (allowedTypes && !this.isFileTypeAllowed(file, allowedTypes)) {\n this.messageService.add({\n severity: 'error',\n summary: 'نوع الملف غير مسموح',\n detail: `الملف \"${file.name}\" ليس من الأنواع المسموحة`,\n });\n continue;\n }\n\n if (isMultiple && this.attachments.some(a => a.fileName === file.name)) {\n continue;\n }\n\n const base64 = await this.fileToBase64(file);\n const attachment = new AttachmentDto();\n attachment.fileName = file.name;\n attachment.mimeType = file.type;\n attachment.base64 = base64;\n\n if (isMultiple) {\n this.attachments = [...this.attachments, attachment];\n } else {\n this.attachment = attachment;\n }\n }\n }\n\n remove(index: number) {\n const copy = [...this.attachments];\n copy.splice(index, 1);\n this.attachments = copy;\n }\n\n choose(event: any, callback: any) {\n callback();\n }\n\n private fileToBase64(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve((reader.result as string).split(',')[1]);\n reader.onerror = err => reject(err);\n });\n }\n\n private isFileTypeAllowed(file: File, allowedTypes: string): boolean {\n const accepted = allowedTypes.split(',').map(t => t.trim());\n return accepted.some(type => {\n if (type === '*/*') return true;\n if (type.endsWith('/*')) {\n return file.type.startsWith(type.split('/')[0] + '/');\n }\n return file.type === type;\n });\n }\n\n getFileLabel(mime: string): string {\n if (!mime) return 'FILE';\n if (mime.includes('pdf')) return 'PDF';\n if (mime.includes('excel') || mime.includes('spreadsheet')) return 'XLS';\n if (mime.includes('word')) return 'DOC';\n if (mime.includes('image')) return 'IMG';\n if (mime.includes('zip')) return 'ZIP';\n if (mime.includes('csv')) return 'CSV';\n if (mime.includes('text')) return 'TXT';\n return 'FILE';\n }\n\n getLabelClass(mime: string): string {\n if (mime.includes('pdf')) return 'bg-red-600 text-white';\n if (mime.includes('excel')) return 'bg-green-600 text-white';\n if (mime.includes('word')) return 'bg-blue-600 text-white';\n if (mime.includes('image')) return 'bg-yellow-500 text-white';\n if (mime.includes('zip')) return 'bg-pink-600 text-white';\n return 'bg-gray-400 text-white';\n }\n\n getIconColor(mime: string): string {\n if (mime.includes('pdf')) return 'text-red-400';\n if (mime.includes('excel')) return 'text-green-500';\n if (mime.includes('word')) return 'text-blue-500';\n if (mime.includes('image')) return 'text-yellow-500';\n if (mime.includes('zip')) return 'text-pink-500';\n return 'text-gray-400';\n }\n\n getFileIcon(mime: string): string {\n if (mime.includes('pdf')) return 'pi pi-file-pdf';\n if (mime.includes('excel') || mime.includes('spreadsheet')) return 'pi pi-file-excel';\n if (mime.includes('word')) return 'pi pi-file-word';\n if (mime.includes('image')) return 'pi pi-image';\n if (mime.includes('zip')) return 'pi pi-file-zip';\n return 'pi pi-file';\n }\n}\n","<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"اسحب الملفات أو انقر للإرفاق\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n style=\"height: 7rem;\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n style=\"top: 3px;right: 3px;\"\n type=\"button\"\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"حذف\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div style=\"max-width: 85%;\" class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n\n <div class=\"truncate\">{{ file.fileName }}</div>\n </div>\n\n <!-- Download icon -->\n <a\n *ngIf=\"file.binaryObjectId\"\n style=\"bottom: 3px;right: 3px;\"\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"تحميل\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n type=\"button\"\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"أضف وصفاً\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">اسحب وأفلِت الملفات هنا للتحميل.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA6BM,MAAO,uBAAwB,SAAQ,SAAS,CAAA;AAOhC,IAAA,cAAA;IANpB,kBAAkB,GAAG,yIAAyI;IAE9J,WAAW,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;IAC9B,QAAQ,GAAG,CAAC;AACJ,IAAA,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC;AAEjC,IAAA,WAAA,CAAoB,cAA8B,EAAA;AAChD,QAAA,KAAK,EAAE;QADW,IAAA,CAAA,cAAc,GAAd,cAAc;;AAIlC,IAAA,IAAI,GAAG,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAK,YAAY,CAAC;;AAEnE,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK;AACzC,cAAE,IAAI,CAAC,WAAW,CAAC;eAChB,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;;IAG9D,IAAI,WAAW,CAAC,KAAsB,EAAA;AACpC,QAAA,IAA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i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2 from '@angular/router';
6
+ import { RouterModule } from '@angular/router';
7
+
8
+ class BreadcrumbComponent {
9
+ breadcrumb = [];
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: BreadcrumbComponent, isStandalone: true, selector: "app-breadcrumb", inputs: { breadcrumb: "breadcrumb" }, ngImport: i0, template: `
12
+ <nav class="overflow-x-auto">
13
+ <ul class="flex items-center text-white text-sm font-medium" role="list">
14
+ <li class="relative z-10">
15
+ <a
16
+ [routerLink]="['/']"
17
+ class="flex items-center h-10 px-4 pr-6 text-white bg-primary-500 hover:bg-teal-500 active:bg-teal-600 transition-all duration-150 rounded-r-md"
18
+ style="clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0% 50%)"
19
+ >
20
+ <i class="pi pi-home mr-2 rtl:ml-2 rtl:mr-0 text-base"></i>
21
+ </a>
22
+ </li>
23
+ <li
24
+ *ngFor="let item of breadcrumb; let i = index; let first = first; let last = last"
25
+ class="relative z-10"
26
+ >
27
+
28
+ <ng-container *ngIf="item.routerLink && !last; else textOnly">
29
+ <a
30
+ [routerLink]="item.routerLink"
31
+ class="flex items-center h-10 px-4 pr-6 text-white bg-primary-500 hover:bg-teal-500 active:bg-teal-600 transition-all duration-150"
32
+ [ngClass]="{
33
+ 'bg-primary-500': i % 2 === 0,
34
+ 'bg-primary-600': i % 2 === 1,
35
+ 'rounded-l-md pl-5': first,
36
+ 'rounded-r-md pr-5': last
37
+ }"
38
+ style="clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%)"
39
+ >
40
+ <i *ngIf="item.icon" [class]="item.icon + ' mr-2 text-base'"></i>
41
+ {{ item.label }}
42
+ </a>
43
+ </ng-container>
44
+ <ng-template #textOnly>
45
+ <span
46
+ class="flex items-center h-10 px-4 pr-6 text-white"
47
+ [ngClass]="{
48
+ 'bg-primary-500': i % 2 === 0,
49
+ 'bg-primary-600': i % 2 === 1,
50
+ 'rounded-l-md pl-5': first,
51
+ 'rounded-r-md pr-5': last
52
+ }"
53
+ style="clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%)"
54
+ >
55
+ <i *ngIf="item.icon" [class]="item.icon + ' mr-2 text-base'"></i>
56
+ {{ item.label }}
57
+ </span>
58
+ </ng-template>
59
+ </li>
60
+ </ul>
61
+ </nav>
62
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
63
+ }
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
65
+ type: Component,
66
+ args: [{
67
+ selector: 'app-breadcrumb',
68
+ standalone: true,
69
+ imports: [CommonModule, RouterModule], // <--- أضف RouterModule هنا
70
+ template: `
71
+ <nav class="overflow-x-auto">
72
+ <ul class="flex items-center text-white text-sm font-medium" role="list">
73
+ <li class="relative z-10">
74
+ <a
75
+ [routerLink]="['/']"
76
+ class="flex items-center h-10 px-4 pr-6 text-white bg-primary-500 hover:bg-teal-500 active:bg-teal-600 transition-all duration-150 rounded-r-md"
77
+ style="clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0% 50%)"
78
+ >
79
+ <i class="pi pi-home mr-2 rtl:ml-2 rtl:mr-0 text-base"></i>
80
+ </a>
81
+ </li>
82
+ <li
83
+ *ngFor="let item of breadcrumb; let i = index; let first = first; let last = last"
84
+ class="relative z-10"
85
+ >
86
+
87
+ <ng-container *ngIf="item.routerLink && !last; else textOnly">
88
+ <a
89
+ [routerLink]="item.routerLink"
90
+ class="flex items-center h-10 px-4 pr-6 text-white bg-primary-500 hover:bg-teal-500 active:bg-teal-600 transition-all duration-150"
91
+ [ngClass]="{
92
+ 'bg-primary-500': i % 2 === 0,
93
+ 'bg-primary-600': i % 2 === 1,
94
+ 'rounded-l-md pl-5': first,
95
+ 'rounded-r-md pr-5': last
96
+ }"
97
+ style="clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%)"
98
+ >
99
+ <i *ngIf="item.icon" [class]="item.icon + ' mr-2 text-base'"></i>
100
+ {{ item.label }}
101
+ </a>
102
+ </ng-container>
103
+ <ng-template #textOnly>
104
+ <span
105
+ class="flex items-center h-10 px-4 pr-6 text-white"
106
+ [ngClass]="{
107
+ 'bg-primary-500': i % 2 === 0,
108
+ 'bg-primary-600': i % 2 === 1,
109
+ 'rounded-l-md pl-5': first,
110
+ 'rounded-r-md pr-5': last
111
+ }"
112
+ style="clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%)"
113
+ >
114
+ <i *ngIf="item.icon" [class]="item.icon + ' mr-2 text-base'"></i>
115
+ {{ item.label }}
116
+ </span>
117
+ </ng-template>
118
+ </li>
119
+ </ul>
120
+ </nav>
121
+ `,
122
+ }]
123
+ }], propDecorators: { breadcrumb: [{
124
+ type: Input
125
+ }] } });
126
+
127
+ /**
128
+ * Generated bundle index. Do not edit.
129
+ */
130
+
131
+ export { BreadcrumbComponent };
132
+ //# sourceMappingURL=elite.framework-ng.core-src-lib-components-breadcrumb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elite.framework-ng.core-src-lib-components-breadcrumb.mjs","sources":["../../../projects/core/src/lib/components/breadcrumb/breadcrumb.ts","../../../projects/core/src/lib/components/breadcrumb/elite.framework-ng.core-src-lib-components-breadcrumb.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuItem } from 'primeng/api';\nimport { RouterModule } from '@angular/router'; // <--- أضف هذا الاستيراد\n\n@Component({\n selector: 'app-breadcrumb',\n standalone: true,\n imports: [CommonModule, RouterModule], // <--- أضف RouterModule هنا\n template: `\n <nav class=\"overflow-x-auto\">\n <ul class=\"flex items-center text-white text-sm font-medium\" role=\"list\">\n <li class=\"relative z-10\">\n <a\n [routerLink]=\"['/']\"\n class=\"flex items-center h-10 px-4 pr-6 text-white bg-primary-500 hover:bg-teal-500 active:bg-teal-600 transition-all duration-150 rounded-r-md\"\n style=\"clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0% 50%)\"\n >\n <i class=\"pi pi-home mr-2 rtl:ml-2 rtl:mr-0 text-base\"></i>\n </a>\n </li>\n <li\n *ngFor=\"let item of breadcrumb; let i = index; let first = first; let last = last\"\n class=\"relative z-10\"\n >\n\n <ng-container *ngIf=\"item.routerLink && !last; else textOnly\">\n <a\n [routerLink]=\"item.routerLink\"\n class=\"flex items-center h-10 px-4 pr-6 text-white bg-primary-500 hover:bg-teal-500 active:bg-teal-600 transition-all duration-150\"\n [ngClass]=\"{\n 'bg-primary-500': i % 2 === 0,\n 'bg-primary-600': i % 2 === 1,\n 'rounded-l-md pl-5': first,\n 'rounded-r-md pr-5': last\n }\"\n style=\"clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%)\"\n >\n <i *ngIf=\"item.icon\" [class]=\"item.icon + ' mr-2 text-base'\"></i>\n {{ item.label }}\n </a>\n </ng-container>\n <ng-template #textOnly>\n <span\n class=\"flex items-center h-10 px-4 pr-6 text-white\"\n [ngClass]=\"{\n 'bg-primary-500': i % 2 === 0,\n 'bg-primary-600': i % 2 === 1,\n 'rounded-l-md pl-5': first,\n 'rounded-r-md pr-5': last\n }\"\n style=\"clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%)\"\n >\n <i *ngIf=\"item.icon\" [class]=\"item.icon + ' mr-2 text-base'\"></i>\n {{ item.label }}\n </span>\n </ng-template>\n </li>\n </ul>\n </nav>\n `,\n})\nexport class BreadcrumbComponent {\n @Input() breadcrumb: MenuItem[] | any = [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA8Da,mBAAmB,CAAA;IACrB,UAAU,GAAqB,EAAE;uGAD/B,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EArDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDT,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EApDS,YAAY,6VAAE,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAsDzB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAzD/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDT,EAAA,CAAA;AACF,iBAAA;8BAEU,UAAU,EAAA,CAAA;sBAAlB;;;AC/DH;;AAEG;;;;"}
@@ -0,0 +1,76 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { FieldType } from '@ngx-formly/core';
4
+ import * as i2 from '@angular/forms';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { CommonModule } from '@angular/common';
7
+ import * as i1 from 'primeng/colorpicker';
8
+ import { ColorPickerModule } from 'primeng/colorpicker';
9
+ import * as i3 from '@ngx-translate/core';
10
+ import { TranslateModule } from '@ngx-translate/core';
11
+
12
+ class ColorPickerComponent extends FieldType {
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColorPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColorPickerComponent, isStandalone: true, selector: "formly-field-color-picker", usesInheritance: true, ngImport: i0, template: `
15
+
16
+
17
+ <div class="flex items-center justify-between rtl:flex-row-reverse w-full px-2 py-1" style=" border-radius: var(--p-inputtext-border-radius);">
18
+ <p-colorPicker
19
+ [style.direction]="'ltr'"
20
+ [(ngModel)]="formControl.value"
21
+ (ngModelChange)="formControl.setValue($event)"
22
+ [style]="to['style']"
23
+ [disabled]="to.disabled ?? false"
24
+ [inline]="to['inline'] ?? false"
25
+ [format]="to['format'] ?? 'hex'"
26
+ [tabindex]="'' + (to.tabindex ?? 0)"
27
+ [id]="id"
28
+ [name]="to['name'] || key"
29
+
30
+
31
+ ></p-colorPicker>
32
+ <!-- appendTo="body" -->
33
+ <label [for]="id" class="text-sm text-gray-800 mr-2 whitespace-nowrap">
34
+ {{ (to.label ?? '') | translate}}
35
+ </label>
36
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ColorPickerModule }, { kind: "component", type: i1.ColorPicker, selector: "p-colorPicker, p-colorpicker, p-color-picker", inputs: ["styleClass", "inline", "format", "tabindex", "inputId", "autoZIndex", "showTransitionOptions", "hideTransitionOptions", "autofocus", "defaultColor", "appendTo"], outputs: ["onChange", "onShow", "onHide"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColorPickerComponent, decorators: [{
39
+ type: Component,
40
+ args: [{
41
+ standalone: true,
42
+ selector: 'formly-field-color-picker',
43
+ imports: [CommonModule, ColorPickerModule, FormsModule, TranslateModule],
44
+ template: `
45
+
46
+
47
+ <div class="flex items-center justify-between rtl:flex-row-reverse w-full px-2 py-1" style=" border-radius: var(--p-inputtext-border-radius);">
48
+ <p-colorPicker
49
+ [style.direction]="'ltr'"
50
+ [(ngModel)]="formControl.value"
51
+ (ngModelChange)="formControl.setValue($event)"
52
+ [style]="to['style']"
53
+ [disabled]="to.disabled ?? false"
54
+ [inline]="to['inline'] ?? false"
55
+ [format]="to['format'] ?? 'hex'"
56
+ [tabindex]="'' + (to.tabindex ?? 0)"
57
+ [id]="id"
58
+ [name]="to['name'] || key"
59
+
60
+
61
+ ></p-colorPicker>
62
+ <!-- appendTo="body" -->
63
+ <label [for]="id" class="text-sm text-gray-800 mr-2 whitespace-nowrap">
64
+ {{ (to.label ?? '') | translate}}
65
+ </label>
66
+ `,
67
+ changeDetection: ChangeDetectionStrategy.OnPush,
68
+ }]
69
+ }] });
70
+
71
+ /**
72
+ * Generated bundle index. Do not edit.
73
+ */
74
+
75
+ export { ColorPickerComponent };
76
+ //# sourceMappingURL=elite.framework-ng.core-src-lib-components-color-picker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elite.framework-ng.core-src-lib-components-color-picker.mjs","sources":["../../../projects/core/src/lib/components/color-picker/color-picker.type.ts","../../../projects/core/src/lib/components/color-picker/elite.framework-ng.core-src-lib-components-color-picker.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, inject } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport { FormsModule, NgModel } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { ColorPickerModule } from 'primeng/colorpicker';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n standalone: true,\n selector: 'formly-field-color-picker',\n imports: [CommonModule, ColorPickerModule,FormsModule,TranslateModule],\n template: `\n\n\n <div class=\"flex items-center justify-between rtl:flex-row-reverse w-full px-2 py-1\" style=\" border-radius: var(--p-inputtext-border-radius);\">\n <p-colorPicker\n [style.direction]=\"'ltr'\"\n [(ngModel)]=\"formControl.value\"\n (ngModelChange)=\"formControl.setValue($event)\"\n [style]=\"to['style']\"\n [disabled]=\"to.disabled ?? false\"\n [inline]=\"to['inline'] ?? false\"\n [format]=\"to['format'] ?? 'hex'\"\n [tabindex]=\"'' + (to.tabindex ?? 0)\"\n [id]=\"id\"\n [name]=\"to['name'] || key\"\n\n\n ></p-colorPicker>\n <!-- appendTo=\"body\" -->\n <label [for]=\"id\" class=\"text-sm text-gray-800 mr-2 whitespace-nowrap\">\n {{ (to.label ?? '') | translate}}\n </label>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColorPickerComponent extends FieldType<FieldTypeConfig> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAoCM,MAAO,oBAAqB,SAAQ,SAA0B,CAAA;uGAAvD,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAzBrB;;;;;;;;;;;;;;;;;;;;;;AAsBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAvBS,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,QAAA,EAAA,UAAA,EAAA,SAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA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