raise-common-lib 0.0.248 → 0.0.250

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 (42) hide show
  1. package/bundles/raise-common-lib.umd.js +2134 -803
  2. package/bundles/raise-common-lib.umd.js.map +1 -1
  3. package/bundles/raise-common-lib.umd.min.js +1 -1
  4. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/lib/common-grid/index.component.js +210 -8
  6. package/esm2015/lib/date-tree-filter/date-tree-filter-popover/index.component.js +761 -0
  7. package/esm2015/lib/date-tree-filter/date-tree-filter.helper.js +679 -0
  8. package/esm2015/lib/dialog/common-dialog/index.component.js +1 -1
  9. package/esm2015/lib/form/richtexteditor/data-config.js +68 -1
  10. package/esm2015/lib/form/richtexteditor/index.component.js +130 -474
  11. package/esm2015/lib/raise-common-lib.module.js +4 -1
  12. package/esm2015/public-api.js +3 -1
  13. package/esm2015/raise-common-lib.js +2 -2
  14. package/esm5/lib/common-grid/index.component.js +244 -8
  15. package/esm5/lib/date-tree-filter/date-tree-filter-popover/index.component.js +902 -0
  16. package/esm5/lib/date-tree-filter/date-tree-filter.helper.js +787 -0
  17. package/esm5/lib/dialog/common-dialog/index.component.js +1 -1
  18. package/esm5/lib/form/richtexteditor/data-config.js +68 -1
  19. package/esm5/lib/form/richtexteditor/index.component.js +132 -523
  20. package/esm5/lib/raise-common-lib.module.js +4 -1
  21. package/esm5/public-api.js +3 -1
  22. package/esm5/raise-common-lib.js +2 -2
  23. package/fesm2015/raise-common-lib.js +1845 -716
  24. package/fesm2015/raise-common-lib.js.map +1 -1
  25. package/fesm5/raise-common-lib.js +2129 -802
  26. package/fesm5/raise-common-lib.js.map +1 -1
  27. package/lib/common-grid/index.component.d.ts +30 -1
  28. package/lib/date-tree-filter/date-tree-filter-popover/index.component.d.ts +46 -0
  29. package/lib/date-tree-filter/date-tree-filter.helper.d.ts +54 -0
  30. package/lib/form/richtexteditor/data-config.d.ts +8 -0
  31. package/lib/form/richtexteditor/index.component.d.ts +41 -65
  32. package/package.json +1 -1
  33. package/public-api.d.ts +2 -0
  34. package/raise-common-lib.metadata.json +1 -1
  35. package/src/assets/img/bullet-dash.svg +3 -0
  36. package/src/assets/img/raise_logo_main_new.svg +27 -27
  37. package/esm2015/lib/form/richtexteditor/ai-config.js +0 -70
  38. package/esm2015/lib/form/richtexteditor/openapi.js +0 -175
  39. package/esm5/lib/form/richtexteditor/ai-config.js +0 -73
  40. package/esm5/lib/form/richtexteditor/openapi.js +0 -208
  41. package/lib/form/richtexteditor/ai-config.d.ts +0 -10
  42. package/lib/form/richtexteditor/openapi.d.ts +0 -3
