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,11 +1,11 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@syncfusion/ej2-angular-grids'), require('lodash'), require('rxjs'), require('@angular/material/snack-bar'), require('@angular/material/dialog'), require('@syncfusion/ej2-angular-treegrid'), require('@syncfusion/ej2-angular-navigations'), require('@angular/router'), require('rxjs/operators'), require('@angular/cdk/drag-drop'), require('@angular/common/http'), require('@syncfusion/ej2-base'), require('resize-observer-polyfill'), require('@syncfusion/ej2-data'), require('moment'), require('circular-json'), require('@angular/material/core'), require('@syncfusion/ej2-angular-layouts'), require('@angular/common'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/forms'), require('ng-inline-svg'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-diagrams'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-pivotview'), require('@syncfusion/ej2-angular-charts'), require('@syncfusion/ej2-angular-pdfviewer'), require('@syncfusion/ej2-angular-splitbuttons'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/material/menu'), require('@angular/material/tooltip'), require('@angular/material/checkbox'), require('@angular/material/select'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/button'), require('@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox'), require('@syncfusion/ej2-data/src/manager'), require('@syncfusion/ej2-data/src/query')) :
3
- typeof define === 'function' && define.amd ? define('raise-common-lib', ['exports', '@angular/core', '@syncfusion/ej2-angular-grids', 'lodash', 'rxjs', '@angular/material/snack-bar', '@angular/material/dialog', '@syncfusion/ej2-angular-treegrid', '@syncfusion/ej2-angular-navigations', '@angular/router', 'rxjs/operators', '@angular/cdk/drag-drop', '@angular/common/http', '@syncfusion/ej2-base', 'resize-observer-polyfill', '@syncfusion/ej2-data', 'moment', 'circular-json', '@angular/material/core', '@syncfusion/ej2-angular-layouts', '@angular/common', '@angular/material/icon', '@angular/platform-browser', '@angular/forms', 'ng-inline-svg', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-diagrams', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-pivotview', '@syncfusion/ej2-angular-charts', '@syncfusion/ej2-angular-pdfviewer', '@syncfusion/ej2-angular-splitbuttons', '@syncfusion/ej2-angular-richtexteditor', '@angular/material/menu', '@angular/material/tooltip', '@angular/material/checkbox', '@angular/material/select', '@angular/material/form-field', '@angular/material/input', '@angular/material/button', '@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox', '@syncfusion/ej2-data/src/manager', '@syncfusion/ej2-data/src/query'], factory) :
4
- (global = global || self, factory(global['raise-common-lib'] = {}, global.ng.core, global.ej2AngularGrids, global.lodash, global.rxjs, global.ng.material['snack-bar'], global.ng.material.dialog, global.ej2AngularTreegrid, global.ej2AngularNavigations, global.ng.router, global.rxjs.operators, global.ng.cdk['drag-drop'], global.ng.common.http, global.ej2Base, global.ResizeObserver, global.ej2Data, global.moment, global.CircularJSON, global.ng.material.core, global.ej2AngularLayouts, global.ng.common, global.ng.material.icon, global.ng.platformBrowser, global.ng.forms, global.ngInlineSvg, global.ej2AngularButtons, global.ej2AngularDiagrams, global.ej2AngularPopups, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularDropdowns, global.ej2AngularPivotview, global.ej2AngularCharts, global.ej2AngularPdfviewer, global.ej2AngularSplitbuttons, global.ej2AngularRichtexteditor, global.ng.material.menu, global.ng.material.tooltip, global.ng.material.checkbox, global.ng.material.select, global.ng.material['form-field'], global.ng.material.input, global.ng.material.button, global.maskedtextbox, global.manager, global.query));
5
- }(this, (function (exports, core, ej2AngularGrids, lodash, rxjs, snackBar, dialog, ej2AngularTreegrid, ej2AngularNavigations, router, operators, dragDrop, http, ej2Base, ResizeObserver, ej2Data, moment, CircularJSON, core$1, ej2AngularLayouts, common, icon, platformBrowser, forms, ngInlineSvg, ej2AngularButtons, ej2AngularDiagrams, ej2AngularPopups, ej2AngularCalendars, ej2AngularInputs, ej2AngularDropdowns, ej2AngularPivotview, ej2AngularCharts, ej2AngularPdfviewer, ej2AngularSplitbuttons, ej2AngularRichtexteditor, menu, tooltip, checkbox, select, formField, input, button, maskedtextbox, manager, query) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@syncfusion/ej2-angular-grids'), require('lodash'), require('moment'), require('rxjs'), require('@angular/material/snack-bar'), require('@angular/material/dialog'), require('@syncfusion/ej2-angular-treegrid'), require('@syncfusion/ej2-angular-navigations'), require('@angular/router'), require('rxjs/operators'), require('@angular/cdk/drag-drop'), require('@angular/common/http'), require('@syncfusion/ej2-base'), require('resize-observer-polyfill'), require('@syncfusion/ej2-data'), require('circular-json'), require('@angular/material/core'), require('@syncfusion/ej2-angular-layouts'), require('@angular/common'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/forms'), require('ng-inline-svg'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-diagrams'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-pivotview'), require('@syncfusion/ej2-angular-charts'), require('@syncfusion/ej2-angular-pdfviewer'), require('@syncfusion/ej2-angular-splitbuttons'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/material/menu'), require('@angular/material/tooltip'), require('@angular/material/checkbox'), require('@angular/material/select'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/button'), require('@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox'), require('@syncfusion/ej2-data/src/manager'), require('@syncfusion/ej2-data/src/query')) :
3
+ typeof define === 'function' && define.amd ? define('raise-common-lib', ['exports', '@angular/core', '@syncfusion/ej2-angular-grids', 'lodash', 'moment', 'rxjs', '@angular/material/snack-bar', '@angular/material/dialog', '@syncfusion/ej2-angular-treegrid', '@syncfusion/ej2-angular-navigations', '@angular/router', 'rxjs/operators', '@angular/cdk/drag-drop', '@angular/common/http', '@syncfusion/ej2-base', 'resize-observer-polyfill', '@syncfusion/ej2-data', 'circular-json', '@angular/material/core', '@syncfusion/ej2-angular-layouts', '@angular/common', '@angular/material/icon', '@angular/platform-browser', '@angular/forms', 'ng-inline-svg', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-diagrams', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-pivotview', '@syncfusion/ej2-angular-charts', '@syncfusion/ej2-angular-pdfviewer', '@syncfusion/ej2-angular-splitbuttons', '@syncfusion/ej2-angular-richtexteditor', '@angular/material/menu', '@angular/material/tooltip', '@angular/material/checkbox', '@angular/material/select', '@angular/material/form-field', '@angular/material/input', '@angular/material/button', '@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox', '@syncfusion/ej2-data/src/manager', '@syncfusion/ej2-data/src/query'], factory) :
4
+ (global = global || self, factory(global['raise-common-lib'] = {}, global.ng.core, global.ej2AngularGrids, global.lodash, global.moment, global.rxjs, global.ng.material['snack-bar'], global.ng.material.dialog, global.ej2AngularTreegrid, global.ej2AngularNavigations, global.ng.router, global.rxjs.operators, global.ng.cdk['drag-drop'], global.ng.common.http, global.ej2Base, global.ResizeObserver, global.ej2Data, global.CircularJSON, global.ng.material.core, global.ej2AngularLayouts, global.ng.common, global.ng.material.icon, global.ng.platformBrowser, global.ng.forms, global.ngInlineSvg, global.ej2AngularButtons, global.ej2AngularDiagrams, global.ej2AngularPopups, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularDropdowns, global.ej2AngularPivotview, global.ej2AngularCharts, global.ej2AngularPdfviewer, global.ej2AngularSplitbuttons, global.ej2AngularRichtexteditor, global.ng.material.menu, global.ng.material.tooltip, global.ng.material.checkbox, global.ng.material.select, global.ng.material['form-field'], global.ng.material.input, global.ng.material.button, global.maskedtextbox, global.manager, global.query));
5
+ }(this, (function (exports, core, ej2AngularGrids, lodash, moment, rxjs, snackBar, dialog, ej2AngularTreegrid, ej2AngularNavigations, router, operators, dragDrop, http, ej2Base, ResizeObserver, ej2Data, CircularJSON, core$1, ej2AngularLayouts, common, icon, platformBrowser, forms, ngInlineSvg, ej2AngularButtons, ej2AngularDiagrams, ej2AngularPopups, ej2AngularCalendars, ej2AngularInputs, ej2AngularDropdowns, ej2AngularPivotview, ej2AngularCharts, ej2AngularPdfviewer, ej2AngularSplitbuttons, ej2AngularRichtexteditor, menu, tooltip, checkbox, select, formField, input, button, maskedtextbox, manager, query) { 'use strict';
6
6
 
7
- ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
8
7
  moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
8
+ ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
9
9
  CircularJSON = CircularJSON && CircularJSON.hasOwnProperty('default') ? CircularJSON['default'] : CircularJSON;
10
10
 
11
11
  /******************************************************************************
@@ -443,6 +443,791 @@
443
443
  return {};
444
444
  }
445
445
 
446
+ /**
447
+ * @fileoverview added by tsickle
448
+ * Generated from: lib/date-tree-filter/date-tree-filter.helper.ts
449
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
450
+ */
451
+ /**
452
+ * @record
453
+ */
454
+ function DateTreeFilterSetupOptions() { }
455
+ if (false) {
456
+ /** @type {?} */
457
+ DateTreeFilterSetupOptions.prototype.rows;
458
+ /** @type {?} */
459
+ DateTreeFilterSetupOptions.prototype.fields;
460
+ /** @type {?} */
461
+ DateTreeFilterSetupOptions.prototype.hints;
462
+ }
463
+ /**
464
+ * @record
465
+ */
466
+ function DateTreeFilterHelperOptions() { }
467
+ if (false) {
468
+ /** @type {?} */
469
+ DateTreeFilterHelperOptions.prototype.getTranslation;
470
+ /** @type {?} */
471
+ DateTreeFilterHelperOptions.prototype.getPopoverElement;
472
+ /** @type {?} */
473
+ DateTreeFilterHelperOptions.prototype.getGridElement;
474
+ /** @type {?} */
475
+ DateTreeFilterHelperOptions.prototype.applyRows;
476
+ /** @type {?|undefined} */
477
+ DateTreeFilterHelperOptions.prototype.parseDateValue;
478
+ /** @type {?|undefined} */
479
+ DateTreeFilterHelperOptions.prototype.dateFormats;
480
+ }
481
+ /**
482
+ * @record
483
+ */
484
+ function RsCommonGridDateTreeFactoryHost() { }
485
+ if (false) {
486
+ /** @type {?} */
487
+ RsCommonGridDateTreeFactoryHost.prototype.translation;
488
+ /** @type {?} */
489
+ RsCommonGridDateTreeFactoryHost.prototype.dateTreePopoverRef;
490
+ /** @type {?} */
491
+ RsCommonGridDateTreeFactoryHost.prototype.grid;
492
+ }
493
+ /** @type {?} */
494
+ var DATE_TREE_DEFAULT_DATE_FORMATS = [
495
+ "YYYY-MM-DD",
496
+ "MM/DD/YYYY",
497
+ "DD/MM/YYYY",
498
+ "YYYY/MM/DD",
499
+ "DD-MMM-YYYY",
500
+ "MMM DD, YYYY",
501
+ ];
502
+ var DateTreeFilterHelper = /** @class */ (function () {
503
+ function DateTreeFilterHelper(options) {
504
+ this.popoverVisible = false;
505
+ this.popoverField = "";
506
+ this.popoverStyle = {};
507
+ this.selectedByField = {};
508
+ this.fieldLabelMap = {};
509
+ this.dateFields = [];
510
+ this.sourceRows = [];
511
+ this.defaultDateFormats = [
512
+ "YYYY-MM-DD",
513
+ "MM/DD/YYYY",
514
+ "DD/MM/YYYY",
515
+ "YYYY/MM/DD",
516
+ "DD-MMM-YYYY",
517
+ "DD-MMM-YYYY hh:mm A",
518
+ "MMM DD, YYYY",
519
+ moment.ISO_8601,
520
+ ];
521
+ this.options = options;
522
+ }
523
+ /**
524
+ * @param {?} config
525
+ * @return {?}
526
+ */
527
+ DateTreeFilterHelper.prototype.setup = /**
528
+ * @param {?} config
529
+ * @return {?}
530
+ */
531
+ function (config) {
532
+ var _this = this;
533
+ /** @type {?} */
534
+ var rows = config && config.rows ? config.rows : [];
535
+ /** @type {?} */
536
+ var fields = config && config.fields ? config.fields : [];
537
+ /** @type {?} */
538
+ var hints = config && config.hints ? config.hints : [];
539
+ this.sourceRows = rows;
540
+ this.dateFields = this.resolveDateTreeFieldsByHints(fields, hints);
541
+ this.fieldLabelMap = {};
542
+ (fields || []).forEach((/**
543
+ * @param {?} item
544
+ * @return {?}
545
+ */
546
+ function (item) {
547
+ if (!item || !item.columnName) {
548
+ return;
549
+ }
550
+ _this.fieldLabelMap[item.columnName] =
551
+ item.columnDisplayName || item.columnName;
552
+ }));
553
+ this.apply();
554
+ };
555
+ /**
556
+ * @param {?} args
557
+ * @return {?}
558
+ */
559
+ DateTreeFilterHelper.prototype.handleGridActionBegin = /**
560
+ * @param {?} args
561
+ * @return {?}
562
+ */
563
+ function (args) {
564
+ /** @type {?} */
565
+ var requestType = this.getRequestType(args);
566
+ if (requestType === "filterchoicerequest" ||
567
+ requestType === "filtersearchbegin") {
568
+ args.filterChoiceCount = 15000;
569
+ }
570
+ if (requestType !== "filterbeforeopen") {
571
+ return;
572
+ }
573
+ /** @type {?} */
574
+ var columnName = this.resolveActionColumnName(args);
575
+ if (!this.isDateTreeField(columnName)) {
576
+ this.close();
577
+ return;
578
+ }
579
+ args.cancel = true;
580
+ this.open(columnName);
581
+ };
582
+ /**
583
+ * @param {?} selectionMap
584
+ * @return {?}
585
+ */
586
+ DateTreeFilterHelper.prototype.updateSelection = /**
587
+ * @param {?} selectionMap
588
+ * @return {?}
589
+ */
590
+ function (selectionMap) {
591
+ this.selectedByField = selectionMap || {};
592
+ this.apply();
593
+ };
594
+ /**
595
+ * @return {?}
596
+ */
597
+ DateTreeFilterHelper.prototype.close = /**
598
+ * @return {?}
599
+ */
600
+ function () {
601
+ if (!this.popoverVisible) {
602
+ return;
603
+ }
604
+ this.popoverVisible = false;
605
+ this.popoverField = "";
606
+ this.popoverStyle = {};
607
+ };
608
+ /**
609
+ * @param {?} event
610
+ * @return {?}
611
+ */
612
+ DateTreeFilterHelper.prototype.handleDocumentMouseDown = /**
613
+ * @param {?} event
614
+ * @return {?}
615
+ */
616
+ function (event) {
617
+ if (!this.popoverVisible) {
618
+ return;
619
+ }
620
+ /** @type {?} */
621
+ var target = (/** @type {?} */ (event.target));
622
+ if (!target) {
623
+ return;
624
+ }
625
+ if (this.isInsidePopover(target) || this.isDateFilterMenuItem(target)) {
626
+ return;
627
+ }
628
+ this.close();
629
+ };
630
+ /**
631
+ * @param {?} event
632
+ * @return {?}
633
+ */
634
+ DateTreeFilterHelper.prototype.handleDocumentMouseOver = /**
635
+ * @param {?} event
636
+ * @return {?}
637
+ */
638
+ function (event) {
639
+ if (!this.popoverVisible) {
640
+ return;
641
+ }
642
+ /** @type {?} */
643
+ var target = (/** @type {?} */ (event.target));
644
+ if (!target) {
645
+ return;
646
+ }
647
+ if (this.isInsidePopover(target)) {
648
+ return;
649
+ }
650
+ /** @type {?} */
651
+ var menuItem = (/** @type {?} */ (target.closest(".e-menu-item")));
652
+ if (menuItem) {
653
+ if (!this.isDateFilterMenuItem(menuItem)) {
654
+ this.close();
655
+ }
656
+ return;
657
+ }
658
+ /** @type {?} */
659
+ var otherFilterTarget = (/** @type {?} */ (target.closest(".e-filtermenudiv, .e-headercell .e-columnmenu, .e-columnmenu, .e-contextmenu")));
660
+ if (otherFilterTarget && !this.isDateFilterMenuItem(otherFilterTarget)) {
661
+ this.close();
662
+ }
663
+ };
664
+ /**
665
+ * @return {?}
666
+ */
667
+ DateTreeFilterHelper.prototype.updatePosition = /**
668
+ * @return {?}
669
+ */
670
+ function () {
671
+ if (!this.popoverVisible) {
672
+ return;
673
+ }
674
+ /** @type {?} */
675
+ var anchor = this.findDateFilterAnchorElement();
676
+ if (anchor) {
677
+ /** @type {?} */
678
+ var rect = anchor.getBoundingClientRect();
679
+ /** @type {?} */
680
+ var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
681
+ /** @type {?} */
682
+ var viewportHeight = window.innerHeight || document.documentElement.clientHeight;
683
+ /** @type {?} */
684
+ var popoverElement = this.options.getPopoverElement
685
+ ? this.options.getPopoverElement()
686
+ : null;
687
+ /** @type {?} */
688
+ var popoverWidth = popoverElement && popoverElement.offsetWidth
689
+ ? popoverElement.offsetWidth
690
+ : 300;
691
+ /** @type {?} */
692
+ var popoverHeight = popoverElement && popoverElement.offsetHeight
693
+ ? popoverElement.offsetHeight
694
+ : 420;
695
+ /** @type {?} */
696
+ var edgeGap = 8;
697
+ /** @type {?} */
698
+ var anchorGap = 8;
699
+ /** @type {?} */
700
+ var top = rect.top - 6;
701
+ /** @type {?} */
702
+ var left = rect.right + anchorGap;
703
+ if (left + popoverWidth > viewportWidth - edgeGap) {
704
+ left = rect.left - popoverWidth - anchorGap;
705
+ }
706
+ if (left < edgeGap) {
707
+ left = edgeGap;
708
+ }
709
+ if (left + popoverWidth > viewportWidth - edgeGap) {
710
+ left = Math.max(edgeGap, viewportWidth - popoverWidth - edgeGap);
711
+ }
712
+ if (top + popoverHeight > viewportHeight - edgeGap) {
713
+ top = Math.max(edgeGap, viewportHeight - popoverHeight - edgeGap);
714
+ }
715
+ this.popoverStyle = {
716
+ position: "fixed",
717
+ left: left + "px",
718
+ top: top + "px",
719
+ };
720
+ return;
721
+ }
722
+ /** @type {?} */
723
+ var gridElement = this.options.getGridElement
724
+ ? this.options.getGridElement()
725
+ : null;
726
+ if (gridElement && gridElement.getBoundingClientRect) {
727
+ /** @type {?} */
728
+ var fallbackRect = gridElement.getBoundingClientRect();
729
+ this.popoverStyle = {
730
+ position: "fixed",
731
+ left: Math.max(8, fallbackRect.right - 312) + "px",
732
+ top: Math.max(8, fallbackRect.top + 8) + "px",
733
+ };
734
+ }
735
+ };
736
+ /**
737
+ * @private
738
+ * @param {?} field
739
+ * @return {?}
740
+ */
741
+ DateTreeFilterHelper.prototype.open = /**
742
+ * @private
743
+ * @param {?} field
744
+ * @return {?}
745
+ */
746
+ function (field) {
747
+ var _this = this;
748
+ this.popoverField = field;
749
+ this.popoverVisible = true;
750
+ this.updatePosition();
751
+ setTimeout((/**
752
+ * @return {?}
753
+ */
754
+ function () { return _this.updatePosition(); }), 50);
755
+ setTimeout((/**
756
+ * @return {?}
757
+ */
758
+ function () { return _this.updatePosition(); }), 150);
759
+ };
760
+ /**
761
+ * @private
762
+ * @return {?}
763
+ */
764
+ DateTreeFilterHelper.prototype.apply = /**
765
+ * @private
766
+ * @return {?}
767
+ */
768
+ function () {
769
+ /** @type {?} */
770
+ var filteredRows = this.filterRowsBySelectedDateTree(this.sourceRows || []);
771
+ this.options.applyRows(filteredRows);
772
+ };
773
+ /**
774
+ * @private
775
+ * @param {?} args
776
+ * @return {?}
777
+ */
778
+ DateTreeFilterHelper.prototype.getRequestType = /**
779
+ * @private
780
+ * @param {?} args
781
+ * @return {?}
782
+ */
783
+ function (args) {
784
+ if (!args || !args.requestType) {
785
+ return "";
786
+ }
787
+ return String(args.requestType).trim().toLowerCase();
788
+ };
789
+ /**
790
+ * @private
791
+ * @param {?} args
792
+ * @return {?}
793
+ */
794
+ DateTreeFilterHelper.prototype.resolveActionColumnName = /**
795
+ * @private
796
+ * @param {?} args
797
+ * @return {?}
798
+ */
799
+ function (args) {
800
+ if (!args) {
801
+ return "";
802
+ }
803
+ return (args.columnName ||
804
+ args.field ||
805
+ args.currentFilteringColumn ||
806
+ (args.column && (args.column.field || args.column.columnName)) ||
807
+ "");
808
+ };
809
+ /**
810
+ * @private
811
+ * @param {?} fields
812
+ * @param {?} hints
813
+ * @return {?}
814
+ */
815
+ DateTreeFilterHelper.prototype.resolveDateTreeFieldsByHints = /**
816
+ * @private
817
+ * @param {?} fields
818
+ * @param {?} hints
819
+ * @return {?}
820
+ */
821
+ function (fields, hints) {
822
+ /** @type {?} */
823
+ var normalizedHints = (hints || [])
824
+ .filter((/**
825
+ * @param {?} item
826
+ * @return {?}
827
+ */
828
+ function (item) { return !!item; }))
829
+ .map((/**
830
+ * @param {?} item
831
+ * @return {?}
832
+ */
833
+ function (item) { return String(item).trim().toLowerCase(); }));
834
+ if (!fields || !fields.length || !normalizedHints.length) {
835
+ return [];
836
+ }
837
+ return fields
838
+ .filter((/**
839
+ * @param {?} item
840
+ * @return {?}
841
+ */
842
+ function (item) {
843
+ if (!item || !item.columnName) {
844
+ return false;
845
+ }
846
+ /** @type {?} */
847
+ var columnName = String(item.columnName || "").toLowerCase();
848
+ /** @type {?} */
849
+ var displayName = String(item.columnDisplayName || "").toLowerCase();
850
+ return normalizedHints.some((/**
851
+ * @param {?} hint
852
+ * @return {?}
853
+ */
854
+ function (hint) {
855
+ return (columnName === hint ||
856
+ displayName === hint ||
857
+ (hint.length >= 3 &&
858
+ (columnName.indexOf(hint) > -1 ||
859
+ displayName.indexOf(hint) > -1)));
860
+ }));
861
+ }))
862
+ .map((/**
863
+ * @param {?} item
864
+ * @return {?}
865
+ */
866
+ function (item) { return item.columnName; }));
867
+ };
868
+ /**
869
+ * @private
870
+ * @param {?} field
871
+ * @return {?}
872
+ */
873
+ DateTreeFilterHelper.prototype.isDateTreeField = /**
874
+ * @private
875
+ * @param {?} field
876
+ * @return {?}
877
+ */
878
+ function (field) {
879
+ return this.dateFields.indexOf(field) > -1;
880
+ };
881
+ /**
882
+ * @private
883
+ * @param {?} field
884
+ * @return {?}
885
+ */
886
+ DateTreeFilterHelper.prototype.getFieldDaySelectionMap = /**
887
+ * @private
888
+ * @param {?} field
889
+ * @return {?}
890
+ */
891
+ function (field) {
892
+ if (!this.selectedByField[field]) {
893
+ this.selectedByField[field] = {};
894
+ }
895
+ return this.selectedByField[field];
896
+ };
897
+ /**
898
+ * @private
899
+ * @param {?} rows
900
+ * @param {?=} excludeField
901
+ * @return {?}
902
+ */
903
+ DateTreeFilterHelper.prototype.filterRowsBySelectedDateTree = /**
904
+ * @private
905
+ * @param {?} rows
906
+ * @param {?=} excludeField
907
+ * @return {?}
908
+ */
909
+ function (rows, excludeField) {
910
+ var _this = this;
911
+ /** @type {?} */
912
+ var filteredRows = rows ? rows.slice() : [];
913
+ this.dateFields.forEach((/**
914
+ * @param {?} field
915
+ * @return {?}
916
+ */
917
+ function (field) {
918
+ if (excludeField && field === excludeField) {
919
+ return;
920
+ }
921
+ /** @type {?} */
922
+ var selectedMap = _this.getFieldDaySelectionMap(field);
923
+ /** @type {?} */
924
+ var selectedKeys = Object.keys(selectedMap);
925
+ if (!selectedKeys.length) {
926
+ return;
927
+ }
928
+ filteredRows = filteredRows.filter((/**
929
+ * @param {?} row
930
+ * @return {?}
931
+ */
932
+ function (row) {
933
+ /** @type {?} */
934
+ var dayKey = _this.getDayKeyByRowValue(row[field]);
935
+ return dayKey ? !!selectedMap[dayKey] : false;
936
+ }));
937
+ }));
938
+ return filteredRows;
939
+ };
940
+ /**
941
+ * @private
942
+ * @param {?} value
943
+ * @return {?}
944
+ */
945
+ DateTreeFilterHelper.prototype.getDayKeyByRowValue = /**
946
+ * @private
947
+ * @param {?} value
948
+ * @return {?}
949
+ */
950
+ function (value) {
951
+ /** @type {?} */
952
+ var date = this.parseDateValue(value);
953
+ if (!date) {
954
+ return "";
955
+ }
956
+ return this.toDayKey(date.getFullYear(), date.getMonth() + 1, date.getDate());
957
+ };
958
+ /**
959
+ * @private
960
+ * @param {?} value
961
+ * @return {?}
962
+ */
963
+ DateTreeFilterHelper.prototype.parseDateValue = /**
964
+ * @private
965
+ * @param {?} value
966
+ * @return {?}
967
+ */
968
+ function (value) {
969
+ if (this.options.parseDateValue) {
970
+ return this.options.parseDateValue(value);
971
+ }
972
+ if (!value) {
973
+ return null;
974
+ }
975
+ if (value instanceof Date) {
976
+ return value;
977
+ }
978
+ /** @type {?} */
979
+ var formats = this.options && this.options.dateFormats && this.options.dateFormats.length
980
+ ? this.options.dateFormats
981
+ : this.defaultDateFormats;
982
+ /** @type {?} */
983
+ var parsed = moment(value, formats, true);
984
+ if (parsed.isValid()) {
985
+ return parsed.toDate();
986
+ }
987
+ /** @type {?} */
988
+ var fallback = new Date(value);
989
+ return isNaN(fallback.getTime()) ? null : fallback;
990
+ };
991
+ /**
992
+ * @private
993
+ * @param {?} year
994
+ * @param {?} month
995
+ * @param {?} day
996
+ * @return {?}
997
+ */
998
+ DateTreeFilterHelper.prototype.toDayKey = /**
999
+ * @private
1000
+ * @param {?} year
1001
+ * @param {?} month
1002
+ * @param {?} day
1003
+ * @return {?}
1004
+ */
1005
+ function (year, month, day) {
1006
+ return year + "-" + this.pad2(month) + "-" + this.pad2(day);
1007
+ };
1008
+ /**
1009
+ * @private
1010
+ * @param {?} value
1011
+ * @return {?}
1012
+ */
1013
+ DateTreeFilterHelper.prototype.pad2 = /**
1014
+ * @private
1015
+ * @param {?} value
1016
+ * @return {?}
1017
+ */
1018
+ function (value) {
1019
+ return value < 10 ? "0" + value : String(value);
1020
+ };
1021
+ /**
1022
+ * @private
1023
+ * @param {?} target
1024
+ * @return {?}
1025
+ */
1026
+ DateTreeFilterHelper.prototype.isInsidePopover = /**
1027
+ * @private
1028
+ * @param {?} target
1029
+ * @return {?}
1030
+ */
1031
+ function (target) {
1032
+ /** @type {?} */
1033
+ var popoverElement = this.options.getPopoverElement
1034
+ ? this.options.getPopoverElement()
1035
+ : null;
1036
+ if (!target || !popoverElement) {
1037
+ return false;
1038
+ }
1039
+ return popoverElement.contains(target);
1040
+ };
1041
+ /**
1042
+ * @private
1043
+ * @param {?} element
1044
+ * @return {?}
1045
+ */
1046
+ DateTreeFilterHelper.prototype.isDateFilterMenuItem = /**
1047
+ * @private
1048
+ * @param {?} element
1049
+ * @return {?}
1050
+ */
1051
+ function (element) {
1052
+ if (!element) {
1053
+ return false;
1054
+ }
1055
+ /** @type {?} */
1056
+ var menuItem = (/** @type {?} */ (element.closest(".e-menu-item")));
1057
+ if (!menuItem) {
1058
+ return false;
1059
+ }
1060
+ /** @type {?} */
1061
+ var text = (menuItem.textContent || "").trim().toLowerCase();
1062
+ /** @type {?} */
1063
+ var translation = this.options.getTranslation
1064
+ ? this.options.getTranslation()
1065
+ : null;
1066
+ /** @type {?} */
1067
+ var filterText = String((translation && translation.FILTER) || "filter")
1068
+ .trim()
1069
+ .toLowerCase();
1070
+ if (!text) {
1071
+ return false;
1072
+ }
1073
+ if (text.indexOf(filterText) > -1 || text.indexOf("filter") > -1) {
1074
+ return true;
1075
+ }
1076
+ /** @type {?} */
1077
+ var cls = (menuItem.className || "").toLowerCase();
1078
+ return cls.indexOf("filter") > -1;
1079
+ };
1080
+ /**
1081
+ * @private
1082
+ * @return {?}
1083
+ */
1084
+ DateTreeFilterHelper.prototype.findDateFilterAnchorElement = /**
1085
+ * @private
1086
+ * @return {?}
1087
+ */
1088
+ function () {
1089
+ var _this = this;
1090
+ /** @type {?} */
1091
+ var menuContainers = (/** @type {?} */ (Array.from(document.querySelectorAll(".e-columnmenu, .e-contextmenu"))));
1092
+ /** @type {?} */
1093
+ var visibleContainers = menuContainers.filter((/**
1094
+ * @param {?} container
1095
+ * @return {?}
1096
+ */
1097
+ function (container) {
1098
+ if (!container || !container.getBoundingClientRect) {
1099
+ return false;
1100
+ }
1101
+ /** @type {?} */
1102
+ var rect = container.getBoundingClientRect();
1103
+ if (rect.width <= 0 || rect.height <= 0) {
1104
+ return false;
1105
+ }
1106
+ /** @type {?} */
1107
+ var style = window.getComputedStyle(container);
1108
+ if (!style || style.display === "none" || style.visibility === "hidden") {
1109
+ return false;
1110
+ }
1111
+ return true;
1112
+ }));
1113
+ if (!visibleContainers.length) {
1114
+ return null;
1115
+ }
1116
+ /** @type {?} */
1117
+ var currentContainer = visibleContainers[visibleContainers.length - 1];
1118
+ /** @type {?} */
1119
+ var menuItems = (/** @type {?} */ (Array.from(currentContainer.querySelectorAll(".e-menu-item"))));
1120
+ /** @type {?} */
1121
+ var visibleFilterItems = menuItems.filter((/**
1122
+ * @param {?} item
1123
+ * @return {?}
1124
+ */
1125
+ function (item) {
1126
+ if (!_this.isDateFilterMenuItem(item)) {
1127
+ return false;
1128
+ }
1129
+ if (!item.getBoundingClientRect) {
1130
+ return false;
1131
+ }
1132
+ /** @type {?} */
1133
+ var rect = item.getBoundingClientRect();
1134
+ return rect.width > 0 && rect.height > 0;
1135
+ }));
1136
+ if (!visibleFilterItems.length) {
1137
+ return null;
1138
+ }
1139
+ /** @type {?} */
1140
+ var focusedItem = visibleFilterItems.find((/**
1141
+ * @param {?} item
1142
+ * @return {?}
1143
+ */
1144
+ function (item) {
1145
+ return (item.classList.contains("e-focused") ||
1146
+ item.classList.contains("e-selected") ||
1147
+ item.classList.contains("e-hover"));
1148
+ }));
1149
+ return focusedItem || visibleFilterItems[visibleFilterItems.length - 1];
1150
+ };
1151
+ return DateTreeFilterHelper;
1152
+ }());
1153
+ if (false) {
1154
+ /** @type {?} */
1155
+ DateTreeFilterHelper.prototype.popoverVisible;
1156
+ /** @type {?} */
1157
+ DateTreeFilterHelper.prototype.popoverField;
1158
+ /** @type {?} */
1159
+ DateTreeFilterHelper.prototype.popoverStyle;
1160
+ /** @type {?} */
1161
+ DateTreeFilterHelper.prototype.selectedByField;
1162
+ /** @type {?} */
1163
+ DateTreeFilterHelper.prototype.fieldLabelMap;
1164
+ /** @type {?} */
1165
+ DateTreeFilterHelper.prototype.dateFields;
1166
+ /**
1167
+ * @type {?}
1168
+ * @private
1169
+ */
1170
+ DateTreeFilterHelper.prototype.sourceRows;
1171
+ /**
1172
+ * @type {?}
1173
+ * @private
1174
+ */
1175
+ DateTreeFilterHelper.prototype.options;
1176
+ /**
1177
+ * @type {?}
1178
+ * @private
1179
+ */
1180
+ DateTreeFilterHelper.prototype.defaultDateFormats;
1181
+ }
1182
+ /**
1183
+ * @param {?} host
1184
+ * @return {?}
1185
+ */
1186
+ function resolveGridElement(host) {
1187
+ if (!host || !host.grid) {
1188
+ return null;
1189
+ }
1190
+ /** @type {?} */
1191
+ var gridRef = host.grid;
1192
+ if (gridRef.grid && gridRef.grid.element) {
1193
+ return gridRef.grid.element;
1194
+ }
1195
+ if (gridRef.element) {
1196
+ return gridRef.element;
1197
+ }
1198
+ return null;
1199
+ }
1200
+ /**
1201
+ * @param {?} host
1202
+ * @param {?} applyRows
1203
+ * @param {?=} dateFormats
1204
+ * @return {?}
1205
+ */
1206
+ function createRsCommonGridDateTreeHelper(host, applyRows, dateFormats) {
1207
+ return new DateTreeFilterHelper({
1208
+ getTranslation: (/**
1209
+ * @return {?}
1210
+ */
1211
+ function () { return (host ? host.translation : null); }),
1212
+ getPopoverElement: (/**
1213
+ * @return {?}
1214
+ */
1215
+ function () {
1216
+ return host && host.dateTreePopoverRef
1217
+ ? host.dateTreePopoverRef.nativeElement
1218
+ : null;
1219
+ }),
1220
+ getGridElement: (/**
1221
+ * @return {?}
1222
+ */
1223
+ function () { return resolveGridElement(host); }),
1224
+ applyRows: applyRows,
1225
+ dateFormats: dateFormats && dateFormats.length
1226
+ ? dateFormats
1227
+ : DATE_TREE_DEFAULT_DATE_FORMATS,
1228
+ });
1229
+ }
1230
+
446
1231
  /**
447
1232
  * @fileoverview added by tsickle
448
1233
  * Generated from: lib/common-grid/index.component.ts
@@ -450,6 +1235,7 @@
450
1235
  */
451
1236
  var CommonGridComponent = /** @class */ (function () {
452
1237
  function CommonGridComponent(ref) {
1238
+ var _this = this;
453
1239
  this.ref = ref;
454
1240
  this.showCheckBox = true;
455
1241
  this.loaded = true;
@@ -496,6 +1282,23 @@
496
1282
  this.alwaysShowCheckbox = false;
497
1283
  this.disableSystemRow = false; // 禁用IsSytem = true的整行
498
1284
  // 禁用IsSytem = true的整行
1285
+ /**
1286
+ * 开启日期树筛选(默认关闭,不影响现有页面)
1287
+ */
1288
+ this.enableDateTreeFilter = false;
1289
+ /**
1290
+ * 参与日期树筛选的列名或 hint,如 ['CreatedOn', 'ModifiedOn']
1291
+ */
1292
+ this.dateTreeFilterFields = [];
1293
+ /**
1294
+ * 未筛选原始数据(可选)。
1295
+ * 不传时由组件在 dataSource 变更时自动快照;传则由页面自行维护 raw。
1296
+ */
1297
+ this.dateTreeSourceRows = null;
1298
+ /**
1299
+ * 内聚模式下仍向页面同步筛选结果(默认 false,一般无需绑定)
1300
+ */
1301
+ this.dateTreeEmitFilteredRows = false;
499
1302
  this.recordDoubleClick = new core.EventEmitter();
500
1303
  this.actionComplete = new core.EventEmitter();
501
1304
  this.rowSelected = new core.EventEmitter();
@@ -513,6 +1316,16 @@
513
1316
  this.rowDrop = new core.EventEmitter();
514
1317
  this.rowDrag = new core.EventEmitter();
515
1318
  this.rowDragStart = new core.EventEmitter();
1319
+ /**
1320
+ * 日期树筛选后的行数据(可选,复杂页面与 dateTreeSourceRows 搭配使用)
1321
+ */
1322
+ this.dateTreeFilteredRows = new core.EventEmitter();
1323
+ /**
1324
+ * 内聚模式:表格实际绑定的数据
1325
+ */
1326
+ this.dateTreeDisplayRows = [];
1327
+ this.dateTreeRawRows = [];
1328
+ this.dateTreeApplyingFilter = false;
516
1329
  this.selectId = [];
517
1330
  this.startPaging = false;
518
1331
  this.indexList = [];
@@ -540,6 +1353,11 @@
540
1353
  return list;
541
1354
  });
542
1355
  this.translation = getTranslation();
1356
+ this.dateTreeHelper = createRsCommonGridDateTreeHelper(this, (/**
1357
+ * @param {?} rows
1358
+ * @return {?}
1359
+ */
1360
+ function (rows) { return _this.onDateTreeRowsApplied(rows); }));
543
1361
  }
544
1362
  /**
545
1363
  * @return {?}
@@ -567,6 +1385,36 @@
567
1385
  function (index, item) {
568
1386
  return index; // or a unique identifier in your object
569
1387
  };
1388
+ Object.defineProperty(CommonGridComponent.prototype, "gridBindDataSource", {
1389
+ /** ejs-grid 绑定数据源:内聚模式用内部展示数据,否则用 dataSource */
1390
+ get: /**
1391
+ * ejs-grid 绑定数据源:内聚模式用内部展示数据,否则用 dataSource
1392
+ * @return {?}
1393
+ */
1394
+ function () {
1395
+ if (this.enableDateTreeFilter && this.dateTreeSourceRows == null) {
1396
+ return this.dateTreeDisplayRows;
1397
+ }
1398
+ return this.dataSource;
1399
+ },
1400
+ enumerable: true,
1401
+ configurable: true
1402
+ });
1403
+ Object.defineProperty(CommonGridComponent.prototype, "dateTreePopoverSourceRows", {
1404
+ /** 日期树 popover 用的全量数据 */
1405
+ get: /**
1406
+ * 日期树 popover 用的全量数据
1407
+ * @return {?}
1408
+ */
1409
+ function () {
1410
+ if (this.dateTreeSourceRows != null) {
1411
+ return this.dateTreeSourceRows;
1412
+ }
1413
+ return this.dateTreeRawRows;
1414
+ },
1415
+ enumerable: true,
1416
+ configurable: true
1417
+ });
570
1418
  /**
571
1419
  * @param {?} changes
572
1420
  * @return {?}
@@ -576,12 +1424,16 @@
576
1424
  * @return {?}
577
1425
  */
578
1426
  function (changes) {
579
- if (changes.dataSource && changes.dataSource.currentValue) {
1427
+ /** @type {?} */
1428
+ var bindRows = changes.dataSource && changes.dataSource.currentValue
1429
+ ? changes.dataSource.currentValue
1430
+ : null;
1431
+ if (bindRows) {
580
1432
  if (this.allowPaging &&
581
- changes.dataSource.currentValue.length &&
1433
+ bindRows.length &&
582
1434
  !this.pageSettings) {
583
1435
  this.pageSettings =
584
- changes.dataSource.currentValue.length > 9
1436
+ bindRows.length > 9
585
1437
  ? {
586
1438
  pageSizes: ["All", "25", "50", "100"],
587
1439
  pageSize: 50,
@@ -589,11 +1441,123 @@
589
1441
  : null;
590
1442
  }
591
1443
  }
1444
+ if (this.enableDateTreeFilter &&
1445
+ this.dateTreeSourceRows == null &&
1446
+ changes.dataSource &&
1447
+ !this.dateTreeApplyingFilter) {
1448
+ this.captureDateTreeRawFromDataSource(changes.dataSource.currentValue);
1449
+ }
1450
+ if (changes.enableDateTreeFilter && changes.enableDateTreeFilter.currentValue) {
1451
+ this.captureDateTreeRawFromDataSource(this.dataSource);
1452
+ }
1453
+ if (changes.enableDateTreeFilter && !changes.enableDateTreeFilter.currentValue) {
1454
+ this.dateTreeHelper && this.dateTreeHelper.close();
1455
+ this.dateTreeDisplayRows = [];
1456
+ this.dateTreeRawRows = [];
1457
+ }
1458
+ if (this.enableDateTreeFilter &&
1459
+ (changes.enableDateTreeFilter ||
1460
+ changes.dateTreeFilterFields ||
1461
+ changes.dateTreeSourceRows ||
1462
+ changes.fields ||
1463
+ changes.dataSource)) {
1464
+ this.refreshDateTreeFilter();
1465
+ }
592
1466
  };
593
1467
  /**
1468
+ * @private
1469
+ * @param {?} rows
594
1470
  * @return {?}
595
1471
  */
596
- CommonGridComponent.prototype._load = /**
1472
+ CommonGridComponent.prototype.captureDateTreeRawFromDataSource = /**
1473
+ * @private
1474
+ * @param {?} rows
1475
+ * @return {?}
1476
+ */
1477
+ function (rows) {
1478
+ this.dateTreeRawRows = rows ? rows.slice() : [];
1479
+ };
1480
+ /**
1481
+ * @param {?} event
1482
+ * @return {?}
1483
+ */
1484
+ CommonGridComponent.prototype.onDocumentMouseDown = /**
1485
+ * @param {?} event
1486
+ * @return {?}
1487
+ */
1488
+ function (event) {
1489
+ if (this.enableDateTreeFilter && this.dateTreeHelper) {
1490
+ this.dateTreeHelper.handleDocumentMouseDown(event);
1491
+ }
1492
+ };
1493
+ /**
1494
+ * @param {?} event
1495
+ * @return {?}
1496
+ */
1497
+ CommonGridComponent.prototype.onDocumentMouseOver = /**
1498
+ * @param {?} event
1499
+ * @return {?}
1500
+ */
1501
+ function (event) {
1502
+ if (this.enableDateTreeFilter && this.dateTreeHelper) {
1503
+ this.dateTreeHelper.handleDocumentMouseOver(event);
1504
+ }
1505
+ };
1506
+ /**
1507
+ * @private
1508
+ * @return {?}
1509
+ */
1510
+ CommonGridComponent.prototype.refreshDateTreeFilter = /**
1511
+ * @private
1512
+ * @return {?}
1513
+ */
1514
+ function () {
1515
+ if (!this.enableDateTreeFilter || !this.dateTreeHelper) {
1516
+ return;
1517
+ }
1518
+ /** @type {?} */
1519
+ var rows = this.dateTreeSourceRows != null
1520
+ ? this.dateTreeSourceRows
1521
+ : this.dateTreeRawRows || [];
1522
+ this.dateTreeHelper.setup({
1523
+ rows: rows,
1524
+ fields: this.fields || [],
1525
+ hints: this.dateTreeFilterFields || [],
1526
+ });
1527
+ };
1528
+ /**
1529
+ * @private
1530
+ * @param {?} rows
1531
+ * @return {?}
1532
+ */
1533
+ CommonGridComponent.prototype.onDateTreeRowsApplied = /**
1534
+ * @private
1535
+ * @param {?} rows
1536
+ * @return {?}
1537
+ */
1538
+ function (rows) {
1539
+ var _this = this;
1540
+ /** @type {?} */
1541
+ var result = rows || [];
1542
+ this.dateTreeApplyingFilter = true;
1543
+ if (this.enableDateTreeFilter && this.dateTreeSourceRows == null) {
1544
+ this.dateTreeDisplayRows = result;
1545
+ }
1546
+ if (this.dateTreeSourceRows != null || this.dateTreeEmitFilteredRows) {
1547
+ this.dateTreeFilteredRows.emit(result);
1548
+ }
1549
+ this.ref && this.ref.markForCheck();
1550
+ setTimeout((/**
1551
+ * @return {?}
1552
+ */
1553
+ function () {
1554
+ _this.dateTreeApplyingFilter = false;
1555
+ }), 0);
1556
+ };
1557
+ /**
1558
+ * @return {?}
1559
+ */
1560
+ CommonGridComponent.prototype._load = /**
597
1561
  * @return {?}
598
1562
  */
599
1563
  function () {
@@ -847,7 +1811,10 @@
847
1811
  args.requestType === "sorting")) {
848
1812
  this.startPaging = true;
849
1813
  }
850
- if (args.requestType == "filterchoicerequest" ||
1814
+ if (this.enableDateTreeFilter && this.dateTreeHelper) {
1815
+ this.dateTreeHelper.handleGridActionBegin(args);
1816
+ }
1817
+ else if (args.requestType == "filterchoicerequest" ||
851
1818
  args.requestType === "filtersearchbegin") {
852
1819
  args.filterChoiceCount = 15000;
853
1820
  }
@@ -1220,7 +2187,7 @@
1220
2187
  CommonGridComponent.decorators = [
1221
2188
  { type: core.Component, args: [{
1222
2189
  selector: "rs-common-grid",
1223
- 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",
2190
+ 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",
1224
2191
  styles: [""]
1225
2192
  }] }
1226
2193
  ];
@@ -1258,6 +2225,10 @@
1258
2225
  alwaysShowCheckbox: [{ type: core.Input }],
1259
2226
  defaultRecord: [{ type: core.Input }],
1260
2227
  disableSystemRow: [{ type: core.Input }],
2228
+ enableDateTreeFilter: [{ type: core.Input }],
2229
+ dateTreeFilterFields: [{ type: core.Input }],
2230
+ dateTreeSourceRows: [{ type: core.Input }],
2231
+ dateTreeEmitFilteredRows: [{ type: core.Input }],
1261
2232
  recordDoubleClick: [{ type: core.Output }],
1262
2233
  actionComplete: [{ type: core.Output }],
1263
2234
  rowSelected: [{ type: core.Output }],
@@ -1274,7 +2245,11 @@
1274
2245
  rowSelecting: [{ type: core.Output }],
1275
2246
  rowDrop: [{ type: core.Output }],
1276
2247
  rowDrag: [{ type: core.Output }],
1277
- rowDragStart: [{ type: core.Output }]
2248
+ rowDragStart: [{ type: core.Output }],
2249
+ dateTreeFilteredRows: [{ type: core.Output }],
2250
+ dateTreePopoverRef: [{ type: core.ViewChild, args: ["dateTreePopoverRef", { read: core.ElementRef, static: false },] }],
2251
+ onDocumentMouseDown: [{ type: core.HostListener, args: ["document:mousedown", ["$event"],] }],
2252
+ onDocumentMouseOver: [{ type: core.HostListener, args: ["document:mouseover", ["$event"],] }]
1278
2253
  };
1279
2254
  return CommonGridComponent;
1280
2255
  }());
@@ -1354,6 +2329,27 @@
1354
2329
  CommonGridComponent.prototype.defaultRecord;
1355
2330
  /** @type {?} */
1356
2331
  CommonGridComponent.prototype.disableSystemRow;
2332
+ /**
2333
+ * 开启日期树筛选(默认关闭,不影响现有页面)
2334
+ * @type {?}
2335
+ */
2336
+ CommonGridComponent.prototype.enableDateTreeFilter;
2337
+ /**
2338
+ * 参与日期树筛选的列名或 hint,如 ['CreatedOn', 'ModifiedOn']
2339
+ * @type {?}
2340
+ */
2341
+ CommonGridComponent.prototype.dateTreeFilterFields;
2342
+ /**
2343
+ * 未筛选原始数据(可选)。
2344
+ * 不传时由组件在 dataSource 变更时自动快照;传则由页面自行维护 raw。
2345
+ * @type {?}
2346
+ */
2347
+ CommonGridComponent.prototype.dateTreeSourceRows;
2348
+ /**
2349
+ * 内聚模式下仍向页面同步筛选结果(默认 false,一般无需绑定)
2350
+ * @type {?}
2351
+ */
2352
+ CommonGridComponent.prototype.dateTreeEmitFilteredRows;
1357
2353
  /** @type {?} */