@@ -1,6 +1,7 @@
1
- import { EventEmitter, Component, ChangeDetectorRef, ViewChild, Input, Output, HostBinding, Injectable, ɵɵdefineInjectable, Inject, ɵɵinject, ContentChild, HostListener, ComponentFactoryResolver, ViewContainerRef, ViewChildren, ElementRef, InjectionToken, Optional, ChangeDetectionStrategy, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
1
+ import { EventEmitter, Component, ChangeDetectorRef, ViewChild, Input, Output, ElementRef, HostListener, HostBinding, Injectable, ɵɵdefineInjectable, Inject, ɵɵinject, ContentChild, ComponentFactoryResolver, ViewContainerRef, ViewChildren, InjectionToken, Optional, ChangeDetectionStrategy, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
2
  import { GridComponent, ExcelExportService, ColumnChooserService, VirtualScrollService, FilterService, ResizeService, GridModule, PagerModule, GridAllModule, PageService, RowDDService, SortService, EditService, ToolbarService as ToolbarService$1, AggregateService, ColumnMenuService, DetailRowService, SelectionService, GroupService } from '@syncfusion/ej2-angular-grids';
3
3
  import { times, debounce as debounce$1, forEach, throttle, find, cloneDeep, startsWith, filter as filter$1, meanBy, sumBy, minBy, maxBy, sortBy, uniqBy, differenceWith, mean } from 'lodash';
4
+ import moment from 'moment';
4
5
  import { __awaiter, __decorate, __metadata } from 'tslib';
5
6
  import { Subject, BehaviorSubject, Observable } from 'rxjs';
6
7
  import { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
@@ -14,7 +15,6 @@ import { HttpClient, HttpHeaders, HttpClientModule } from '@angular/common/http'
14
15
  import { setCulture, L10n, addClass, enableRipple, Browser, createElement } from '@syncfusion/ej2-base';
15
16
  import ResizeObserver from 'resize-observer-polyfill';
16
17
  import { Query, DataUtil } from '@syncfusion/ej2-data';
17
- import moment from 'moment';
18
18
  import CircularJSON from 'circular-json';
19
19
  import { MAT_DATE_FORMATS } from '@angular/material/core';
20
20
  import { DashboardLayoutModule } from '@syncfusion/ej2-angular-layouts';
@@ -32,7 +32,7 @@ import { DropDownListModule, DropDownTreeModule, MultiSelectAllModule, AutoCompl
32
32
  import { ToolbarService, FieldListService, NumberFormattingService, CalculatedFieldService, GroupingBarService, VirtualScrollService as VirtualScrollService$1, DrillThroughService, PivotViewAllModule, PivotFieldListAllModule } from '@syncfusion/ej2-angular-pivotview';
33
33
  import { ChartAllModule, AccumulationChartAllModule, RangeNavigatorAllModule, AccumulationChartModule, PieSeriesService, AccumulationLegendService, AccumulationTooltipService, AccumulationAnnotationService, AccumulationDataLabelService } from '@syncfusion/ej2-angular-charts';
34
34
  import { PdfViewerModule, LinkAnnotationService, BookmarkViewService, MagnificationService, ThumbnailViewService, ToolbarService as ToolbarService$2, NavigationService, TextSearchService, TextSelectionService, PrintService } from '@syncfusion/ej2-angular-pdfviewer';
35
- import { DropDownButton, DropDownButtonModule, SplitButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
35
+ import { DropDownButtonModule, SplitButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
36
36
  import { RichTextEditorAllModule, HtmlEditorService, ToolbarService as ToolbarService$3 } from '@syncfusion/ej2-angular-richtexteditor';
37
37
  import { MatMenuModule } from '@angular/material/menu';
38
38
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -77,6 +77,684 @@ function getTranslation() {
77
77
  return {};
78
78
  }
79
79
 
80
+ /**
81
+ * @fileoverview added by tsickle
82
+ * Generated from: lib/date-tree-filter/date-tree-filter.helper.ts
83
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
84
+ */
85
+ /**
86
+ * @record
87
+ */
88
+ function DateTreeFilterSetupOptions() { }
89
+ if (false) {
90
+ /** @type {?} */
91
+ DateTreeFilterSetupOptions.prototype.rows;
92
+ /** @type {?} */
93
+ DateTreeFilterSetupOptions.prototype.fields;
94
+ /** @type {?} */
95
+ DateTreeFilterSetupOptions.prototype.hints;
96
+ }
97
+ /**
98
+ * @record
99
+ */
100
+ function DateTreeFilterHelperOptions() { }
101
+ if (false) {
102
+ /** @type {?} */
103
+ DateTreeFilterHelperOptions.prototype.getTranslation;
104
+ /** @type {?} */
105
+ DateTreeFilterHelperOptions.prototype.getPopoverElement;
106
+ /** @type {?} */
107
+ DateTreeFilterHelperOptions.prototype.getGridElement;
108
+ /** @type {?} */
109
+ DateTreeFilterHelperOptions.prototype.applyRows;
110
+ /** @type {?|undefined} */
111
+ DateTreeFilterHelperOptions.prototype.parseDateValue;
112
+ /** @type {?|undefined} */
113
+ DateTreeFilterHelperOptions.prototype.dateFormats;
114
+ }
115
+ /**
116
+ * @record
117
+ */
118
+ function RsCommonGridDateTreeFactoryHost() { }
119
+ if (false) {
120
+ /** @type {?} */
121
+ RsCommonGridDateTreeFactoryHost.prototype.translation;
122
+ /** @type {?} */
123
+ RsCommonGridDateTreeFactoryHost.prototype.dateTreePopoverRef;
124
+ /** @type {?} */
125
+ RsCommonGridDateTreeFactoryHost.prototype.grid;
126
+ }
127
+ /** @type {?} */
128
+ const DATE_TREE_DEFAULT_DATE_FORMATS = [
129
+ "YYYY-MM-DD",
130
+ "MM/DD/YYYY",
131
+ "DD/MM/YYYY",
132
+ "YYYY/MM/DD",
133
+ "DD-MMM-YYYY",
134
+ "MMM DD, YYYY",
135
+ ];
136
+ class DateTreeFilterHelper {
137
+ /**
138
+ * @param {?} options
139
+ */
140
+ constructor(options) {
141
+ this.popoverVisible = false;
142
+ this.popoverField = "";
143
+ this.popoverStyle = {};
144
+ this.selectedByField = {};
145
+ this.fieldLabelMap = {};
146
+ this.dateFields = [];
147
+ this.sourceRows = [];
148
+ this.defaultDateFormats = [
149
+ "YYYY-MM-DD",
150
+ "MM/DD/YYYY",
151
+ "DD/MM/YYYY",
152
+ "YYYY/MM/DD",
153
+ "DD-MMM-YYYY",
154
+ "DD-MMM-YYYY hh:mm A",
155
+ "MMM DD, YYYY",
156
+ moment.ISO_8601,
157
+ ];
158
+ this.options = options;
159
+ }
160
+ /**
161
+ * @param {?} config
162
+ * @return {?}
163
+ */
164
+ setup(config) {
165
+ /** @type {?} */
166
+ var rows = config && config.rows ? config.rows : [];
167
+ /** @type {?} */
168
+ var fields = config && config.fields ? config.fields : [];
169
+ /** @type {?} */
170
+ var hints = config && config.hints ? config.hints : [];
171
+ this.sourceRows = rows;
172
+ this.dateFields = this.resolveDateTreeFieldsByHints(fields, hints);
173
+ this.fieldLabelMap = {};
174
+ (fields || []).forEach((/**
175
+ * @param {?} item
176
+ * @return {?}
177
+ */
178
+ (item) => {
179
+ if (!item || !item.columnName) {
180
+ return;
181
+ }
182
+ this.fieldLabelMap[item.columnName] =
183
+ item.columnDisplayName || item.columnName;
184
+ }));
185
+ this.apply();
186
+ }
187
+ /**
188
+ * @param {?} args
189
+ * @return {?}
190
+ */
191
+ handleGridActionBegin(args) {
192
+ /** @type {?} */
193
+ var requestType = this.getRequestType(args);
194
+ if (requestType === "filterchoicerequest" ||
195
+ requestType === "filtersearchbegin") {
196
+ args.filterChoiceCount = 15000;
197
+ }
198
+ if (requestType !== "filterbeforeopen") {
199
+ return;
200
+ }
201
+ /** @type {?} */
202
+ var columnName = this.resolveActionColumnName(args);
203
+ if (!this.isDateTreeField(columnName)) {
204
+ this.close();
205
+ return;
206
+ }
207
+ args.cancel = true;
208
+ this.open(columnName);
209
+ }
210
+ /**
211
+ * @param {?} selectionMap
212
+ * @return {?}
213
+ */
214
+ updateSelection(selectionMap) {
215
+ this.selectedByField = selectionMap || {};
216
+ this.apply();
217
+ }
218
+ /**
219
+ * @return {?}
220
+ */
221
+ close() {
222
+ if (!this.popoverVisible) {
223
+ return;
224
+ }
225
+ this.popoverVisible = false;
226
+ this.popoverField = "";
227
+ this.popoverStyle = {};
228
+ }
229
+ /**
230
+ * @param {?} event
231
+ * @return {?}
232
+ */
233
+ handleDocumentMouseDown(event) {
234
+ if (!this.popoverVisible) {
235
+ return;
236
+ }
237
+ /** @type {?} */
238
+ var target = (/** @type {?} */ (event.target));
239
+ if (!target) {
240
+ return;
241
+ }
242
+ if (this.isInsidePopover(target) || this.isDateFilterMenuItem(target)) {
243
+ return;
244
+ }
245
+ this.close();
246
+ }
247
+ /**
248
+ * @param {?} event
249
+ * @return {?}
250
+ */
251
+ handleDocumentMouseOver(event) {
252
+ if (!this.popoverVisible) {
253
+ return;
254
+ }
255
+ /** @type {?} */
256
+ var target = (/** @type {?} */ (event.target));
257
+ if (!target) {
258
+ return;
259
+ }
260
+ if (this.isInsidePopover(target)) {
261
+ return;
262
+ }
263
+ /** @type {?} */
264
+ var menuItem = (/** @type {?} */ (target.closest(".e-menu-item")));
265
+ if (menuItem) {
266
+ if (!this.isDateFilterMenuItem(menuItem)) {
267
+ this.close();
268
+ }
269
+ return;
270
+ }
271
+ /** @type {?} */
272
+ var otherFilterTarget = (/** @type {?} */ (target.closest(".e-filtermenudiv, .e-headercell .e-columnmenu, .e-columnmenu, .e-contextmenu")));
273
+ if (otherFilterTarget && !this.isDateFilterMenuItem(otherFilterTarget)) {
274
+ this.close();
275
+ }
276
+ }
277
+ /**
278
+ * @return {?}
279
+ */
280
+ updatePosition() {
281
+ if (!this.popoverVisible) {
282
+ return;
283
+ }
284
+ /** @type {?} */
285
+ var anchor = this.findDateFilterAnchorElement();
286
+ if (anchor) {
287
+ /** @type {?} */
288
+ var rect = anchor.getBoundingClientRect();
289
+ /** @type {?} */
290
+ var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
291
+ /** @type {?} */
292
+ var viewportHeight = window.innerHeight || document.documentElement.clientHeight;
293
+ /** @type {?} */
294
+ var popoverElement = this.options.getPopoverElement
295
+ ? this.options.getPopoverElement()
296
+ : null;
297
+ /** @type {?} */
298
+ var popoverWidth = popoverElement && popoverElement.offsetWidth
299
+ ? popoverElement.offsetWidth
300
+ : 300;
301
+ /** @type {?} */
302
+ var popoverHeight = popoverElement && popoverElement.offsetHeight
303
+ ? popoverElement.offsetHeight
304
+ : 420;
305
+ /** @type {?} */
306
+ var edgeGap = 8;
307
+ /** @type {?} */
308
+ var anchorGap = 8;
309
+ /** @type {?} */
310
+ var top = rect.top - 6;
311
+ /** @type {?} */
312
+ var left = rect.right + anchorGap;
313
+ if (left + popoverWidth > viewportWidth - edgeGap) {
314
+ left = rect.left - popoverWidth - anchorGap;
315
+ }
316
+ if (left < edgeGap) {
317
+ left = edgeGap;
318
+ }
319
+ if (left + popoverWidth > viewportWidth - edgeGap) {
320
+ left = Math.max(edgeGap, viewportWidth - popoverWidth - edgeGap);
321
+ }
322
+ if (top + popoverHeight > viewportHeight - edgeGap) {
323
+ top = Math.max(edgeGap, viewportHeight - popoverHeight - edgeGap);
324
+ }
325
+ this.popoverStyle = {
326
+ position: "fixed",
327
+ left: left + "px",
328
+ top: top + "px",
329
+ };
330
+ return;
331
+ }
332
+ /** @type {?} */
333
+ var gridElement = this.options.getGridElement
334
+ ? this.options.getGridElement()
335
+ : null;
336
+ if (gridElement && gridElement.getBoundingClientRect) {
337
+ /** @type {?} */
338
+ var fallbackRect = gridElement.getBoundingClientRect();
339
+ this.popoverStyle = {
340
+ position: "fixed",
341
+ left: Math.max(8, fallbackRect.right - 312) + "px",
342
+ top: Math.max(8, fallbackRect.top + 8) + "px",
343
+ };
344
+ }
345
+ }
346
+ /**
347
+ * @private
348
+ * @param {?} field
349
+ * @return {?}
350
+ */
351
+ open(field) {
352
+ this.popoverField = field;
353
+ this.popoverVisible = true;
354
+ this.updatePosition();
355
+ setTimeout((/**
356
+ * @return {?}
357
+ */
358
+ () => this.updatePosition()), 50);
359
+ setTimeout((/**
360
+ * @return {?}
361
+ */
362
+ () => this.updatePosition()), 150);
363
+ }
364
+ /**
365
+ * @private
366
+ * @return {?}
367
+ */
368
+ apply() {
369
+ /** @type {?} */
370
+ var filteredRows = this.filterRowsBySelectedDateTree(this.sourceRows || []);
371
+ this.options.applyRows(filteredRows);
372
+ }
373
+ /**
374
+ * @private
375
+ * @param {?} args
376
+ * @return {?}
377
+ */
378
+ getRequestType(args) {
379
+ if (!args || !args.requestType) {
380
+ return "";
381
+ }
382
+ return String(args.requestType).trim().toLowerCase();
383
+ }
384
+ /**
385
+ * @private
386
+ * @param {?} args
387
+ * @return {?}
388
+ */
389
+ resolveActionColumnName(args) {
390
+ if (!args) {
391
+ return "";
392
+ }
393
+ return (args.columnName ||
394
+ args.field ||
395
+ args.currentFilteringColumn ||
396
+ (args.column && (args.column.field || args.column.columnName)) ||
397
+ "");
398
+ }
399
+ /**
400
+ * @private
401
+ * @param {?} fields
402
+ * @param {?} hints
403
+ * @return {?}
404
+ */
405
+ resolveDateTreeFieldsByHints(fields, hints) {
406
+ /** @type {?} */
407
+ var normalizedHints = (hints || [])
408
+ .filter((/**
409
+ * @param {?} item
410
+ * @return {?}
411
+ */
412
+ (item) => !!item))
413
+ .map((/**
414
+ * @param {?} item
415
+ * @return {?}
416
+ */
417
+ (item) => String(item).trim().toLowerCase()));
418
+ if (!fields || !fields.length || !normalizedHints.length) {
419
+ return [];
420
+ }
421
+ return fields
422
+ .filter((/**
423
+ * @param {?} item
424
+ * @return {?}
425
+ */
426
+ (item) => {
427
+ if (!item || !item.columnName) {
428
+ return false;
429
+ }
430
+ /** @type {?} */
431
+ var columnName = String(item.columnName || "").toLowerCase();
432
+ /** @type {?} */
433
+ var displayName = String(item.columnDisplayName || "").toLowerCase();
434
+ return normalizedHints.some((/**
435
+ * @param {?} hint
436
+ * @return {?}
437
+ */
438
+ (hint) => {
439
+ return (columnName === hint ||
440
+ displayName === hint ||
441
+ (hint.length >= 3 &&
442
+ (columnName.indexOf(hint) > -1 ||
443
+ displayName.indexOf(hint) > -1)));
444
+ }));
445
+ }))
446
+ .map((/**
447
+ * @param {?} item
448
+ * @return {?}
449
+ */
450
+ (item) => item.columnName));
451
+ }
452
+ /**
453
+ * @private
454
+ * @param {?} field
455
+ * @return {?}
456
+ */
457
+ isDateTreeField(field) {
458
+ return this.dateFields.indexOf(field) > -1;
459
+ }
460
+ /**
461
+ * @private
462
+ * @param {?} field
463
+ * @return {?}
464
+ */
465
+ getFieldDaySelectionMap(field) {
466
+ if (!this.selectedByField[field]) {
467
+ this.selectedByField[field] = {};
468
+ }
469
+ return this.selectedByField[field];
470
+ }
471
+ /**
472
+ * @private
473
+ * @param {?} rows
474
+ * @param {?=} excludeField
475
+ * @return {?}
476
+ */
477
+ filterRowsBySelectedDateTree(rows, excludeField) {
478
+ /** @type {?} */
479
+ var filteredRows = rows ? rows.slice() : [];
480
+ this.dateFields.forEach((/**
481
+ * @param {?} field
482
+ * @return {?}
483
+ */
484
+ (field) => {
485
+ if (excludeField && field === excludeField) {
486
+ return;
487
+ }
488
+ /** @type {?} */
489
+ var selectedMap = this.getFieldDaySelectionMap(field);
490
+ /** @type {?} */
491
+ var selectedKeys = Object.keys(selectedMap);
492
+ if (!selectedKeys.length) {
493
+ return;
494
+ }
495
+ filteredRows = filteredRows.filter((/**
496
+ * @param {?} row
497
+ * @return {?}
498
+ */
499
+ (row) => {
500
+ /** @type {?} */
501
+ var dayKey = this.getDayKeyByRowValue(row[field]);
502
+ return dayKey ? !!selectedMap[dayKey] : false;
503
+ }));
504
+ }));
505
+ return filteredRows;
506
+ }
507
+ /**
508
+ * @private
509
+ * @param {?} value
510
+ * @return {?}
511
+ */
512
+ getDayKeyByRowValue(value) {
513
+ /** @type {?} */
514
+ var date = this.parseDateValue(value);
515
+ if (!date) {
516
+ return "";
517
+ }
518
+ return this.toDayKey(date.getFullYear(), date.getMonth() + 1, date.getDate());
519
+ }
520
+ /**
521
+ * @private
522
+ * @param {?} value
523
+ * @return {?}
524
+ */
525
+ parseDateValue(value) {
526
+ if (this.options.parseDateValue) {
527
+ return this.options.parseDateValue(value);
528
+ }
529
+ if (!value) {
530
+ return null;
531
+ }
532
+ if (value instanceof Date) {
533
+ return value;
534
+ }
535
+ /** @type {?} */
536
+ var formats = this.options && this.options.dateFormats && this.options.dateFormats.length
537
+ ? this.options.dateFormats
538
+ : this.defaultDateFormats;
539
+ /** @type {?} */
540
+ var parsed = moment(value, formats, true);
541
+ if (parsed.isValid()) {
542
+ return parsed.toDate();
543
+ }
544
+ /** @type {?} */
545
+ var fallback = new Date(value);
546
+ return isNaN(fallback.getTime()) ? null : fallback;
547
+ }
548
+ /**
549
+ * @private
550
+ * @param {?} year
551
+ * @param {?} month
552
+ * @param {?} day
553
+ * @return {?}
554
+ */
555
+ toDayKey(year, month, day) {
556
+ return year + "-" + this.pad2(month) + "-" + this.pad2(day);
557
+ }
558
+ /**
559
+ * @private
560
+ * @param {?} value
561
+ * @return {?}
562
+ */
563
+ pad2(value) {
564
+ return value < 10 ? "0" + value : String(value);
565
+ }
566
+ /**
567
+ * @private
568
+ * @param {?} target
569
+ * @return {?}
570
+ */
571
+ isInsidePopover(target) {
572
+ /** @type {?} */
573
+ var popoverElement = this.options.getPopoverElement
574
+ ? this.options.getPopoverElement()
575
+ : null;
576
+ if (!target || !popoverElement) {
577
+ return false;
578
+ }
579
+ return popoverElement.contains(target);
580
+ }
581
+ /**
582
+ * @private
583
+ * @param {?} element
584
+ * @return {?}
585
+ */
586
+ isDateFilterMenuItem(element) {
587
+ if (!element) {
588
+ return false;
589
+ }
590
+ /** @type {?} */
591
+ var menuItem = (/** @type {?} */ (element.closest(".e-menu-item")));
592
+ if (!menuItem) {
593
+ return false;
594
+ }
595
+ /** @type {?} */
596
+ var text = (menuItem.textContent || "").trim().toLowerCase();
597
+ /** @type {?} */
598
+ var translation = this.options.getTranslation
599
+ ? this.options.getTranslation()
600
+ : null;
601
+ /** @type {?} */
602
+ var filterText = String((translation && translation.FILTER) || "filter")
603
+ .trim()
604
+ .toLowerCase();
605
+ if (!text) {
606
+ return false;
607
+ }
608
+ if (text.indexOf(filterText) > -1 || text.indexOf("filter") > -1) {
609
+ return true;
610
+ }
611
+ /** @type {?} */
612
+ var cls = (menuItem.className || "").toLowerCase();
613
+ return cls.indexOf("filter") > -1;
614
+ }
615
+ /**
616
+ * @private
617
+ * @return {?}
618
+ */
619
+ findDateFilterAnchorElement() {
620
+ /** @type {?} */
621
+ var menuContainers = (/** @type {?} */ (Array.from(document.querySelectorAll(".e-columnmenu, .e-contextmenu"))));
622
+ /** @type {?} */
623
+ var visibleContainers = menuContainers.filter((/**
624
+ * @param {?} container
625
+ * @return {?}
626
+ */
627
+ (container) => {
628
+ if (!container || !container.getBoundingClientRect) {
629
+ return false;
630
+ }
631
+ /** @type {?} */
632
+ var rect = container.getBoundingClientRect();
633
+ if (rect.width <= 0 || rect.height <= 0) {
634
+ return false;
635
+ }
636
+ /** @type {?} */
637
+ var style = window.getComputedStyle(container);
638
+ if (!style || style.display === "none" || style.visibility === "hidden") {
639
+ return false;
640
+ }
641
+ return true;
642
+ }));
643
+ if (!visibleContainers.length) {
644
+ return null;
645
+ }
646
+ /** @type {?} */
647
+ var currentContainer = visibleContainers[visibleContainers.length - 1];
648
+ /** @type {?} */
649
+ var menuItems = (/** @type {?} */ (Array.from(currentContainer.querySelectorAll(".e-menu-item"))));
650
+ /** @type {?} */
651
+ var visibleFilterItems = menuItems.filter((/**
652
+ * @param {?} item
653
+ * @return {?}
654
+ */
655
+ (item) => {
656
+ if (!this.isDateFilterMenuItem(item)) {
657
+ return false;
658
+ }
659
+ if (!item.getBoundingClientRect) {
660
+ return false;
661
+ }
662
+ /** @type {?} */
663
+ var rect = item.getBoundingClientRect();
664
+ return rect.width > 0 && rect.height > 0;
665
+ }));
666
+ if (!visibleFilterItems.length) {
667
+ return null;
668
+ }
669
+ /** @type {?} */
670
+ var focusedItem = visibleFilterItems.find((/**
671
+ * @param {?} item
672
+ * @return {?}
673
+ */
674
+ (item) => {
675
+ return (item.classList.contains("e-focused") ||
676
+ item.classList.contains("e-selected") ||
677
+ item.classList.contains("e-hover"));
678
+ }));
679
+ return focusedItem || visibleFilterItems[visibleFilterItems.length - 1];
680
+ }
681
+ }
682
+ if (false) {
683
+ /** @type {?} */
684
+ DateTreeFilterHelper.prototype.popoverVisible;
685
+ /** @type {?} */
686
+ DateTreeFilterHelper.prototype.popoverField;
687
+ /** @type {?} */
688
+ DateTreeFilterHelper.prototype.popoverStyle;
689
+ /** @type {?} */
690
+ DateTreeFilterHelper.prototype.selectedByField;
691
+ /** @type {?} */
692
+ DateTreeFilterHelper.prototype.fieldLabelMap;
693
+ /** @type {?} */
694
+ DateTreeFilterHelper.prototype.dateFields;
695
+ /**
696
+ * @type {?}
697
+ * @private
698
+ */
699
+ DateTreeFilterHelper.prototype.sourceRows;
700
+ /**
701
+ * @type {?}
702
+ * @private
703
+ */
704
+ DateTreeFilterHelper.prototype.options;
705
+ /**
706
+ * @type {?}
707
+ * @private
708
+ */
709
+ DateTreeFilterHelper.prototype.defaultDateFormats;
710
+ }
711
+ /**
712
+ * @param {?} host
713
+ * @return {?}
714
+ */
715
+ function resolveGridElement(host) {
716
+ if (!host || !host.grid) {
717
+ return null;
718
+ }
719
+ /** @type {?} */
720
+ var gridRef = host.grid;
721
+ if (gridRef.grid && gridRef.grid.element) {
722
+ return gridRef.grid.element;
723
+ }
724
+ if (gridRef.element) {
725
+ return gridRef.element;
726
+ }
727
+ return null;
728
+ }
729
+ /**
730
+ * @param {?} host
731
+ * @param {?} applyRows
732
+ * @param {?=} dateFormats
733
+ * @return {?}
734
+ */
735
+ function createRsCommonGridDateTreeHelper(host, applyRows, dateFormats) {
736
+ return new DateTreeFilterHelper({
737
+ getTranslation: (/**
738
+ * @return {?}
739
+ */
740
+ () => (host ? host.translation : null)),
741
+ getPopoverElement: (/**
742
+ * @return {?}
743
+ */
744
+ () => host && host.dateTreePopoverRef
745
+ ? host.dateTreePopoverRef.nativeElement
746
+ : null),
747
+ getGridElement: (/**
748
+ * @return {?}
749
+ */
750
+ () => resolveGridElement(host)),
751
+ applyRows: applyRows,
752
+ dateFormats: dateFormats && dateFormats.length
753
+ ? dateFormats
754
+ : DATE_TREE_DEFAULT_DATE_FORMATS,
755
+ });
756
+ }
757
+
80
758
  /**
81
759
  * @fileoverview added by tsickle
82
760
  * Generated from: lib/common-grid/index.component.ts
@@ -133,6 +811,23 @@ class CommonGridComponent {
133
811
  this.alwaysShowCheckbox = false;
134
812
  this.disableSystemRow = false; // 禁用IsSytem = true的整行
135
813
  // 禁用IsSytem = true的整行
814
+ /**
815
+ * 开启日期树筛选(默认关闭,不影响现有页面)
816
+ */
817
+ this.enableDateTreeFilter = false;
818
+ /**
819
+ * 参与日期树筛选的列名或 hint,如 ['CreatedOn', 'ModifiedOn']
820
+ */
821
+ this.dateTreeFilterFields = [];
822
+ /**
823
+ * 未筛选原始数据(可选)。
824
+ * 不传时由组件在 dataSource 变更时自动快照;传则由页面自行维护 raw。
825
+ */
826
+ this.dateTreeSourceRows = null;
827
+ /**
828
+ * 内聚模式下仍向页面同步筛选结果(默认 false,一般无需绑定)
829
+ */
830
+ this.dateTreeEmitFilteredRows = false;
136
831
  this.recordDoubleClick = new EventEmitter();
137
832
  this.actionComplete = new EventEmitter();
138
833
  this.rowSelected = new EventEmitter();
@@ -150,6 +845,16 @@ class CommonGridComponent {
150
845
  this.rowDrop = new EventEmitter();
151
846
  this.rowDrag = new EventEmitter();
152
847
  this.rowDragStart = new EventEmitter();
848
+ /**
849
+ * 日期树筛选后的行数据(可选,复杂页面与 dateTreeSourceRows 搭配使用)
850
+ */
851
+ this.dateTreeFilteredRows = new EventEmitter();
852
+ /**
853
+ * 内聚模式:表格实际绑定的数据
854
+ */
855
+ this.dateTreeDisplayRows = [];
856
+ this.dateTreeRawRows = [];
857
+ this.dateTreeApplyingFilter = false;
153
858
  this.selectId = [];
154
859
  this.startPaging = false;
155
860
  this.indexList = [];
@@ -174,6 +879,11 @@ class CommonGridComponent {
174
879
  return list;
175
880
  });
176
881
  this.translation = getTranslation();
882
+ this.dateTreeHelper = createRsCommonGridDateTreeHelper(this, (/**
883
+ * @param {?} rows
884
+ * @return {?}
885
+ */
886
+ (rows) => this.onDateTreeRowsApplied(rows)));
177
887
  }
178
888
  /**
179
889
  * @return {?}
@@ -193,17 +903,41 @@ class CommonGridComponent {
193
903
  trackByFn(index, item) {
194
904
  return index; // or a unique identifier in your object
195
905
  }
906
+ /**
907
+ * ejs-grid 绑定数据源:内聚模式用内部展示数据,否则用 dataSource
908
+ * @return {?}
909
+ */
910
+ get gridBindDataSource() {
911
+ if (this.enableDateTreeFilter && this.dateTreeSourceRows == null) {
912
+ return this.dateTreeDisplayRows;
913
+ }
914
+ return this.dataSource;
915
+ }
916
+ /**
917
+ * 日期树 popover 用的全量数据
918
+ * @return {?}
919
+ */
920
+ get dateTreePopoverSourceRows() {
921
+ if (this.dateTreeSourceRows != null) {
922
+ return this.dateTreeSourceRows;
923
+ }
924
+ return this.dateTreeRawRows;
925
+ }
196
926
  /**
197
927
  * @param {?} changes
198
928
  * @return {?}
199
929
  */
200
930
  ngOnChanges(changes) {
201
- if (changes.dataSource && changes.dataSource.currentValue) {
931
+ /** @type {?} */
932
+ var bindRows = changes.dataSource && changes.dataSource.currentValue
933
+ ? changes.dataSource.currentValue
934
+ : null;
935
+ if (bindRows) {
202
936
  if (this.allowPaging &&
203
- changes.dataSource.currentValue.length &&
937
+ bindRows.length &&
204
938
  !this.pageSettings) {
205
939
  this.pageSettings =
206
- changes.dataSource.currentValue.length > 9
940
+ bindRows.length > 9
207
941
  ? {
208
942
  pageSizes: ["All", "25", "50", "100"],
209
943
  pageSize: 50,
@@ -211,6 +945,95 @@ class CommonGridComponent {
211
945
  : null;
212
946
  }
213
947
  }
948
+ if (this.enableDateTreeFilter &&
949
+ this.dateTreeSourceRows == null &&
950
+ changes.dataSource &&
951
+ !this.dateTreeApplyingFilter) {
952
+ this.captureDateTreeRawFromDataSource(changes.dataSource.currentValue);
953
+ }
954
+ if (changes.enableDateTreeFilter && changes.enableDateTreeFilter.currentValue) {
955
+ this.captureDateTreeRawFromDataSource(this.dataSource);
956
+ }
957
+ if (changes.enableDateTreeFilter && !changes.enableDateTreeFilter.currentValue) {
958
+ this.dateTreeHelper && this.dateTreeHelper.close();
959
+ this.dateTreeDisplayRows = [];
960
+ this.dateTreeRawRows = [];
961
+ }
962
+ if (this.enableDateTreeFilter &&
963
+ (changes.enableDateTreeFilter ||
964
+ changes.dateTreeFilterFields ||
965
+ changes.dateTreeSourceRows ||
966
+ changes.fields ||
967
+ changes.dataSource)) {
968
+ this.refreshDateTreeFilter();
969
+ }
970
+ }
971
+ /**
972
+ * @private
973
+ * @param {?} rows
974
+ * @return {?}
975
+ */
976
+ captureDateTreeRawFromDataSource(rows) {
977
+ this.dateTreeRawRows = rows ? rows.slice() : [];
978
+ }
979
+ /**
980
+ * @param {?} event
981
+ * @return {?}
982
+ */
983
+ onDocumentMouseDown(event) {
984
+ if (this.enableDateTreeFilter && this.dateTreeHelper) {
985
+ this.dateTreeHelper.handleDocumentMouseDown(event);
986
+ }
987
+ }
988
+ /**
989
+ * @param {?} event
990
+ * @return {?}
991
+ */
992
+ onDocumentMouseOver(event) {
993
+ if (this.enableDateTreeFilter && this.dateTreeHelper) {
994
+ this.dateTreeHelper.handleDocumentMouseOver(event);
995
+ }
996
+ }
997
+ /**
998
+ * @private
999
+ * @return {?}
1000
+ */
1001
+ refreshDateTreeFilter() {
1002
+ if (!this.enableDateTreeFilter || !this.dateTreeHelper) {
1003
+ return;
1004
+ }
1005
+ /** @type {?} */
1006
+ var rows = this.dateTreeSourceRows != null
1007
+ ? this.dateTreeSourceRows
1008
+ : this.dateTreeRawRows || [];
1009
+ this.dateTreeHelper.setup({
1010
+ rows: rows,
1011
+ fields: this.fields || [],
1012
+ hints: this.dateTreeFilterFields || [],
1013
+ });
1014
+ }
1015
+ /**
1016
+ * @private
1017
+ * @param {?} rows
1018
+ * @return {?}
1019
+ */
1020
+ onDateTreeRowsApplied(rows) {
1021
+ /** @type {?} */
1022
+ var result = rows || [];
1023
+ this.dateTreeApplyingFilter = true;
1024
+ if (this.enableDateTreeFilter && this.dateTreeSourceRows == null) {
1025
+ this.dateTreeDisplayRows = result;
1026
+ }
1027
+ if (this.dateTreeSourceRows != null || this.dateTreeEmitFilteredRows) {
1028
+ this.dateTreeFilteredRows.emit(result);
1029
+ }
1030
+ this.ref && this.ref.markForCheck();
1031
+ setTimeout((/**
1032
+ * @return {?}
1033
+ */
1034
+ () => {
1035
+ this.dateTreeApplyingFilter = false;
1036
+ }), 0);
214
1037
  }
215
1038
  /**
216
1039
  * @return {?}
@@ -413,7 +1236,10 @@ class CommonGridComponent {
413
1236
  args.requestType === "sorting")) {
414
1237
  this.startPaging = true;
415
1238
  }
416
- if (args.requestType == "filterchoicerequest" ||
1239
+ if (this.enableDateTreeFilter && this.dateTreeHelper) {
1240
+ this.dateTreeHelper.handleGridActionBegin(args);
1241
+ }
1242
+ else if (args.requestType == "filterchoicerequest" ||
417
1243
  args.requestType === "filtersearchbegin") {
418
1244
  args.filterChoiceCount = 15000;
419
1245
  }
@@ -690,7 +1516,7 @@ class CommonGridComponent {
690
1516
  CommonGridComponent.decorators = [
691
1517
  { type: Component, args: [{
692
1518
  selector: "rs-common-grid",
693
- template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselecting)=\"_rowDeselecting($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [showInColumnChooser]=\"\r\n item.showInColumnChooser === undefined ? true : item.showInColumnChooser\r\n \"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n [headerTemplate]=\"item.showHeaderTemplate ? headerTemplate : undefined\"\r\n [isPrimaryKey]=\"item?.isPrimaryKey ? true : false\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
1519
+ template: "<rs-date-tree-filter-popover\r\n *ngIf=\"enableDateTreeFilter && dateTreeHelper && dateTreeHelper.popoverVisible\"\r\n #dateTreePopoverRef\r\n [ngStyle]=\"dateTreeHelper.popoverStyle\"\r\n [field]=\"dateTreeHelper.popoverField\"\r\n [translation]=\"translation\"\r\n [sourceRows]=\"dateTreePopoverSourceRows\"\r\n [dateFields]=\"dateTreeHelper.dateFields\"\r\n [selectedByField]=\"dateTreeHelper.selectedByField\"\r\n [fieldLabelMap]=\"dateTreeHelper.fieldLabelMap\"\r\n (apply)=\"dateTreeHelper.updateSelection($event)\"\r\n (close)=\"dateTreeHelper.close()\"\r\n></rs-date-tree-filter-popover>\r\n<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"gridBindDataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"gridBindDataSource && gridBindDataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselecting)=\"_rowDeselecting($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [showInColumnChooser]=\"\r\n item.showInColumnChooser === undefined ? true : item.showInColumnChooser\r\n \"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n [headerTemplate]=\"item.showHeaderTemplate ? headerTemplate : undefined\"\r\n [isPrimaryKey]=\"item?.isPrimaryKey ? true : false\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
694
1520
  styles: [""]
695
1521
  }] }
696
1522
  ];
@@ -728,6 +1554,10 @@ CommonGridComponent.propDecorators = {
728
1554
  alwaysShowCheckbox: [{ type: Input }],
729
1555
  defaultRecord: [{ type: Input }],
730
1556
  disableSystemRow: [{ type: Input }],
1557
+ enableDateTreeFilter: [{ type: Input }],
1558
+ dateTreeFilterFields: [{ type: Input }],
1559
+ dateTreeSourceRows: [{ type: Input }],
1560
+ dateTreeEmitFilteredRows: [{ type: Input }],
731
1561
  recordDoubleClick: [{ type: Output }],
732
1562
  actionComplete: [{ type: Output }],
733
1563
  rowSelected: [{ type: Output }],
@@ -744,7 +1574,11 @@ CommonGridComponent.propDecorators = {
744
1574
  rowSelecting: [{ type: Output }],
745
1575
  rowDrop: [{ type: Output }],
746
1576
  rowDrag: [{ type: Output }],
747
- rowDragStart: [{ type: Output }]
1577
+ rowDragStart: [{ type: Output }],
1578
+ dateTreeFilteredRows: [{ type: Output }],
1579
+ dateTreePopoverRef: [{ type: ViewChild, args: ["dateTreePopoverRef", { read: ElementRef, static: false },] }],
1580
+ onDocumentMouseDown: [{ type: HostListener, args: ["document:mousedown", ["$event"],] }],
1581
+ onDocumentMouseOver: [{ type: HostListener, args: ["document:mouseover", ["$event"],] }]
748
1582
  };
749
1583
  if (false) {
750
1584
  /** @type {?} */
@@ -822,6 +1656,27 @@ if (false) {
822
1656
  CommonGridComponent.prototype.defaultRecord;
823
1657
  /** @type {?} */
824
1658
  CommonGridComponent.prototype.disableSystemRow;
1659
+ /**
1660
+ * 开启日期树筛选(默认关闭,不影响现有页面)
1661
+ * @type {?}
1662
+ */
1663
+ CommonGridComponent.prototype.enableDateTreeFilter;
1664
+ /**
1665
+ * 参与日期树筛选的列名或 hint,如 ['CreatedOn', 'ModifiedOn']
1666
+ * @type {?}
1667
+ */
1668
+ CommonGridComponent.prototype.dateTreeFilterFields;
1669
+ /**
1670
+ * 未筛选原始数据(可选)。
1671
+ * 不传时由组件在 dataSource 变更时自动快照;传则由页面自行维护 raw。
1672
+ * @type {?}
1673
+ */
1674
+ CommonGridComponent.prototype.dateTreeSourceRows;
1675
+ /**
1676
+ * 内聚模式下仍向页面同步筛选结果(默认 false,一般无需绑定)
1677
+ * @type {?}
1678
+ */
1679
+ CommonGridComponent.prototype.dateTreeEmitFilteredRows;
825
1680
  /** @type {?} */
826
1681
  CommonGridComponent.prototype.recordDoubleClick;
827
1682
  /** @type {?} */
@@ -856,6 +1711,30 @@ if (false) {
856
1711
  CommonGridComponent.prototype.rowDrag;
857
1712
  /** @type {?} */
858
1713
  CommonGridComponent.prototype.rowDragStart;
1714
+ /**
1715
+ * 日期树筛选后的行数据(可选,复杂页面与 dateTreeSourceRows 搭配使用)
1716
+ * @type {?}
1717
+ */
1718
+ CommonGridComponent.prototype.dateTreeFilteredRows;
1719
+ /** @type {?} */
1720
+ CommonGridComponent.prototype.dateTreePopoverRef;
1721
+ /** @type {?} */
1722
+ CommonGridComponent.prototype.dateTreeHelper;
1723
+ /**
1724
+ * 内聚模式:表格实际绑定的数据
1725
+ * @type {?}
1726
+ */
1727
+ CommonGridComponent.prototype.dateTreeDisplayRows;
1728
+ /**
1729
+ * @type {?}
1730
+ * @private
1731
+ */
1732
+ CommonGridComponent.prototype.dateTreeRawRows;
1733
+ /**
1734
+ * @type {?}
1735
+ * @private
1736
+ */
1737
+ CommonGridComponent.prototype.dateTreeApplyingFilter;
859
1738
  /** @type {?} */
860
1739
  CommonGridComponent.prototype.selectId;
861
1740
  /** @type {?} */
@@ -989,6 +1868,765 @@ if (false) {
989
1868
  GridActionItemComponent.prototype.ImageType;
990
1869
  }
991
1870
 
1871
+ /**
1872
+ * @fileoverview added by tsickle
1873
+ * Generated from: lib/date-tree-filter/date-tree-filter-popover/index.component.ts
1874
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1875
+ */
1876
+ class DateTreeFilterPopoverComponent {
1877
+ constructor() {
1878
+ this.field = "";
1879
+ this.sourceRows = [];
1880
+ this.dateFields = [];
1881
+ this.selectedByField = {};
1882
+ this.fieldLabelMap = {};
1883
+ this.apply = new EventEmitter();
1884
+ this.close = new EventEmitter();
1885
+ this.keyword = "";
1886
+ this.years = [];
1887
+ this.expandStateByField = {};
1888
+ this.workingSelectedByField = {};
1889
+ }
1890
+ /**
1891
+ * @param {?} changes
1892
+ * @return {?}
1893
+ */
1894
+ ngOnChanges(changes) {
1895
+ if (changes.field ||
1896
+ changes.sourceRows ||
1897
+ changes.selectedByField ||
1898
+ changes.dateFields) {
1899
+ this.keyword = "";
1900
+ this.workingSelectedByField = this.cloneSelectionMap(this.selectedByField);
1901
+ this.rebuildTree();
1902
+ }
1903
+ }
1904
+ /**
1905
+ * @return {?}
1906
+ */
1907
+ closePopover() {
1908
+ this.close.emit();
1909
+ }
1910
+ /**
1911
+ * @param {?} value
1912
+ * @return {?}
1913
+ */
1914
+ onKeywordChange(value) {
1915
+ this.keyword = value || "";
1916
+ }
1917
+ /**
1918
+ * @return {?}
1919
+ */
1920
+ getVisibleYears() {
1921
+ /** @type {?} */
1922
+ const searchText = (this.keyword || "").trim().toLowerCase();
1923
+ if (!searchText) {
1924
+ return this.years;
1925
+ }
1926
+ return this.years
1927
+ .map((/**
1928
+ * @param {?} yearNode
1929
+ * @return {?}
1930
+ */
1931
+ (yearNode) => {
1932
+ /** @type {?} */
1933
+ const yearMatched = String(yearNode.year).toLowerCase().indexOf(searchText) > -1;
1934
+ /** @type {?} */
1935
+ const months = yearNode.months
1936
+ .map((/**
1937
+ * @param {?} monthNode
1938
+ * @return {?}
1939
+ */
1940
+ (monthNode) => {
1941
+ /** @type {?} */
1942
+ const monthMatched = String(monthNode.label)
1943
+ .toLowerCase()
1944
+ .indexOf(searchText) > -1;
1945
+ /** @type {?} */
1946
+ const days = monthNode.days.filter((/**
1947
+ * @param {?} dayNode
1948
+ * @return {?}
1949
+ */
1950
+ (dayNode) => {
1951
+ return (String(dayNode.label)
1952
+ .toLowerCase()
1953
+ .indexOf(searchText) > -1);
1954
+ }));
1955
+ if (yearMatched || monthMatched) {
1956
+ return monthNode;
1957
+ }
1958
+ return Object.assign({}, monthNode, { days: days });
1959
+ }))
1960
+ .filter((/**
1961
+ * @param {?} monthNode
1962
+ * @return {?}
1963
+ */
1964
+ (monthNode) => monthNode.days.length > 0));
1965
+ if (yearMatched) {
1966
+ return yearNode;
1967
+ }
1968
+ return Object.assign({}, yearNode, { months: months });
1969
+ }))
1970
+ .filter((/**
1971
+ * @param {?} yearNode
1972
+ * @return {?}
1973
+ */
1974
+ (yearNode) => yearNode.months.length > 0));
1975
+ }
1976
+ /**
1977
+ * @param {?} yearNode
1978
+ * @return {?}
1979
+ */
1980
+ toggleYearExpanded(yearNode) {
1981
+ /** @type {?} */
1982
+ const state = this.getOrCreateExpandState(this.field);
1983
+ state.years[yearNode.key] = !state.years[yearNode.key];
1984
+ yearNode.expanded = !!state.years[yearNode.key];
1985
+ }
1986
+ /**
1987
+ * @param {?} monthNode
1988
+ * @return {?}
1989
+ */
1990
+ toggleMonthExpanded(monthNode) {
1991
+ /** @type {?} */
1992
+ const state = this.getOrCreateExpandState(this.field);
1993
+ state.months[monthNode.key] = !state.months[monthNode.key];
1994
+ monthNode.expanded = !!state.months[monthNode.key];
1995
+ }
1996
+ /**
1997
+ * @return {?}
1998
+ */
1999
+ isAllChecked() {
2000
+ /** @type {?} */
2001
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2002
+ /** @type {?} */
2003
+ const enabledDayKeys = this.getEnabledDayKeysInCurrentField();
2004
+ if (!enabledDayKeys.length) {
2005
+ return false;
2006
+ }
2007
+ return enabledDayKeys.every((/**
2008
+ * @param {?} key
2009
+ * @return {?}
2010
+ */
2011
+ (key) => !!selectedMap[key]));
2012
+ }
2013
+ /**
2014
+ * @return {?}
2015
+ */
2016
+ isAllIndeterminate() {
2017
+ /** @type {?} */
2018
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2019
+ /** @type {?} */
2020
+ const enabledDayKeys = this.getEnabledDayKeysInCurrentField();
2021
+ if (!enabledDayKeys.length) {
2022
+ return false;
2023
+ }
2024
+ /** @type {?} */
2025
+ const selectedCount = enabledDayKeys.filter((/**
2026
+ * @param {?} key
2027
+ * @return {?}
2028
+ */
2029
+ (key) => !!selectedMap[key]))
2030
+ .length;
2031
+ return selectedCount > 0 && selectedCount < enabledDayKeys.length;
2032
+ }
2033
+ /**
2034
+ * @param {?} checked
2035
+ * @return {?}
2036
+ */
2037
+ toggleAllDays(checked) {
2038
+ /** @type {?} */
2039
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2040
+ /** @type {?} */
2041
+ const enabledDayKeys = this.getEnabledDayKeysInCurrentField();
2042
+ enabledDayKeys.forEach((/**
2043
+ * @param {?} key
2044
+ * @return {?}
2045
+ */
2046
+ (key) => {
2047
+ if (checked) {
2048
+ selectedMap[key] = true;
2049
+ }
2050
+ else {
2051
+ delete selectedMap[key];
2052
+ }
2053
+ }));
2054
+ }
2055
+ /**
2056
+ * @param {?} dayNode
2057
+ * @return {?}
2058
+ */
2059
+ isDayChecked(dayNode) {
2060
+ /** @type {?} */
2061
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2062
+ return !!selectedMap[dayNode.key];
2063
+ }
2064
+ /**
2065
+ * @param {?} dayNode
2066
+ * @param {?} checked
2067
+ * @return {?}
2068
+ */
2069
+ toggleDay(dayNode, checked) {
2070
+ if (dayNode.disabled) {
2071
+ return;
2072
+ }
2073
+ /** @type {?} */
2074
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2075
+ if (checked) {
2076
+ selectedMap[dayNode.key] = true;
2077
+ }
2078
+ else {
2079
+ delete selectedMap[dayNode.key];
2080
+ }
2081
+ }
2082
+ /**
2083
+ * @param {?} monthNode
2084
+ * @return {?}
2085
+ */
2086
+ isMonthDisabled(monthNode) {
2087
+ return monthNode.days.every((/**
2088
+ * @param {?} dayNode
2089
+ * @return {?}
2090
+ */
2091
+ (dayNode) => dayNode.disabled));
2092
+ }
2093
+ /**
2094
+ * @param {?} monthNode
2095
+ * @return {?}
2096
+ */
2097
+ isMonthChecked(monthNode) {
2098
+ if (this.isMonthDisabled(monthNode)) {
2099
+ return false;
2100
+ }
2101
+ /** @type {?} */
2102
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2103
+ /** @type {?} */
2104
+ const enabledDays = monthNode.days.filter((/**
2105
+ * @param {?} dayNode
2106
+ * @return {?}
2107
+ */
2108
+ (dayNode) => !dayNode.disabled));
2109
+ return enabledDays.every((/**
2110
+ * @param {?} dayNode
2111
+ * @return {?}
2112
+ */
2113
+ (dayNode) => !!selectedMap[dayNode.key]));
2114
+ }
2115
+ /**
2116
+ * @param {?} monthNode
2117
+ * @return {?}
2118
+ */
2119
+ isMonthIndeterminate(monthNode) {
2120
+ if (this.isMonthDisabled(monthNode)) {
2121
+ return false;
2122
+ }
2123
+ /** @type {?} */
2124
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2125
+ /** @type {?} */
2126
+ const enabledDays = monthNode.days.filter((/**
2127
+ * @param {?} dayNode
2128
+ * @return {?}
2129
+ */
2130
+ (dayNode) => !dayNode.disabled));
2131
+ /** @type {?} */
2132
+ const selectedCount = enabledDays.filter((/**
2133
+ * @param {?} dayNode
2134
+ * @return {?}
2135
+ */
2136
+ (dayNode) => {
2137
+ return !!selectedMap[dayNode.key];
2138
+ })).length;
2139
+ return selectedCount > 0 && selectedCount < enabledDays.length;
2140
+ }
2141
+ /**
2142
+ * @param {?} monthNode
2143
+ * @param {?} checked
2144
+ * @return {?}
2145
+ */
2146
+ toggleMonth(monthNode, checked) {
2147
+ if (this.isMonthDisabled(monthNode)) {
2148
+ return;
2149
+ }
2150
+ /** @type {?} */
2151
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2152
+ monthNode.days.forEach((/**
2153
+ * @param {?} dayNode
2154
+ * @return {?}
2155
+ */
2156
+ (dayNode) => {
2157
+ if (dayNode.disabled) {
2158
+ return;
2159
+ }
2160
+ if (checked) {
2161
+ selectedMap[dayNode.key] = true;
2162
+ }
2163
+ else {
2164
+ delete selectedMap[dayNode.key];
2165
+ }
2166
+ }));
2167
+ }
2168
+ /**
2169
+ * @param {?} yearNode
2170
+ * @return {?}
2171
+ */
2172
+ isYearDisabled(yearNode) {
2173
+ return yearNode.months.every((/**
2174
+ * @param {?} monthNode
2175
+ * @return {?}
2176
+ */
2177
+ (monthNode) => this.isMonthDisabled(monthNode)));
2178
+ }
2179
+ /**
2180
+ * @param {?} yearNode
2181
+ * @return {?}
2182
+ */
2183
+ isYearChecked(yearNode) {
2184
+ if (this.isYearDisabled(yearNode)) {
2185
+ return false;
2186
+ }
2187
+ /** @type {?} */
2188
+ const enabledMonths = yearNode.months.filter((/**
2189
+ * @param {?} monthNode
2190
+ * @return {?}
2191
+ */
2192
+ (monthNode) => !this.isMonthDisabled(monthNode)));
2193
+ return enabledMonths.every((/**
2194
+ * @param {?} monthNode
2195
+ * @return {?}
2196
+ */
2197
+ (monthNode) => this.isMonthChecked(monthNode)));
2198
+ }
2199
+ /**
2200
+ * @param {?} yearNode
2201
+ * @return {?}
2202
+ */
2203
+ isYearIndeterminate(yearNode) {
2204
+ if (this.isYearDisabled(yearNode)) {
2205
+ return false;
2206
+ }
2207
+ /** @type {?} */
2208
+ const selectedMap = this.getFieldDaySelectionMap(this.field);
2209
+ /** @type {?} */
2210
+ const enabledDays = [];
2211
+ yearNode.months.forEach((/**
2212
+ * @param {?} monthNode
2213
+ * @return {?}
2214
+ */
2215
+ (monthNode) => {
2216
+ monthNode.days.forEach((/**
2217
+ * @param {?} dayNode
2218
+ * @return {?}
2219
+ */
2220
+ (dayNode) => {
2221
+ if (!dayNode.disabled) {
2222
+ enabledDays.push(dayNode.key);
2223
+ }
2224
+ }));
2225
+ }));
2226
+ /** @type {?} */
2227
+ const selectedCount = enabledDays.filter((/**
2228
+ * @param {?} key
2229
+ * @return {?}
2230
+ */
2231
+ (key) => !!selectedMap[key])).length;
2232
+ return selectedCount > 0 && selectedCount < enabledDays.length;
2233
+ }
2234
+ /**
2235
+ * @param {?} yearNode
2236
+ * @param {?} checked
2237
+ * @return {?}
2238
+ */
2239
+ toggleYear(yearNode, checked) {
2240
+ if (this.isYearDisabled(yearNode)) {
2241
+ return;
2242
+ }
2243
+ yearNode.months.forEach((/**
2244
+ * @param {?} monthNode
2245
+ * @return {?}
2246
+ */
2247
+ (monthNode) => {
2248
+ this.toggleMonth(monthNode, checked);
2249
+ }));
2250
+ }
2251
+ /**
2252
+ * @return {?}
2253
+ */
2254
+ clearSelection() {
2255
+ if (this.field) {
2256
+ this.workingSelectedByField[this.field] = {};
2257
+ }
2258
+ this.apply.emit(this.cloneSelectionMap(this.workingSelectedByField));
2259
+ this.rebuildTree();
2260
+ }
2261
+ /**
2262
+ * @return {?}
2263
+ */
2264
+ applySelection() {
2265
+ this.apply.emit(this.cloneSelectionMap(this.workingSelectedByField));
2266
+ this.closePopover();
2267
+ }
2268
+ /**
2269
+ * @private
2270
+ * @return {?}
2271
+ */
2272
+ rebuildTree() {
2273
+ if (!this.field) {
2274
+ this.years = [];
2275
+ return;
2276
+ }
2277
+ /** @type {?} */
2278
+ const sourceRows = this.sourceRows || [];
2279
+ /** @type {?} */
2280
+ const rowsByOtherFilters = this.filterRowsBySelectedDateTree(sourceRows, this.field);
2281
+ /** @type {?} */
2282
+ const availableDayKeyMap = {};
2283
+ rowsByOtherFilters.forEach((/**
2284
+ * @param {?} row
2285
+ * @return {?}
2286
+ */
2287
+ (row) => {
2288
+ /** @type {?} */
2289
+ const dayKey = this.getDayKeyByRowValue(row[this.field]);
2290
+ if (dayKey) {
2291
+ availableDayKeyMap[dayKey] = true;
2292
+ }
2293
+ }));
2294
+ /** @type {?} */
2295
+ const groupedMap = {};
2296
+ sourceRows.forEach((/**
2297
+ * @param {?} row
2298
+ * @return {?}
2299
+ */
2300
+ (row) => {
2301
+ /** @type {?} */
2302
+ const date = this.parseDateValue(row[this.field]);
2303
+ if (!date) {
2304
+ return;
2305
+ }
2306
+ /** @type {?} */
2307
+ const year = date.getFullYear();
2308
+ /** @type {?} */
2309
+ const month = date.getMonth() + 1;
2310
+ /** @type {?} */
2311
+ const day = date.getDate();
2312
+ if (!groupedMap[year]) {
2313
+ groupedMap[year] = {};
2314
+ }
2315
+ if (!groupedMap[year][month]) {
2316
+ groupedMap[year][month] = {};
2317
+ }
2318
+ if (!groupedMap[year][month][day]) {
2319
+ groupedMap[year][month][day] = 0;
2320
+ }
2321
+ groupedMap[year][month][day] += 1;
2322
+ }));
2323
+ /** @type {?} */
2324
+ const expandState = this.getOrCreateExpandState(this.field);
2325
+ this.years = Object.keys(groupedMap)
2326
+ .map((/**
2327
+ * @param {?} key
2328
+ * @return {?}
2329
+ */
2330
+ (key) => Number(key)))
2331
+ .sort((/**
2332
+ * @param {?} a
2333
+ * @param {?} b
2334
+ * @return {?}
2335
+ */
2336
+ (a, b) => b - a))
2337
+ .map((/**
2338
+ * @param {?} year
2339
+ * @return {?}
2340
+ */
2341
+ (year) => {
2342
+ /** @type {?} */
2343
+ const months = Object.keys(groupedMap[year])
2344
+ .map((/**
2345
+ * @param {?} key
2346
+ * @return {?}
2347
+ */
2348
+ (key) => Number(key)))
2349
+ .sort((/**
2350
+ * @param {?} a
2351
+ * @param {?} b
2352
+ * @return {?}
2353
+ */
2354
+ (a, b) => a - b))
2355
+ .map((/**
2356
+ * @param {?} month
2357
+ * @return {?}
2358
+ */
2359
+ (month) => {
2360
+ /** @type {?} */
2361
+ const monthKey = year + "-" + this.pad2(month);
2362
+ if (expandState.months[monthKey] === undefined) {
2363
+ expandState.months[monthKey] = true;
2364
+ }
2365
+ /** @type {?} */
2366
+ const days = Object.keys(groupedMap[year][month])
2367
+ .map((/**
2368
+ * @param {?} key
2369
+ * @return {?}
2370
+ */
2371
+ (key) => Number(key)))
2372
+ .sort((/**
2373
+ * @param {?} a
2374
+ * @param {?} b
2375
+ * @return {?}
2376
+ */
2377
+ (a, b) => a - b))
2378
+ .map((/**
2379
+ * @param {?} day
2380
+ * @return {?}
2381
+ */
2382
+ (day) => {
2383
+ /** @type {?} */
2384
+ const dayKey = this.toDayKey(year, month, day);
2385
+ /** @type {?} */
2386
+ const dayDate = new Date(year, month - 1, day);
2387
+ return {
2388
+ key: dayKey,
2389
+ day: day,
2390
+ label: moment(dayDate).format("D MMM YYYY"),
2391
+ count: groupedMap[year][month][day],
2392
+ disabled: !availableDayKeyMap[dayKey],
2393
+ };
2394
+ }));
2395
+ return {
2396
+ key: monthKey,
2397
+ month: month,
2398
+ label: moment()
2399
+ .month(month - 1)
2400
+ .format("MMM"),
2401
+ expanded: !!expandState.months[monthKey],
2402
+ days: days,
2403
+ };
2404
+ }));
2405
+ /** @type {?} */
2406
+ const yearKey = String(year);
2407
+ if (expandState.years[yearKey] === undefined) {
2408
+ expandState.years[yearKey] = true;
2409
+ }
2410
+ return {
2411
+ key: yearKey,
2412
+ year: year,
2413
+ expanded: !!expandState.years[yearKey],
2414
+ months: months,
2415
+ };
2416
+ }));
2417
+ }
2418
+ /**
2419
+ * @private
2420
+ * @param {?} rows
2421
+ * @param {?=} excludeField
2422
+ * @return {?}
2423
+ */
2424
+ filterRowsBySelectedDateTree(rows, excludeField) {
2425
+ /** @type {?} */
2426
+ let filteredRows = rows ? rows.slice() : [];
2427
+ (this.dateFields || []).forEach((/**
2428
+ * @param {?} field
2429
+ * @return {?}
2430
+ */
2431
+ (field) => {
2432
+ if (excludeField && field === excludeField) {
2433
+ return;
2434
+ }
2435
+ /** @type {?} */
2436
+ const selectedMap = this.getFieldDaySelectionMap(field);
2437
+ /** @type {?} */
2438
+ const selectedKeys = Object.keys(selectedMap);
2439
+ if (!selectedKeys.length) {
2440
+ return;
2441
+ }
2442
+ filteredRows = filteredRows.filter((/**
2443
+ * @param {?} row
2444
+ * @return {?}
2445
+ */
2446
+ (row) => {
2447
+ /** @type {?} */
2448
+ const dayKey = this.getDayKeyByRowValue(row[field]);
2449
+ return dayKey ? !!selectedMap[dayKey] : false;
2450
+ }));
2451
+ }));
2452
+ return filteredRows;
2453
+ }
2454
+ /**
2455
+ * @private
2456
+ * @param {?} value
2457
+ * @return {?}
2458
+ */
2459
+ parseDateValue(value) {
2460
+ if (!value) {
2461
+ return null;
2462
+ }
2463
+ if (value instanceof Date) {
2464
+ return value;
2465
+ }
2466
+ /** @type {?} */
2467
+ const parsed = moment(value, [
2468
+ "YYYY-MM-DD",
2469
+ "MM/DD/YYYY",
2470
+ "DD/MM/YYYY",
2471
+ "YYYY/MM/DD",
2472
+ "DD-MMM-YYYY",
2473
+ "MMM DD, YYYY",
2474
+ moment.ISO_8601,
2475
+ ], true);
2476
+ if (parsed.isValid()) {
2477
+ return parsed.toDate();
2478
+ }
2479
+ /** @type {?} */
2480
+ const fallback = new Date(value);
2481
+ return isNaN(fallback.getTime()) ? null : fallback;
2482
+ }
2483
+ /**
2484
+ * @private
2485
+ * @param {?} field
2486
+ * @return {?}
2487
+ */
2488
+ getOrCreateExpandState(field) {
2489
+ if (!this.expandStateByField[field]) {
2490
+ this.expandStateByField[field] = { years: {}, months: {} };
2491
+ }
2492
+ return this.expandStateByField[field];
2493
+ }
2494
+ /**
2495
+ * @private
2496
+ * @param {?} field
2497
+ * @return {?}
2498
+ */
2499
+ getFieldDaySelectionMap(field) {
2500
+ if (!this.workingSelectedByField[field]) {
2501
+ this.workingSelectedByField[field] = {};
2502
+ }
2503
+ return this.workingSelectedByField[field];
2504
+ }
2505
+ /**
2506
+ * @private
2507
+ * @param {?} year
2508
+ * @param {?} month
2509
+ * @param {?} day
2510
+ * @return {?}
2511
+ */
2512
+ toDayKey(year, month, day) {
2513
+ return year + "-" + this.pad2(month) + "-" + this.pad2(day);
2514
+ }
2515
+ /**
2516
+ * @private
2517
+ * @param {?} value
2518
+ * @return {?}
2519
+ */
2520
+ pad2(value) {
2521
+ return value < 10 ? "0" + value : String(value);
2522
+ }
2523
+ /**
2524
+ * @private
2525
+ * @param {?} value
2526
+ * @return {?}
2527
+ */
2528
+ getDayKeyByRowValue(value) {
2529
+ /** @type {?} */
2530
+ const date = this.parseDateValue(value);
2531
+ if (!date) {
2532
+ return "";
2533
+ }
2534
+ return this.toDayKey(date.getFullYear(), date.getMonth() + 1, date.getDate());
2535
+ }
2536
+ /**
2537
+ * @private
2538
+ * @return {?}
2539
+ */
2540
+ getEnabledDayKeysInCurrentField() {
2541
+ /** @type {?} */
2542
+ const keys = [];
2543
+ this.years.forEach((/**
2544
+ * @param {?} yearNode
2545
+ * @return {?}
2546
+ */
2547
+ (yearNode) => {
2548
+ yearNode.months.forEach((/**
2549
+ * @param {?} monthNode
2550
+ * @return {?}
2551
+ */
2552
+ (monthNode) => {
2553
+ monthNode.days.forEach((/**
2554
+ * @param {?} dayNode
2555
+ * @return {?}
2556
+ */
2557
+ (dayNode) => {
2558
+ if (!dayNode.disabled) {
2559
+ keys.push(dayNode.key);
2560
+ }
2561
+ }));
2562
+ }));
2563
+ }));
2564
+ return keys;
2565
+ }
2566
+ /**
2567
+ * @private
2568
+ * @param {?} source
2569
+ * @return {?}
2570
+ */
2571
+ cloneSelectionMap(source) {
2572
+ try {
2573
+ return source ? JSON.parse(JSON.stringify(source)) : {};
2574
+ }
2575
+ catch (e) {
2576
+ return {};
2577
+ }
2578
+ }
2579
+ }
2580
+ DateTreeFilterPopoverComponent.decorators = [
2581
+ { type: Component, args: [{
2582
+ selector: "rs-date-tree-filter-popover",
2583
+ template: "<div class=\"date-tree-filter-popover\">\r\n <div class=\"popover-search\">\r\n <span class=\"search-icon\"><img src=\"/assets/img/search.svg\" alt=\"\" /></span>\r\n <input\r\n type=\"text\"\r\n [placeholder]=\"translation.SEARCH || '.SEARCH'\"\r\n [value]=\"keyword\"\r\n (input)=\"onKeywordChange($event.target.value)\"\r\n />\r\n </div>\r\n\r\n <div class=\"popover-tree\">\r\n <label class=\"tree-row all-row\">\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"isAllChecked()\"\r\n [indeterminate]=\"isAllIndeterminate()\"\r\n (change)=\"toggleAllDays($event.target.checked)\"\r\n />\r\n <span class=\"row-label\">{{ translation.ALL || '.ALL' }}</span>\r\n </label>\r\n\r\n <div class=\"year-block\" *ngFor=\"let yearNode of getVisibleYears()\">\r\n <div class=\"tree-row\">\r\n <button\r\n type=\"button\"\r\n class=\"tree-toggle-btn\"\r\n (click)=\"toggleYearExpanded(yearNode); $event.stopPropagation()\"\r\n >\r\n <span class=\"tree-arrow\" [ngClass]=\"{ expanded: yearNode.expanded }\"></span>\r\n </button>\r\n <input\r\n type=\"checkbox\"\r\n [disabled]=\"isYearDisabled(yearNode)\"\r\n [checked]=\"isYearChecked(yearNode)\"\r\n [indeterminate]=\"isYearIndeterminate(yearNode)\"\r\n (change)=\"toggleYear(yearNode, $event.target.checked)\"\r\n />\r\n <span class=\"row-label\">{{ yearNode.year }}</span>\r\n </div>\r\n\r\n <div class=\"month-block\" *ngIf=\"yearNode.expanded\">\r\n <div class=\"month-item\" *ngFor=\"let monthNode of yearNode.months\">\r\n <div class=\"tree-row\">\r\n <button\r\n type=\"button\"\r\n class=\"tree-toggle-btn\"\r\n (click)=\"toggleMonthExpanded(monthNode); $event.stopPropagation()\"\r\n >\r\n <span class=\"tree-arrow\" [ngClass]=\"{ expanded: monthNode.expanded }\"></span>\r\n </button>\r\n <input\r\n type=\"checkbox\"\r\n [disabled]=\"isMonthDisabled(monthNode)\"\r\n [checked]=\"isMonthChecked(monthNode)\"\r\n [indeterminate]=\"isMonthIndeterminate(monthNode)\"\r\n (change)=\"toggleMonth(monthNode, $event.target.checked)\"\r\n />\r\n <span class=\"row-label\">{{ monthNode.label }}</span>\r\n </div>\r\n\r\n <div class=\"day-block\" *ngIf=\"monthNode.expanded\">\r\n <label\r\n class=\"tree-row day-row\"\r\n *ngFor=\"let dayNode of monthNode.days\"\r\n [ngClass]=\"{ disabled: dayNode.disabled }\"\r\n >\r\n <span class=\"tree-toggle-spacer\"></span>\r\n <input\r\n type=\"checkbox\"\r\n [disabled]=\"dayNode.disabled\"\r\n [checked]=\"isDayChecked(dayNode)\"\r\n (change)=\"toggleDay(dayNode, $event.target.checked)\"\r\n />\r\n <span class=\"row-label\">{{ dayNode.label }}</span>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"popover-footer\">\r\n <button type=\"button\" (click)=\"clearSelection()\">\r\n {{ translation.CLEAR || '.CLEAR' }}\r\n </button>\r\n <button type=\"button\" class=\"primary-btn\" (click)=\"applySelection()\">\r\n {{ translation.APPLY || '.APPLY' }}\r\n </button>\r\n </div>\r\n</div>\r\n",
2584
+ styles: [":host{position:fixed;left:12px;top:12px;z-index:20;width:300px}.date-tree-filter-popover{background:#fff;border:1px solid #eaedf0;border-radius:10px;box-shadow:0 0 4px rgba(0,0,0,.25);padding:4px 8px;display:flex;flex-direction:column;color:#44566c;font-family:Arial}.popover-search{position:relative;padding:4px 0 8px}.popover-search .search-icon{position:absolute;left:10px;top:10px;color:#929dab;font-size:12px;line-height:12px}.popover-search input{width:100%;height:28px;border:1px solid #eaedf0;border-radius:16px;padding:0 10px 0 28px;outline:0;font-size:12px;color:#44566c}.popover-tree{max-height:320px;overflow:auto;padding-right:2px}.tree-row{display:flex;align-items:center;min-height:24px;font-size:11px;line-height:14px;color:#44566c}.tree-row input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:14px;height:14px;margin:0 6px 0 0;box-sizing:border-box;border:1px solid #d8d8d8;border-radius:3px;background-color:#fff;cursor:pointer;vertical-align:middle;flex-shrink:0}.tree-row input[type=checkbox]:checked{border-color:#1f7bff;background-color:#1f7bff;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 9 9' fill='none'%3E%3Cpath d='M0.5 4.31818L3 7.5L5.75 4L8.5 0.5' stroke='white' stroke-linecap='round'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;background-size:9px 9px}.tree-row input[type=checkbox]:indeterminate{border-color:#1f7bff;background-color:#1f7bff;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 9 9' fill='none'%3E%3Cpath d='M1.5 4.5H7.5' stroke='white' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;background-size:9px 9px}.tree-row input[type=checkbox]:disabled{cursor:not-allowed;opacity:.5}.all-row{padding-left:20px;margin-bottom:2px}.year-block{margin-bottom:2px}.month-block{padding-left:20px}.day-block{padding-left:24px}.tree-toggle-btn{width:16px;height:16px;padding:0;margin-right:4px;border:none;background:0 0;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.tree-arrow{display:inline-block;width:6px;height:6px;border-right:1px solid #6c7c90;border-bottom:1px solid #6c7c90;transform:rotate(-45deg);transition:transform .15s}.tree-arrow.expanded{transform:rotate(45deg)}.tree-toggle-spacer{width:20px;display:inline-block}.row-label{color:#44566c}.day-row.disabled .row-label{color:#adb5bd}.popover-footer{margin-top:8px;padding:12px 0 8px;border-top:1px solid #eaedf0;display:flex;justify-content:flex-end;gap:12px}.popover-footer button{min-width:56px;height:26px;padding:0 8px;border-radius:4px;border:1px solid #dbe1e7;background:#fff;font-size:11px;color:#44566c;cursor:pointer}.popover-footer .primary-btn{background:#1364b3;border-color:#1364b3;color:#fff}"]
2585
+ }] }
2586
+ ];
2587
+ DateTreeFilterPopoverComponent.propDecorators = {
2588
+ field: [{ type: Input }],
2589
+ translation: [{ type: Input }],
2590
+ sourceRows: [{ type: Input }],
2591
+ dateFields: [{ type: Input }],
2592
+ selectedByField: [{ type: Input }],
2593
+ fieldLabelMap: [{ type: Input }],
2594
+ apply: [{ type: Output }],
2595
+ close: [{ type: Output }]
2596
+ };
2597
+ if (false) {
2598
+ /** @type {?} */
2599
+ DateTreeFilterPopoverComponent.prototype.field;
2600
+ /** @type {?} */
2601
+ DateTreeFilterPopoverComponent.prototype.translation;
2602
+ /** @type {?} */
2603
+ DateTreeFilterPopoverComponent.prototype.sourceRows;
2604
+ /** @type {?} */
2605
+ DateTreeFilterPopoverComponent.prototype.dateFields;
2606
+ /** @type {?} */
2607
+ DateTreeFilterPopoverComponent.prototype.selectedByField;
2608
+ /** @type {?} */
2609
+ DateTreeFilterPopoverComponent.prototype.fieldLabelMap;
2610
+ /** @type {?} */
2611
+ DateTreeFilterPopoverComponent.prototype.apply;
2612
+ /** @type {?} */
2613
+ DateTreeFilterPopoverComponent.prototype.close;
2614
+ /** @type {?} */
2615
+ DateTreeFilterPopoverComponent.prototype.keyword;
2616
+ /** @type {?} */
2617
+ DateTreeFilterPopoverComponent.prototype.years;
2618
+ /**
2619
+ * @type {?}
2620
+ * @private
2621
+ */
2622
+ DateTreeFilterPopoverComponent.prototype.expandStateByField;
2623
+ /**
2624
+ * @type {?}
2625
+ * @private
2626
+ */
2627
+ DateTreeFilterPopoverComponent.prototype.workingSelectedByField;
2628
+ }
2629
+
992
2630
  /**
993
2631
  * @fileoverview added by tsickle
994
2632
  * Generated from: lib/float-box/index.component.ts
@@ -22827,7 +24465,7 @@ CommonDialogComponent.decorators = [
22827
24465
  { type: Component, args: [{
22828
24466
  selector: "rs-common-dialog",
22829
24467
  template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <ng-container *ngIf=\"customPageTitle; else defaultTitle\">\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </ng-container>\r\n <ng-template #defaultTitle>\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n </ng-template>\r\n <!-- <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </div> -->\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header-btn\" (click)=\"onClose()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button *ngIf=\"!hideCloseBtn\" class=\"e-btn\" (click)=\"onClose()\">\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button *ngIf=\"!hideDiscardBtn\" class=\"e-btn\" (click)=\"onDiscard()\">\r\n {{ discardBtnLabel }}\r\n </button>\r\n <button *ngIf=\"!hideSaveBtn\" class=\"e-btn e-primary\" (click)=\"onSave()\">\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
22830
- styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
24468
+ styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;max-width:90vw;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
22831
24469
  }] }
22832
24470
  ];
22833
24471
  /** @nocollapse */
@@ -33495,248 +35133,6 @@ if (false) {
33495
35133
  ConfirmSelectComponent.prototype.isInteracted;
33496
35134
  }
33497
35135
 
33498
- /**
33499
- * @fileoverview added by tsickle
33500
- * Generated from: lib/form/richtexteditor/ai-config.ts
33501
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
33502
- */
33503
- /**
33504
- * @record
33505
- */
33506
- function AIConfig() { }
33507
- if (false) {
33508
- /** @type {?} */
33509
- AIConfig.prototype.endpoint;
33510
- /** @type {?} */
33511
- AIConfig.prototype.apiKey;
33512
- /** @type {?} */
33513
- AIConfig.prototype.deployment;
33514
- /** @type {?} */
33515
- AIConfig.prototype.apiVersion;
33516
- /** @type {?} */
33517
- AIConfig.prototype.enabled;
33518
- }
33519
- // 从环境配置获取AI配置
33520
- /**
33521
- * @return {?}
33522
- */
33523
- function getAIConfig() {
33524
- return {
33525
- endpoint: "https://aidevused.openai.azure.com/",
33526
- apiKey: "ccba76e279f64653a50ac4fee90afe5c",
33527
- deployment: "gpt-4",
33528
- apiVersion: "2025-01-01-preview",
33529
- enabled: true,
33530
- };
33531
- }
33532
- // 检查配置是否有效
33533
- /**
33534
- * @param {?} config
33535
- * @return {?}
33536
- */
33537
- function isAIConfigValid(config) {
33538
- // 检查是否为aidevused端点且有有效API密钥
33539
- return !!((config.endpoint &&
33540
- config.apiKey &&
33541
- config.deployment &&
33542
- config.enabled &&
33543
- config.endpoint === "https://aidevused.openai.azure.com/" &&
33544
- config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
33545
- );
33546
- }
33547
- // 从后端API获取AI配置(推荐方式)
33548
- /**
33549
- * @return {?}
33550
- * @this {*}
33551
- */
33552
- function getAIConfigFromBackend() {
33553
- return __awaiter(this, void 0, void 0, function* () {
33554
- try {
33555
- // 这里应该调用你的后端API来获取AI配置
33556
- // 例如:return await this.http.get('/api/ai-config');
33557
- // 临时返回默认配置
33558
- return getAIConfig();
33559
- }
33560
- catch (error) {
33561
- console.error("Failed to get AI config from backend:", error);
33562
- return getAIConfig();
33563
- }
33564
- });
33565
- }
33566
-
33567
- /**
33568
- * @fileoverview added by tsickle
33569
- * Generated from: lib/form/richtexteditor/openapi.ts
33570
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
33571
- */
33572
- // import { testAIFunction } from './ai-test';
33573
- // testAIFunction();
33574
- // 使用fetch API发送请求到Azure OpenAI
33575
- /**
33576
- * @param {?} messages
33577
- * @param {?} config
33578
- * @return {?}
33579
- * @this {*}
33580
- */
33581
- function sendAIRequest(messages, config) {
33582
- return __awaiter(this, void 0, void 0, function* () {
33583
- try {
33584
- /** @type {?} */
33585
- const url = `${config.endpoint}/openai/deployments/${config.deployment}/chat/completions?api-version=${config.apiVersion}`;
33586
- /** @type {?} */
33587
- const url1 = `${config.endpoint}`;
33588
- /** @type {?} */
33589
- const response = yield fetch(url, {
33590
- method: 'POST',
33591
- headers: {
33592
- 'Content-Type': 'application/json',
33593
- 'api-key': config.apiKey,
33594
- },
33595
- body: JSON.stringify({
33596
- messages: messages,
33597
- max_tokens: 1000,
33598
- temperature: 0.7,
33599
- top_p: 1,
33600
- frequency_penalty: 0,
33601
- presence_penalty: 0,
33602
- }),
33603
- });
33604
- if (!response.ok) {
33605
- /** @type {?} */
33606
- const errorText = yield response.text();
33607
- throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`);
33608
- }
33609
- /** @type {?} */
33610
- const data = yield response.json();
33611
- if (!data.choices || !data.choices[0] || !data.choices[0].message) {
33612
- throw new Error('Invalid response format from AI service');
33613
- }
33614
- return data.choices[0].message.content;
33615
- }
33616
- catch (error) {
33617
- console.error('AI request failed:', error);
33618
- throw error;
33619
- }
33620
- });
33621
- }
33622
- // 备用方案:使用模拟数据(用于开发测试)
33623
- /**
33624
- * @param {?} subQuery
33625
- * @param {?} promptQuery
33626
- * @return {?}
33627
- */
33628
- function getMockAIResponse(subQuery, promptQuery) {
33629
- /** @type {?} */
33630
- const mockResponses = {
33631
- Rephrase: `Rephrased: ${promptQuery}`,
33632
- Grammar: `Corrected: ${promptQuery}`,
33633
- Summarize: `Summary: ${promptQuery.substring(0, 100)}...`,
33634
- Elaborate: `Elaborated: ${promptQuery} with additional details and context.`,
33635
- Translate: `Translated: ${promptQuery}`,
33636
- SentimentAnalysis: '😊 Positive',
33637
- };
33638
- for (const [key, value] of Object.entries(mockResponses)) {
33639
- if (subQuery.includes(key)) {
33640
- return value;
33641
- }
33642
- }
33643
- return `AI processed: ${promptQuery}`;
33644
- }
33645
- // 主要的AI请求方法
33646
- /**
33647
- * @param {?} subQuery
33648
- * @param {?} promptQuery
33649
- * @return {?}
33650
- * @this {*}
33651
- */
33652
- function OpenAiModelRTE(subQuery, promptQuery) {
33653
- return __awaiter(this, void 0, void 0, function* () {
33654
- try {
33655
- /** @type {?} */
33656
- const config = getAIConfig();
33657
- // 检查配置是否有效
33658
- if (!isAIConfigValid(config)) {
33659
- console.warn('AI configuration is incomplete or disabled, using mock response');
33660
- return getMockAIResponse(subQuery, promptQuery);
33661
- }
33662
- /** @type {?} */
33663
- const messages = [
33664
- {
33665
- role: 'system',
33666
- content: subQuery.includes('emoji followed by the sentiment in the format')
33667
- ? 'You are a helpful assistant. Please respond in string format.'
33668
- : "NOTE: Return same html format just do changes content only. don't change html formats.",
33669
- },
33670
- {
33671
- role: 'user',
33672
- content: `${subQuery} ${promptQuery}`,
33673
- },
33674
- ];
33675
- /** @type {?} */
33676
- const result = yield sendAIRequest(messages, config);
33677
- return result;
33678
- }
33679
- catch (error) {
33680
- console.error('AI request failed, using mock response:', error);
33681
- return getMockAIResponse(subQuery, promptQuery);
33682
- }
33683
- });
33684
- }
33685
- // 兼容性方法(保持向后兼容)
33686
- /**
33687
- * @param {?} options
33688
- * @return {?}
33689
- * @this {*}
33690
- */
33691
- function getAzureChatAIRequest(options) {
33692
- return __awaiter(this, void 0, void 0, function* () {
33693
- try {
33694
- /** @type {?} */
33695
- const config = getAIConfig();
33696
- if (!isAIConfigValid(config)) {
33697
- return null;
33698
- }
33699
- /** @type {?} */
33700
- const result = yield sendAIRequest(options.messages, config);
33701
- return result;
33702
- }
33703
- catch (err) {
33704
- console.error('Error occurred:', err);
33705
- return null;
33706
- }
33707
- });
33708
- }
33709
- /**
33710
- * @param {?} prompt
33711
- * @return {?}
33712
- * @this {*}
33713
- */
33714
- function getAzureTextAIRequest(prompt) {
33715
- return __awaiter(this, void 0, void 0, function* () {
33716
- try {
33717
- /** @type {?} */
33718
- const config = getAIConfig();
33719
- if (!isAIConfigValid(config)) {
33720
- return undefined;
33721
- }
33722
- /** @type {?} */
33723
- const messages = [
33724
- {
33725
- role: 'user',
33726
- content: prompt,
33727
- },
33728
- ];
33729
- /** @type {?} */
33730
- const result = yield sendAIRequest(messages, config);
33731
- return result;
33732
- }
33733
- catch (err) {
33734
- console.error('Error occurred:', err);
33735
- return undefined;
33736
- }
33737
- });
33738
- }
33739
-
33740
35136
  /**
33741
35137
  * @fileoverview added by tsickle
33742
35138
  * Generated from: lib/form/richtexteditor/data-config.ts
@@ -33831,6 +35227,73 @@ const fontFamily = {
33831
35227
  command: "Font",
33832
35228
  subCommand: "FontName",
33833
35229
  },
35230
+ // New fonts
35231
+ {
35232
+ text: "Tiempos Headline - Semibold",
35233
+ value: "Tiempos Headline Semibold",
35234
+ cssClass: "e-tiempos-headline",
35235
+ command: "Font",
35236
+ subCommand: "FontName",
35237
+ },
35238
+ {
35239
+ text: "微软雅黑",
35240
+ value: "Microsoft YaHei,微软雅黑,SimHei, sans-serif",
35241
+ cssClass: "e-yahei",
35242
+ command: "Font",
35243
+ subCommand: "FontName",
35244
+ },
35245
+ {
35246
+ text: "等线",
35247
+ value: "DengXian,等线,sans-serif",
35248
+ cssClass: "e-dengxian",
35249
+ command: "Font",
35250
+ subCommand: "FontName",
35251
+ },
35252
+ {
35253
+ text: "思源黑体",
35254
+ value: "Source Han Sans CN, Microsoft YaHei,'微软雅黑', sans-serif",
35255
+ cssClass: "e-source-han-sans-cn-regular",
35256
+ command: "Font",
35257
+ subCommand: "FontName",
35258
+ },
35259
+ {
35260
+ text: "思源宋体",
35261
+ value: "Source Han Serif CN, SimSun,'宋体',serif",
35262
+ cssClass: "e-source-han-serif-cn-regular",
35263
+ command: "Font",
35264
+ subCommand: "FontName",
35265
+ },
35266
+ {
35267
+ text: "霞鹜文楷",
35268
+ value: "LXGW WenKai,'霞鹜文楷',STKaiti, KaiTi, '楷体', '华文楷体', Arial, sans-serif",
35269
+ cssClass: "e-lxgw",
35270
+ command: "Font",
35271
+ subCommand: "FontName",
35272
+ },
35273
+ // Ping Fang SC 系列
35274
+ {
35275
+ text: "Ping Fang SC - Light",
35276
+ value: "苹方-简",
35277
+ cssClass: "e-ping-fang-sc-light",
35278
+ command: "Font",
35279
+ subCommand: "FontName",
35280
+ },
35281
+ ],
35282
+ };
35283
+ /** @type {?} */
35284
+ const size = {
35285
+ default: "11pt",
35286
+ width: "40px",
35287
+ items: [
35288
+ { text: "8 pt", value: "8pt" },
35289
+ { text: "9 pt", value: "9pt" },
35290
+ { text: "10 pt", value: "10pt" },
35291
+ { text: "11 pt", value: "11pt" },
35292
+ { text: "12 pt", value: "12pt" },
35293
+ { text: "14 pt", value: "14pt" },
35294
+ { text: "18 pt", value: "18pt" },
35295
+ { text: "24 pt", value: "24pt" },
35296
+ { text: "36 pt", value: "36pt" },
33834
35297
  ],
33835
35298
  };
33836
35299
  // line height配置
@@ -34016,74 +35479,30 @@ function applyBulletStyle(ul, style) {
34016
35479
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
34017
35480
  */
34018
35481
  class RichtexteditorComponent {
34019
- /**
34020
- * @param {?} ref
34021
- */
34022
- constructor(ref) {
34023
- this.ref = ref;
34024
- // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
34025
- this.placeholder = "";
35482
+ constructor() {
34026
35483
  this.value = "";
35484
+ this.editorId = "editorId";
34027
35485
  this.height = 150;
34028
35486
  this.autoSaveOnIdle = true;
34029
- this.target = "#container"; // dialog 弹窗父级
34030
- // dialog 弹窗父级
34031
- this.toolbarClick = new EventEmitter();
34032
- this.change = new EventEmitter();
34033
- // @Output() change = new EventEmitter();
34034
- this.family = fontFamily;
34035
- this.dialogWidth = "800px";
34036
- this.dialogHeight = "642px";
34037
- this.showZoomBtn = true;
34038
- this.showMsg = false;
35487
+ this.disabled = false;
34039
35488
  this.insertImageSettings = {
34040
35489
  saveFormat: "Blob",
34041
35490
  allowedTypes: [".svg", ".png"],
34042
35491
  display: "none",
34043
35492
  };
34044
- this.size = "";
34045
- this.dropValIndex = 0;
34046
- this.queryList = [
34047
- { id: "Rephrase", text: "Rephrase" },
34048
- { id: "Grammar", text: "Correct Grammar" },
34049
- { id: "Summarize", text: "Summarize" },
34050
- { id: "Elaborate", text: "Elaborate" },
34051
- { id: "Translate", text: "Translate" },
34052
- { id: "SentimentAnalysis", text: "Sentiment Analysis" },
34053
- ];
34054
- this.rephraseTyleList = [
34055
- { text: "Standard", id: "Standard" },
34056
- { text: "Fluent", id: "Fluent" },
34057
- { text: "Professional", id: "Professional" },
34058
- ];
34059
- this.languageList = [
34060
- { id: "EN", text: "English" },
34061
- { id: "ZH", text: "Chinese (Simplified)" },
34062
- { id: "ES", text: "Spanish" },
34063
- { id: "ZHT", text: "Chinese (Traditional)" },
34064
- { id: "HI", text: "Hindi" },
34065
- { id: "AR", text: "Arabic" },
34066
- { id: "BN", text: "Bengali" },
34067
- { id: "PT", text: "Portuguese" },
34068
- { id: "RU", text: "Russian" },
34069
- { id: "JA", text: "Japanese" },
34070
- { id: "DE", text: "German" },
34071
- { id: "KO", text: "Korean" },
34072
- { id: "FR", text: "French" },
34073
- { id: "IT", text: "Italian" },
34074
- { id: "TR", text: "Turkish" },
34075
- ];
34076
- this.promptQuery = "";
34077
- this.isSentimentCheck = false;
34078
- this.subQuery = "";
34079
- this.chipValue = "Standard";
35493
+ this.toolbarClick = new EventEmitter();
35494
+ this.change = new EventEmitter();
35495
+ this.created = new EventEmitter();
35496
+ this.actionBegin = new EventEmitter();
35497
+ this.input = new EventEmitter();
35498
+ this.focus = new EventEmitter();
35499
+ this.blur = new EventEmitter();
35500
+ this.actionComplete = new EventEmitter();
35501
+ this.family = fontFamily;
35502
+ this.fontSize = size;
34080
35503
  this.tools = {
34081
35504
  enableFloating: false,
34082
35505
  items: [
34083
- {
34084
- tooltipText: "AI Assist",
34085
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="ai_assistant_button_tbar" style="width:100%"><div class="e-rte-dropdown-btn-text">AI Assist</div></button>',
34086
- },
34087
35506
  "Bold",
34088
35507
  "Italic",
34089
35508
  "Underline",
@@ -34098,21 +35517,12 @@ class RichtexteditorComponent {
34098
35517
  "CreateTable",
34099
35518
  "Formats",
34100
35519
  "Alignments",
34101
- {
34102
- tooltipText: "Line Height",
34103
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
34104
- },
34105
- "OrderedList",
34106
- "UnorderedList",
35520
+ "BulletFormatList",
35521
+ "NumberFormatList",
34107
35522
  "Outdent",
34108
35523
  "Indent",
34109
35524
  "|",
34110
35525
  "CreateLink",
34111
- {
34112
- tooltipText: "",
34113
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
34114
- '<div class="e-tbar-btn-text" style="font-weight: 500;"><img src="/assets/img/file-icon.svg" style="position: relative;top: -2px;"/><div class="uploadActions"><div id="uploadFromUser">Computer File</div><div id="relationDom">Ticket Attachment</div></div></div></button>',
34115
- },
34116
35526
  "|",
34117
35527
  "FormatPainter",
34118
35528
  "ClearFormat",
@@ -34121,484 +35531,201 @@ class RichtexteditorComponent {
34121
35531
  "Redo",
34122
35532
  ],
34123
35533
  };
35534
+ /**
35535
+ * 表格快捷工具栏:含 TableCell(合并/拆分单元格)
35536
+ */
35537
+ this.quickToolbarSettings = {
35538
+ table: [
35539
+ "Tableheader",
35540
+ "TableRemove",
35541
+ "|",
35542
+ "TableRows",
35543
+ "TableColumns",
35544
+ "TableCell",
35545
+ "|",
35546
+ "Styles",
35547
+ "BackgroundColor",
35548
+ "Alignments",
35549
+ "TableCellVerticalAlign",
35550
+ ],
35551
+ };
35552
+ this.bulletFormatList = {
35553
+ types: [
35554
+ { text: "None", value: "none" },
35555
+ { text: "●", value: "disc" },
35556
+ { text: "○", value: "circle" },
35557
+ { text: "■", value: "square" },
35558
+ { text: "-", value: "dash" },
35559
+ ],
35560
+ };
35561
+ this.numberFormatList = {
35562
+ types: [
35563
+ { text: "None", value: "none" },
35564
+ { text: "1, 2, 3, …", value: "decimal" },
35565
+ {
35566
+ text: "α, β, γ, …",
35567
+ value: "lowerGreek",
35568
+ },
35569
+ {
35570
+ text: "i, ii, iii, …",
35571
+ value: "lowerRoman",
35572
+ },
35573
+ {
35574
+ text: "A, B, C, …",
35575
+ value: "upperAlpha",
35576
+ },
35577
+ {
35578
+ text: "a, b, c, …",
35579
+ value: "lowerAlpha",
35580
+ },
35581
+ {
35582
+ text: "I, II, III, …",
35583
+ value: "upperRoman",
35584
+ },
35585
+ {
35586
+ text: "(1), (2), (3), …",
35587
+ value: "parentheses",
35588
+ },
35589
+ ],
35590
+ };
34124
35591
  }
34125
- /**
34126
- * @return {?}
34127
- */
34128
- ngOnInit() { }
34129
35592
  /**
34130
35593
  * @param {?} args
34131
35594
  * @return {?}
34132
35595
  */
34133
35596
  onContentChange(args) {
34134
- /** @type {?} */
34135
- const tables = document.querySelectorAll("table.e-rte-table");
34136
- tables.forEach((/**
34137
- * @param {?} table
34138
- * @return {?}
34139
- */
34140
- (table) => {
34141
- /** @type {?} */
34142
- const htmlTable = (/** @type {?} */ (table));
34143
- htmlTable.style.marginBottom = "10px";
34144
- htmlTable.style.borderCollapse = "collapse";
34145
- htmlTable.style.emptyCells = "show";
34146
- /** @type {?} */
34147
- const tdElements = table.querySelectorAll("td");
34148
- tdElements.forEach((/**
34149
- * @param {?} td
34150
- * @return {?}
34151
- */
34152
- (td) => {
34153
- td.style.border = "1px solid #adb5bd";
34154
- td.style.height = "20px";
34155
- td.style.minWidth = "20px";
34156
- td.style.padding = "2px 5px";
34157
- td.style.boxSizing = "border-box";
34158
- }));
34159
- }));
34160
35597
  this.change.emit(args);
34161
35598
  }
34162
35599
  /**
34163
35600
  * @return {?}
34164
35601
  */
34165
35602
  onCreate() {
34166
- //bind the a click event
34167
- // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
34168
- // editorContent.addEventListener('click', this.OnClicked.bind(this));
34169
- //add the line height
34170
- this.editorManager = this.rteObj.formatter.editorManager;
34171
- /** @type {?} */
34172
- let splitButton = new DropDownButton({
34173
- items: lineHeight_items,
34174
- iconCss: "e-icons e-line-spacing",
34175
- select: this.onSelect.bind(this),
34176
- });
34177
- splitButton.appendTo("#lineheight_tbar");
34178
- // ai assist
34179
- /** @type {?} */
34180
- let aiassistantButton = new DropDownButton({
34181
- items: this.queryList,
34182
- // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
34183
- select: (/**
34184
- * @param {?} args
34185
- * @return {?}
34186
- */
34187
- (args) => this.aiQuerySelectedMenu(args)),
34188
- });
34189
- aiassistantButton.appendTo("#ai_assistant_button_tbar");
35603
+ this.created.emit();
34190
35604
  }
34191
35605
  /**
34192
- * @private
34193
35606
  * @param {?} args
34194
35607
  * @return {?}
34195
35608
  */
34196
- onSelect(args) {
34197
- if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
34198
- this.rteObj.formatter.saveData();
34199
- }
34200
- /** @type {?} */
34201
- let nodes = this.editorManager.domNode.blockNodes();
34202
- for (let i = 0; nodes.length > i; i++) {
34203
- ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
34204
- }
34205
- this.rteObj.formatter.saveData();
34206
- this.rteObj.formatter.enableUndo(this.rteObj);
35609
+ _toolbarClick(args) {
35610
+ this.toolbarClick.emit(args);
34207
35611
  }
34208
35612
  /**
34209
- * @private
34210
35613
  * @param {?} args
34211
35614
  * @return {?}
34212
35615
  */
34213
- aiQuerySelectedMenu(args) {
34214
- this.dialogueOpen(args.item.text);
34215
- }
34216
- /**
34217
- * @param {?} selectedQuery
34218
- * @return {?}
34219
- */
34220
- dialogueOpen(selectedQuery) {
34221
- /** @type {?} */
34222
- var selectionText = this.rteObj.getSelectedHtml();
34223
- this.selectedQuery = selectedQuery;
34224
- if (selectionText) {
34225
- /** @type {?} */
34226
- let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
34227
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
34228
- this.dropValIndex = this.queryList.findIndex((/**
34229
- * @param {?} q
34230
- * @return {?}
34231
- */
34232
- (q) => q.text.toLowerCase() === selectedQuery.toLowerCase()));
34233
- this.queryCategory.index = this.dropValIndex;
34234
- this.leftRte.value = this.promptQuery = selectionText;
34235
- this.leftRte.refreshUI();
34236
- this.AIdialog.show();
34237
- this.updateAISugesstionsData(selectedQuery);
34238
- }
34239
- else {
34240
- this.showMsg = true;
34241
- setTimeout((/**
34242
- * @return {?}
34243
- */
34244
- () => {
34245
- this.showMsg = false;
34246
- }), 3000);
34247
- console.log("Please select the content to perform the AI operation.");
34248
- }
35616
+ _actionBegin(args) {
35617
+ this.actionBegin.emit(args);
34249
35618
  }
34250
35619
  /**
34251
- * @param {?} selectedQuery
35620
+ * @param {?} args
34252
35621
  * @return {?}
34253
35622
  */
34254
- updateAISugesstionsData(selectedQuery) {
34255
- this.isSentimentCheck = false;
34256
- switch (selectedQuery) {
34257
- case "Summarize":
34258
- this.subQuery = "Summarize the upcoming sentence shortly.";
34259
- break;
34260
- case "Elaborate":
34261
- this.subQuery = "Elaborate on the upcoming sentence.";
34262
- break;
34263
- case "Rephrase":
34264
- this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
34265
- break;
34266
- case "Correct Grammar":
34267
- this.subQuery = "Correct the grammar of the upcoming sentence.";
34268
- break;
34269
- case "Translate":
34270
- this.subQuery =
34271
- "Translate the upcoming sentence to " + this.translatelanguage + ".";
34272
- break;
34273
- case "Sentiment Analysis":
34274
- this.isSentimentCheck = true;
34275
- this.subQuery =
34276
- 'Analyze the sentiment and grammar of the following paragraphs and provide the expression score with an emoji followed by the sentiment in the format: "😊 Neutral". \n\nNOTE: Avoid any additional text or explanation:';
34277
- break;
34278
- }
34279
- this.updateAISugesstions();
35623
+ _input(args) {
35624
+ this.input.emit(args);
34280
35625
  }
34281
35626
  /**
35627
+ * @param {?} args
34282
35628
  * @return {?}
34283
35629
  */
34284
- updateAISugesstions() {
34285
- try {
34286
- if (this.promptQuery) {
34287
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
34288
- "";
34289
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
34290
- "none";
34291
- this.sentimentButton.element.style.display = "none";
34292
- this.regenerateButton.disabled = true;
34293
- this.copyButton.disabled = true;
34294
- this.replaceButton.disabled = true;
34295
- this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
34296
- this.apiResultData.then((/**
34297
- * @param {?} result
34298
- * @return {?}
34299
- */
34300
- (result) => {
34301
- this.AIResult = this.isSentimentCheck ? this.promptQuery : result;
34302
- this.sentimentButton.content = result
34303
- .toLowerCase()
34304
- .includes("positive")
34305
- ? "😊 Positive"
34306
- : result.toLowerCase().includes("negative")
34307
- ? "😞 Negative"
34308
- : "😐 Neutral";
34309
- this.sentimentButton.element.style.display = !this.isSentimentCheck
34310
- ? "none"
34311
- : "";
34312
- this.rightRte.value = this.AIResult;
34313
- /** @type {?} */
34314
- var noResultsFound = !(this.AIResult || this.promptQuery);
34315
- ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
34316
- this.regenerateButton.disabled = noResultsFound;
34317
- this.copyButton.disabled = noResultsFound;
34318
- this.replaceButton.disabled = noResultsFound;
34319
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
34320
- "none";
34321
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
34322
- noResultsFound ? "none" : "";
34323
- console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
34324
- // this.ref.markForCheck();
34325
- }));
35630
+ _actionComplete(args) {
35631
+ if (args.requestType == "UL") {
35632
+ if (args.elements[0].parentElement.style.listStyleType == "dash") {
35633
+ args.elements[0].parentElement.style.listStyleImage =
35634
+ "url('../../../assets/img/bullet-dash.svg')";
35635
+ args.elements[0].parentElement.style.listStyleType = "none";
34326
35636
  }
34327
35637
  }
34328
- catch (_a) {
34329
- // this.toastObj.show();
34330
- }
34331
- }
34332
- /**
34333
- * @param {?} subQuery
34334
- * @param {?} promptQuery
34335
- * @return {?}
34336
- */
34337
- getResponseFromOpenAI(subQuery, promptQuery) {
34338
- return __awaiter(this, void 0, void 0, function* () {
34339
- /** @type {?} */
34340
- const content = yield OpenAiModelRTE(subQuery, promptQuery);
34341
- return content ? ((/** @type {?} */ (content))) : "";
34342
- });
34343
- }
34344
- /**
34345
- * @return {?}
34346
- */
34347
- dialogShow() {
34348
- (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
34349
- * @return {?}
34350
- */
34351
- () => {
34352
- this.updateAISugesstions();
34353
- }));
34354
- (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
34355
- * @return {?}
34356
- */
34357
- () => {
34358
- this.copyTextToClipboard(this.AIResult);
34359
- }));
34360
- (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
34361
- * @return {?}
34362
- */
34363
- () => {
34364
- /** @type {?} */
34365
- let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
34366
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
34367
- ((/** @type {?} */ (this.rteObj))).executeCommand("insertHTML", this.AIResult, {
34368
- undo: true,
34369
- });
34370
- this.closeDialog();
34371
- }));
34372
- ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
34373
- }
34374
- /**
34375
- * @return {?}
34376
- */
34377
- closeDialog() {
34378
- this.AIdialog.hide();
34379
- this.rightRte.value = "";
34380
- this.leftRte.value = "";
34381
- this.promptQuery = "";
34382
- this.chipValue = "Standard";
34383
- this.AIResult = "";
34384
- this.dropValIndex = 0;
34385
- this.selectedQuery = "Rephrase";
34386
- this.sentimentButton.content = "😊 Neutral";
34387
- }
34388
- /**
34389
- * @param {?} text
34390
- * @return {?}
34391
- */
34392
- copyTextToClipboard(text) {
34393
- if (navigator.clipboard) {
34394
- navigator.clipboard
34395
- .writeText(text)
34396
- .then((/**
34397
- * @return {?}
34398
- */
34399
- () => {
34400
- console.log("Text copied to clipboard successfully!");
34401
- }))
34402
- .catch((/**
34403
- * @param {?} err
34404
- * @return {?}
34405
- */
34406
- (err) => {
34407
- console.error("Failed to copy text: ", err);
34408
- }));
34409
- }
34410
- else {
34411
- // Fallback for browsers that do not support the Clipboard API
34412
- /** @type {?} */
34413
- const textarea = document.createElement("textarea");
34414
- textarea.value = text;
34415
- document.body.appendChild(textarea);
34416
- textarea.select();
34417
- try {
34418
- document.execCommand("copy");
34419
- console.log("Text copied to clipboard using execCommand");
35638
+ else if (args.requestType == "OL") {
35639
+ args.elements[0].parentElement.classList.remove("custom-list", "parentheses");
35640
+ if (args.elements[0].parentElement.style.listStyleType == "parentheses") {
35641
+ args.elements[0].parentElement.classList = "custom-list";
35642
+ args.elements[0].parentElement.classList.add("parentheses");
34420
35643
  }
34421
- catch (err) {
34422
- console.error("Failed to copy text: ", err);
34423
- }
34424
- finally {
34425
- document.body.removeChild(textarea);
34426
- }
34427
- }
34428
- }
34429
- /**
34430
- * @return {?}
34431
- */
34432
- onOverlayClick() {
34433
- /** @type {?} */
34434
- let activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
34435
- if (activeEle) {
34436
- activeEle.classList.remove("e-active");
34437
35644
  }
34438
- this.closeDialog();
34439
- }
34440
- /**
34441
- * @param {?} args
34442
- * @return {?}
34443
- */
34444
- onQuerySelect(args) {
34445
- // this.chipList.selectedChips = 0;
34446
- this.translatelanguage = "EN";
34447
- this.selectedQuery = args.itemData.text;
34448
- this.updateAISugesstionsData(args.itemData.text);
35645
+ this.actionComplete.emit(args);
34449
35646
  }
34450
35647
  /**
34451
35648
  * @param {?} args
34452
35649
  * @return {?}
34453
35650
  */
34454
- onLanguageSelect(args) {
34455
- this.translatelanguage = args.itemData.id;
34456
- this.updateAISugesstionsData("Translate");
35651
+ _focus(args) {
35652
+ this.focus.emit(args);
34457
35653
  }
34458
35654
  /**
34459
35655
  * @param {?} args
34460
35656
  * @return {?}
34461
35657
  */
34462
- onChipClick(args) {
34463
- this.chipValue = args.itemData.text;
34464
- // 事件会触发两次 必须判断args.text是否有值
34465
- if (args.itemData.text)
34466
- this.updateAISugesstionsData("Rephrase");
34467
- }
34468
- /**
34469
- * @param {?} args
34470
- * @return {?}
34471
- */
34472
- _toolbarClick(args) {
34473
- this.toolbarClick.emit(args);
34474
- }
34475
- /**
34476
- * @return {?}
34477
- */
34478
- hideToast() {
34479
- this.showMsg = false;
34480
- }
34481
- /**
34482
- * @return {?}
34483
- */
34484
- onZoom() {
34485
- if (this.size === "largest") {
34486
- this.size = ""; // 恢复到原始大小
34487
- }
34488
- else {
34489
- this.size = "largest"; // 设置为最大化
34490
- }
35658
+ _blur(args) {
35659
+ this.blur.emit(args);
34491
35660
  }
34492
35661
  }
34493
35662
  RichtexteditorComponent.decorators = [
34494
35663
  { type: Component, args: [{
34495
35664
  selector: "rs-richtext-editor",
34496
- template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n id=\"editor\"\r\n [height]=\"height\"\r\n [saveInterval]=\"0\"\r\n [autoSaveOnIdle]=\"autoSaveOnIdle\"\r\n [toolbarSettings]=\"tools\"\r\n [fontFamily]=\"family\"\r\n [insertImageSettings]=\"insertImageSettings\"\r\n [(value)]=\"value\"\r\n (change)=\"onContentChange($event)\"\r\n (created)=\"onCreate()\"\r\n (toolbarClick)=\"_toolbarClick($event)\"\r\n >\r\n </ejs-richtexteditor>\r\n <ejs-dialog\r\n #AIdialog\r\n id=\"AIdialog\"\r\n [ngClass]=\"size\"\r\n [visible]=\"false\"\r\n [target]=\"target\"\r\n [isModal]=\"true\"\r\n [height]=\"dialogHeight\"\r\n [width]=\"dialogWidth\"\r\n maxHeight=\"80%\"\r\n cssClass=\"e-rte-elements custom-dialog-rte\"\r\n zIndex=\"1000\"\r\n (close)=\"closeDialog()\"\r\n (overlayClick)=\"onOverlayClick()\"\r\n (open)=\"dialogShow()\"\r\n >\r\n <ng-template #header>\r\n <div class=\"header-title\">AI Assist</div>\r\n <div class=\"header-buttons\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-zoom\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div class=\"header-btn\" (click)=\"closeDialog()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #footerTemplate>\r\n <div id=\"dialog-footer-content\">\r\n <div class=\"custom-row-0\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"width: 100%; align-items: center; justify-content: left\"\r\n ></div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: right; width: 100%\">\r\n <button\r\n ejs-button\r\n #sentimentButton\r\n content=\"\uD83D\uDE0A Neutral\"\r\n disabled=\"false\"\r\n cssClass=\"sentiment\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #copyButton\r\n content=\"Copy\"\r\n disabled=\"false\"\r\n class=\"copy-btn\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #replaceButton\r\n content=\"Replace\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #content>\r\n <div class=\"dialog-content\" style=\"height: 100%\">\r\n <div class=\"custom-row-0\">\r\n <div class=\"cuscol-0\" style=\"width: 100%\">\r\n <ejs-dropdownlist\r\n #queryCategory\r\n style=\"width: 200px\"\r\n id=\"queryCategory\"\r\n [dataSource]=\"queryList\"\r\n index=\"0\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onQuerySelect($event)\"\r\n >\r\n Rephrase\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Rephrase'\"\r\n id=\"chips-container\"\r\n #chipList\r\n style=\"width: 160px\"\r\n [(ngModel)]=\"chipValue\"\r\n [dataSource]=\"rephraseTyleList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onChipClick($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Translate'\"\r\n #languageCategory\r\n index=\"0\"\r\n id=\"language-Category\"\r\n [dataSource]=\"languageList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onLanguageSelect($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <!-- <ejs-chiplist\r\n id=\"chips-container\"\r\n #chipList\r\n [chips]=\"['Standard', 'Fluent', 'Professional']\"\r\n selection=\"Single\"\r\n cssClass=\"e-outline\"\r\n [selectedChips]=\"[0]\"\r\n (click)=\"onChipClick($event)\"\r\n >\r\n </ejs-chiplist> -->\r\n <button\r\n ejs-button\r\n #regenerateButton\r\n content=\"Regenerate\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n <div class=\"custom-row-1\" style=\"height: calc(100% - 40px)\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: left;\r\n \"\r\n >\r\n <div style=\"text-align: left; height: 100%\">\r\n <ejs-richtexteditor\r\n #leftRte\r\n id=\"leftRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n </ejs-richtexteditor>\r\n </div>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n justify-content: space-between;\r\n width: 100%;\r\n height: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: left; width: 100%; height: 100%\">\r\n <ejs-richtexteditor\r\n #rightRte\r\n id=\"rightRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n <!-- style=\"display: none\" -->\r\n </ejs-richtexteditor>\r\n <div\r\n class=\"no-results-found\"\r\n id=\"no-results-found\"\r\n style=\"display: none; height: 244px; align-content: center\"\r\n >\r\n <img\r\n height=\"50\"\r\n width=\"50\"\r\n src=\"https://storage.googleapis.com/cdn-bolddesk/agent-angular-app/images/light/no-records-warning.svg\"\r\n />\r\n <div>No results found</div>\r\n </div>\r\n <div id=\"skeletonId\" style=\"display: none\">\r\n <ejs-skeleton\r\n #skeletonId1\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"100%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId2\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"90%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId3\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"70%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId4\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"50%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId5\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"30%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId6\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"10%\"\r\n ></ejs-skeleton\r\n ><br />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ejs-dialog>\r\n <div class=\"toast\" *ngIf=\"showMsg\">\r\n <span class=\"toast_text\">First, Select some text</span\r\n ><span class=\"close_icon\" (click)=\"hideToast()\"></span>\r\n </div>\r\n</div>\r\n",
35665
+ template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n [id]=\"editorId\"\r\n [height]=\"height\"\r\n [saveInterval]=\"0\"\r\n [autoSaveOnIdle]=\"autoSaveOnIdle\"\r\n [toolbarSettings]=\"tools\"\r\n [quickToolbarSettings]=\"quickToolbarSettings\"\r\n [bulletFormatList]=\"bulletFormatList\"\r\n [numberFormatList]=\"numberFormatList\"\r\n [fontFamily]=\"family\"\r\n [fontSize]=\"fontSize\"\r\n [disabled]=\"disabled\"\r\n [insertImageSettings]=\"insertImageSettings\"\r\n [(value)]=\"value\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (change)=\"onContentChange($event)\"\r\n (created)=\"onCreate()\"\r\n (toolbarClick)=\"_toolbarClick($event)\"\r\n (input)=\"_input($event)\"\r\n (focus)=\"_focus($event)\"\r\n (blur)=\"_blur($event)\"\r\n (actionComplete)=\"_actionComplete($event)\"\r\n >\r\n </ejs-richtexteditor>\r\n</div>\r\n",
34497
35666
  styles: [".editor_box{position:relative;width:100%;height:100%}.editor_box .toast{position:absolute;left:35%;top:110px;z-index:1;width:400px;border-radius:4px;border:1px solid #e8f2ff;background:#f4f8ff;padding:4px 12px;color:#1f3f5c;font-size:12px;font-style:normal;font-weight:400;height:32px;font-family:Arial;display:flex;align-items:center;justify-content:space-between}.editor_box .toast .toast_text::before{content:url(../../assets/img/info.svg);display:inline-block;width:16px;height:16px;vertical-align:bottom;margin-right:8px}.editor_box .toast .close_icon{background-image:url(../../assets/img/notification-close.svg);cursor:pointer;display:inline-block;width:16px;height:16px}.custom-dialog-rte{padding:0 20px;border-radius:10px}.custom-row-0,.custom-row-1,.custom-row-2{display:flex;align-items:center;padding:12px 24px}.e-rte-dropdown-btn-text{padding-left:4px}.no-results-found{text-align:center}.no-results-found img{display:block;margin:0 auto}.e-custom{margin-right:.5rem;border-radius:25px!important}.custom-dialog-rte .skeleton-rectangle{border-radius:4px}@media (max-width:767px){.cuscol-0,.cuscol-1,.cuscol-2{justify-content:center!important}.custom-row-0,.custom-row-1,.custom-row-2{flex-direction:column!important}.cuscol-1{border-right:none!important}.cuscol-0{width:100%;align-items:center}::ng-deep:host .e-dialog{max-height:80%!important}.custom-dialog-rte .e-dialog .e-dlg-content{overflow-y:auto!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor{height:100px!important}.cuscol-noresult{padding-bottom:20px!important}.e-chip-list{padding:5px!important}.cuscol{padding-right:.2rem!important;width:auto!important}.custom-row-1{height:auto!important}}.cuscol-1{display:flex;flex-direction:row!important}.cuscol-2{display:flex;flex-direction:column!important}.sentiment{color:#000!important}.custom-dialog-rte .e-dialog .e-dlg-content{padding:0!important;overflow-y:hidden}.custom-dialog-rte .e-dialog .e-dlg-header-content{padding:20px 0!important;border:0!important}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header{display:flex;align-items:center;line-height:18px;justify-content:space-between}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header .header-title{font-family:Arial;font-size:15px;font-weight:700;font-style:normal}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons{display:flex}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons img{width:16px;height:16px;cursor:pointer;padding:2px;margin-left:12px}.custom-dialog-rte .e-dialog .e-footer-content{padding:0!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor.e-rte-tb-expand .e-rte-content,.e-richtexteditor.e-rte-tb-expand .e-source-content{border:0;border-bottom:1px solid #dee2e6;border-top:0 solid #dee2e6!important}.custom-dialog-rte .dialog-content .custom-row-0{border-top:0 solid #ddd!important;padding:0;margin-bottom:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-0{justify-content:left;border-right:none!important;padding:0;display:flex;gap:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1{padding:0;margin-left:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1 .e-primary{color:#44566c;border-radius:4px;border:1px solid #dbe1e7;background:#fff;width:87px;margin:0;padding:2px 12px;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;height:28px}.custom-dialog-rte .dialog-content .custom-row-1{padding:0;height:calc(100% - 40px);gap:12px}.custom-dialog-rte .e-footer-content{border:0}.custom-dialog-rte .e-footer-content .custom-row-0{padding:20px 0}.custom-dialog-rte .e-footer-content .e-control.e-btn{font-family:Arial;font-size:12px;line-height:14px;padding:2px 12px;height:28px;background:#fff;color:#44566c}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn{border-color:#dbe1e7}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn::before{content:url(../../assets/img/editor-copy.svg);vertical-align:middle;margin-right:6px}.custom-dialog-rte .e-footer-content .e-control.e-btn.e-primary{color:#fff;background:#1364b3}.editor_box .e-dialog.largest{width:96vw!important;height:88vh!important;max-height:88vh;max-width:2100px}"]
34498
35667
  }] }
34499
35668
  ];
34500
- /** @nocollapse */
34501
- RichtexteditorComponent.ctorParameters = () => [
34502
- { type: ChangeDetectorRef }
34503
- ];
34504
35669
  RichtexteditorComponent.propDecorators = {
34505
- rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
34506
- queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
34507
- leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
34508
- rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
34509
- AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
34510
- sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
34511
- regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
34512
- copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
34513
- replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
34514
- placeholder: [{ type: Input }],
34515
35670
  value: [{ type: Input }],
35671
+ editorId: [{ type: Input }],
34516
35672
  height: [{ type: Input }],
34517
35673
  autoSaveOnIdle: [{ type: Input }],
34518
- target: [{ type: Input }],
35674
+ disabled: [{ type: Input }],
35675
+ insertImageSettings: [{ type: Input }],
34519
35676
  toolbarClick: [{ type: Output }],
34520
- change: [{ type: Output }]
35677
+ change: [{ type: Output }],
35678
+ created: [{ type: Output }],
35679
+ actionBegin: [{ type: Output }],
35680
+ input: [{ type: Output }],
35681
+ focus: [{ type: Output }],
35682
+ blur: [{ type: Output }],
35683
+ actionComplete: [{ type: Output }]
34521
35684
  };
34522
35685
  if (false) {
34523
- /** @type {?} */
34524
- RichtexteditorComponent.prototype.rteObj;
34525
- /** @type {?} */
34526
- RichtexteditorComponent.prototype.queryCategory;
34527
- /** @type {?} */
34528
- RichtexteditorComponent.prototype.leftRte;
34529
- /** @type {?} */
34530
- RichtexteditorComponent.prototype.rightRte;
34531
- /** @type {?} */
34532
- RichtexteditorComponent.prototype.AIdialog;
34533
- /** @type {?} */
34534
- RichtexteditorComponent.prototype.sentimentButton;
34535
- /** @type {?} */
34536
- RichtexteditorComponent.prototype.regenerateButton;
34537
- /** @type {?} */
34538
- RichtexteditorComponent.prototype.copyButton;
34539
- /** @type {?} */
34540
- RichtexteditorComponent.prototype.replaceButton;
34541
- /** @type {?} */
34542
- RichtexteditorComponent.prototype.placeholder;
34543
35686
  /** @type {?} */
34544
35687
  RichtexteditorComponent.prototype.value;
34545
35688
  /** @type {?} */
35689
+ RichtexteditorComponent.prototype.editorId;
35690
+ /** @type {?} */
34546
35691
  RichtexteditorComponent.prototype.height;
34547
35692
  /** @type {?} */
34548
35693
  RichtexteditorComponent.prototype.autoSaveOnIdle;
34549
35694
  /** @type {?} */
34550
- RichtexteditorComponent.prototype.target;
34551
- /** @type {?} */
34552
- RichtexteditorComponent.prototype.toolbarClick;
34553
- /** @type {?} */
34554
- RichtexteditorComponent.prototype.change;
34555
- /** @type {?} */
34556
- RichtexteditorComponent.prototype.family;
34557
- /** @type {?} */
34558
- RichtexteditorComponent.prototype.dialogWidth;
34559
- /** @type {?} */
34560
- RichtexteditorComponent.prototype.dialogHeight;
34561
- /** @type {?} */
34562
- RichtexteditorComponent.prototype.showZoomBtn;
34563
- /** @type {?} */
34564
- RichtexteditorComponent.prototype.showMsg;
35695
+ RichtexteditorComponent.prototype.disabled;
34565
35696
  /** @type {?} */
34566
35697
  RichtexteditorComponent.prototype.insertImageSettings;
34567
35698
  /** @type {?} */
34568
- RichtexteditorComponent.prototype.editorManager;
34569
- /** @type {?} */
34570
- RichtexteditorComponent.prototype.size;
34571
- /** @type {?} */
34572
- RichtexteditorComponent.prototype.selectedQuery;
34573
- /** @type {?} */
34574
- RichtexteditorComponent.prototype.dropValIndex;
34575
- /** @type {?} */
34576
- RichtexteditorComponent.prototype.queryList;
35699
+ RichtexteditorComponent.prototype.toolbarClick;
34577
35700
  /** @type {?} */
34578
- RichtexteditorComponent.prototype.rephraseTyleList;
35701
+ RichtexteditorComponent.prototype.change;
34579
35702
  /** @type {?} */
34580
- RichtexteditorComponent.prototype.languageList;
35703
+ RichtexteditorComponent.prototype.created;
34581
35704
  /** @type {?} */
34582
- RichtexteditorComponent.prototype.promptQuery;
35705
+ RichtexteditorComponent.prototype.actionBegin;
34583
35706
  /** @type {?} */
34584
- RichtexteditorComponent.prototype.isSentimentCheck;
35707
+ RichtexteditorComponent.prototype.input;
34585
35708
  /** @type {?} */
34586
- RichtexteditorComponent.prototype.subQuery;
35709
+ RichtexteditorComponent.prototype.focus;
34587
35710
  /** @type {?} */
34588
- RichtexteditorComponent.prototype.translatelanguage;
35711
+ RichtexteditorComponent.prototype.blur;
34589
35712
  /** @type {?} */
34590
- RichtexteditorComponent.prototype.chipValue;
35713
+ RichtexteditorComponent.prototype.actionComplete;
34591
35714
  /** @type {?} */
34592
- RichtexteditorComponent.prototype.apiResultData;
35715
+ RichtexteditorComponent.prototype.family;
34593
35716
  /** @type {?} */
34594
- RichtexteditorComponent.prototype.AIResult;
35717
+ RichtexteditorComponent.prototype.fontSize;
34595
35718
  /** @type {?} */
34596
35719
  RichtexteditorComponent.prototype.tools;
34597
35720
  /**
35721
+ * 表格快捷工具栏:含 TableCell(合并/拆分单元格)
34598
35722
  * @type {?}
34599
- * @private
34600
35723
  */
34601
- RichtexteditorComponent.prototype.ref;
35724
+ RichtexteditorComponent.prototype.quickToolbarSettings;
35725
+ /** @type {?} */
35726
+ RichtexteditorComponent.prototype.bulletFormatList;
35727
+ /** @type {?} */
35728
+ RichtexteditorComponent.prototype.numberFormatList;
34602
35729
  }
34603
35730
 
34604
35731
  /**
@@ -49370,6 +50497,7 @@ RaiseCommonLibModule.decorators = [
49370
50497
  CommonGridComponent,
49371
50498
  GridActionComponent,
49372
50499
  GridActionItemComponent,
50500
+ DateTreeFilterPopoverComponent,
49373
50501
  FloatBoxComponent,
49374
50502
  RsPageListComponent,
49375
50503
  RsPageTabComponent,
@@ -49556,6 +50684,7 @@ RaiseCommonLibModule.decorators = [
49556
50684
  CommonGridComponent,
49557
50685
  GridActionComponent,
49558
50686
  GridActionItemComponent,
50687
+ DateTreeFilterPopoverComponent,
49559
50688
  FloatBoxComponent,
49560
50689
  RsPageListComponent,
49561
50690
  RsPageTabComponent,
@@ -49620,5 +50749,5 @@ RaiseCommonLibModule.decorators = [
49620
50749
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
49621
50750
  */
49622
50751
 
49623
- export { API_SERVICE_TOKEN, CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, PBF_TOKEN, PaneGroupNewComponent, ROLE_SERVICE_TOKEN, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSStepperComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SmartPopupComponent, StaticResourceService, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, DashboardService as ɵb, ApiList as ɵc, DashboardPorletsService as ɵd, debounce as ɵe, RichtexteditorComponent as ɵf, ConfirmSelectComponent as ɵg, NewActionNotificationComponent as ɵh, CommonDeleteComponent as ɵi, SidebarIconlistNewComponent as ɵj, EmptyIconPromptComponent as ɵk, GadgetTableComponent as ɵl, GadgetPivotComponent as ɵm, GadgetPivotChartComponent as ɵn, GadgetTransposeComponent as ɵo, PortletTypeNewComponent as ɵp, FieldFilterComponent as ɵq, FieldFormatComponent as ɵr, DataMartNewComponent as ɵs, BarChartsComponent as ɵt, PaneDownloadComponent as ɵu };
50752
+ export { API_SERVICE_TOKEN, CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DATE_TREE_DEFAULT_DATE_FORMATS, DateTreeFilterHelper, DateTreeFilterPopoverComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, PBF_TOKEN, PaneGroupNewComponent, ROLE_SERVICE_TOKEN, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSStepperComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SmartPopupComponent, StaticResourceService, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, createRsCommonGridDateTreeHelper, filterShowSection, Debounce as ɵa, DashboardService as ɵb, ApiList as ɵc, DashboardPorletsService as ɵd, debounce as ɵe, RichtexteditorComponent as ɵf, ConfirmSelectComponent as ɵg, NewActionNotificationComponent as ɵh, CommonDeleteComponent as ɵi, SidebarIconlistNewComponent as ɵj, EmptyIconPromptComponent as ɵk, GadgetTableComponent as ɵl, GadgetPivotComponent as ɵm, GadgetPivotChartComponent as ɵn, GadgetTransposeComponent as ɵo, PortletTypeNewComponent as ɵp, FieldFilterComponent as ɵq, FieldFormatComponent as ɵr, DataMartNewComponent as ɵs, BarChartsComponent as ɵt, PaneDownloadComponent as ɵu };
49624
50753
  //# sourceMappingURL=raise-common-lib.js.map