1358
2354
  CommonGridComponent.prototype.recordDoubleClick;
1359
2355
  /** @type {?} */
@@ -1388,6 +2384,30 @@
1388
2384
  CommonGridComponent.prototype.rowDrag;
1389
2385
  /** @type {?} */
1390
2386
  CommonGridComponent.prototype.rowDragStart;
2387
+ /**
2388
+ * 日期树筛选后的行数据(可选,复杂页面与 dateTreeSourceRows 搭配使用)
2389
+ * @type {?}
2390
+ */
2391
+ CommonGridComponent.prototype.dateTreeFilteredRows;
2392
+ /** @type {?} */
2393
+ CommonGridComponent.prototype.dateTreePopoverRef;
2394
+ /** @type {?} */
2395
+ CommonGridComponent.prototype.dateTreeHelper;
2396
+ /**
2397
+ * 内聚模式:表格实际绑定的数据
2398
+ * @type {?}
2399
+ */
2400
+ CommonGridComponent.prototype.dateTreeDisplayRows;
2401
+ /**
2402
+ * @type {?}
2403
+ * @private
2404
+ */
2405
+ CommonGridComponent.prototype.dateTreeRawRows;
2406
+ /**
2407
+ * @type {?}
2408
+ * @private
2409
+ */
2410
+ CommonGridComponent.prototype.dateTreeApplyingFilter;
1391
2411
  /** @type {?} */
1392
2412
  CommonGridComponent.prototype.selectId;
1393
2413
  /** @type {?} */
@@ -1527,6 +2547,905 @@
1527
2547
  GridActionItemComponent.prototype.ImageType;
1528
2548
  }
1529
2549
 
2550
+ /**
2551
+ * @fileoverview added by tsickle
2552
+ * Generated from: lib/date-tree-filter/date-tree-filter-popover/index.component.ts
2553
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2554
+ */
2555
+ var DateTreeFilterPopoverComponent = /** @class */ (function () {
2556
+ function DateTreeFilterPopoverComponent() {
2557
+ this.field = "";
2558
+ this.sourceRows = [];
2559
+ this.dateFields = [];
2560
+ this.selectedByField = {};
2561
+ this.fieldLabelMap = {};
2562
+ this.apply = new core.EventEmitter();
2563
+ this.close = new core.EventEmitter();
2564
+ this.keyword = "";
2565
+ this.years = [];
2566
+ this.expandStateByField = {};
2567
+ this.workingSelectedByField = {};
2568
+ }
2569
+ /**
2570
+ * @param {?} changes
2571
+ * @return {?}
2572
+ */
2573
+ DateTreeFilterPopoverComponent.prototype.ngOnChanges = /**
2574
+ * @param {?} changes
2575
+ * @return {?}
2576
+ */
2577
+ function (changes) {
2578
+ if (changes.field ||
2579
+ changes.sourceRows ||
2580
+ changes.selectedByField ||
2581
+ changes.dateFields) {
2582
+ this.keyword = "";
2583
+ this.workingSelectedByField = this.cloneSelectionMap(this.selectedByField);
2584
+ this.rebuildTree();
2585
+ }
2586
+ };
2587
+ /**
2588
+ * @return {?}
2589
+ */
2590
+ DateTreeFilterPopoverComponent.prototype.closePopover = /**
2591
+ * @return {?}
2592
+ */
2593
+ function () {
2594
+ this.close.emit();
2595
+ };
2596
+ /**
2597
+ * @param {?} value
2598
+ * @return {?}
2599
+ */
2600
+ DateTreeFilterPopoverComponent.prototype.onKeywordChange = /**
2601
+ * @param {?} value
2602
+ * @return {?}
2603
+ */
2604
+ function (value) {
2605
+ this.keyword = value || "";
2606
+ };
2607
+ /**
2608
+ * @return {?}
2609
+ */
2610
+ DateTreeFilterPopoverComponent.prototype.getVisibleYears = /**
2611
+ * @return {?}
2612
+ */
2613
+ function () {
2614
+ /** @type {?} */
2615
+ var searchText = (this.keyword || "").trim().toLowerCase();
2616
+ if (!searchText) {
2617
+ return this.years;
2618
+ }
2619
+ return this.years
2620
+ .map((/**
2621
+ * @param {?} yearNode
2622
+ * @return {?}
2623
+ */
2624
+ function (yearNode) {
2625
+ /** @type {?} */
2626
+ var yearMatched = String(yearNode.year).toLowerCase().indexOf(searchText) > -1;
2627
+ /** @type {?} */
2628
+ var months = yearNode.months
2629
+ .map((/**
2630
+ * @param {?} monthNode
2631
+ * @return {?}
2632
+ */
2633
+ function (monthNode) {
2634
+ /** @type {?} */
2635
+ var monthMatched = String(monthNode.label)
2636
+ .toLowerCase()
2637
+ .indexOf(searchText) > -1;
2638
+ /** @type {?} */
2639
+ var days = monthNode.days.filter((/**
2640
+ * @param {?} dayNode
2641
+ * @return {?}
2642
+ */
2643
+ function (dayNode) {
2644
+ return (String(dayNode.label)
2645
+ .toLowerCase()
2646
+ .indexOf(searchText) > -1);
2647
+ }));
2648
+ if (yearMatched || monthMatched) {
2649
+ return monthNode;
2650
+ }
2651
+ return Object.assign({}, monthNode, { days: days });
2652
+ }))
2653
+ .filter((/**
2654
+ * @param {?} monthNode
2655
+ * @return {?}
2656
+ */
2657
+ function (monthNode) { return monthNode.days.length > 0; }));
2658
+ if (yearMatched) {
2659
+ return yearNode;
2660
+ }
2661
+ return Object.assign({}, yearNode, { months: months });
2662
+ }))
2663
+ .filter((/**
2664
+ * @param {?} yearNode
2665
+ * @return {?}
2666
+ */
2667
+ function (yearNode) { return yearNode.months.length > 0; }));
2668
+ };
2669
+ /**
2670
+ * @param {?} yearNode
2671
+ * @return {?}
2672
+ */
2673
+ DateTreeFilterPopoverComponent.prototype.toggleYearExpanded = /**
2674
+ * @param {?} yearNode
2675
+ * @return {?}
2676
+ */
2677
+ function (yearNode) {
2678
+ /** @type {?} */
2679
+ var state = this.getOrCreateExpandState(this.field);
2680
+ state.years[yearNode.key] = !state.years[yearNode.key];
2681
+ yearNode.expanded = !!state.years[yearNode.key];
2682
+ };
2683
+ /**
2684
+ * @param {?} monthNode
2685
+ * @return {?}
2686
+ */
2687
+ DateTreeFilterPopoverComponent.prototype.toggleMonthExpanded = /**
2688
+ * @param {?} monthNode
2689
+ * @return {?}
2690
+ */
2691
+ function (monthNode) {
2692
+ /** @type {?} */
2693
+ var state = this.getOrCreateExpandState(this.field);
2694
+ state.months[monthNode.key] = !state.months[monthNode.key];
2695
+ monthNode.expanded = !!state.months[monthNode.key];
2696
+ };
2697
+ /**
2698
+ * @return {?}
2699
+ */
2700
+ DateTreeFilterPopoverComponent.prototype.isAllChecked = /**
2701
+ * @return {?}
2702
+ */
2703
+ function () {
2704
+ /** @type {?} */
2705
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2706
+ /** @type {?} */
2707
+ var enabledDayKeys = this.getEnabledDayKeysInCurrentField();
2708
+ if (!enabledDayKeys.length) {
2709
+ return false;
2710
+ }
2711
+ return enabledDayKeys.every((/**
2712
+ * @param {?} key
2713
+ * @return {?}
2714
+ */
2715
+ function (key) { return !!selectedMap[key]; }));
2716
+ };
2717
+ /**
2718
+ * @return {?}
2719
+ */
2720
+ DateTreeFilterPopoverComponent.prototype.isAllIndeterminate = /**
2721
+ * @return {?}
2722
+ */
2723
+ function () {
2724
+ /** @type {?} */
2725
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2726
+ /** @type {?} */
2727
+ var enabledDayKeys = this.getEnabledDayKeysInCurrentField();
2728
+ if (!enabledDayKeys.length) {
2729
+ return false;
2730
+ }
2731
+ /** @type {?} */
2732
+ var selectedCount = enabledDayKeys.filter((/**
2733
+ * @param {?} key
2734
+ * @return {?}
2735
+ */
2736
+ function (key) { return !!selectedMap[key]; }))
2737
+ .length;
2738
+ return selectedCount > 0 && selectedCount < enabledDayKeys.length;
2739
+ };
2740
+ /**
2741
+ * @param {?} checked
2742
+ * @return {?}
2743
+ */
2744
+ DateTreeFilterPopoverComponent.prototype.toggleAllDays = /**
2745
+ * @param {?} checked
2746
+ * @return {?}
2747
+ */
2748
+ function (checked) {
2749
+ /** @type {?} */
2750
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2751
+ /** @type {?} */
2752
+ var enabledDayKeys = this.getEnabledDayKeysInCurrentField();
2753
+ enabledDayKeys.forEach((/**
2754
+ * @param {?} key
2755
+ * @return {?}
2756
+ */
2757
+ function (key) {
2758
+ if (checked) {
2759
+ selectedMap[key] = true;
2760
+ }
2761
+ else {
2762
+ delete selectedMap[key];
2763
+ }
2764
+ }));
2765
+ };
2766
+ /**
2767
+ * @param {?} dayNode
2768
+ * @return {?}
2769
+ */
2770
+ DateTreeFilterPopoverComponent.prototype.isDayChecked = /**
2771
+ * @param {?} dayNode
2772
+ * @return {?}
2773
+ */
2774
+ function (dayNode) {
2775
+ /** @type {?} */
2776
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2777
+ return !!selectedMap[dayNode.key];
2778
+ };
2779
+ /**
2780
+ * @param {?} dayNode
2781
+ * @param {?} checked
2782
+ * @return {?}
2783
+ */
2784
+ DateTreeFilterPopoverComponent.prototype.toggleDay = /**
2785
+ * @param {?} dayNode
2786
+ * @param {?} checked
2787
+ * @return {?}
2788
+ */
2789
+ function (dayNode, checked) {
2790
+ if (dayNode.disabled) {
2791
+ return;
2792
+ }
2793
+ /** @type {?} */
2794
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2795
+ if (checked) {
2796
+ selectedMap[dayNode.key] = true;
2797
+ }
2798
+ else {
2799
+ delete selectedMap[dayNode.key];
2800
+ }
2801
+ };
2802
+ /**
2803
+ * @param {?} monthNode
2804
+ * @return {?}
2805
+ */
2806
+ DateTreeFilterPopoverComponent.prototype.isMonthDisabled = /**
2807
+ * @param {?} monthNode
2808
+ * @return {?}
2809
+ */
2810
+ function (monthNode) {
2811
+ return monthNode.days.every((/**
2812
+ * @param {?} dayNode
2813
+ * @return {?}
2814
+ */
2815
+ function (dayNode) { return dayNode.disabled; }));
2816
+ };
2817
+ /**
2818
+ * @param {?} monthNode
2819
+ * @return {?}
2820
+ */
2821
+ DateTreeFilterPopoverComponent.prototype.isMonthChecked = /**
2822
+ * @param {?} monthNode
2823
+ * @return {?}
2824
+ */
2825
+ function (monthNode) {
2826
+ if (this.isMonthDisabled(monthNode)) {
2827
+ return false;
2828
+ }
2829
+ /** @type {?} */
2830
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2831
+ /** @type {?} */
2832
+ var enabledDays = monthNode.days.filter((/**
2833
+ * @param {?} dayNode
2834
+ * @return {?}
2835
+ */
2836
+ function (dayNode) { return !dayNode.disabled; }));
2837
+ return enabledDays.every((/**
2838
+ * @param {?} dayNode
2839
+ * @return {?}
2840
+ */
2841
+ function (dayNode) { return !!selectedMap[dayNode.key]; }));
2842
+ };
2843
+ /**
2844
+ * @param {?} monthNode
2845
+ * @return {?}
2846
+ */
2847
+ DateTreeFilterPopoverComponent.prototype.isMonthIndeterminate = /**
2848
+ * @param {?} monthNode
2849
+ * @return {?}
2850
+ */
2851
+ function (monthNode) {
2852
+ if (this.isMonthDisabled(monthNode)) {
2853
+ return false;
2854
+ }
2855
+ /** @type {?} */
2856
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2857
+ /** @type {?} */
2858
+ var enabledDays = monthNode.days.filter((/**
2859
+ * @param {?} dayNode
2860
+ * @return {?}
2861
+ */
2862
+ function (dayNode) { return !dayNode.disabled; }));
2863
+ /** @type {?} */
2864
+ var selectedCount = enabledDays.filter((/**
2865
+ * @param {?} dayNode
2866
+ * @return {?}
2867
+ */
2868
+ function (dayNode) {
2869
+ return !!selectedMap[dayNode.key];
2870
+ })).length;
2871
+ return selectedCount > 0 && selectedCount < enabledDays.length;
2872
+ };
2873
+ /**
2874
+ * @param {?} monthNode
2875
+ * @param {?} checked
2876
+ * @return {?}
2877
+ */
2878
+ DateTreeFilterPopoverComponent.prototype.toggleMonth = /**
2879
+ * @param {?} monthNode
2880
+ * @param {?} checked
2881
+ * @return {?}
2882
+ */
2883
+ function (monthNode, checked) {
2884
+ if (this.isMonthDisabled(monthNode)) {
2885
+ return;
2886
+ }
2887
+ /** @type {?} */
2888
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2889
+ monthNode.days.forEach((/**
2890
+ * @param {?} dayNode
2891
+ * @return {?}
2892
+ */
2893
+ function (dayNode) {
2894
+ if (dayNode.disabled) {
2895
+ return;
2896
+ }
2897
+ if (checked) {
2898
+ selectedMap[dayNode.key] = true;
2899
+ }
2900
+ else {
2901
+ delete selectedMap[dayNode.key];
2902
+ }
2903
+ }));
2904
+ };
2905
+ /**
2906
+ * @param {?} yearNode
2907
+ * @return {?}
2908
+ */
2909
+ DateTreeFilterPopoverComponent.prototype.isYearDisabled = /**
2910
+ * @param {?} yearNode
2911
+ * @return {?}
2912
+ */
2913
+ function (yearNode) {
2914
+ var _this = this;
2915
+ return yearNode.months.every((/**
2916
+ * @param {?} monthNode
2917
+ * @return {?}
2918
+ */
2919
+ function (monthNode) {
2920
+ return _this.isMonthDisabled(monthNode);
2921
+ }));
2922
+ };
2923
+ /**
2924
+ * @param {?} yearNode
2925
+ * @return {?}
2926
+ */
2927
+ DateTreeFilterPopoverComponent.prototype.isYearChecked = /**
2928
+ * @param {?} yearNode
2929
+ * @return {?}
2930
+ */
2931
+ function (yearNode) {
2932
+ var _this = this;
2933
+ if (this.isYearDisabled(yearNode)) {
2934
+ return false;
2935
+ }
2936
+ /** @type {?} */
2937
+ var enabledMonths = yearNode.months.filter((/**
2938
+ * @param {?} monthNode
2939
+ * @return {?}
2940
+ */
2941
+ function (monthNode) { return !_this.isMonthDisabled(monthNode); }));
2942
+ return enabledMonths.every((/**
2943
+ * @param {?} monthNode
2944
+ * @return {?}
2945
+ */
2946
+ function (monthNode) { return _this.isMonthChecked(monthNode); }));
2947
+ };
2948
+ /**
2949
+ * @param {?} yearNode
2950
+ * @return {?}
2951
+ */
2952
+ DateTreeFilterPopoverComponent.prototype.isYearIndeterminate = /**
2953
+ * @param {?} yearNode
2954
+ * @return {?}
2955
+ */
2956
+ function (yearNode) {
2957
+ if (this.isYearDisabled(yearNode)) {
2958
+ return false;
2959
+ }
2960
+ /** @type {?} */
2961
+ var selectedMap = this.getFieldDaySelectionMap(this.field);
2962
+ /** @type {?} */
2963
+ var enabledDays = [];
2964
+ yearNode.months.forEach((/**
2965
+ * @param {?} monthNode
2966
+ * @return {?}
2967
+ */
2968
+ function (monthNode) {
2969
+ monthNode.days.forEach((/**
2970
+ * @param {?} dayNode
2971
+ * @return {?}
2972
+ */
2973
+ function (dayNode) {
2974
+ if (!dayNode.disabled) {
2975
+ enabledDays.push(dayNode.key);
2976
+ }
2977
+ }));
2978
+ }));
2979
+ /** @type {?} */
2980
+ var selectedCount = enabledDays.filter((/**
2981
+ * @param {?} key
2982
+ * @return {?}
2983
+ */
2984
+ function (key) { return !!selectedMap[key]; })).length;
2985
+ return selectedCount > 0 && selectedCount < enabledDays.length;
2986
+ };
2987
+ /**
2988
+ * @param {?} yearNode
2989
+ * @param {?} checked
2990
+ * @return {?}
2991
+ */
2992
+ DateTreeFilterPopoverComponent.prototype.toggleYear = /**
2993
+ * @param {?} yearNode
2994
+ * @param {?} checked
2995
+ * @return {?}
2996
+ */
2997
+ function (yearNode, checked) {
2998
+ var _this = this;
2999
+ if (this.isYearDisabled(yearNode)) {
3000
+ return;
3001
+ }
3002
+ yearNode.months.forEach((/**
3003
+ * @param {?} monthNode
3004
+ * @return {?}
3005
+ */
3006
+ function (monthNode) {
3007
+ _this.toggleMonth(monthNode, checked);
3008
+ }));
3009
+ };
3010
+ /**
3011
+ * @return {?}
3012
+ */
3013
+ DateTreeFilterPopoverComponent.prototype.clearSelection = /**
3014
+ * @return {?}
3015
+ */
3016
+ function () {
3017
+ if (this.field) {
3018
+ this.workingSelectedByField[this.field] = {};
3019
+ }
3020
+ this.apply.emit(this.cloneSelectionMap(this.workingSelectedByField));
3021
+ this.rebuildTree();
3022
+ };
3023
+ /**
3024
+ * @return {?}
3025
+ */
3026
+ DateTreeFilterPopoverComponent.prototype.applySelection = /**
3027
+ * @return {?}
3028
+ */
3029
+ function () {
3030
+ this.apply.emit(this.cloneSelectionMap(this.workingSelectedByField));
3031
+ this.closePopover();
3032
+ };
3033
+ /**
3034
+ * @private
3035
+ * @return {?}
3036
+ */
3037
+ DateTreeFilterPopoverComponent.prototype.rebuildTree = /**
3038
+ * @private
3039
+ * @return {?}
3040
+ */
3041
+ function () {
3042
+ var _this = this;
3043
+ if (!this.field) {
3044
+ this.years = [];
3045
+ return;
3046
+ }
3047
+ /** @type {?} */
3048
+ var sourceRows = this.sourceRows || [];
3049
+ /** @type {?} */
3050
+ var rowsByOtherFilters = this.filterRowsBySelectedDateTree(sourceRows, this.field);
3051
+ /** @type {?} */
3052
+ var availableDayKeyMap = {};
3053
+ rowsByOtherFilters.forEach((/**
3054
+ * @param {?} row
3055
+ * @return {?}
3056
+ */
3057
+ function (row) {
3058
+ /** @type {?} */
3059
+ var dayKey = _this.getDayKeyByRowValue(row[_this.field]);
3060
+ if (dayKey) {
3061
+ availableDayKeyMap[dayKey] = true;
3062
+ }
3063
+ }));
3064
+ /** @type {?} */
3065
+ var groupedMap = {};
3066
+ sourceRows.forEach((/**
3067
+ * @param {?} row
3068
+ * @return {?}
3069
+ */
3070
+ function (row) {
3071
+ /** @type {?} */
3072
+ var date = _this.parseDateValue(row[_this.field]);
3073
+ if (!date) {
3074
+ return;
3075
+ }
3076
+ /** @type {?} */
3077
+ var year = date.getFullYear();
3078
+ /** @type {?} */
3079
+ var month = date.getMonth() + 1;
3080
+ /** @type {?} */
3081
+ var day = date.getDate();
3082
+ if (!groupedMap[year]) {
3083
+ groupedMap[year] = {};
3084
+ }
3085
+ if (!groupedMap[year][month]) {
3086
+ groupedMap[year][month] = {};
3087
+ }
3088
+ if (!groupedMap[year][month][day]) {
3089
+ groupedMap[year][month][day] = 0;
3090
+ }
3091
+ groupedMap[year][month][day] += 1;
3092
+ }));
3093
+ /** @type {?} */
3094
+ var expandState = this.getOrCreateExpandState(this.field);
3095
+ this.years = Object.keys(groupedMap)
3096
+ .map((/**
3097
+ * @param {?} key
3098
+ * @return {?}
3099
+ */
3100
+ function (key) { return Number(key); }))
3101
+ .sort((/**
3102
+ * @param {?} a
3103
+ * @param {?} b
3104
+ * @return {?}
3105
+ */
3106
+ function (a, b) { return b - a; }))
3107
+ .map((/**
3108
+ * @param {?} year
3109
+ * @return {?}
3110
+ */
3111
+ function (year) {
3112
+ /** @type {?} */
3113
+ var months = Object.keys(groupedMap[year])
3114
+ .map((/**
3115
+ * @param {?} key
3116
+ * @return {?}
3117
+ */
3118
+ function (key) { return Number(key); }))
3119
+ .sort((/**
3120
+ * @param {?} a
3121
+ * @param {?} b
3122
+ * @return {?}
3123
+ */
3124
+ function (a, b) { return a - b; }))
3125
+ .map((/**
3126
+ * @param {?} month
3127
+ * @return {?}
3128
+ */
3129
+ function (month) {
3130
+ /** @type {?} */
3131
+ var monthKey = year + "-" + _this.pad2(month);
3132
+ if (expandState.months[monthKey] === undefined) {
3133
+ expandState.months[monthKey] = true;
3134
+ }
3135
+ /** @type {?} */
3136
+ var days = Object.keys(groupedMap[year][month])
3137
+ .map((/**
3138
+ * @param {?} key
3139
+ * @return {?}
3140
+ */
3141
+ function (key) { return Number(key); }))
3142
+ .sort((/**
3143
+ * @param {?} a
3144
+ * @param {?} b
3145
+ * @return {?}
3146
+ */
3147
+ function (a, b) { return a - b; }))
3148
+ .map((/**
3149
+ * @param {?} day
3150
+ * @return {?}
3151
+ */
3152
+ function (day) {
3153
+ /** @type {?} */
3154
+ var dayKey = _this.toDayKey(year, month, day);
3155
+ /** @type {?} */
3156
+ var dayDate = new Date(year, month - 1, day);
3157
+ return {
3158
+ key: dayKey,
3159
+ day: day,
3160
+ label: moment(dayDate).format("D MMM YYYY"),
3161
+ count: groupedMap[year][month][day],
3162
+ disabled: !availableDayKeyMap[dayKey],
3163
+ };
3164
+ }));
3165
+ return {
3166
+ key: monthKey,
3167
+ month: month,
3168
+ label: moment()
3169
+ .month(month - 1)
3170
+ .format("MMM"),
3171
+ expanded: !!expandState.months[monthKey],
3172
+ days: days,
3173
+ };
3174
+ }));
3175
+ /** @type {?} */
3176
+ var yearKey = String(year);
3177
+ if (expandState.years[yearKey] === undefined) {
3178
+ expandState.years[yearKey] = true;
3179
+ }
3180
+ return {
3181
+ key: yearKey,
3182
+ year: year,
3183
+ expanded: !!expandState.years[yearKey],
3184
+ months: months,
3185
+ };
3186
+ }));
3187
+ };
3188
+ /**
3189
+ * @private
3190
+ * @param {?} rows
3191
+ * @param {?=} excludeField
3192
+ * @return {?}
3193
+ */
3194
+ DateTreeFilterPopoverComponent.prototype.filterRowsBySelectedDateTree = /**
3195
+ * @private
3196
+ * @param {?} rows
3197
+ * @param {?=} excludeField
3198
+ * @return {?}
3199
+ */
3200
+ function (rows, excludeField) {
3201
+ var _this = this;
3202
+ /** @type {?} */
3203
+ var filteredRows = rows ? rows.slice() : [];
3204
+ (this.dateFields || []).forEach((/**
3205
+ * @param {?} field
3206
+ * @return {?}
3207
+ */
3208
+ function (field) {
3209
+ if (excludeField && field === excludeField) {
3210
+ return;
3211
+ }
3212
+ /** @type {?} */
3213
+ var selectedMap = _this.getFieldDaySelectionMap(field);
3214
+ /** @type {?} */
3215
+ var selectedKeys = Object.keys(selectedMap);
3216
+ if (!selectedKeys.length) {
3217
+ return;
3218
+ }
3219
+ filteredRows = filteredRows.filter((/**
3220
+ * @param {?} row
3221
+ * @return {?}
3222
+ */
3223
+ function (row) {
3224
+ /** @type {?} */
3225
+ var dayKey = _this.getDayKeyByRowValue(row[field]);
3226
+ return dayKey ? !!selectedMap[dayKey] : false;
3227
+ }));
3228
+ }));
3229
+ return filteredRows;
3230
+ };
3231
+ /**
3232
+ * @private
3233
+ * @param {?} value
3234
+ * @return {?}
3235
+ */
3236
+ DateTreeFilterPopoverComponent.prototype.parseDateValue = /**
3237
+ * @private
3238
+ * @param {?} value
3239
+ * @return {?}
3240
+ */
3241
+ function (value) {
3242
+ if (!value) {
3243
+ return null;
3244
+ }
3245
+ if (value instanceof Date) {
3246
+ return value;
3247
+ }
3248
+ /** @type {?} */
3249
+ var parsed = moment(value, [
3250
+ "YYYY-MM-DD",
3251
+ "MM/DD/YYYY",
3252
+ "DD/MM/YYYY",
3253
+ "YYYY/MM/DD",
3254
+ "DD-MMM-YYYY",
3255
+ "MMM DD, YYYY",
3256
+ moment.ISO_8601,
3257
+ ], true);
3258
+ if (parsed.isValid()) {
3259
+ return parsed.toDate();
3260
+ }
3261
+ /** @type {?} */
3262
+ var fallback = new Date(value);
3263
+ return isNaN(fallback.getTime()) ? null : fallback;
3264
+ };
3265
+ /**
3266
+ * @private
3267
+ * @param {?} field
3268
+ * @return {?}
3269
+ */
3270
+ DateTreeFilterPopoverComponent.prototype.getOrCreateExpandState = /**
3271
+ * @private
3272
+ * @param {?} field
3273
+ * @return {?}
3274
+ */
3275
+ function (field) {
3276
+ if (!this.expandStateByField[field]) {
3277
+ this.expandStateByField[field] = { years: {}, months: {} };
3278
+ }
3279
+ return this.expandStateByField[field];
3280
+ };
3281
+ /**
3282
+ * @private
3283
+ * @param {?} field
3284
+ * @return {?}
3285
+ */
3286
+ DateTreeFilterPopoverComponent.prototype.getFieldDaySelectionMap = /**
3287
+ * @private
3288
+ * @param {?} field
3289
+ * @return {?}
3290
+ */
3291
+ function (field) {
3292
+ if (!this.workingSelectedByField[field]) {
3293
+ this.workingSelectedByField[field] = {};
3294
+ }
3295
+ return this.workingSelectedByField[field];
3296
+ };
3297
+ /**
3298
+ * @private
3299
+ * @param {?} year
3300
+ * @param {?} month
3301
+ * @param {?} day
3302
+ * @return {?}
3303
+ */
3304
+ DateTreeFilterPopoverComponent.prototype.toDayKey = /**
3305
+ * @private
3306
+ * @param {?} year
3307
+ * @param {?} month
3308
+ * @param {?} day
3309
+ * @return {?}
3310
+ */
3311
+ function (year, month, day) {
3312
+ return year + "-" + this.pad2(month) + "-" + this.pad2(day);
3313
+ };
3314
+ /**
3315
+ * @private
3316
+ * @param {?} value
3317
+ * @return {?}
3318
+ */
3319
+ DateTreeFilterPopoverComponent.prototype.pad2 = /**
3320
+ * @private
3321
+ * @param {?} value
3322
+ * @return {?}
3323
+ */
3324
+ function (value) {
3325
+ return value < 10 ? "0" + value : String(value);
3326
+ };
3327
+ /**
3328
+ * @private
3329
+ * @param {?} value
3330
+ * @return {?}
3331
+ */
3332
+ DateTreeFilterPopoverComponent.prototype.getDayKeyByRowValue = /**
3333
+ * @private
3334
+ * @param {?} value
3335
+ * @return {?}
3336
+ */
3337
+ function (value) {
3338
+ /** @type {?} */
3339
+ var date = this.parseDateValue(value);
3340
+ if (!date) {
3341
+ return "";
3342
+ }
3343
+ return this.toDayKey(date.getFullYear(), date.getMonth() + 1, date.getDate());
3344
+ };
3345
+ /**
3346
+ * @private
3347
+ * @return {?}
3348
+ */
3349
+ DateTreeFilterPopoverComponent.prototype.getEnabledDayKeysInCurrentField = /**
3350
+ * @private
3351
+ * @return {?}
3352
+ */
3353
+ function () {
3354
+ /** @type {?} */
3355
+ var keys = [];
3356
+ this.years.forEach((/**
3357
+ * @param {?} yearNode
3358
+ * @return {?}
3359
+ */
3360
+ function (yearNode) {
3361
+ yearNode.months.forEach((/**
3362
+ * @param {?} monthNode
3363
+ * @return {?}
3364
+ */
3365
+ function (monthNode) {
3366
+ monthNode.days.forEach((/**
3367
+ * @param {?} dayNode
3368
+ * @return {?}
3369
+ */
3370
+ function (dayNode) {
3371
+ if (!dayNode.disabled) {
3372
+ keys.push(dayNode.key);
3373
+ }
3374
+ }));
3375
+ }));
3376
+ }));
3377
+ return keys;
3378
+ };
3379
+ /**
3380
+ * @private
3381
+ * @param {?} source
3382
+ * @return {?}
3383
+ */
3384
+ DateTreeFilterPopoverComponent.prototype.cloneSelectionMap = /**
3385
+ * @private
3386
+ * @param {?} source
3387
+ * @return {?}
3388
+ */
3389
+ function (source) {
3390
+ try {
3391
+ return source ? JSON.parse(JSON.stringify(source)) : {};
3392
+ }
3393
+ catch (e) {
3394
+ return {};
3395
+ }
3396
+ };
3397
+ DateTreeFilterPopoverComponent.decorators = [
3398
+ { type: core.Component, args: [{
3399
+ selector: "rs-date-tree-filter-popover",
3400
+ 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",
3401
+ 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}"]
3402
+ }] }
3403
+ ];
3404
+ DateTreeFilterPopoverComponent.propDecorators = {
3405
+ field: [{ type: core.Input }],
3406
+ translation: [{ type: core.Input }],
3407
+ sourceRows: [{ type: core.Input }],
3408
+ dateFields: [{ type: core.Input }],
3409
+ selectedByField: [{ type: core.Input }],
3410
+ fieldLabelMap: [{ type: core.Input }],
3411
+ apply: [{ type: core.Output }],
3412
+ close: [{ type: core.Output }]
3413
+ };
3414
+ return DateTreeFilterPopoverComponent;
3415
+ }());
3416
+ if (false) {
3417
+ /** @type {?} */
3418
+ DateTreeFilterPopoverComponent.prototype.field;
3419
+ /** @type {?} */
3420
+ DateTreeFilterPopoverComponent.prototype.translation;
3421
+ /** @type {?} */
3422
+ DateTreeFilterPopoverComponent.prototype.sourceRows;
3423
+ /** @type {?} */
3424
+ DateTreeFilterPopoverComponent.prototype.dateFields;
3425
+ /** @type {?} */
3426
+ DateTreeFilterPopoverComponent.prototype.selectedByField;
3427
+ /** @type {?} */
3428
+ DateTreeFilterPopoverComponent.prototype.fieldLabelMap;
3429
+ /** @type {?} */
3430
+ DateTreeFilterPopoverComponent.prototype.apply;
3431
+ /** @type {?} */
3432
+ DateTreeFilterPopoverComponent.prototype.close;
3433
+ /** @type {?} */
3434
+ DateTreeFilterPopoverComponent.prototype.keyword;
3435
+ /** @type {?} */
3436
+ DateTreeFilterPopoverComponent.prototype.years;
3437
+ /**
3438
+ * @type {?}
3439
+ * @private
3440
+ */
3441
+ DateTreeFilterPopoverComponent.prototype.expandStateByField;
3442
+ /**
3443
+ * @type {?}
3444
+ * @private
3445
+ */
3446
+ DateTreeFilterPopoverComponent.prototype.workingSelectedByField;
3447
+ }
3448
+
1530
3449
  /**
1531
3450
  * @fileoverview added by tsickle
1532
3451
  * Generated from: lib/float-box/index.component.ts
@@ -24230,7 +26149,7 @@
24230
26149
  { type: core.Component, args: [{
24231
26150
  selector: "rs-common-dialog",
24232
26151
  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",
24233
- 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%)}"]
26152
+ 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%)}"]
24234
26153
  }] }
24235
26154
  ];
24236
26155
  /** @nocollapse */
@@ -36449,284 +38368,6 @@
36449
38368
  ConfirmSelectComponent.prototype.isInteracted;
36450
38369
  }
36451
38370
 
36452
- /**
36453
- * @fileoverview added by tsickle
36454
- * Generated from: lib/form/richtexteditor/ai-config.ts
36455
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
36456
- */
36457
- /**
36458
- * @record
36459
- */
36460
- function AIConfig() { }
36461
- if (false) {
36462
- /** @type {?} */
36463
- AIConfig.prototype.endpoint;
36464
- /** @type {?} */
36465
- AIConfig.prototype.apiKey;
36466
- /** @type {?} */
36467
- AIConfig.prototype.deployment;
36468
- /** @type {?} */
36469
- AIConfig.prototype.apiVersion;
36470
- /** @type {?} */
36471
- AIConfig.prototype.enabled;
36472
- }
36473
- // 从环境配置获取AI配置
36474
- /**
36475
- * @return {?}
36476
- */
36477
- function getAIConfig() {
36478
- return {
36479
- endpoint: "https://aidevused.openai.azure.com/",
36480
- apiKey: "ccba76e279f64653a50ac4fee90afe5c",
36481
- deployment: "gpt-4",
36482
- apiVersion: "2025-01-01-preview",
36483
- enabled: true,
36484
- };
36485
- }
36486
- // 检查配置是否有效
36487
- /**
36488
- * @param {?} config
36489
- * @return {?}
36490
- */
36491
- function isAIConfigValid(config) {
36492
- // 检查是否为aidevused端点且有有效API密钥
36493
- return !!((config.endpoint &&
36494
- config.apiKey &&
36495
- config.deployment &&
36496
- config.enabled &&
36497
- config.endpoint === "https://aidevused.openai.azure.com/" &&
36498
- config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
36499
- );
36500
- }
36501
- // 从后端API获取AI配置(推荐方式)
36502
- /**
36503
- * @return {?}
36504
- * @this {*}
36505
- */
36506
- function getAIConfigFromBackend() {
36507
- return __awaiter(this, void 0, void 0, function () {
36508
- return __generator(this, function (_a) {
36509
- try {
36510
- // 这里应该调用你的后端API来获取AI配置
36511
- // 例如:return await this.http.get('/api/ai-config');
36512
- // 临时返回默认配置
36513
- return [2 /*return*/, getAIConfig()];
36514
- }
36515
- catch (error) {
36516
- console.error("Failed to get AI config from backend:", error);
36517
- return [2 /*return*/, getAIConfig()];
36518
- }
36519
- return [2 /*return*/];
36520
- });
36521
- });
36522
- }
36523
-
36524
- /**
36525
- * @fileoverview added by tsickle
36526
- * Generated from: lib/form/richtexteditor/openapi.ts
36527
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
36528
- */
36529
- // import { testAIFunction } from './ai-test';
36530
- // testAIFunction();
36531
- // 使用fetch API发送请求到Azure OpenAI
36532
- /**
36533
- * @param {?} messages
36534
- * @param {?} config
36535
- * @return {?}
36536
- * @this {*}
36537
- */
36538
- function sendAIRequest(messages, config) {
36539
- return __awaiter(this, void 0, void 0, function () {
36540
- var url, url1, response, errorText, data, error_1;
36541
- return __generator(this, function (_a) {
36542
- switch (_a.label) {
36543
- case 0:
36544
- _a.trys.push([0, 5, , 6]);
36545
- url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
36546
- url1 = "" + config.endpoint;
36547
- return [4 /*yield*/, fetch(url, {
36548
- method: 'POST',
36549
- headers: {
36550
- 'Content-Type': 'application/json',
36551
- 'api-key': config.apiKey,
36552
- },
36553
- body: JSON.stringify({
36554
- messages: messages,
36555
- max_tokens: 1000,
36556
- temperature: 0.7,
36557
- top_p: 1,
36558
- frequency_penalty: 0,
36559
- presence_penalty: 0,
36560
- }),
36561
- })];
36562
- case 1:
36563
- response = _a.sent();
36564
- if (!!response.ok) return [3 /*break*/, 3];
36565
- return [4 /*yield*/, response.text()];
36566
- case 2:
36567
- errorText = _a.sent();
36568
- throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
36569
- case 3: return [4 /*yield*/, response.json()];
36570
- case 4:
36571
- data = _a.sent();
36572
- if (!data.choices || !data.choices[0] || !data.choices[0].message) {
36573
- throw new Error('Invalid response format from AI service');
36574
- }
36575
- return [2 /*return*/, data.choices[0].message.content];
36576
- case 5:
36577
- error_1 = _a.sent();
36578
- console.error('AI request failed:', error_1);
36579
- throw error_1;
36580
- case 6: return [2 /*return*/];
36581
- }
36582
- });
36583
- });
36584
- }
36585
- // 备用方案:使用模拟数据(用于开发测试)
36586
- /**
36587
- * @param {?} subQuery
36588
- * @param {?} promptQuery
36589
- * @return {?}
36590
- */
36591
- function getMockAIResponse(subQuery, promptQuery) {
36592
- var e_1, _a;
36593
- /** @type {?} */
36594
- var mockResponses = {
36595
- Rephrase: "Rephrased: " + promptQuery,
36596
- Grammar: "Corrected: " + promptQuery,
36597
- Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
36598
- Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
36599
- Translate: "Translated: " + promptQuery,
36600
- SentimentAnalysis: '😊 Positive',
36601
- };
36602
- try {
36603
- for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
36604
- var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
36605
- if (subQuery.includes(key)) {
36606
- return value;
36607
- }
36608
- }
36609
- }
36610
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
36611
- finally {
36612
- try {
36613
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
36614
- }
36615
- finally { if (e_1) throw e_1.error; }
36616
- }
36617
- return "AI processed: " + promptQuery;
36618
- }
36619
- // 主要的AI请求方法
36620
- /**
36621
- * @param {?} subQuery
36622
- * @param {?} promptQuery
36623
- * @return {?}
36624
- * @this {*}
36625
- */
36626
- function OpenAiModelRTE(subQuery, promptQuery) {
36627
- return __awaiter(this, void 0, void 0, function () {
36628
- var config, messages, result, error_2;
36629
- return __generator(this, function (_a) {
36630
- switch (_a.label) {
36631
- case 0:
36632
- _a.trys.push([0, 2, , 3]);
36633
- config = getAIConfig();
36634
- // 检查配置是否有效
36635
- if (!isAIConfigValid(config)) {
36636
- console.warn('AI configuration is incomplete or disabled, using mock response');
36637
- return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
36638
- }
36639
- messages = [
36640
- {
36641
- role: 'system',
36642
- content: subQuery.includes('emoji followed by the sentiment in the format')
36643
- ? 'You are a helpful assistant. Please respond in string format.'
36644
- : "NOTE: Return same html format just do changes content only. don't change html formats.",
36645
- },
36646
- {
36647
- role: 'user',
36648
- content: subQuery + " " + promptQuery,
36649
- },
36650
- ];
36651
- return [4 /*yield*/, sendAIRequest(messages, config)];
36652
- case 1:
36653
- result = _a.sent();
36654
- return [2 /*return*/, result];
36655
- case 2:
36656
- error_2 = _a.sent();
36657
- console.error('AI request failed, using mock response:', error_2);
36658
- return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
36659
- case 3: return [2 /*return*/];
36660
- }
36661
- });
36662
- });
36663
- }
36664
- // 兼容性方法(保持向后兼容)
36665
- /**
36666
- * @param {?} options
36667
- * @return {?}
36668
- * @this {*}
36669
- */
36670
- function getAzureChatAIRequest(options) {
36671
- return __awaiter(this, void 0, void 0, function () {
36672
- var config, result, err_1;
36673
- return __generator(this, function (_a) {
36674
- switch (_a.label) {
36675
- case 0:
36676
- _a.trys.push([0, 2, , 3]);
36677
- config = getAIConfig();
36678
- if (!isAIConfigValid(config)) {
36679
- return [2 /*return*/, null];
36680
- }
36681
- return [4 /*yield*/, sendAIRequest(options.messages, config)];
36682
- case 1:
36683
- result = _a.sent();
36684
- return [2 /*return*/, result];
36685
- case 2:
36686
- err_1 = _a.sent();
36687
- console.error('Error occurred:', err_1);
36688
- return [2 /*return*/, null];
36689
- case 3: return [2 /*return*/];
36690
- }
36691
- });
36692
- });
36693
- }
36694
- /**
36695
- * @param {?} prompt
36696
- * @return {?}
36697
- * @this {*}
36698
- */
36699
- function getAzureTextAIRequest(prompt) {
36700
- return __awaiter(this, void 0, void 0, function () {
36701
- var config, messages, result, err_2;
36702
- return __generator(this, function (_a) {
36703
- switch (_a.label) {
36704
- case 0:
36705
- _a.trys.push([0, 2, , 3]);
36706
- config = getAIConfig();
36707
- if (!isAIConfigValid(config)) {
36708
- return [2 /*return*/, undefined];
36709
- }
36710
- messages = [
36711
- {
36712
- role: 'user',
36713
- content: prompt,
36714
- },
36715
- ];
36716
- return [4 /*yield*/, sendAIRequest(messages, config)];
36717
- case 1:
36718
- result = _a.sent();
36719
- return [2 /*return*/, result];
36720
- case 2:
36721
- err_2 = _a.sent();
36722
- console.error('Error occurred:', err_2);
36723
- return [2 /*return*/, undefined];
36724
- case 3: return [2 /*return*/];
36725
- }
36726
- });
36727
- });
36728
- }
36729
-
36730
38371
  /**
36731
38372
  * @fileoverview added by tsickle
36732
38373
  * Generated from: lib/form/richtexteditor/data-config.ts
@@ -36821,6 +38462,73 @@
36821
38462
  command: "Font",
36822
38463
  subCommand: "FontName",
36823
38464
  },
38465
+ // New fonts
38466
+ {
38467
+ text: "Tiempos Headline - Semibold",
38468
+ value: "Tiempos Headline Semibold",
38469
+ cssClass: "e-tiempos-headline",
38470
+ command: "Font",
38471
+ subCommand: "FontName",
38472
+ },
38473
+ {
38474
+ text: "微软雅黑",
38475
+ value: "Microsoft YaHei,微软雅黑,SimHei, sans-serif",
38476
+ cssClass: "e-yahei",
38477
+ command: "Font",
38478
+ subCommand: "FontName",
38479
+ },
38480
+ {
38481
+ text: "等线",
38482
+ value: "DengXian,等线,sans-serif",
38483
+ cssClass: "e-dengxian",
38484
+ command: "Font",
38485
+ subCommand: "FontName",
38486
+ },
38487
+ {
38488
+ text: "思源黑体",
38489
+ value: "Source Han Sans CN, Microsoft YaHei,'微软雅黑', sans-serif",
38490
+ cssClass: "e-source-han-sans-cn-regular",
38491
+ command: "Font",
38492
+ subCommand: "FontName",
38493
+ },
38494
+ {
38495
+ text: "思源宋体",
38496
+ value: "Source Han Serif CN, SimSun,'宋体',serif",
38497
+ cssClass: "e-source-han-serif-cn-regular",
38498
+ command: "Font",
38499
+ subCommand: "FontName",
38500
+ },
38501
+ {
38502
+ text: "霞鹜文楷",
38503
+ value: "LXGW WenKai,'霞鹜文楷',STKaiti, KaiTi, '楷体', '华文楷体', Arial, sans-serif",
38504
+ cssClass: "e-lxgw",
38505
+ command: "Font",
38506
+ subCommand: "FontName",
38507
+ },
38508
+ // Ping Fang SC 系列
38509
+ {
38510
+ text: "Ping Fang SC - Light",
38511
+ value: "苹方-简",
38512
+ cssClass: "e-ping-fang-sc-light",
38513
+ command: "Font",
38514
+ subCommand: "FontName",
38515
+ },
38516
+ ],
38517
+ };
38518
+ /** @type {?} */
38519
+ var size = {
38520
+ default: "11pt",
38521
+ width: "40px",
38522
+ items: [
38523
+ { text: "8 pt", value: "8pt" },
38524
+ { text: "9 pt", value: "9pt" },
38525
+ { text: "10 pt", value: "10pt" },
38526
+ { text: "11 pt", value: "11pt" },
38527
+ { text: "12 pt", value: "12pt" },
38528
+ { text: "14 pt", value: "14pt" },
38529
+ { text: "18 pt", value: "18pt" },
38530
+ { text: "24 pt", value: "24pt" },
38531
+ { text: "36 pt", value: "36pt" },
36824
38532
  ],
36825
38533
  };
36826
38534
  // line height配置
@@ -37006,71 +38714,30 @@
37006
38714
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
37007
38715
  */
37008
38716
  var RichtexteditorComponent = /** @class */ (function () {
37009
- function RichtexteditorComponent(ref) {
37010
- this.ref = ref;
37011
- // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
37012
- this.placeholder = "";
38717
+ function RichtexteditorComponent() {
37013
38718
  this.value = "";
38719
+ this.editorId = "editorId";
37014
38720
  this.height = 150;
37015
38721
  this.autoSaveOnIdle = true;
37016
- this.target = "#container"; // dialog 弹窗父级
37017
- // dialog 弹窗父级
37018
- this.toolbarClick = new core.EventEmitter();
37019
- this.change = new core.EventEmitter();
37020
- // @Output() change = new EventEmitter();
37021
- this.family = fontFamily;
37022
- this.dialogWidth = "800px";
37023
- this.dialogHeight = "642px";
37024
- this.showZoomBtn = true;
37025
- this.showMsg = false;
38722
+ this.disabled = false;
37026
38723
  this.insertImageSettings = {
37027
38724
  saveFormat: "Blob",
37028
38725
  allowedTypes: [".svg", ".png"],
37029
38726
  display: "none",
37030
38727
  };
37031
- this.size = "";
37032
- this.dropValIndex = 0;
37033
- this.queryList = [
37034
- { id: "Rephrase", text: "Rephrase" },
37035
- { id: "Grammar", text: "Correct Grammar" },
37036
- { id: "Summarize", text: "Summarize" },
37037
- { id: "Elaborate", text: "Elaborate" },
37038
- { id: "Translate", text: "Translate" },
37039
- { id: "SentimentAnalysis", text: "Sentiment Analysis" },
37040
- ];
37041
- this.rephraseTyleList = [
37042
- { text: "Standard", id: "Standard" },
37043
- { text: "Fluent", id: "Fluent" },
37044
- { text: "Professional", id: "Professional" },
37045
- ];
37046
- this.languageList = [
37047
- { id: "EN", text: "English" },
37048
- { id: "ZH", text: "Chinese (Simplified)" },
37049
- { id: "ES", text: "Spanish" },
37050
- { id: "ZHT", text: "Chinese (Traditional)" },
37051
- { id: "HI", text: "Hindi" },
37052
- { id: "AR", text: "Arabic" },
37053
- { id: "BN", text: "Bengali" },
37054
- { id: "PT", text: "Portuguese" },
37055
- { id: "RU", text: "Russian" },
37056
- { id: "JA", text: "Japanese" },
37057
- { id: "DE", text: "German" },
37058
- { id: "KO", text: "Korean" },
37059
- { id: "FR", text: "French" },
37060
- { id: "IT", text: "Italian" },
37061
- { id: "TR", text: "Turkish" },
37062
- ];
37063
- this.promptQuery = "";
37064
- this.isSentimentCheck = false;
37065
- this.subQuery = "";
37066
- this.chipValue = "Standard";
38728
+ this.toolbarClick = new core.EventEmitter();
38729
+ this.change = new core.EventEmitter();
38730
+ this.created = new core.EventEmitter();
38731
+ this.actionBegin = new core.EventEmitter();
38732
+ this.input = new core.EventEmitter();
38733
+ this.focus = new core.EventEmitter();
38734
+ this.blur = new core.EventEmitter();
38735
+ this.actionComplete = new core.EventEmitter();
38736
+ this.family = fontFamily;
38737
+ this.fontSize = size;
37067
38738
  this.tools = {
37068
38739
  enableFloating: false,
37069
38740
  items: [
37070
- {
37071
- tooltipText: "AI Assist",
37072
- 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>',
37073
- },
37074
38741
  "Bold",
37075
38742
  "Italic",
37076
38743
  "Underline",
@@ -37085,21 +38752,12 @@
37085
38752
  "CreateTable",
37086
38753
  "Formats",
37087
38754
  "Alignments",
37088
- {
37089
- tooltipText: "Line Height",
37090
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
37091
- },
37092
- "OrderedList",
37093
- "UnorderedList",
38755
+ "BulletFormatList",
38756
+ "NumberFormatList",
37094
38757
  "Outdent",
37095
38758
  "Indent",
37096
38759
  "|",
37097
38760
  "CreateLink",
37098
- {
37099
- tooltipText: "",
37100
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
37101
- '<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>',
37102
- },
37103
38761
  "|",
37104
38762
  "FormatPainter",
37105
38763
  "ClearFormat",
@@ -37108,14 +38766,64 @@
37108
38766
  "Redo",
37109
38767
  ],
37110
38768
  };
38769
+ /**
38770
+ * 表格快捷工具栏:含 TableCell(合并/拆分单元格)
38771
+ */
38772
+ this.quickToolbarSettings = {
38773
+ table: [
38774
+ "Tableheader",
38775
+ "TableRemove",
38776
+ "|",
38777
+ "TableRows",
38778
+ "TableColumns",
38779
+ "TableCell",
38780
+ "|",
38781
+ "Styles",
38782
+ "BackgroundColor",
38783
+ "Alignments",
38784
+ "TableCellVerticalAlign",
38785
+ ],
38786
+ };
38787
+ this.bulletFormatList = {
38788
+ types: [
38789
+ { text: "None", value: "none" },
38790
+ { text: "●", value: "disc" },
38791
+ { text: "○", value: "circle" },
38792
+ { text: "■", value: "square" },
38793
+ { text: "-", value: "dash" },
38794
+ ],
38795
+ };
38796
+ this.numberFormatList = {
38797
+ types: [
38798
+ { text: "None", value: "none" },
38799
+ { text: "1, 2, 3, …", value: "decimal" },
38800
+ {
38801
+ text: "α, β, γ, …",
38802
+ value: "lowerGreek",
38803
+ },
38804
+ {
38805
+ text: "i, ii, iii, …",
38806
+ value: "lowerRoman",
38807
+ },
38808
+ {
38809
+ text: "A, B, C, …",
38810
+ value: "upperAlpha",
38811
+ },
38812
+ {
38813
+ text: "a, b, c, …",
38814
+ value: "lowerAlpha",
38815
+ },
38816
+ {
38817
+ text: "I, II, III, …",
38818
+ value: "upperRoman",
38819
+ },
38820
+ {
38821
+ text: "(1), (2), (3), …",
38822
+ value: "parentheses",
38823
+ },
38824
+ ],
38825
+ };
37111
38826
  }
37112
- /**
37113
- * @return {?}
37114
- */
37115
- RichtexteditorComponent.prototype.ngOnInit = /**
37116
- * @return {?}
37117
- */
37118
- function () { };
37119
38827
  /**
37120
38828
  * @param {?} args
37121
38829
  * @return {?}
@@ -37125,32 +38833,6 @@
37125
38833
  * @return {?}
37126
38834
  */
37127
38835
  function (args) {
37128
- /** @type {?} */
37129
- var tables = document.querySelectorAll("table.e-rte-table");
37130
- tables.forEach((/**
37131
- * @param {?} table
37132
- * @return {?}
37133
- */
37134
- function (table) {
37135
- /** @type {?} */
37136
- var htmlTable = (/** @type {?} */ (table));
37137
- htmlTable.style.marginBottom = "10px";
37138
- htmlTable.style.borderCollapse = "collapse";
37139
- htmlTable.style.emptyCells = "show";
37140
- /** @type {?} */
37141
- var tdElements = table.querySelectorAll("td");
37142
- tdElements.forEach((/**
37143
- * @param {?} td
37144
- * @return {?}
37145
- */
37146
- function (td) {
37147
- td.style.border = "1px solid #adb5bd";
37148
- td.style.height = "20px";
37149
- td.style.minWidth = "20px";
37150
- td.style.padding = "2px 5px";
37151
- td.style.boxSizing = "border-box";
37152
- }));
37153
- }));
37154
38836
  this.change.emit(args);
37155
38837
  };
37156
38838
  /**
@@ -37160,514 +38842,157 @@
37160
38842
  * @return {?}
37161
38843
  */
37162
38844
  function () {
37163
- var _this = this;
37164
- //bind the a click event
37165
- // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
37166
- // editorContent.addEventListener('click', this.OnClicked.bind(this));
37167
- //add the line height
37168
- this.editorManager = this.rteObj.formatter.editorManager;
37169
- /** @type {?} */
37170
- var splitButton = new ej2AngularSplitbuttons.DropDownButton({
37171
- items: lineHeight_items,
37172
- iconCss: "e-icons e-line-spacing",
37173
- select: this.onSelect.bind(this),
37174
- });
37175
- splitButton.appendTo("#lineheight_tbar");
37176
- // ai assist
37177
- /** @type {?} */
37178
- var aiassistantButton = new ej2AngularSplitbuttons.DropDownButton({
37179
- items: this.queryList,
37180
- // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
37181
- select: (/**
37182
- * @param {?} args
37183
- * @return {?}
37184
- */
37185
- function (args) { return _this.aiQuerySelectedMenu(args); }),
37186
- });
37187
- aiassistantButton.appendTo("#ai_assistant_button_tbar");
38845
+ this.created.emit();
37188
38846
  };
37189
38847
  /**
37190
- * @private
37191
38848
  * @param {?} args
37192
38849
  * @return {?}
37193
38850
  */
37194
- RichtexteditorComponent.prototype.onSelect = /**
37195
- * @private
38851
+ RichtexteditorComponent.prototype._toolbarClick = /**
37196
38852
  * @param {?} args
37197
38853
  * @return {?}
37198
38854
  */
37199
38855
  function (args) {
37200
- if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
37201
- this.rteObj.formatter.saveData();
37202
- }
37203
- /** @type {?} */
37204
- var nodes = this.editorManager.domNode.blockNodes();
37205
- for (var i = 0; nodes.length > i; i++) {
37206
- ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
37207
- }
37208
- this.rteObj.formatter.saveData();
37209
- this.rteObj.formatter.enableUndo(this.rteObj);
38856
+ this.toolbarClick.emit(args);
37210
38857
  };
37211
38858
  /**
37212
- * @private
37213
38859
  * @param {?} args
37214
38860
  * @return {?}
37215
38861
  */
37216
- RichtexteditorComponent.prototype.aiQuerySelectedMenu = /**
37217
- * @private
38862
+ RichtexteditorComponent.prototype._actionBegin = /**
37218
38863
  * @param {?} args
37219
38864
  * @return {?}
37220
38865
  */
37221
38866
  function (args) {
37222
- this.dialogueOpen(args.item.text);
37223
- };
37224
- /**
37225
- * @param {?} selectedQuery
37226
- * @return {?}
37227
- */
37228
- RichtexteditorComponent.prototype.dialogueOpen = /**
37229
- * @param {?} selectedQuery
37230
- * @return {?}
37231
- */
37232
- function (selectedQuery) {
37233
- var _this = this;
37234
- /** @type {?} */
37235
- var selectionText = this.rteObj.getSelectedHtml();
37236
- this.selectedQuery = selectedQuery;
37237
- if (selectionText) {
37238
- /** @type {?} */
37239
- var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
37240
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
37241
- this.dropValIndex = this.queryList.findIndex((/**
37242
- * @param {?} q
37243
- * @return {?}
37244
- */
37245
- function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
37246
- this.queryCategory.index = this.dropValIndex;
37247
- this.leftRte.value = this.promptQuery = selectionText;
37248
- this.leftRte.refreshUI();
37249
- this.AIdialog.show();
37250
- this.updateAISugesstionsData(selectedQuery);
37251
- }
37252
- else {
37253
- this.showMsg = true;
37254
- setTimeout((/**
37255
- * @return {?}
37256
- */
37257
- function () {
37258
- _this.showMsg = false;
37259
- }), 3000);
37260
- console.log("Please select the content to perform the AI operation.");
37261
- }
37262
- };
37263
- /**
37264
- * @param {?} selectedQuery
37265
- * @return {?}
37266
- */
37267
- RichtexteditorComponent.prototype.updateAISugesstionsData = /**
37268
- * @param {?} selectedQuery
37269
- * @return {?}
37270
- */
37271
- function (selectedQuery) {
37272
- this.isSentimentCheck = false;
37273
- switch (selectedQuery) {
37274
- case "Summarize":
37275
- this.subQuery = "Summarize the upcoming sentence shortly.";
37276
- break;
37277
- case "Elaborate":
37278
- this.subQuery = "Elaborate on the upcoming sentence.";
37279
- break;
37280
- case "Rephrase":
37281
- this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
37282
- break;
37283
- case "Correct Grammar":
37284
- this.subQuery = "Correct the grammar of the upcoming sentence.";
37285
- break;
37286
- case "Translate":
37287
- this.subQuery =
37288
- "Translate the upcoming sentence to " + this.translatelanguage + ".";
37289
- break;
37290
- case "Sentiment Analysis":
37291
- this.isSentimentCheck = true;
37292
- this.subQuery =
37293
- '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:';
37294
- break;
37295
- }
37296
- this.updateAISugesstions();
37297
- };
37298
- /**
37299
- * @return {?}
37300
- */
37301
- RichtexteditorComponent.prototype.updateAISugesstions = /**
37302
- * @return {?}
37303
- */
37304
- function () {
37305
- var _this = this;
37306
- try {
37307
- if (this.promptQuery) {
37308
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
37309
- "";
37310
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
37311
- "none";
37312
- this.sentimentButton.element.style.display = "none";
37313
- this.regenerateButton.disabled = true;
37314
- this.copyButton.disabled = true;
37315
- this.replaceButton.disabled = true;
37316
- this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
37317
- this.apiResultData.then((/**
37318
- * @param {?} result
37319
- * @return {?}
37320
- */
37321
- function (result) {
37322
- _this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
37323
- _this.sentimentButton.content = result
37324
- .toLowerCase()
37325
- .includes("positive")
37326
- ? "😊 Positive"
37327
- : result.toLowerCase().includes("negative")
37328
- ? "😞 Negative"
37329
- : "😐 Neutral";
37330
- _this.sentimentButton.element.style.display = !_this.isSentimentCheck
37331
- ? "none"
37332
- : "";
37333
- _this.rightRte.value = _this.AIResult;
37334
- /** @type {?} */
37335
- var noResultsFound = !(_this.AIResult || _this.promptQuery);
37336
- ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
37337
- _this.regenerateButton.disabled = noResultsFound;
37338
- _this.copyButton.disabled = noResultsFound;
37339
- _this.replaceButton.disabled = noResultsFound;
37340
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
37341
- "none";
37342
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
37343
- noResultsFound ? "none" : "";
37344
- console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
37345
- // this.ref.markForCheck();
37346
- }));
37347
- }
37348
- }
37349
- catch (_a) {
37350
- // this.toastObj.show();
37351
- }
37352
- };
37353
- /**
37354
- * @param {?} subQuery
37355
- * @param {?} promptQuery
37356
- * @return {?}
37357
- */
37358
- RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
37359
- * @param {?} subQuery
37360
- * @param {?} promptQuery
37361
- * @return {?}
37362
- */
37363
- function (subQuery, promptQuery) {
37364
- return __awaiter(this, void 0, void 0, function () {
37365
- var content;
37366
- return __generator(this, function (_a) {
37367
- switch (_a.label) {
37368
- case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
37369
- case 1:
37370
- content = _a.sent();
37371
- return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
37372
- }
37373
- });
37374
- });
37375
- };
37376
- /**
37377
- * @return {?}
37378
- */
37379
- RichtexteditorComponent.prototype.dialogShow = /**
37380
- * @return {?}
37381
- */
37382
- function () {
37383
- var _this = this;
37384
- (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
37385
- * @return {?}
37386
- */
37387
- function () {
37388
- _this.updateAISugesstions();
37389
- }));
37390
- (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
37391
- * @return {?}
37392
- */
37393
- function () {
37394
- _this.copyTextToClipboard(_this.AIResult);
37395
- }));
37396
- (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
37397
- * @return {?}
37398
- */
37399
- function () {
37400
- /** @type {?} */
37401
- var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
37402
- ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
37403
- ((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
37404
- undo: true,
37405
- });
37406
- _this.closeDialog();
37407
- }));
37408
- ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
37409
- };
37410
- /**
37411
- * @return {?}
37412
- */
37413
- RichtexteditorComponent.prototype.closeDialog = /**
37414
- * @return {?}
37415
- */
37416
- function () {
37417
- this.AIdialog.hide();
37418
- this.rightRte.value = "";
37419
- this.leftRte.value = "";
37420
- this.promptQuery = "";
37421
- this.chipValue = "Standard";
37422
- this.AIResult = "";
37423
- this.dropValIndex = 0;
37424
- this.selectedQuery = "Rephrase";
37425
- this.sentimentButton.content = "😊 Neutral";
37426
- };
37427
- /**
37428
- * @param {?} text
37429
- * @return {?}
37430
- */
37431
- RichtexteditorComponent.prototype.copyTextToClipboard = /**
37432
- * @param {?} text
37433
- * @return {?}
37434
- */
37435
- function (text) {
37436
- if (navigator.clipboard) {
37437
- navigator.clipboard
37438
- .writeText(text)
37439
- .then((/**
37440
- * @return {?}
37441
- */
37442
- function () {
37443
- console.log("Text copied to clipboard successfully!");
37444
- }))
37445
- .catch((/**
37446
- * @param {?} err
37447
- * @return {?}
37448
- */
37449
- function (err) {
37450
- console.error("Failed to copy text: ", err);
37451
- }));
37452
- }
37453
- else {
37454
- // Fallback for browsers that do not support the Clipboard API
37455
- /** @type {?} */
37456
- var textarea = document.createElement("textarea");
37457
- textarea.value = text;
37458
- document.body.appendChild(textarea);
37459
- textarea.select();
37460
- try {
37461
- document.execCommand("copy");
37462
- console.log("Text copied to clipboard using execCommand");
37463
- }
37464
- catch (err) {
37465
- console.error("Failed to copy text: ", err);
37466
- }
37467
- finally {
37468
- document.body.removeChild(textarea);
37469
- }
37470
- }
37471
- };
37472
- /**
37473
- * @return {?}
37474
- */
37475
- RichtexteditorComponent.prototype.onOverlayClick = /**
37476
- * @return {?}
37477
- */
37478
- function () {
37479
- /** @type {?} */
37480
- var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
37481
- if (activeEle) {
37482
- activeEle.classList.remove("e-active");
37483
- }
37484
- this.closeDialog();
38867
+ this.actionBegin.emit(args);
37485
38868
  };
37486
38869
  /**
37487
38870
  * @param {?} args
37488
38871
  * @return {?}
37489
38872
  */
37490
- RichtexteditorComponent.prototype.onQuerySelect = /**
38873
+ RichtexteditorComponent.prototype._input = /**
37491
38874
  * @param {?} args
37492
38875
  * @return {?}
37493
38876
  */
37494
38877
  function (args) {
37495
- // this.chipList.selectedChips = 0;
37496
- this.translatelanguage = "EN";
37497
- this.selectedQuery = args.itemData.text;
37498
- this.updateAISugesstionsData(args.itemData.text);
38878
+ this.input.emit(args);
37499
38879
  };
37500
38880
  /**
37501
38881
  * @param {?} args
37502
38882
  * @return {?}
37503
38883
  */
37504
- RichtexteditorComponent.prototype.onLanguageSelect = /**
38884
+ RichtexteditorComponent.prototype._actionComplete = /**
37505
38885
  * @param {?} args
37506
38886
  * @return {?}
37507
38887
  */
37508
38888
  function (args) {
37509
- this.translatelanguage = args.itemData.id;
37510
- this.updateAISugesstionsData("Translate");
38889
+ if (args.requestType == "UL") {
38890
+ if (args.elements[0].parentElement.style.listStyleType == "dash") {
38891
+ args.elements[0].parentElement.style.listStyleImage =
38892
+ "url('../../../assets/img/bullet-dash.svg')";
38893
+ args.elements[0].parentElement.style.listStyleType = "none";
38894
+ }
38895
+ }
38896
+ else if (args.requestType == "OL") {
38897
+ args.elements[0].parentElement.classList.remove("custom-list", "parentheses");
38898
+ if (args.elements[0].parentElement.style.listStyleType == "parentheses") {
38899
+ args.elements[0].parentElement.classList = "custom-list";
38900
+ args.elements[0].parentElement.classList.add("parentheses");
38901
+ }
38902
+ }
38903
+ this.actionComplete.emit(args);
37511
38904
  };
37512
38905
  /**
37513
38906
  * @param {?} args
37514
38907
  * @return {?}
37515
38908
  */
37516
- RichtexteditorComponent.prototype.onChipClick = /**
38909
+ RichtexteditorComponent.prototype._focus = /**
37517
38910
  * @param {?} args
37518
38911
  * @return {?}
37519
38912
  */
37520
38913
  function (args) {
37521
- this.chipValue = args.itemData.text;
37522
- // 事件会触发两次 必须判断args.text是否有值
37523
- if (args.itemData.text)
37524
- this.updateAISugesstionsData("Rephrase");
38914
+ this.focus.emit(args);
37525
38915
  };
37526
38916
  /**
37527
38917
  * @param {?} args
37528
38918
  * @return {?}
37529
38919
  */
37530
- RichtexteditorComponent.prototype._toolbarClick = /**
38920
+ RichtexteditorComponent.prototype._blur = /**
37531
38921
  * @param {?} args
37532
38922
  * @return {?}
37533
38923
  */
37534
38924
  function (args) {
37535
- this.toolbarClick.emit(args);
37536
- };
37537
- /**
37538
- * @return {?}
37539
- */
37540
- RichtexteditorComponent.prototype.hideToast = /**
37541
- * @return {?}
37542
- */
37543
- function () {
37544
- this.showMsg = false;
37545
- };
37546
- /**
37547
- * @return {?}
37548
- */
37549
- RichtexteditorComponent.prototype.onZoom = /**
37550
- * @return {?}
37551
- */
37552
- function () {
37553
- if (this.size === "largest") {
37554
- this.size = ""; // 恢复到原始大小
37555
- }
37556
- else {
37557
- this.size = "largest"; // 设置为最大化
37558
- }
38925
+ this.blur.emit(args);
37559
38926
  };
37560
38927
  RichtexteditorComponent.decorators = [
37561
38928
  { type: core.Component, args: [{
37562
38929
  selector: "rs-richtext-editor",
37563
- 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",
38930
+ 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",
37564
38931
  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}"]
37565
38932
  }] }
37566
38933
  ];
37567
- /** @nocollapse */
37568
- RichtexteditorComponent.ctorParameters = function () { return [
37569
- { type: core.ChangeDetectorRef }
37570
- ]; };
37571
38934
  RichtexteditorComponent.propDecorators = {
37572
- rteObj: [{ type: core.ViewChild, args: ["editor", { static: false },] }],
37573
- queryCategory: [{ type: core.ViewChild, args: ["queryCategory", { static: false },] }],
37574
- leftRte: [{ type: core.ViewChild, args: ["leftRte", { static: false },] }],
37575
- rightRte: [{ type: core.ViewChild, args: ["rightRte", { static: false },] }],
37576
- AIdialog: [{ type: core.ViewChild, args: ["AIdialog", { static: true },] }],
37577
- sentimentButton: [{ type: core.ViewChild, args: ["sentimentButton", { static: false },] }],
37578
- regenerateButton: [{ type: core.ViewChild, args: ["regenerateButton", { static: false },] }],
37579
- copyButton: [{ type: core.ViewChild, args: ["copyButton", { static: false },] }],
37580
- replaceButton: [{ type: core.ViewChild, args: ["replaceButton", { static: false },] }],
37581
- placeholder: [{ type: core.Input }],
37582
38935
  value: [{ type: core.Input }],
38936
+ editorId: [{ type: core.Input }],
37583
38937
  height: [{ type: core.Input }],
37584
38938
  autoSaveOnIdle: [{ type: core.Input }],
37585
- target: [{ type: core.Input }],
38939
+ disabled: [{ type: core.Input }],
38940
+ insertImageSettings: [{ type: core.Input }],
37586
38941
  toolbarClick: [{ type: core.Output }],
37587
- change: [{ type: core.Output }]
38942
+ change: [{ type: core.Output }],
38943
+ created: [{ type: core.Output }],
38944
+ actionBegin: [{ type: core.Output }],
38945
+ input: [{ type: core.Output }],
38946
+ focus: [{ type: core.Output }],
38947
+ blur: [{ type: core.Output }],
38948
+ actionComplete: [{ type: core.Output }]
37588
38949
  };
37589
38950
  return RichtexteditorComponent;
37590
38951
  }());
37591
38952
  if (false) {
37592
- /** @type {?} */
37593
- RichtexteditorComponent.prototype.rteObj;
37594
- /** @type {?} */
37595
- RichtexteditorComponent.prototype.queryCategory;
37596
- /** @type {?} */
37597
- RichtexteditorComponent.prototype.leftRte;
37598
- /** @type {?} */
37599
- RichtexteditorComponent.prototype.rightRte;
37600
- /** @type {?} */
37601
- RichtexteditorComponent.prototype.AIdialog;
37602
- /** @type {?} */
37603
- RichtexteditorComponent.prototype.sentimentButton;
37604
- /** @type {?} */
37605
- RichtexteditorComponent.prototype.regenerateButton;
37606
- /** @type {?} */
37607
- RichtexteditorComponent.prototype.copyButton;
37608
- /** @type {?} */
37609
- RichtexteditorComponent.prototype.replaceButton;
37610
- /** @type {?} */
37611
- RichtexteditorComponent.prototype.placeholder;
37612
38953
  /** @type {?} */
37613
38954
  RichtexteditorComponent.prototype.value;
37614
38955
  /** @type {?} */
38956
+ RichtexteditorComponent.prototype.editorId;
38957
+ /** @type {?} */
37615
38958
  RichtexteditorComponent.prototype.height;
37616
38959
  /** @type {?} */
37617
38960
  RichtexteditorComponent.prototype.autoSaveOnIdle;
37618
38961
  /** @type {?} */
37619
- RichtexteditorComponent.prototype.target;
37620
- /** @type {?} */
37621
- RichtexteditorComponent.prototype.toolbarClick;
37622
- /** @type {?} */
37623
- RichtexteditorComponent.prototype.change;
37624
- /** @type {?} */
37625
- RichtexteditorComponent.prototype.family;
37626
- /** @type {?} */
37627
- RichtexteditorComponent.prototype.dialogWidth;
37628
- /** @type {?} */
37629
- RichtexteditorComponent.prototype.dialogHeight;
37630
- /** @type {?} */
37631
- RichtexteditorComponent.prototype.showZoomBtn;
37632
- /** @type {?} */
37633
- RichtexteditorComponent.prototype.showMsg;
38962
+ RichtexteditorComponent.prototype.disabled;
37634
38963
  /** @type {?} */
37635
38964
  RichtexteditorComponent.prototype.insertImageSettings;
37636
38965
  /** @type {?} */
37637
- RichtexteditorComponent.prototype.editorManager;
37638
- /** @type {?} */
37639
- RichtexteditorComponent.prototype.size;
37640
- /** @type {?} */
37641
- RichtexteditorComponent.prototype.selectedQuery;
37642
- /** @type {?} */
37643
- RichtexteditorComponent.prototype.dropValIndex;
37644
- /** @type {?} */
37645
- RichtexteditorComponent.prototype.queryList;
38966
+ RichtexteditorComponent.prototype.toolbarClick;
37646
38967
  /** @type {?} */
37647
- RichtexteditorComponent.prototype.rephraseTyleList;
38968
+ RichtexteditorComponent.prototype.change;
37648
38969
  /** @type {?} */
37649
- RichtexteditorComponent.prototype.languageList;
38970
+ RichtexteditorComponent.prototype.created;
37650
38971
  /** @type {?} */
37651
- RichtexteditorComponent.prototype.promptQuery;
38972
+ RichtexteditorComponent.prototype.actionBegin;
37652
38973
  /** @type {?} */
37653
- RichtexteditorComponent.prototype.isSentimentCheck;
38974
+ RichtexteditorComponent.prototype.input;
37654
38975
  /** @type {?} */
37655
- RichtexteditorComponent.prototype.subQuery;
38976
+ RichtexteditorComponent.prototype.focus;
37656
38977
  /** @type {?} */
37657
- RichtexteditorComponent.prototype.translatelanguage;
38978
+ RichtexteditorComponent.prototype.blur;
37658
38979
  /** @type {?} */
37659
- RichtexteditorComponent.prototype.chipValue;
38980
+ RichtexteditorComponent.prototype.actionComplete;
37660
38981
  /** @type {?} */
37661
- RichtexteditorComponent.prototype.apiResultData;
38982
+ RichtexteditorComponent.prototype.family;
37662
38983
  /** @type {?} */
37663
- RichtexteditorComponent.prototype.AIResult;
38984
+ RichtexteditorComponent.prototype.fontSize;
37664
38985
  /** @type {?} */
37665
38986
  RichtexteditorComponent.prototype.tools;
37666
38987
  /**
38988
+ * 表格快捷工具栏:含 TableCell(合并/拆分单元格)
37667
38989
  * @type {?}
37668
- * @private
37669
38990
  */
37670
- RichtexteditorComponent.prototype.ref;
38991
+ RichtexteditorComponent.prototype.quickToolbarSettings;
38992
+ /** @type {?} */
38993
+ RichtexteditorComponent.prototype.bulletFormatList;
38994
+ /** @type {?} */
38995
+ RichtexteditorComponent.prototype.numberFormatList;
37671
38996
  }
37672
38997
 
37673
38998
  /**
@@ -54005,6 +55330,7 @@
54005
55330
  CommonGridComponent,
54006
55331
  GridActionComponent,
54007
55332
  GridActionItemComponent,
55333
+ DateTreeFilterPopoverComponent,
54008
55334
  FloatBoxComponent,
54009
55335
  RsPageListComponent,
54010
55336
  RsPageTabComponent,
@@ -54191,6 +55517,7 @@
54191
55517
  CommonGridComponent,
54192
55518
  GridActionComponent,
54193
55519
  GridActionItemComponent,
55520
+ DateTreeFilterPopoverComponent,
54194
55521
  FloatBoxComponent,
54195
55522
  RsPageListComponent,
54196
55523
  RsPageTabComponent,
@@ -54250,6 +55577,9 @@
54250
55577
  exports.CommonDialogComponent = CommonDialogComponent;
54251
55578
  exports.CommonFunctionService = CommonFunctionService;
54252
55579
  exports.CommonGridComponent = CommonGridComponent;
55580
+ exports.DATE_TREE_DEFAULT_DATE_FORMATS = DATE_TREE_DEFAULT_DATE_FORMATS;
55581
+ exports.DateTreeFilterHelper = DateTreeFilterHelper;
55582
+ exports.DateTreeFilterPopoverComponent = DateTreeFilterPopoverComponent;
54253
55583
  exports.DefaultDrawerConfig = DefaultDrawerConfig;
54254
55584
  exports.DialogService = DialogService;
54255
55585
  exports.DrawerComponent = DrawerComponent;
@@ -54288,6 +55618,7 @@
54288
55618
  exports.ToolbarItemComponent = ToolbarItemComponent;
54289
55619
  exports.TranslationService = TranslationService;
54290
55620
  exports.TruncatedTextToggleComponent = TruncatedTextToggleComponent;
55621
+ exports.createRsCommonGridDateTreeHelper = createRsCommonGridDateTreeHelper;
54291
55622
  exports.filterShowSection = filterShowSection;
54292
55623
  exports.ɵa = Debounce;
54293
55624
  exports.ɵb = DashboardService;