cps-ui-kit 0.140.0 → 0.141.0
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.
- package/esm2020/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +137 -4
- package/esm2020/lib/components/cps-button/cps-button.component.mjs +55 -2
- package/esm2020/lib/components/cps-button-toggle/cps-button-toggle.component.mjs +63 -2
- package/esm2020/lib/components/cps-checkbox/cps-checkbox.component.mjs +50 -1
- package/esm2020/lib/components/cps-chip/cps-chip.component.mjs +34 -1
- package/esm2020/lib/components/cps-datepicker/cps-datepicker.component.mjs +78 -1
- package/esm2020/lib/components/cps-expansion-panel/cps-expansion-panel.component.mjs +51 -1
- package/esm2020/lib/components/cps-icon/cps-icon.component.mjs +17 -1
- package/esm2020/lib/components/cps-info-circle/cps-info-circle.component.mjs +29 -1
- package/esm2020/lib/components/cps-input/cps-input.component.mjs +131 -1
- package/esm2020/lib/components/cps-loader/cps-loader.component.mjs +21 -1
- package/esm2020/lib/components/cps-menu/cps-menu.component.mjs +58 -2
- package/esm2020/lib/components/cps-paginator/cps-paginator.component.mjs +38 -1
- package/esm2020/lib/components/cps-paginator/pipes/cps-paginate.pipe.mjs +5 -1
- package/esm2020/lib/components/cps-progress-circular/cps-progress-circular.component.mjs +17 -1
- package/esm2020/lib/components/cps-progress-linear/cps-progress-linear.component.mjs +29 -1
- package/esm2020/lib/components/cps-radio-group/cps-radio/cps-radio.component.mjs +5 -1
- package/esm2020/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.mjs +18 -1
- package/esm2020/lib/components/cps-radio-group/cps-radio-group.component.mjs +50 -1
- package/esm2020/lib/components/cps-select/cps-select.component.mjs +137 -4
- package/esm2020/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.mjs +21 -1
- package/esm2020/lib/components/cps-tab-group/cps-tab/cps-tab.component.mjs +41 -1
- package/esm2020/lib/components/cps-tab-group/cps-tab-group.component.mjs +32 -2
- package/esm2020/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.mjs +67 -3
- package/esm2020/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.mjs +31 -3
- package/esm2020/lib/components/cps-table/components/internal/table-row-menu/table-row-menu.component.mjs +51 -0
- package/esm2020/lib/components/cps-table/cps-table.component.mjs +312 -8
- package/esm2020/lib/components/cps-table/directives/cps-table-column-filter.directive.mjs +67 -3
- package/esm2020/lib/components/cps-table/directives/cps-table-column-sortable.directive.mjs +9 -1
- package/esm2020/lib/components/cps-table/directives/cps-table-header-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-table/directives/cps-table-row-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-tag/cps-tag.component.mjs +35 -2
- package/esm2020/lib/components/cps-textarea/cps-textarea.component.mjs +101 -1
- package/esm2020/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.mjs +17 -1
- package/esm2020/lib/components/cps-tree-select/cps-tree-select.component.mjs +13 -1
- package/esm2020/lib/components/cps-tree-table/cps-tree-table.component.mjs +314 -7
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-column-filter.directive.mjs +63 -3
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-column-sortable.directive.mjs +9 -1
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-header-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-row-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.mjs +5 -1
- package/esm2020/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.mjs +118 -1
- package/esm2020/lib/directives/cps-tooltip.directive.mjs +37 -1
- package/esm2020/lib/services/cps-dialog/cps-dialog.service.mjs +2 -2
- package/fesm2015/cps-ui-kit.mjs +2312 -37
- package/fesm2015/cps-ui-kit.mjs.map +1 -1
- package/fesm2020/cps-ui-kit.mjs +2312 -37
- package/fesm2020/cps-ui-kit.mjs.map +1 -1
- package/lib/components/cps-autocomplete/cps-autocomplete.component.d.ts +133 -0
- package/lib/components/cps-button/cps-button.component.d.ts +53 -0
- package/lib/components/cps-button-toggle/cps-button-toggle.component.d.ts +61 -0
- package/lib/components/cps-checkbox/cps-checkbox.component.d.ts +49 -0
- package/lib/components/cps-chip/cps-chip.component.d.ts +33 -0
- package/lib/components/cps-datepicker/cps-datepicker.component.d.ts +85 -0
- package/lib/components/cps-expansion-panel/cps-expansion-panel.component.d.ts +50 -0
- package/lib/components/cps-icon/cps-icon.component.d.ts +16 -0
- package/lib/components/cps-info-circle/cps-info-circle.component.d.ts +28 -0
- package/lib/components/cps-input/cps-input.component.d.ts +130 -0
- package/lib/components/cps-loader/cps-loader.component.d.ts +20 -0
- package/lib/components/cps-menu/cps-menu.component.d.ts +56 -0
- package/lib/components/cps-paginator/cps-paginator.component.d.ts +37 -0
- package/lib/components/cps-paginator/pipes/cps-paginate.pipe.d.ts +4 -0
- package/lib/components/cps-progress-circular/cps-progress-circular.component.d.ts +16 -0
- package/lib/components/cps-progress-linear/cps-progress-linear.component.d.ts +28 -0
- package/lib/components/cps-radio-group/cps-radio/cps-radio.component.d.ts +8 -0
- package/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.d.ts +21 -0
- package/lib/components/cps-radio-group/cps-radio-group.component.d.ts +49 -0
- package/lib/components/cps-select/cps-select.component.d.ts +133 -0
- package/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.d.ts +21 -1
- package/lib/components/cps-tab-group/cps-tab/cps-tab.component.d.ts +40 -0
- package/lib/components/cps-tab-group/cps-tab-group.component.d.ts +30 -0
- package/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.d.ts +68 -0
- package/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.d.ts +36 -0
- package/lib/components/cps-table/{table-row-menu → components/internal/table-row-menu}/table-row-menu.component.d.ts +15 -1
- package/lib/components/cps-table/cps-table.component.d.ts +304 -0
- package/lib/components/cps-table/directives/cps-table-column-filter.directive.d.ts +68 -0
- package/lib/components/cps-table/directives/cps-table-column-sortable.directive.d.ts +8 -0
- package/lib/components/cps-table/directives/cps-table-header-selectable.directive.d.ts +4 -0
- package/lib/components/cps-table/directives/cps-table-row-selectable.directive.d.ts +8 -0
- package/lib/components/cps-tag/cps-tag.component.d.ts +33 -0
- package/lib/components/cps-textarea/cps-textarea.component.d.ts +100 -0
- package/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.d.ts +16 -0
- package/lib/components/cps-tree-select/cps-tree-select.component.d.ts +12 -0
- package/lib/components/cps-tree-table/cps-tree-table.component.d.ts +307 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-column-filter.directive.d.ts +64 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-column-sortable.directive.d.ts +8 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-header-selectable.directive.d.ts +4 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-row-selectable.directive.d.ts +8 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.d.ts +8 -0
- package/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.d.ts +117 -0
- package/lib/directives/cps-tooltip.directive.d.ts +40 -0
- package/lib/services/cps-dialog/cps-dialog.service.d.ts +1 -1
- package/package.json +1 -1
- package/esm2020/lib/components/cps-table/table-row-menu/table-row-menu.component.mjs +0 -37
package/fesm2015/cps-ui-kit.mjs
CHANGED
|
@@ -225,10 +225,26 @@ const iconNames = [
|
|
|
225
225
|
'widget-button-icon',
|
|
226
226
|
'xls'
|
|
227
227
|
];
|
|
228
|
+
/**
|
|
229
|
+
* CpsIconComponent is a component that is used for icons.
|
|
230
|
+
* @group Components
|
|
231
|
+
*/
|
|
228
232
|
class CpsIconComponent {
|
|
229
233
|
constructor() {
|
|
234
|
+
/**
|
|
235
|
+
* Name of the icon.
|
|
236
|
+
* @group Props
|
|
237
|
+
*/
|
|
230
238
|
this.icon = '';
|
|
239
|
+
/**
|
|
240
|
+
* Size of the icon, it can be of type number denoting pixels, string or 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
241
|
+
* @group Props
|
|
242
|
+
*/
|
|
231
243
|
this.size = 'small';
|
|
244
|
+
/**
|
|
245
|
+
* Color of the icon.
|
|
246
|
+
* @group Props
|
|
247
|
+
*/
|
|
232
248
|
this.color = 'currentColor';
|
|
233
249
|
this.iconColor = 'currentColor';
|
|
234
250
|
this.url = '../../../../assets/';
|
|
@@ -280,13 +296,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
280
296
|
type: Input
|
|
281
297
|
}] } });
|
|
282
298
|
|
|
299
|
+
/**
|
|
300
|
+
* CpsProgressLinearComponent is a process status indicator of a rectangular form.
|
|
301
|
+
* @group Components
|
|
302
|
+
*/
|
|
283
303
|
class CpsProgressLinearComponent {
|
|
284
304
|
constructor() {
|
|
305
|
+
/**
|
|
306
|
+
* Width of the progress bar, of type number denoting pixels or string.
|
|
307
|
+
* @group Props
|
|
308
|
+
*/
|
|
285
309
|
this.width = '100%';
|
|
310
|
+
/**
|
|
311
|
+
* Height of the progress bar, of type number denoting pixels or string.
|
|
312
|
+
* @group Props
|
|
313
|
+
*/
|
|
286
314
|
this.height = '0.5rem';
|
|
315
|
+
/**
|
|
316
|
+
* Color of the progress bar.
|
|
317
|
+
* @group Props
|
|
318
|
+
*/
|
|
287
319
|
this.color = 'calm';
|
|
320
|
+
/**
|
|
321
|
+
* Background color of the progress bar.
|
|
322
|
+
* @group Props
|
|
323
|
+
*/
|
|
288
324
|
this.bgColor = 'white';
|
|
325
|
+
/**
|
|
326
|
+
* Option to control the transparency of the progress bar, of type number or string.
|
|
327
|
+
* @group Props
|
|
328
|
+
*/
|
|
289
329
|
this.opacity = 1;
|
|
330
|
+
/**
|
|
331
|
+
* Border radius of the progress bar, of type number or string.
|
|
332
|
+
* @group Props
|
|
333
|
+
*/
|
|
290
334
|
this.radius = 0;
|
|
291
335
|
}
|
|
292
336
|
ngOnInit() {
|
|
@@ -316,17 +360,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
316
360
|
type: Input
|
|
317
361
|
}] } });
|
|
318
362
|
|
|
363
|
+
/**
|
|
364
|
+
* CpsTooltipDirective provides advisory information for a target element.
|
|
365
|
+
* @group Directives
|
|
366
|
+
*/
|
|
319
367
|
class CpsTooltipDirective {
|
|
320
368
|
// eslint-disable-next-line no-useless-constructor
|
|
321
369
|
constructor(_elementRef) {
|
|
322
370
|
this._elementRef = _elementRef;
|
|
371
|
+
/**
|
|
372
|
+
* Delay to show the tooltip in milliseconds, it can be of type string or number.
|
|
373
|
+
* @group Props
|
|
374
|
+
*/
|
|
323
375
|
this.tooltipOpenDelay = 300;
|
|
376
|
+
/**
|
|
377
|
+
* Delay to hide the tooltip in milliseconds, it can be of type string or number.
|
|
378
|
+
* @group Props
|
|
379
|
+
*/
|
|
324
380
|
this.tooltipCloseDelay = 300;
|
|
381
|
+
/**
|
|
382
|
+
* Whether the tooltip should open on hover, click or focus.
|
|
383
|
+
* @group Props
|
|
384
|
+
*/
|
|
325
385
|
this.tooltipOpenOn = 'hover';
|
|
386
|
+
/**
|
|
387
|
+
* Position of the tooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
388
|
+
* @group Props
|
|
389
|
+
*/
|
|
326
390
|
this.tooltipPosition = 'top';
|
|
391
|
+
/**
|
|
392
|
+
* Whether the tooltip is persistent.
|
|
393
|
+
* @group Props
|
|
394
|
+
*/
|
|
327
395
|
this.tooltipPersistent = false;
|
|
396
|
+
/**
|
|
397
|
+
* When present, it specifies that the tooltip should be disabled.
|
|
398
|
+
* @group Props
|
|
399
|
+
*/
|
|
328
400
|
this.tooltipDisabled = false;
|
|
401
|
+
/**
|
|
402
|
+
* Max width of the tooltip of type number denoting pixels or string.
|
|
403
|
+
* @group Props
|
|
404
|
+
*/
|
|
329
405
|
this.tooltipMaxWidth = '100%';
|
|
406
|
+
/**
|
|
407
|
+
* Tooltip content class for styling.
|
|
408
|
+
* @group Props
|
|
409
|
+
*/
|
|
330
410
|
this.tooltipContentClass = 'cps-tooltip-content';
|
|
331
411
|
this._createTooltip = () => {
|
|
332
412
|
if (this._popup)
|
|
@@ -536,13 +616,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
536
616
|
args: ['window:resize', ['$event']]
|
|
537
617
|
}] } });
|
|
538
618
|
|
|
619
|
+
/**
|
|
620
|
+
* CpsInfoCircleComponent is a component that provides information by means of the info icon with the tooltip on hover.
|
|
621
|
+
* @group Components
|
|
622
|
+
*/
|
|
539
623
|
class CpsInfoCircleComponent {
|
|
540
624
|
constructor() {
|
|
625
|
+
/**
|
|
626
|
+
* Size of the icon, it can be of type number denoting pixels, string or 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
627
|
+
* @group Props
|
|
628
|
+
*/
|
|
541
629
|
this.size = 'small';
|
|
630
|
+
/**
|
|
631
|
+
* Tooltip text to provide more info.
|
|
632
|
+
* @group Props
|
|
633
|
+
*/
|
|
542
634
|
this.tooltipText = '';
|
|
635
|
+
/**
|
|
636
|
+
* Position of the tooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
637
|
+
* @group Props
|
|
638
|
+
*/
|
|
543
639
|
this.tooltipPosition = 'top';
|
|
640
|
+
/**
|
|
641
|
+
* Info tooltip class for styling.
|
|
642
|
+
* @group Props
|
|
643
|
+
*/
|
|
544
644
|
this.tooltipContentClass = 'cps-tooltip-content';
|
|
645
|
+
/**
|
|
646
|
+
* Max width of the tooltip of type number denoting pixels or string.
|
|
647
|
+
* @group Props
|
|
648
|
+
*/
|
|
545
649
|
this.tooltipMaxWidth = '100%';
|
|
650
|
+
/**
|
|
651
|
+
* Whether the tooltip is persistent.
|
|
652
|
+
* @group Props
|
|
653
|
+
*/
|
|
546
654
|
this.tooltipPersistent = false;
|
|
547
655
|
}
|
|
548
656
|
}
|
|
@@ -565,7 +673,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
565
673
|
type: Input
|
|
566
674
|
}] } });
|
|
567
675
|
|
|
676
|
+
/**
|
|
677
|
+
* CpsInputComponent is used to enter values in a certain formats such as numeric, text or password.
|
|
678
|
+
* @group Components
|
|
679
|
+
*/
|
|
568
680
|
class CpsInputComponent {
|
|
681
|
+
/**
|
|
682
|
+
* Value of the input.
|
|
683
|
+
* @group Props
|
|
684
|
+
*/
|
|
569
685
|
set value(value) {
|
|
570
686
|
if (!value)
|
|
571
687
|
value = '';
|
|
@@ -579,34 +695,156 @@ class CpsInputComponent {
|
|
|
579
695
|
this._control = _control;
|
|
580
696
|
this.elementRef = elementRef;
|
|
581
697
|
this.cdRef = cdRef;
|
|
698
|
+
/**
|
|
699
|
+
* Label of the input element.
|
|
700
|
+
* @group Props
|
|
701
|
+
*/
|
|
582
702
|
this.label = '';
|
|
703
|
+
/**
|
|
704
|
+
* Bottom hint text for the input field.
|
|
705
|
+
* @group Props
|
|
706
|
+
*/
|
|
583
707
|
this.hint = '';
|
|
708
|
+
/**
|
|
709
|
+
* Placeholder text for the input field.
|
|
710
|
+
* @group Props
|
|
711
|
+
*/
|
|
584
712
|
this.placeholder = 'Please enter';
|
|
713
|
+
/**
|
|
714
|
+
* Whether input is disabled.
|
|
715
|
+
* @group Props
|
|
716
|
+
*/
|
|
585
717
|
this.disabled = false;
|
|
718
|
+
/**
|
|
719
|
+
* Whether input is readonly.
|
|
720
|
+
* @group Props
|
|
721
|
+
*/
|
|
586
722
|
this.readonly = false;
|
|
723
|
+
/**
|
|
724
|
+
* Width of the input field, of type number denoting pixels or string.
|
|
725
|
+
* @group Props
|
|
726
|
+
*/
|
|
587
727
|
this.width = '100%';
|
|
728
|
+
/**
|
|
729
|
+
* Type of the input of type 'text', 'number' or 'password'.
|
|
730
|
+
* @group Props
|
|
731
|
+
*/
|
|
588
732
|
this.type = 'text';
|
|
733
|
+
/**
|
|
734
|
+
* When enabled, a loading bar is displayed.
|
|
735
|
+
* @group Props
|
|
736
|
+
*/
|
|
589
737
|
this.loading = false;
|
|
738
|
+
/**
|
|
739
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
740
|
+
* @group Props
|
|
741
|
+
*/
|
|
590
742
|
this.clearable = false;
|
|
743
|
+
/**
|
|
744
|
+
* Icon before input value.
|
|
745
|
+
* @group Props
|
|
746
|
+
*/
|
|
591
747
|
this.prefixIcon = '';
|
|
748
|
+
/**
|
|
749
|
+
* When enabled, prefixIcon is clickable.
|
|
750
|
+
* @group Props
|
|
751
|
+
*/
|
|
592
752
|
this.prefixIconClickable = false;
|
|
753
|
+
/**
|
|
754
|
+
* Size of icon before input value, of type number or string or it can be a value 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
755
|
+
* @group Props
|
|
756
|
+
*/
|
|
593
757
|
this.prefixIconSize = '18px';
|
|
758
|
+
/**
|
|
759
|
+
* Text before input value.
|
|
760
|
+
* @group Props
|
|
761
|
+
*/
|
|
594
762
|
this.prefixText = '';
|
|
763
|
+
/**
|
|
764
|
+
* Hides hint and validation errors.
|
|
765
|
+
* @group Props
|
|
766
|
+
*/
|
|
595
767
|
this.hideDetails = false;
|
|
768
|
+
/**
|
|
769
|
+
* Whether the component should have persistent clear icon.
|
|
770
|
+
* @group Props
|
|
771
|
+
*/
|
|
596
772
|
this.persistentClear = false;
|
|
773
|
+
/**
|
|
774
|
+
* Error message.
|
|
775
|
+
* @group Props
|
|
776
|
+
*/
|
|
597
777
|
this.error = '';
|
|
778
|
+
/**
|
|
779
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
780
|
+
* @group Props
|
|
781
|
+
*/
|
|
598
782
|
this.infoTooltip = '';
|
|
783
|
+
/**
|
|
784
|
+
* InfoTooltip class for styling.
|
|
785
|
+
* @group Props
|
|
786
|
+
*/
|
|
599
787
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
788
|
+
/**
|
|
789
|
+
* Max width of infoTooltip, of type number denoting pixels or string.
|
|
790
|
+
* @group Props
|
|
791
|
+
*/
|
|
600
792
|
this.infoTooltipMaxWidth = '100%';
|
|
793
|
+
/**
|
|
794
|
+
* Whether the infoTooltip is persistent.
|
|
795
|
+
* @group Props
|
|
796
|
+
*/
|
|
601
797
|
this.infoTooltipPersistent = false;
|
|
798
|
+
/**
|
|
799
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
800
|
+
* @group Props
|
|
801
|
+
*/
|
|
602
802
|
this.infoTooltipPosition = 'top';
|
|
803
|
+
/**
|
|
804
|
+
* Styling appearance of input field, it can be "outlined" or "underlined" or "borderless".
|
|
805
|
+
* @group Props
|
|
806
|
+
*/
|
|
603
807
|
this.appearance = 'outlined';
|
|
808
|
+
/**
|
|
809
|
+
* Readonly value to display inside of input field.
|
|
810
|
+
* @group Props
|
|
811
|
+
*/
|
|
604
812
|
this.valueToDisplay = '';
|
|
813
|
+
/**
|
|
814
|
+
* Callback to invoke on value change.
|
|
815
|
+
* @param {string} string - value changed.
|
|
816
|
+
* @group Emits
|
|
817
|
+
*/
|
|
605
818
|
this.valueChanged = new EventEmitter();
|
|
819
|
+
/**
|
|
820
|
+
* Callback to invoke when the component receives focus.
|
|
821
|
+
* @param {any}
|
|
822
|
+
* @group Emits
|
|
823
|
+
*/
|
|
606
824
|
this.focused = new EventEmitter();
|
|
825
|
+
/**
|
|
826
|
+
* Callback to invoke when the prefix icon is clicked.
|
|
827
|
+
* @param {any}
|
|
828
|
+
* @group Emits
|
|
829
|
+
*/
|
|
607
830
|
this.prefixIconClicked = new EventEmitter();
|
|
831
|
+
/**
|
|
832
|
+
* Callback to invoke when the component loses focus.
|
|
833
|
+
* @param {any}
|
|
834
|
+
* @group Emits
|
|
835
|
+
*/
|
|
608
836
|
this.blurred = new EventEmitter();
|
|
837
|
+
/**
|
|
838
|
+
* Callback to invoke when x icon is clicked.
|
|
839
|
+
* @param {any}
|
|
840
|
+
* @group Emits
|
|
841
|
+
*/
|
|
609
842
|
this.cleared = new EventEmitter();
|
|
843
|
+
/**
|
|
844
|
+
* Callback to invoke when enter is clicked.
|
|
845
|
+
* @param {any}
|
|
846
|
+
* @group Emits
|
|
847
|
+
*/
|
|
610
848
|
this.enterClicked = new EventEmitter();
|
|
611
849
|
this.currentType = '';
|
|
612
850
|
this.prefixWidth = '';
|
|
@@ -821,14 +1059,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
821
1059
|
args: ['prefixTextSpan']
|
|
822
1060
|
}] } });
|
|
823
1061
|
|
|
1062
|
+
/**
|
|
1063
|
+
* CpsChipComponent represents a chip element.
|
|
1064
|
+
* @group Components
|
|
1065
|
+
*/
|
|
824
1066
|
class CpsChipComponent {
|
|
825
1067
|
constructor() {
|
|
1068
|
+
/**
|
|
1069
|
+
* Label of the chip element.
|
|
1070
|
+
* @group Props
|
|
1071
|
+
*/
|
|
826
1072
|
this.label = '';
|
|
1073
|
+
/**
|
|
1074
|
+
* Name of the icon.
|
|
1075
|
+
* @group Props
|
|
1076
|
+
*/
|
|
827
1077
|
this.icon = '';
|
|
1078
|
+
/**
|
|
1079
|
+
* Color of the icon.
|
|
1080
|
+
* @group Props
|
|
1081
|
+
*/
|
|
828
1082
|
this.iconColor = 'text-darkest';
|
|
1083
|
+
/**
|
|
1084
|
+
* Position of the icon, it can be 'before' or 'after'. Defaults to 'before'.
|
|
1085
|
+
* @group Props
|
|
1086
|
+
*/
|
|
829
1087
|
this.iconPosition = 'before';
|
|
1088
|
+
/**
|
|
1089
|
+
* Option for closing a chip element.
|
|
1090
|
+
* @group Props
|
|
1091
|
+
*/
|
|
830
1092
|
this.closable = false;
|
|
1093
|
+
/**
|
|
1094
|
+
* Whether chip is disabled.
|
|
1095
|
+
* @group Props
|
|
1096
|
+
*/
|
|
831
1097
|
this.disabled = false;
|
|
1098
|
+
/**
|
|
1099
|
+
* Callback to invoke on chip close.
|
|
1100
|
+
* @param {string} string - Chip closed.
|
|
1101
|
+
* @group Emits
|
|
1102
|
+
*/
|
|
832
1103
|
this.closed = new EventEmitter();
|
|
833
1104
|
this.classesList = ['cps-chip'];
|
|
834
1105
|
}
|
|
@@ -933,6 +1204,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
933
1204
|
args: [{ standalone: true, name: 'checkOptionSelected' }]
|
|
934
1205
|
}] });
|
|
935
1206
|
|
|
1207
|
+
/**
|
|
1208
|
+
* CpsMenuComponent is a popup element, that contains menu items or arbitrary content.
|
|
1209
|
+
* @group Components
|
|
1210
|
+
*/
|
|
936
1211
|
class CpsMenuComponent {
|
|
937
1212
|
// eslint-disable-next-line no-useless-constructor
|
|
938
1213
|
constructor(document, platformId, el, renderer, cd, zone, config, overlayService) {
|
|
@@ -944,18 +1219,70 @@ class CpsMenuComponent {
|
|
|
944
1219
|
this.zone = zone;
|
|
945
1220
|
this.config = config;
|
|
946
1221
|
this.overlayService = overlayService;
|
|
1222
|
+
/**
|
|
1223
|
+
* Header title of the menu.
|
|
1224
|
+
* @group Props
|
|
1225
|
+
*/
|
|
947
1226
|
this.header = '';
|
|
1227
|
+
/**
|
|
1228
|
+
* An array of menu items.
|
|
1229
|
+
* @group Props
|
|
1230
|
+
*/
|
|
948
1231
|
this.items = [];
|
|
1232
|
+
/**
|
|
1233
|
+
* Whether to include top pointing arrow on the menu.
|
|
1234
|
+
* @group Props
|
|
1235
|
+
*/
|
|
949
1236
|
this.withArrow = true;
|
|
950
|
-
|
|
1237
|
+
/**
|
|
1238
|
+
* Menu with prepared-colored items, without header and items description.
|
|
1239
|
+
* @group Props
|
|
1240
|
+
*/
|
|
1241
|
+
this.compressed = false;
|
|
1242
|
+
/**
|
|
1243
|
+
* Whether the menu should show on target element focus.
|
|
1244
|
+
* @group Props
|
|
1245
|
+
*/
|
|
951
1246
|
this.focusOnShow = true;
|
|
1247
|
+
/**
|
|
1248
|
+
* Whether the menu should be persistent.
|
|
1249
|
+
* @group Props
|
|
1250
|
+
*/
|
|
952
1251
|
this.persistent = false;
|
|
1252
|
+
/**
|
|
1253
|
+
* Styling class of the menu container.
|
|
1254
|
+
* @group Props
|
|
1255
|
+
*/
|
|
953
1256
|
this.containerClass = '';
|
|
1257
|
+
/**
|
|
1258
|
+
* Transition options of the show animation.
|
|
1259
|
+
* @group Props
|
|
1260
|
+
*/
|
|
954
1261
|
this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
1262
|
+
/**
|
|
1263
|
+
* Transition options of the hide animation.
|
|
1264
|
+
* @group Props
|
|
1265
|
+
*/
|
|
955
1266
|
this.hideTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
1267
|
+
/**
|
|
1268
|
+
* Callback to invoke when menu is shown.
|
|
1269
|
+
* @group Emits
|
|
1270
|
+
*/
|
|
956
1271
|
this.menuShown = new EventEmitter();
|
|
1272
|
+
/**
|
|
1273
|
+
* Callback to invoke when menu is hidden.
|
|
1274
|
+
* @group Emits
|
|
1275
|
+
*/
|
|
957
1276
|
this.menuHidden = new EventEmitter();
|
|
1277
|
+
/**
|
|
1278
|
+
* Callback to invoke before menu is hidden.
|
|
1279
|
+
* @group Emits
|
|
1280
|
+
*/
|
|
958
1281
|
this.beforeMenuHidden = new EventEmitter();
|
|
1282
|
+
/**
|
|
1283
|
+
* Callback to invoke when content is clicked.
|
|
1284
|
+
* @group Emits
|
|
1285
|
+
*/
|
|
959
1286
|
this.contentClicked = new EventEmitter();
|
|
960
1287
|
this.withIcons = true;
|
|
961
1288
|
this.autoZIndex = true;
|
|
@@ -1410,6 +1737,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1410
1737
|
type: Output
|
|
1411
1738
|
}] } });
|
|
1412
1739
|
|
|
1740
|
+
/**
|
|
1741
|
+
* CpsSelectComponent is used to select items from a collection.
|
|
1742
|
+
* @group Components
|
|
1743
|
+
*/
|
|
1413
1744
|
class CpsSelectComponent {
|
|
1414
1745
|
set value(value) {
|
|
1415
1746
|
this._value = value;
|
|
@@ -1420,37 +1751,166 @@ class CpsSelectComponent {
|
|
|
1420
1751
|
}
|
|
1421
1752
|
constructor(_control) {
|
|
1422
1753
|
this._control = _control;
|
|
1754
|
+
/**
|
|
1755
|
+
* The label of the select component.
|
|
1756
|
+
* @group Props
|
|
1757
|
+
*/
|
|
1423
1758
|
this.label = '';
|
|
1759
|
+
/**
|
|
1760
|
+
* Placeholder text for the select component.
|
|
1761
|
+
* @group Props
|
|
1762
|
+
*/
|
|
1424
1763
|
this.placeholder = 'Please select';
|
|
1764
|
+
/**
|
|
1765
|
+
* Bottom hint text for the select component.
|
|
1766
|
+
* @group Props
|
|
1767
|
+
*/
|
|
1425
1768
|
this.hint = '';
|
|
1426
|
-
|
|
1769
|
+
/**
|
|
1770
|
+
* Returns the object directly rather than the value specified with optionValue.
|
|
1771
|
+
* @group Props
|
|
1772
|
+
*/
|
|
1773
|
+
this.returnObject = true;
|
|
1774
|
+
/**
|
|
1775
|
+
* Specifies if multiple values can be selected.
|
|
1776
|
+
* @group Props
|
|
1777
|
+
*/
|
|
1427
1778
|
this.multiple = false;
|
|
1779
|
+
/**
|
|
1780
|
+
* Specifies whether the component is disabled.
|
|
1781
|
+
* @group Props
|
|
1782
|
+
*/
|
|
1428
1783
|
this.disabled = false;
|
|
1784
|
+
/**
|
|
1785
|
+
* Width of the select component, of type number denoting pixels or string.
|
|
1786
|
+
* @group Props
|
|
1787
|
+
*/
|
|
1429
1788
|
this.width = '100%';
|
|
1430
|
-
|
|
1431
|
-
|
|
1789
|
+
/**
|
|
1790
|
+
* Option for selecting all elements. Doesn't work with virtual scroll.
|
|
1791
|
+
* @group Props
|
|
1792
|
+
*/
|
|
1793
|
+
this.selectAll = true;
|
|
1794
|
+
/**
|
|
1795
|
+
* When selecting elements, they will appear in a form of a chip.
|
|
1796
|
+
* @group Props
|
|
1797
|
+
*/
|
|
1798
|
+
this.chips = true;
|
|
1799
|
+
/**
|
|
1800
|
+
* Whether the chips can be directly removed.
|
|
1801
|
+
* @group Props
|
|
1802
|
+
*/
|
|
1432
1803
|
this.closableChips = true;
|
|
1804
|
+
/**
|
|
1805
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
1806
|
+
* @group Props
|
|
1807
|
+
*/
|
|
1433
1808
|
this.clearable = false;
|
|
1809
|
+
/**
|
|
1810
|
+
* Whether the dropdown list should open on clear.
|
|
1811
|
+
* @group Props
|
|
1812
|
+
*/
|
|
1434
1813
|
this.openOnClear = true;
|
|
1814
|
+
/**
|
|
1815
|
+
* An array of options.
|
|
1816
|
+
* @group Props
|
|
1817
|
+
*/
|
|
1435
1818
|
this.options = [];
|
|
1819
|
+
/**
|
|
1820
|
+
* Name of the label field of an option.
|
|
1821
|
+
* @group Props
|
|
1822
|
+
*/
|
|
1436
1823
|
this.optionLabel = 'label';
|
|
1437
|
-
|
|
1824
|
+
/**
|
|
1825
|
+
* Name of the value field of an option. Needed only if returnObject prop is false.
|
|
1826
|
+
* @group Props
|
|
1827
|
+
*/
|
|
1828
|
+
this.optionValue = 'value';
|
|
1829
|
+
/**
|
|
1830
|
+
* Name of the info field of an option, shows the additional information text.
|
|
1831
|
+
* @group Props
|
|
1832
|
+
*/
|
|
1438
1833
|
this.optionInfo = 'info';
|
|
1834
|
+
/**
|
|
1835
|
+
* Hides hint and validation errors.
|
|
1836
|
+
* @group Props
|
|
1837
|
+
*/
|
|
1439
1838
|
this.hideDetails = false;
|
|
1839
|
+
/**
|
|
1840
|
+
* Whether the component should have persistent clear icon.
|
|
1841
|
+
* @group Props
|
|
1842
|
+
*/
|
|
1440
1843
|
this.persistentClear = false;
|
|
1844
|
+
/**
|
|
1845
|
+
* Icon before input value.
|
|
1846
|
+
* @group Props
|
|
1847
|
+
*/
|
|
1441
1848
|
this.prefixIcon = '';
|
|
1849
|
+
/**
|
|
1850
|
+
* Size of icon before input value, of type number or string or value 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
1851
|
+
* @group Props
|
|
1852
|
+
*/
|
|
1442
1853
|
this.prefixIconSize = '18px';
|
|
1854
|
+
/**
|
|
1855
|
+
* When enabled, a loading bar is displayed.
|
|
1856
|
+
* @group Props
|
|
1857
|
+
*/
|
|
1443
1858
|
this.loading = false;
|
|
1859
|
+
/**
|
|
1860
|
+
* Whether only the elements within scrollable area should be added into the DOM.
|
|
1861
|
+
* @group Props
|
|
1862
|
+
*/
|
|
1444
1863
|
this.virtualScroll = false;
|
|
1864
|
+
/**
|
|
1865
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
1866
|
+
* @group Props
|
|
1867
|
+
*/
|
|
1445
1868
|
this.numToleratedItems = 10;
|
|
1869
|
+
/**
|
|
1870
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
1871
|
+
* @group Props
|
|
1872
|
+
*/
|
|
1446
1873
|
this.infoTooltip = '';
|
|
1874
|
+
/**
|
|
1875
|
+
* InfoTooltip class for styling.
|
|
1876
|
+
* @group Props
|
|
1877
|
+
*/
|
|
1447
1878
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
1879
|
+
/**
|
|
1880
|
+
* Max width of infoTooltip of type number denoting pixels or string.
|
|
1881
|
+
* @group Props
|
|
1882
|
+
*/
|
|
1448
1883
|
this.infoTooltipMaxWidth = '100%';
|
|
1884
|
+
/**
|
|
1885
|
+
* Whether the infoTooltip is persistent.
|
|
1886
|
+
* @group Props
|
|
1887
|
+
*/
|
|
1449
1888
|
this.infoTooltipPersistent = false;
|
|
1889
|
+
/**
|
|
1890
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
1891
|
+
* @group Props
|
|
1892
|
+
*/
|
|
1450
1893
|
this.infoTooltipPosition = 'top';
|
|
1894
|
+
/**
|
|
1895
|
+
* Class for additional styling of the dropdown list.
|
|
1896
|
+
* @group Props
|
|
1897
|
+
*/
|
|
1451
1898
|
this.optionsClass = '';
|
|
1899
|
+
/**
|
|
1900
|
+
* Styling appearance of select input, it can be 'outlined', 'underlined' or 'borderless'.
|
|
1901
|
+
* @group Props
|
|
1902
|
+
*/
|
|
1452
1903
|
this.appearance = 'outlined';
|
|
1904
|
+
/**
|
|
1905
|
+
* Value of the select component.
|
|
1906
|
+
* @group Props
|
|
1907
|
+
*/
|
|
1453
1908
|
this._value = undefined;
|
|
1909
|
+
/**
|
|
1910
|
+
* Callback to invoke on value change.
|
|
1911
|
+
* @param {any} any - value changed.
|
|
1912
|
+
* @group Emits
|
|
1913
|
+
*/
|
|
1454
1914
|
this.valueChanged = new EventEmitter();
|
|
1455
1915
|
this._statusChangesSubscription = new Subscription();
|
|
1456
1916
|
this.error = '';
|
|
@@ -1854,7 +2314,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1854
2314
|
args: ['optionsList']
|
|
1855
2315
|
}] } });
|
|
1856
2316
|
|
|
2317
|
+
/**
|
|
2318
|
+
* BaseTreeDropdownComponent is an internal base component to support hierarchical data dropdown.
|
|
2319
|
+
* @group Components
|
|
2320
|
+
*/
|
|
1857
2321
|
class CpsBaseTreeDropdownComponent {
|
|
2322
|
+
/**
|
|
2323
|
+
* An array of objects to display as the available options.
|
|
2324
|
+
* @group Props
|
|
2325
|
+
*/
|
|
1858
2326
|
set options(options) {
|
|
1859
2327
|
if (options === null || options === void 0 ? void 0 : options.some((o) => o.inner)) {
|
|
1860
2328
|
this._options = options;
|
|
@@ -1875,32 +2343,141 @@ class CpsBaseTreeDropdownComponent {
|
|
|
1875
2343
|
constructor(control, cdRef) {
|
|
1876
2344
|
this.control = control;
|
|
1877
2345
|
this.cdRef = cdRef;
|
|
2346
|
+
/**
|
|
2347
|
+
* Label of the component.
|
|
2348
|
+
* @group Props
|
|
2349
|
+
*/
|
|
1878
2350
|
this.label = '';
|
|
2351
|
+
/**
|
|
2352
|
+
* Bottom hint text.
|
|
2353
|
+
* @group Props
|
|
2354
|
+
*/
|
|
1879
2355
|
this.hint = '';
|
|
2356
|
+
/**
|
|
2357
|
+
* Specifies if multiple values can be selected.
|
|
2358
|
+
* @group Props
|
|
2359
|
+
*/
|
|
1880
2360
|
this.multiple = false;
|
|
2361
|
+
/**
|
|
2362
|
+
* Whether the component is disabled.
|
|
2363
|
+
* @group Props
|
|
2364
|
+
*/
|
|
1881
2365
|
this.disabled = false;
|
|
2366
|
+
/**
|
|
2367
|
+
* Width of the component, of type number denoting pixels or string.
|
|
2368
|
+
* @group Props
|
|
2369
|
+
*/
|
|
1882
2370
|
this.width = '100%';
|
|
2371
|
+
/**
|
|
2372
|
+
* When selecting an element, it will appear in a form of a chip.
|
|
2373
|
+
* @group Props
|
|
2374
|
+
*/
|
|
1883
2375
|
this.chips = true;
|
|
2376
|
+
/**
|
|
2377
|
+
* Whether the chips can be directly removed.
|
|
2378
|
+
* @group Props
|
|
2379
|
+
*/
|
|
1884
2380
|
this.closableChips = true;
|
|
2381
|
+
/**
|
|
2382
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
2383
|
+
* @group Props
|
|
2384
|
+
*/
|
|
1885
2385
|
this.clearable = false;
|
|
2386
|
+
/**
|
|
2387
|
+
* Whether the dropdown should open on clear.
|
|
2388
|
+
* @group Props
|
|
2389
|
+
*/
|
|
1886
2390
|
this.openOnClear = true;
|
|
2391
|
+
/**
|
|
2392
|
+
* Name of the label field of an option.
|
|
2393
|
+
* @group Props
|
|
2394
|
+
*/
|
|
1887
2395
|
this.optionLabel = 'label';
|
|
2396
|
+
/**
|
|
2397
|
+
* Name of the info field of an option, shows the additional information text.
|
|
2398
|
+
* @group Props
|
|
2399
|
+
*/
|
|
1888
2400
|
this.optionInfo = 'info';
|
|
2401
|
+
/**
|
|
2402
|
+
* Options for hiding details.
|
|
2403
|
+
* @group Props
|
|
2404
|
+
*/
|
|
1889
2405
|
this.hideDetails = false;
|
|
2406
|
+
/**
|
|
2407
|
+
* Whether the component should have persistent clear icon.
|
|
2408
|
+
* @group Props
|
|
2409
|
+
*/
|
|
1890
2410
|
this.persistentClear = false;
|
|
2411
|
+
/**
|
|
2412
|
+
* Icon before input value.
|
|
2413
|
+
* @group Props
|
|
2414
|
+
*/
|
|
1891
2415
|
this.prefixIcon = '';
|
|
2416
|
+
/**
|
|
2417
|
+
* Size of icon before input value, of type number, string, 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
2418
|
+
* @group Props
|
|
2419
|
+
*/
|
|
1892
2420
|
this.prefixIconSize = '18px';
|
|
2421
|
+
/**
|
|
2422
|
+
* When enabled, a loading bar is displayed.
|
|
2423
|
+
* @group Props
|
|
2424
|
+
*/
|
|
1893
2425
|
this.loading = false;
|
|
2426
|
+
/**
|
|
2427
|
+
* Whether only the elements within scrollable area should be added into the DOM.
|
|
2428
|
+
* @group Props
|
|
2429
|
+
*/
|
|
1894
2430
|
this.virtualScroll = false;
|
|
2431
|
+
/**
|
|
2432
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
2433
|
+
* @group Props
|
|
2434
|
+
*/
|
|
1895
2435
|
this.numToleratedItems = 10;
|
|
2436
|
+
/**
|
|
2437
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
2438
|
+
* @group Props
|
|
2439
|
+
*/
|
|
1896
2440
|
this.infoTooltip = '';
|
|
2441
|
+
/**
|
|
2442
|
+
* Info tooltip class for styling.
|
|
2443
|
+
* @group Props
|
|
2444
|
+
*/
|
|
1897
2445
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
2446
|
+
/**
|
|
2447
|
+
* Max width of infoTooltip of type number denoting pixels or string.
|
|
2448
|
+
* @group Props
|
|
2449
|
+
*/
|
|
1898
2450
|
this.infoTooltipMaxWidth = '100%';
|
|
2451
|
+
/**
|
|
2452
|
+
* Whether the infoTooltip is persistent.
|
|
2453
|
+
* @group Props
|
|
2454
|
+
*/
|
|
1899
2455
|
this.infoTooltipPersistent = false;
|
|
2456
|
+
/**
|
|
2457
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
2458
|
+
* @group Props
|
|
2459
|
+
*/
|
|
1900
2460
|
this.infoTooltipPosition = 'top';
|
|
2461
|
+
/**
|
|
2462
|
+
* When set, it expands all directiories initially.
|
|
2463
|
+
* @group Props
|
|
2464
|
+
*/
|
|
1901
2465
|
this.initialExpandDirectories = false;
|
|
2466
|
+
/**
|
|
2467
|
+
* When set, it expands all options initially.
|
|
2468
|
+
* @group Props
|
|
2469
|
+
*/
|
|
1902
2470
|
this.initialExpandAll = false;
|
|
2471
|
+
/**
|
|
2472
|
+
* Value of the component.
|
|
2473
|
+
* @group Props
|
|
2474
|
+
*/
|
|
1903
2475
|
this._value = undefined;
|
|
2476
|
+
/**
|
|
2477
|
+
* Callback to invoke on value change.
|
|
2478
|
+
* @param {any} any - value changed.
|
|
2479
|
+
* @group Emits
|
|
2480
|
+
*/
|
|
1904
2481
|
this.valueChanged = new EventEmitter();
|
|
1905
2482
|
this._statusChangesSubscription = new Subscription();
|
|
1906
2483
|
this._options = [];
|
|
@@ -2362,12 +2939,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2362
2939
|
args: ['boxEl']
|
|
2363
2940
|
}] } });
|
|
2364
2941
|
|
|
2942
|
+
/**
|
|
2943
|
+
* CpsTreeSelectComponent allows to select items from hierarchical data dropdown.
|
|
2944
|
+
* @group Components
|
|
2945
|
+
*/
|
|
2365
2946
|
class CpsTreeSelectComponent extends CpsBaseTreeDropdownComponent {
|
|
2366
2947
|
constructor(control, cdRef) {
|
|
2367
2948
|
super(control, cdRef);
|
|
2368
2949
|
this.control = control;
|
|
2369
2950
|
this.cdRef = cdRef;
|
|
2951
|
+
/**
|
|
2952
|
+
* Styling appearance of tree select, it can be "outlined", "underlined" or "borderless".
|
|
2953
|
+
* @group Props
|
|
2954
|
+
*/
|
|
2370
2955
|
this.appearance = 'outlined';
|
|
2956
|
+
/**
|
|
2957
|
+
* Placeholder text.
|
|
2958
|
+
* @group Props
|
|
2959
|
+
*/
|
|
2371
2960
|
this.placeholder = 'Please select';
|
|
2372
2961
|
}
|
|
2373
2962
|
ngOnInit() {
|
|
@@ -2423,6 +3012,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2423
3012
|
type: Input
|
|
2424
3013
|
}] } });
|
|
2425
3014
|
|
|
3015
|
+
/**
|
|
3016
|
+
* CpsAutocompleteComponent is an input component that provides real-time suggestions when being typed.
|
|
3017
|
+
* @group Components
|
|
3018
|
+
*/
|
|
2426
3019
|
class CpsAutocompleteComponent {
|
|
2427
3020
|
get value() {
|
|
2428
3021
|
return this._value;
|
|
@@ -2434,37 +3027,166 @@ class CpsAutocompleteComponent {
|
|
|
2434
3027
|
constructor(_control, _labelByValue) {
|
|
2435
3028
|
this._control = _control;
|
|
2436
3029
|
this._labelByValue = _labelByValue;
|
|
3030
|
+
/**
|
|
3031
|
+
* Label of the input element.
|
|
3032
|
+
* @group Props
|
|
3033
|
+
*/
|
|
2437
3034
|
this.label = '';
|
|
3035
|
+
/**
|
|
3036
|
+
* Placeholder text.
|
|
3037
|
+
* @group Props
|
|
3038
|
+
*/
|
|
2438
3039
|
this.placeholder = 'Please enter';
|
|
3040
|
+
/**
|
|
3041
|
+
* Bottom hint text.
|
|
3042
|
+
* @group Props
|
|
3043
|
+
*/
|
|
2439
3044
|
this.hint = '';
|
|
2440
|
-
|
|
3045
|
+
/**
|
|
3046
|
+
* Returns the object directly rather than the value specified with optionValue.
|
|
3047
|
+
* @group Props
|
|
3048
|
+
*/
|
|
3049
|
+
this.returnObject = true;
|
|
3050
|
+
/**
|
|
3051
|
+
* Specifies if multiple values can be selected.
|
|
3052
|
+
* @group Props
|
|
3053
|
+
*/
|
|
2441
3054
|
this.multiple = false;
|
|
3055
|
+
/**
|
|
3056
|
+
* Whether autocomplete is disabled.
|
|
3057
|
+
* @group Props
|
|
3058
|
+
*/
|
|
2442
3059
|
this.disabled = false;
|
|
3060
|
+
/**
|
|
3061
|
+
* Width of the input field, a number denoting pixels or a string.
|
|
3062
|
+
* @group Props
|
|
3063
|
+
*/
|
|
2443
3064
|
this.width = '100%';
|
|
2444
|
-
|
|
3065
|
+
/**
|
|
3066
|
+
* Option for selecting all elements. Doesn't work with virtual scroll.
|
|
3067
|
+
* @group Props
|
|
3068
|
+
*/
|
|
3069
|
+
this.selectAll = true;
|
|
3070
|
+
/**
|
|
3071
|
+
* When selecting elements, they will appear in a form of a chip.
|
|
3072
|
+
* @group Props
|
|
3073
|
+
*/
|
|
2445
3074
|
this.chips = true;
|
|
3075
|
+
/**
|
|
3076
|
+
* Whether the chips can be directly removed.
|
|
3077
|
+
* @group Props
|
|
3078
|
+
*/
|
|
2446
3079
|
this.closableChips = true;
|
|
3080
|
+
/**
|
|
3081
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
3082
|
+
* @group Props
|
|
3083
|
+
*/
|
|
2447
3084
|
this.clearable = false;
|
|
3085
|
+
/**
|
|
3086
|
+
* Whether the dropdown list should open on clear.
|
|
3087
|
+
* @group Props
|
|
3088
|
+
*/
|
|
2448
3089
|
this.openOnClear = true;
|
|
3090
|
+
/**
|
|
3091
|
+
* An array of options.
|
|
3092
|
+
* @group Props
|
|
3093
|
+
*/
|
|
2449
3094
|
this.options = [];
|
|
3095
|
+
/**
|
|
3096
|
+
* Name of the label field of an option.
|
|
3097
|
+
* @group Props
|
|
3098
|
+
*/
|
|
2450
3099
|
this.optionLabel = 'label';
|
|
2451
|
-
|
|
3100
|
+
/**
|
|
3101
|
+
* Name of the value field of an option. Needed only if returnObject prop is false.
|
|
3102
|
+
* @group Props
|
|
3103
|
+
*/
|
|
3104
|
+
this.optionValue = 'value';
|
|
3105
|
+
/**
|
|
3106
|
+
* Name of the info field of an option, shows the additional information text.
|
|
3107
|
+
* @group Props
|
|
3108
|
+
*/
|
|
2452
3109
|
this.optionInfo = 'info';
|
|
3110
|
+
/**
|
|
3111
|
+
* Hides hint and validation errors.
|
|
3112
|
+
* @group Props
|
|
3113
|
+
*/
|
|
2453
3114
|
this.hideDetails = false;
|
|
3115
|
+
/**
|
|
3116
|
+
* Whether the component should have persistent clear icon.
|
|
3117
|
+
* @group Props
|
|
3118
|
+
*/
|
|
2454
3119
|
this.persistentClear = false;
|
|
3120
|
+
/**
|
|
3121
|
+
* Icon before input value.
|
|
3122
|
+
* @group Props
|
|
3123
|
+
*/
|
|
2455
3124
|
this.prefixIcon = '';
|
|
3125
|
+
/**
|
|
3126
|
+
* Size of icon before input value, of type number or string or 'fill' or 'xsmall' or 'small' or 'normal' or 'large'.
|
|
3127
|
+
* @group Props
|
|
3128
|
+
*/
|
|
2456
3129
|
this.prefixIconSize = '18px';
|
|
3130
|
+
/**
|
|
3131
|
+
* When enabled, a loading bar is displayed.
|
|
3132
|
+
* @group Props
|
|
3133
|
+
*/
|
|
2457
3134
|
this.loading = false;
|
|
3135
|
+
/**
|
|
3136
|
+
* Text to display when there is no data. Defaults to 'No results found'.
|
|
3137
|
+
* @group Props
|
|
3138
|
+
*/
|
|
2458
3139
|
this.emptyMessage = 'No results found';
|
|
3140
|
+
/**
|
|
3141
|
+
* Whether only the elements within scrollable area should be added into the DOM.
|
|
3142
|
+
* @group Props
|
|
3143
|
+
*/
|
|
2459
3144
|
this.virtualScroll = false;
|
|
3145
|
+
/**
|
|
3146
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
3147
|
+
* @group Props
|
|
3148
|
+
*/
|
|
2460
3149
|
this.numToleratedItems = 10;
|
|
3150
|
+
/**
|
|
3151
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
3152
|
+
* @group Props
|
|
3153
|
+
*/
|
|
2461
3154
|
this.infoTooltip = '';
|
|
3155
|
+
/**
|
|
3156
|
+
* Info tooltip class for styling.
|
|
3157
|
+
* @group Props
|
|
3158
|
+
*/
|
|
2462
3159
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
3160
|
+
/**
|
|
3161
|
+
* Max width of infoTooltip of type number denoting pixels or string.
|
|
3162
|
+
* @group Props
|
|
3163
|
+
*/
|
|
2463
3164
|
this.infoTooltipMaxWidth = '100%';
|
|
3165
|
+
/**
|
|
3166
|
+
* Whether the infoTooltip is persistent.
|
|
3167
|
+
* @group Props
|
|
3168
|
+
*/
|
|
2464
3169
|
this.infoTooltipPersistent = false;
|
|
2465
|
-
|
|
3170
|
+
/**
|
|
3171
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
3172
|
+
* @group Props
|
|
3173
|
+
*/
|
|
3174
|
+
this.infoTooltipPosition = 'top';
|
|
3175
|
+
/**
|
|
3176
|
+
* Styling appearance of autocomplete input, it could be 'outlined', 'underlined' or 'borderless'.
|
|
3177
|
+
* @group Props
|
|
3178
|
+
*/
|
|
2466
3179
|
this.appearance = 'outlined';
|
|
3180
|
+
/**
|
|
3181
|
+
* Value of the autocomplete.
|
|
3182
|
+
* @group Props
|
|
3183
|
+
*/
|
|
2467
3184
|
this._value = undefined;
|
|
3185
|
+
/**
|
|
3186
|
+
* Callback to invoke on value change.
|
|
3187
|
+
* @param {any} any - value changed.
|
|
3188
|
+
* @group Emits
|
|
3189
|
+
*/
|
|
2468
3190
|
this.valueChanged = new EventEmitter();
|
|
2469
3191
|
this._statusChangesSubscription = new Subscription();
|
|
2470
3192
|
this.error = '';
|
|
@@ -3002,13 +3724,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3002
3724
|
args: ['optionsList']
|
|
3003
3725
|
}] } });
|
|
3004
3726
|
|
|
3727
|
+
/**
|
|
3728
|
+
* CpsTreeAutocompleteComponent allows to choose items from hierarchical data dropdown and provides real-time suggestions when being typed.
|
|
3729
|
+
* @group Components
|
|
3730
|
+
*/
|
|
3005
3731
|
class CpsTreeAutocompleteComponent extends CpsBaseTreeDropdownComponent {
|
|
3006
3732
|
constructor(control, cdRef) {
|
|
3007
3733
|
super(control, cdRef);
|
|
3008
3734
|
this.control = control;
|
|
3009
3735
|
this.cdRef = cdRef;
|
|
3736
|
+
/**
|
|
3737
|
+
* Message if array of items is empty.
|
|
3738
|
+
* @group Props
|
|
3739
|
+
*/
|
|
3010
3740
|
this.emptyMessage = 'No results found';
|
|
3741
|
+
/**
|
|
3742
|
+
* Styling appearance of tree autocomplete, it can be 'outlined', 'underlined' or 'borderless'.
|
|
3743
|
+
* @group Props
|
|
3744
|
+
*/
|
|
3011
3745
|
this.appearance = 'outlined';
|
|
3746
|
+
/**
|
|
3747
|
+
* Placeholder text.
|
|
3748
|
+
* @group Props
|
|
3749
|
+
*/
|
|
3012
3750
|
this.placeholder = 'Please enter';
|
|
3013
3751
|
this.inputText = '';
|
|
3014
3752
|
this.backspaceClickedOnce = false;
|
|
@@ -3228,10 +3966,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3228
3966
|
type: Input
|
|
3229
3967
|
}] } });
|
|
3230
3968
|
|
|
3969
|
+
/**
|
|
3970
|
+
* CpsProgressCircularComponent is a process status indicator in a form of a spinner.
|
|
3971
|
+
* @group Components
|
|
3972
|
+
*/
|
|
3231
3973
|
class CpsProgressCircularComponent {
|
|
3232
3974
|
constructor() {
|
|
3975
|
+
/**
|
|
3976
|
+
* Diameter of the progress bar, of type number denoting pixels or string.
|
|
3977
|
+
* @group Props
|
|
3978
|
+
*/
|
|
3233
3979
|
this.diameter = 40;
|
|
3980
|
+
/**
|
|
3981
|
+
* Thickness of the progress bar, of type number denoting pixels or string.
|
|
3982
|
+
* @group Props
|
|
3983
|
+
*/
|
|
3234
3984
|
this.strokeWidth = 4;
|
|
3985
|
+
/**
|
|
3986
|
+
* Color of the progress bar.
|
|
3987
|
+
* @group Props
|
|
3988
|
+
*/
|
|
3235
3989
|
this.color = 'calm';
|
|
3236
3990
|
}
|
|
3237
3991
|
ngOnInit() {
|
|
@@ -3253,19 +4007,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3253
4007
|
type: Input
|
|
3254
4008
|
}] } });
|
|
3255
4009
|
|
|
4010
|
+
/**
|
|
4011
|
+
* CpsButtonComponent is a button element.
|
|
4012
|
+
* @group Components
|
|
4013
|
+
*/
|
|
3256
4014
|
class CpsButtonComponent {
|
|
3257
4015
|
constructor() {
|
|
4016
|
+
/**
|
|
4017
|
+
* Color of the button.
|
|
4018
|
+
* @group Props
|
|
4019
|
+
*/
|
|
3258
4020
|
this.color = 'calm';
|
|
3259
|
-
|
|
4021
|
+
/**
|
|
4022
|
+
* Color of content on the button. Works only with 'solid' type.
|
|
4023
|
+
* @group Props
|
|
4024
|
+
*/
|
|
4025
|
+
this.contentColor = 'white';
|
|
4026
|
+
/**
|
|
4027
|
+
* Type of the button in terms of appearance, it can be 'solid' or 'outlined' or 'borderless'.
|
|
4028
|
+
* @group Props
|
|
4029
|
+
*/
|
|
3260
4030
|
this.type = 'solid';
|
|
4031
|
+
/**
|
|
4032
|
+
* Label or text on the button.
|
|
4033
|
+
* @group Props
|
|
4034
|
+
*/
|
|
3261
4035
|
this.label = '';
|
|
4036
|
+
/**
|
|
4037
|
+
* Name of the icon on the button.
|
|
4038
|
+
* @group Props
|
|
4039
|
+
*/
|
|
3262
4040
|
this.icon = '';
|
|
4041
|
+
/**
|
|
4042
|
+
* Position of the icon on the button, it can be 'before' or 'after'.
|
|
4043
|
+
* @group Props
|
|
4044
|
+
*/
|
|
3263
4045
|
this.iconPosition = 'before';
|
|
4046
|
+
/**
|
|
4047
|
+
* Size on the button, it can be 'xsmall', 'small', 'normal' or 'large'.
|
|
4048
|
+
* @group Props
|
|
4049
|
+
*/
|
|
3264
4050
|
this.size = 'normal';
|
|
4051
|
+
/**
|
|
4052
|
+
* Width on the button, of type number denoting pixels or string.
|
|
4053
|
+
* @group Props
|
|
4054
|
+
*/
|
|
3265
4055
|
this.width = 0;
|
|
4056
|
+
/**
|
|
4057
|
+
* Height on the button, of type number denoting pixels or string.
|
|
4058
|
+
* @group Props
|
|
4059
|
+
*/
|
|
3266
4060
|
this.height = 0;
|
|
4061
|
+
/**
|
|
4062
|
+
* When present, it specifies that the component should be disabled.
|
|
4063
|
+
* @group Props
|
|
4064
|
+
*/
|
|
3267
4065
|
this.disabled = false;
|
|
4066
|
+
/**
|
|
4067
|
+
* When enabled, a cps-progress-circular bar is displayed.
|
|
4068
|
+
* @group Props
|
|
4069
|
+
*/
|
|
3268
4070
|
this.loading = false;
|
|
4071
|
+
/**
|
|
4072
|
+
* Callback to execute when button is clicked.
|
|
4073
|
+
* @param {any} any - button clicked.
|
|
4074
|
+
* @group Emits
|
|
4075
|
+
*/
|
|
3269
4076
|
this.clicked = new EventEmitter();
|
|
3270
4077
|
this.buttonColor = '';
|
|
3271
4078
|
this.textColor = '';
|
|
@@ -3382,7 +4189,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3382
4189
|
args: ['style.width']
|
|
3383
4190
|
}] } });
|
|
3384
4191
|
|
|
4192
|
+
/**
|
|
4193
|
+
* CpsCheckboxComponent is a checkbox element.
|
|
4194
|
+
* @group Components
|
|
4195
|
+
*/
|
|
3385
4196
|
class CpsCheckboxComponent {
|
|
4197
|
+
/**
|
|
4198
|
+
* Value of the checkbox.
|
|
4199
|
+
* @group Props
|
|
4200
|
+
*/
|
|
3386
4201
|
set value(value) {
|
|
3387
4202
|
this._value = value;
|
|
3388
4203
|
this.onChange(value);
|
|
@@ -3393,15 +4208,56 @@ class CpsCheckboxComponent {
|
|
|
3393
4208
|
constructor(_control, _elementRef) {
|
|
3394
4209
|
this._control = _control;
|
|
3395
4210
|
this._elementRef = _elementRef;
|
|
4211
|
+
/**
|
|
4212
|
+
* Label of the checkbox.
|
|
4213
|
+
* @group Props
|
|
4214
|
+
*/
|
|
3396
4215
|
this.label = '';
|
|
4216
|
+
/**
|
|
4217
|
+
* Whether checkbox is disabled.
|
|
4218
|
+
* @group Props
|
|
4219
|
+
*/
|
|
3397
4220
|
this.disabled = false;
|
|
4221
|
+
/**
|
|
4222
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
4223
|
+
* @group Props
|
|
4224
|
+
*/
|
|
3398
4225
|
this.infoTooltip = '';
|
|
4226
|
+
/**
|
|
4227
|
+
* InfoTooltip class for styling.
|
|
4228
|
+
* @group Props
|
|
4229
|
+
*/
|
|
3399
4230
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
4231
|
+
/**
|
|
4232
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
4233
|
+
* @group Props
|
|
4234
|
+
*/
|
|
3400
4235
|
this.infoTooltipMaxWidth = '100%';
|
|
4236
|
+
/**
|
|
4237
|
+
* Whether the infoTooltip is persistent.
|
|
4238
|
+
* @group Props
|
|
4239
|
+
*/
|
|
3401
4240
|
this.infoTooltipPersistent = false;
|
|
4241
|
+
/**
|
|
4242
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
4243
|
+
* @group Props
|
|
4244
|
+
*/
|
|
3402
4245
|
this.infoTooltipPosition = 'top';
|
|
4246
|
+
/**
|
|
4247
|
+
* Name of the icon.
|
|
4248
|
+
* @group Props
|
|
4249
|
+
*/
|
|
3403
4250
|
this.icon = '';
|
|
4251
|
+
/**
|
|
4252
|
+
* Color of the icon.
|
|
4253
|
+
* @group Props
|
|
4254
|
+
*/
|
|
3404
4255
|
this.iconColor = 'text-dark';
|
|
4256
|
+
/**
|
|
4257
|
+
* Callback to invoke on value change.
|
|
4258
|
+
* @param {boolean} boolean - value changed.
|
|
4259
|
+
* @group Emits
|
|
4260
|
+
*/
|
|
3405
4261
|
this.valueChanged = new EventEmitter();
|
|
3406
4262
|
this._value = false;
|
|
3407
4263
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -3478,11 +4334,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3478
4334
|
}] } });
|
|
3479
4335
|
|
|
3480
4336
|
let nextUniqueId = 0;
|
|
4337
|
+
/**
|
|
4338
|
+
* CpsRadioButtonComponent is an internal radio button component.
|
|
4339
|
+
* @group Components
|
|
4340
|
+
*/
|
|
3481
4341
|
class CpsRadioButtonComponent {
|
|
3482
4342
|
constructor() {
|
|
3483
4343
|
this._uniqueId = `cps-radio-button-${++nextUniqueId}`;
|
|
4344
|
+
/**
|
|
4345
|
+
* Whether the radio button is checked.
|
|
4346
|
+
* @group Props
|
|
4347
|
+
*/
|
|
3484
4348
|
this.checked = false;
|
|
4349
|
+
/**
|
|
4350
|
+
* Whether the radio button is disabled.
|
|
4351
|
+
* @group Props
|
|
4352
|
+
*/
|
|
3485
4353
|
this.groupDisabled = false;
|
|
4354
|
+
/**
|
|
4355
|
+
* Callback to invoke on value update.
|
|
4356
|
+
* @param {Event} event - Custom update value event.
|
|
4357
|
+
* @group Emits
|
|
4358
|
+
*/
|
|
3486
4359
|
this.updateValueEvent = new EventEmitter();
|
|
3487
4360
|
}
|
|
3488
4361
|
get inputId() {
|
|
@@ -3512,7 +4385,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3512
4385
|
|
|
3513
4386
|
/* eslint-disable no-use-before-define */
|
|
3514
4387
|
const CPS_RADIO_GROUP = new InjectionToken('CpsRadioGroupComponent');
|
|
4388
|
+
/**
|
|
4389
|
+
* CpsRadioGroupComponent is a radio buttons group.
|
|
4390
|
+
* @group Components
|
|
4391
|
+
*/
|
|
3515
4392
|
class CpsRadioGroupComponent {
|
|
4393
|
+
/**
|
|
4394
|
+
* Value of the radio group.
|
|
4395
|
+
* @group Props
|
|
4396
|
+
*/
|
|
3516
4397
|
set value(value) {
|
|
3517
4398
|
this._value = value;
|
|
3518
4399
|
this.onChange(value);
|
|
@@ -3522,15 +4403,56 @@ class CpsRadioGroupComponent {
|
|
|
3522
4403
|
}
|
|
3523
4404
|
constructor(_control) {
|
|
3524
4405
|
this._control = _control;
|
|
4406
|
+
/**
|
|
4407
|
+
* An array of options.
|
|
4408
|
+
* @group Props
|
|
4409
|
+
*/
|
|
3525
4410
|
this.options = [];
|
|
4411
|
+
/**
|
|
4412
|
+
* Label of the radio group.
|
|
4413
|
+
* @group Props
|
|
4414
|
+
*/
|
|
3526
4415
|
this.groupLabel = '';
|
|
4416
|
+
/**
|
|
4417
|
+
* Whether the radio group should be vertical.
|
|
4418
|
+
* @group Props
|
|
4419
|
+
*/
|
|
3527
4420
|
this.vertical = false;
|
|
4421
|
+
/**
|
|
4422
|
+
* Whether the radio group is disabled.
|
|
4423
|
+
* @group Props
|
|
4424
|
+
*/
|
|
3528
4425
|
this.disabled = false;
|
|
4426
|
+
/**
|
|
4427
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
4428
|
+
* @group Props
|
|
4429
|
+
*/
|
|
3529
4430
|
this.infoTooltip = '';
|
|
4431
|
+
/**
|
|
4432
|
+
* InfoTooltip class for styling.
|
|
4433
|
+
* @group Props
|
|
4434
|
+
*/
|
|
3530
4435
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
4436
|
+
/**
|
|
4437
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
4438
|
+
* @group Props
|
|
4439
|
+
*/
|
|
3531
4440
|
this.infoTooltipMaxWidth = '100%';
|
|
4441
|
+
/**
|
|
4442
|
+
* Whether the infoTooltip is persistent.
|
|
4443
|
+
* @group Props
|
|
4444
|
+
*/
|
|
3532
4445
|
this.infoTooltipPersistent = false;
|
|
4446
|
+
/**
|
|
4447
|
+
* Position of infoTooltip, it can be "top", "bottom", "left" or "right".
|
|
4448
|
+
* @group Props
|
|
4449
|
+
*/
|
|
3533
4450
|
this.infoTooltipPosition = 'top';
|
|
4451
|
+
/**
|
|
4452
|
+
* Callback to invoke on value change.
|
|
4453
|
+
* @param {boolean} boolean - value changed.
|
|
4454
|
+
* @group Emits
|
|
4455
|
+
*/
|
|
3534
4456
|
this.valueChanged = new EventEmitter();
|
|
3535
4457
|
this._value = undefined;
|
|
3536
4458
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -3613,6 +4535,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3613
4535
|
type: Output
|
|
3614
4536
|
}] } });
|
|
3615
4537
|
|
|
4538
|
+
/**
|
|
4539
|
+
* CpsRadioComponent is a radio button with arbitrary content.
|
|
4540
|
+
* @group Components
|
|
4541
|
+
*/
|
|
3616
4542
|
class CpsRadioComponent {
|
|
3617
4543
|
constructor(radioGroup) {
|
|
3618
4544
|
this.groupDisabled = false;
|
|
@@ -3648,11 +4574,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3648
4574
|
type: Input
|
|
3649
4575
|
}] } });
|
|
3650
4576
|
|
|
4577
|
+
/**
|
|
4578
|
+
* CpsLoaderComponent is a fetch data indicator.
|
|
4579
|
+
* @group Components
|
|
4580
|
+
*/
|
|
3651
4581
|
class CpsLoaderComponent {
|
|
3652
4582
|
constructor() {
|
|
4583
|
+
/**
|
|
4584
|
+
* Option for loader component to take up the whole screen.
|
|
4585
|
+
* @group Props
|
|
4586
|
+
*/
|
|
3653
4587
|
this.fullScreen = false;
|
|
4588
|
+
/**
|
|
4589
|
+
* Option to control the transparency of the loader component, of type number or string.
|
|
4590
|
+
* @group Props
|
|
4591
|
+
*/
|
|
3654
4592
|
this.opacity = 0.1;
|
|
4593
|
+
/**
|
|
4594
|
+
* Color of the label.
|
|
4595
|
+
* @group Props
|
|
4596
|
+
*/
|
|
3655
4597
|
this.labelColor = 'depth';
|
|
4598
|
+
/**
|
|
4599
|
+
* Whether to show 'Loading...' label.
|
|
4600
|
+
* @group Props
|
|
4601
|
+
*/
|
|
3656
4602
|
this.showLabel = true;
|
|
3657
4603
|
this.backgroundColor = 'rgba(0, 0, 0, 0.1)';
|
|
3658
4604
|
}
|
|
@@ -3676,9 +4622,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3676
4622
|
type: Input
|
|
3677
4623
|
}] } });
|
|
3678
4624
|
|
|
4625
|
+
/**
|
|
4626
|
+
* TableRowMenuComponent is an internal component which applies the menu to each row.
|
|
4627
|
+
* @group Components
|
|
4628
|
+
*/
|
|
3679
4629
|
class TableRowMenuComponent {
|
|
3680
4630
|
constructor() {
|
|
4631
|
+
/**
|
|
4632
|
+
* Callback to invoke when edit-row button is clicked.
|
|
4633
|
+
* @param {any} any - button clicked.
|
|
4634
|
+
* @group Emits
|
|
4635
|
+
*/
|
|
3681
4636
|
this.editRowBtnClicked = new EventEmitter();
|
|
4637
|
+
/**
|
|
4638
|
+
* Callback to invoke when remove-row button is clicked.
|
|
4639
|
+
* @param {any} any - button clicked.
|
|
4640
|
+
* @group Emits
|
|
4641
|
+
*/
|
|
3682
4642
|
this.removeRowBtnClicked = new EventEmitter();
|
|
3683
4643
|
this.items = [
|
|
3684
4644
|
{
|
|
@@ -3784,12 +4744,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3784
4744
|
type: Input
|
|
3785
4745
|
}] } });
|
|
3786
4746
|
|
|
4747
|
+
/**
|
|
4748
|
+
* CpsTableColumnSortableDirective is a sorting directive used to sort single or multiple columns in table.
|
|
4749
|
+
* @group Directives
|
|
4750
|
+
*/
|
|
3787
4751
|
class CpsTableColumnSortableDirective extends SortableColumn {
|
|
3788
4752
|
constructor(elementRef, viewContainerRef, dt) {
|
|
3789
4753
|
super(dt);
|
|
3790
4754
|
this.elementRef = elementRef;
|
|
3791
4755
|
this.viewContainerRef = viewContainerRef;
|
|
3792
4756
|
this.dt = dt;
|
|
4757
|
+
/**
|
|
4758
|
+
* Name of the column to be sorted.
|
|
4759
|
+
* @group Props
|
|
4760
|
+
*/
|
|
3793
4761
|
this.field = '';
|
|
3794
4762
|
this.sortIconRef =
|
|
3795
4763
|
this.viewContainerRef.createComponent(CpsSortIconComponent);
|
|
@@ -3908,81 +4876,385 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3908
4876
|
function tableFactory(tableComponent) {
|
|
3909
4877
|
return tableComponent.primengTable;
|
|
3910
4878
|
}
|
|
4879
|
+
/**
|
|
4880
|
+
* CpsTableComponent displays data in tabular format.
|
|
4881
|
+
* @group Components
|
|
4882
|
+
*/
|
|
3911
4883
|
class CpsTableComponent {
|
|
3912
4884
|
// eslint-disable-next-line no-useless-constructor
|
|
3913
4885
|
constructor(cdRef) {
|
|
3914
4886
|
this.cdRef = cdRef;
|
|
4887
|
+
/**
|
|
4888
|
+
* An array of objects to display.
|
|
4889
|
+
* @group Props
|
|
4890
|
+
*/
|
|
3915
4891
|
this.data = [];
|
|
4892
|
+
/**
|
|
4893
|
+
* An array of objects to represent dynamic columns.
|
|
4894
|
+
* @group Props
|
|
4895
|
+
*/
|
|
3916
4896
|
this.columns = [];
|
|
4897
|
+
/**
|
|
4898
|
+
* A key used to retrieve the header from columns.
|
|
4899
|
+
* @group Props
|
|
4900
|
+
*/
|
|
3917
4901
|
this.colHeaderName = 'header';
|
|
4902
|
+
/**
|
|
4903
|
+
* A key used to retrieve the field from columns.
|
|
4904
|
+
* @group Props
|
|
4905
|
+
*/
|
|
3918
4906
|
this.colFieldName = 'field';
|
|
4907
|
+
/**
|
|
4908
|
+
* Whether the table should have alternating stripes.
|
|
4909
|
+
* @group Props
|
|
4910
|
+
*/
|
|
3919
4911
|
this.striped = true;
|
|
4912
|
+
/**
|
|
4913
|
+
* Whether the table should have borders.
|
|
4914
|
+
* @group Props
|
|
4915
|
+
*/
|
|
3920
4916
|
this.bordered = true;
|
|
4917
|
+
/**
|
|
4918
|
+
* Size of table cells, it can be "small", "normal" or "large".
|
|
4919
|
+
* @group Props
|
|
4920
|
+
*/
|
|
3921
4921
|
this.size = 'normal';
|
|
4922
|
+
/**
|
|
4923
|
+
* Whether the table should have row selection.
|
|
4924
|
+
* @group Props
|
|
4925
|
+
*/
|
|
3922
4926
|
this.selectable = false;
|
|
4927
|
+
/**
|
|
4928
|
+
* Whether the table should have rows highlighting on hover.
|
|
4929
|
+
* @group Props
|
|
4930
|
+
*/
|
|
3923
4931
|
this.rowHover = true;
|
|
3924
|
-
|
|
4932
|
+
/**
|
|
4933
|
+
* Field, that uniquely identifies a record in data (needed for expandable rows).
|
|
4934
|
+
* @group Props
|
|
4935
|
+
*/
|
|
4936
|
+
this.dataKey = '';
|
|
4937
|
+
/**
|
|
4938
|
+
* Whether the table should show row menu.
|
|
4939
|
+
* @group Props
|
|
4940
|
+
*/
|
|
3925
4941
|
this.showRowMenu = false;
|
|
4942
|
+
/**
|
|
4943
|
+
* Whether the table should have re-orderable rows.
|
|
4944
|
+
* @group Props
|
|
4945
|
+
*/
|
|
3926
4946
|
this.reorderableRows = false;
|
|
4947
|
+
/**
|
|
4948
|
+
* When enabled, a loader component is displayed.
|
|
4949
|
+
* @group Props
|
|
4950
|
+
*/
|
|
3927
4951
|
this.loading = false;
|
|
4952
|
+
/**
|
|
4953
|
+
* Inline style of the table.
|
|
4954
|
+
* @group Props
|
|
4955
|
+
*/
|
|
3928
4956
|
this.tableStyle = undefined;
|
|
4957
|
+
/**
|
|
4958
|
+
* Style class of the table.
|
|
4959
|
+
* @group Props
|
|
4960
|
+
*/
|
|
3929
4961
|
this.tableStyleClass = '';
|
|
3930
|
-
|
|
4962
|
+
/**
|
|
4963
|
+
* Makes all columns sortable if columns prop is provided.
|
|
4964
|
+
* @group Props
|
|
4965
|
+
*/
|
|
4966
|
+
this.sortable = false;
|
|
4967
|
+
/**
|
|
4968
|
+
* Defines whether sorting works on single column or on multiple columns.
|
|
4969
|
+
* @group Props
|
|
4970
|
+
*/
|
|
3931
4971
|
this.sortMode = 'single';
|
|
4972
|
+
/**
|
|
4973
|
+
* Whether to use the default sorting or a custom one using sortFunction.
|
|
4974
|
+
* @group Props
|
|
4975
|
+
*/
|
|
3932
4976
|
this.customSort = false;
|
|
4977
|
+
/**
|
|
4978
|
+
* Whether the table has toolbar.
|
|
4979
|
+
* @group Props
|
|
4980
|
+
*/
|
|
3933
4981
|
this.hasToolbar = true;
|
|
4982
|
+
/**
|
|
4983
|
+
* Toolbar size, it can be "small" or "normal".
|
|
4984
|
+
* @group Props
|
|
4985
|
+
*/
|
|
3934
4986
|
this.toolbarSize = 'normal';
|
|
4987
|
+
/**
|
|
4988
|
+
* Toolbar title.
|
|
4989
|
+
* @group Props
|
|
4990
|
+
*/
|
|
3935
4991
|
this.toolbarTitle = '';
|
|
4992
|
+
/**
|
|
4993
|
+
* Toolbar icon name.
|
|
4994
|
+
* @group Props
|
|
4995
|
+
*/
|
|
3936
4996
|
this.toolbarIcon = '';
|
|
4997
|
+
/**
|
|
4998
|
+
* Toolbar icon color.
|
|
4999
|
+
* @group Props
|
|
5000
|
+
*/
|
|
3937
5001
|
this.toolbarIconColor = '';
|
|
5002
|
+
/**
|
|
5003
|
+
* Makes table scrollable.
|
|
5004
|
+
* @group Props
|
|
5005
|
+
*/
|
|
3938
5006
|
this.scrollable = true;
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
5007
|
+
/**
|
|
5008
|
+
* Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
|
|
5009
|
+
* @group Props
|
|
5010
|
+
*/
|
|
5011
|
+
this.scrollHeight = '';
|
|
5012
|
+
/**
|
|
5013
|
+
* Whether only the elements within scrollable area should be added into the DOM. Works only if scrollable prop is true.
|
|
5014
|
+
* @group Props
|
|
5015
|
+
*/
|
|
5016
|
+
this.virtualScroll = false;
|
|
5017
|
+
/**
|
|
5018
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
5019
|
+
* @group Props
|
|
5020
|
+
*/
|
|
5021
|
+
this.numToleratedItems = 10;
|
|
5022
|
+
/**
|
|
5023
|
+
* Whether the table should have paginator.
|
|
5024
|
+
* @group Props
|
|
5025
|
+
*/
|
|
3942
5026
|
this.paginator = false;
|
|
5027
|
+
/**
|
|
5028
|
+
* Whether to show paginator even if there is only one page.
|
|
5029
|
+
* @group Props
|
|
5030
|
+
*/
|
|
3943
5031
|
this.alwaysShowPaginator = true;
|
|
5032
|
+
/**
|
|
5033
|
+
* Array of integer values to display inside rows per page dropdown of paginator.
|
|
5034
|
+
* @group Props
|
|
5035
|
+
*/
|
|
3944
5036
|
this.rowsPerPageOptions = [];
|
|
5037
|
+
/**
|
|
5038
|
+
* Index of the first row to be displayed.
|
|
5039
|
+
* @group Props
|
|
5040
|
+
*/
|
|
3945
5041
|
this.first = 0;
|
|
5042
|
+
/**
|
|
5043
|
+
* Number of rows to display per page.
|
|
5044
|
+
* @group Props
|
|
5045
|
+
*/
|
|
3946
5046
|
this.rows = 0;
|
|
5047
|
+
/**
|
|
5048
|
+
* Whether to reset page on rows change.
|
|
5049
|
+
* @group Props
|
|
5050
|
+
*/
|
|
3947
5051
|
this.resetPageOnRowsChange = false;
|
|
5052
|
+
/**
|
|
5053
|
+
* Whether to reset page on table data sorting.
|
|
5054
|
+
* @group Props
|
|
5055
|
+
*/
|
|
3948
5056
|
this.resetPageOnSort = true;
|
|
5057
|
+
/**
|
|
5058
|
+
* Number of total records.
|
|
5059
|
+
* @group Props
|
|
5060
|
+
*/
|
|
3949
5061
|
this.totalRecords = 0;
|
|
5062
|
+
/**
|
|
5063
|
+
* Text to display when there is no data.
|
|
5064
|
+
* @group Props
|
|
5065
|
+
*/
|
|
3950
5066
|
this.emptyMessage = 'No data';
|
|
5067
|
+
/**
|
|
5068
|
+
* Height of table's body when there is no data, of type number denoting pixels or string.
|
|
5069
|
+
* @group Props
|
|
5070
|
+
*/
|
|
3951
5071
|
this.emptyBodyHeight = '';
|
|
5072
|
+
/**
|
|
5073
|
+
* Defines if data is loaded and interacted with in lazy manner.
|
|
5074
|
+
* @group Props
|
|
5075
|
+
*/
|
|
3952
5076
|
this.lazy = false;
|
|
5077
|
+
/**
|
|
5078
|
+
* Whether to call lazy loading on initialization.
|
|
5079
|
+
* @group Props
|
|
5080
|
+
*/
|
|
3953
5081
|
this.lazyLoadOnInit = true;
|
|
5082
|
+
/**
|
|
5083
|
+
* Whether to show global filter in the toolbar.
|
|
5084
|
+
* @group Props
|
|
5085
|
+
*/
|
|
3954
5086
|
this.showGlobalFilter = false;
|
|
5087
|
+
/**
|
|
5088
|
+
* Global filter placeholder.
|
|
5089
|
+
* @group Props
|
|
5090
|
+
*/
|
|
3955
5091
|
this.globalFilterPlaceholder = 'Search';
|
|
5092
|
+
/**
|
|
5093
|
+
* An array of fields to use in global filtering.
|
|
5094
|
+
* @group Props
|
|
5095
|
+
*/
|
|
3956
5096
|
this.globalFilterFields = [];
|
|
5097
|
+
/**
|
|
5098
|
+
* Whether to clear global filter on data loading.
|
|
5099
|
+
* @group Props
|
|
5100
|
+
*/
|
|
3957
5101
|
this.clearGlobalFilterOnLoading = false;
|
|
5102
|
+
/**
|
|
5103
|
+
* Whether to show remove button in the toolbar when rows are selected.
|
|
5104
|
+
* @group Props
|
|
5105
|
+
*/
|
|
3958
5106
|
this.showRemoveBtnOnSelect = true;
|
|
5107
|
+
/**
|
|
5108
|
+
* Whether removeBtnOnSelect is disabled.
|
|
5109
|
+
* @group Props
|
|
5110
|
+
*/
|
|
3959
5111
|
this.removeBtnOnSelectDisabled = false;
|
|
5112
|
+
/**
|
|
5113
|
+
* Whether to show additional button in the toolbar when rows are selected.
|
|
5114
|
+
* @group Props
|
|
5115
|
+
*/
|
|
3960
5116
|
this.showAdditionalBtnOnSelect = false;
|
|
5117
|
+
/**
|
|
5118
|
+
* AdditionalBtnOnSelect title.
|
|
5119
|
+
* @group Props
|
|
5120
|
+
*/
|
|
3961
5121
|
this.additionalBtnOnSelectTitle = 'Select action';
|
|
5122
|
+
/**
|
|
5123
|
+
* Whether additionalBtnOnSelect is disabled.
|
|
5124
|
+
* @group Props
|
|
5125
|
+
*/
|
|
3962
5126
|
this.additionalBtnOnSelectDisabled = false;
|
|
5127
|
+
/**
|
|
5128
|
+
* Whether to show action button in the toolbar.
|
|
5129
|
+
* @group Props
|
|
5130
|
+
*/
|
|
3963
5131
|
this.showActionBtn = false;
|
|
5132
|
+
/**
|
|
5133
|
+
* Action button title.
|
|
5134
|
+
* @group Props
|
|
5135
|
+
*/
|
|
3964
5136
|
this.actionBtnTitle = 'Action';
|
|
5137
|
+
/**
|
|
5138
|
+
* Whether actionBtn is disabled.
|
|
5139
|
+
* @group Props
|
|
5140
|
+
*/
|
|
3965
5141
|
this.actionBtnDisabled = false;
|
|
5142
|
+
/**
|
|
5143
|
+
* Whether to show export button in the toolbar.
|
|
5144
|
+
* @group Props
|
|
5145
|
+
*/
|
|
3966
5146
|
this.showExportBtn = false;
|
|
5147
|
+
/**
|
|
5148
|
+
* Whether exportBtn is disabled.
|
|
5149
|
+
* @group Props
|
|
5150
|
+
*/
|
|
3967
5151
|
this.exportBtnDisabled = false;
|
|
5152
|
+
/**
|
|
5153
|
+
* Name of the exported file.
|
|
5154
|
+
* @group Props
|
|
5155
|
+
*/
|
|
3968
5156
|
this.exportFilename = 'download';
|
|
5157
|
+
/**
|
|
5158
|
+
* Character to use as the csv separator.
|
|
5159
|
+
* @group Props
|
|
5160
|
+
*/
|
|
3969
5161
|
this.csvSeparator = ',';
|
|
5162
|
+
/**
|
|
5163
|
+
* Whether to show data reload button in the toolbar.
|
|
5164
|
+
* @group Props
|
|
5165
|
+
*/
|
|
3970
5166
|
this.showDataReloadBtn = false;
|
|
5167
|
+
/**
|
|
5168
|
+
* Whether dataReloadBtn is disabled.
|
|
5169
|
+
* @group Props
|
|
5170
|
+
*/
|
|
3971
5171
|
this.dataReloadBtnDisabled = false;
|
|
3972
|
-
|
|
5172
|
+
/**
|
|
5173
|
+
* Whether the table should show columnsToggle menu, where you can choose which columns to be displayed. If external body template is provided, use columnsSelected event emitter.
|
|
5174
|
+
* @group Props
|
|
5175
|
+
*/
|
|
5176
|
+
this.showColumnsToggleBtn = false;
|
|
5177
|
+
/**
|
|
5178
|
+
* Whether columnsToggle button is disabled.
|
|
5179
|
+
* @group Props
|
|
5180
|
+
*/
|
|
3973
5181
|
this.columnsToggleBtnDisabled = false;
|
|
3974
|
-
|
|
5182
|
+
/**
|
|
5183
|
+
* Array of initial columns to show in the table. If not provided, all columns are initially visible.
|
|
5184
|
+
* @group Props
|
|
5185
|
+
*/
|
|
5186
|
+
this.initialColumns = [];
|
|
5187
|
+
/**
|
|
5188
|
+
* Callback to invoke on selection changed.
|
|
5189
|
+
* @param {any[]} value - selected data.
|
|
5190
|
+
* @group Emits
|
|
5191
|
+
*/
|
|
3975
5192
|
this.selectionChanged = new EventEmitter();
|
|
5193
|
+
/**
|
|
5194
|
+
* Callback to invoke when action button is clicked.
|
|
5195
|
+
* @param {void} void - button clicked.
|
|
5196
|
+
* @group Emits
|
|
5197
|
+
*/
|
|
3976
5198
|
this.actionBtnClicked = new EventEmitter();
|
|
5199
|
+
/**
|
|
5200
|
+
* Callback to invoke when edit-row button is clicked.
|
|
5201
|
+
* @param {any} any - button clicked.
|
|
5202
|
+
* @group Emits
|
|
5203
|
+
*/
|
|
3977
5204
|
this.editRowBtnClicked = new EventEmitter();
|
|
5205
|
+
/**
|
|
5206
|
+
* Callback to invoke on rows removal.
|
|
5207
|
+
* @param {any[]} any[] - array of rows removed.
|
|
5208
|
+
* @group Emits
|
|
5209
|
+
*/
|
|
3978
5210
|
this.rowsRemoved = new EventEmitter();
|
|
5211
|
+
/**
|
|
5212
|
+
* Callback to invoke on page changed.
|
|
5213
|
+
* @param {any} any - page changed.
|
|
5214
|
+
* @group Emits
|
|
5215
|
+
*/
|
|
3979
5216
|
this.pageChanged = new EventEmitter();
|
|
5217
|
+
/**
|
|
5218
|
+
* Callback to invoke when data is sorted.
|
|
5219
|
+
* @param {any} any - sort meta.
|
|
5220
|
+
* @group Emits
|
|
5221
|
+
*/
|
|
3980
5222
|
this.sorted = new EventEmitter();
|
|
5223
|
+
/**
|
|
5224
|
+
* Callback to invoke when data is filtered.
|
|
5225
|
+
* @param {any} any - custom filtering event.
|
|
5226
|
+
* @group Emits
|
|
5227
|
+
*/
|
|
3981
5228
|
this.filtered = new EventEmitter();
|
|
5229
|
+
/**
|
|
5230
|
+
* Callback to invoke when rows are reordered.
|
|
5231
|
+
* @param {any} any - rows reordered.
|
|
5232
|
+
* @group Emits
|
|
5233
|
+
*/
|
|
3982
5234
|
this.rowsReordered = new EventEmitter();
|
|
5235
|
+
/**
|
|
5236
|
+
* Callback to invoke on columns selection.
|
|
5237
|
+
* @param {object} object - selected column.
|
|
5238
|
+
* @group Emits
|
|
5239
|
+
*/
|
|
3983
5240
|
this.columnsSelected = new EventEmitter();
|
|
5241
|
+
/**
|
|
5242
|
+
* Callback to invoke when paging, sorting or filtering happens in lazy mode.
|
|
5243
|
+
* @param {any} any - custom lazy loading event.
|
|
5244
|
+
* @group Emits
|
|
5245
|
+
*/
|
|
3984
5246
|
this.lazyLoaded = new EventEmitter();
|
|
5247
|
+
/**
|
|
5248
|
+
* Callback to invoke when data-reload button is clicked.
|
|
5249
|
+
* @param {any} any - button clicked.
|
|
5250
|
+
* @group Emits
|
|
5251
|
+
*/
|
|
3985
5252
|
this.dataReloadBtnClicked = new EventEmitter();
|
|
5253
|
+
/**
|
|
5254
|
+
* Callback to invoke when additional button on select is clicked.
|
|
5255
|
+
* @param {any[]} any[] - selected data.
|
|
5256
|
+
* @group Emits
|
|
5257
|
+
*/
|
|
3986
5258
|
this.additionalBtnOnSelectClicked = new EventEmitter();
|
|
3987
5259
|
/**
|
|
3988
5260
|
* A function to implement custom sorting. customSort must be true.
|
|
@@ -4498,7 +5770,15 @@ var CpsColumnFilterMatchMode;
|
|
|
4498
5770
|
CpsColumnFilterMatchMode["DATE_AFTER"] = "dateAfter";
|
|
4499
5771
|
})(CpsColumnFilterMatchMode || (CpsColumnFilterMatchMode = {}));
|
|
4500
5772
|
|
|
5773
|
+
/**
|
|
5774
|
+
* CpsDatepickerComponent is an input component to provide date input.
|
|
5775
|
+
* @group Components
|
|
5776
|
+
*/
|
|
4501
5777
|
class CpsDatepickerComponent {
|
|
5778
|
+
/**
|
|
5779
|
+
* Value of the datepicker.
|
|
5780
|
+
* @group Props
|
|
5781
|
+
*/
|
|
4502
5782
|
set value(value) {
|
|
4503
5783
|
this._value = value;
|
|
4504
5784
|
this.stringDate = this._dateToString(value);
|
|
@@ -4509,22 +5789,91 @@ class CpsDatepickerComponent {
|
|
|
4509
5789
|
}
|
|
4510
5790
|
constructor(_control) {
|
|
4511
5791
|
this._control = _control;
|
|
5792
|
+
/**
|
|
5793
|
+
* Label of the datepicker element.
|
|
5794
|
+
* @group Props
|
|
5795
|
+
*/
|
|
4512
5796
|
this.label = '';
|
|
5797
|
+
/**
|
|
5798
|
+
* Whether datepicker is disabled.
|
|
5799
|
+
* @group Props
|
|
5800
|
+
*/
|
|
4513
5801
|
this.disabled = false;
|
|
5802
|
+
/**
|
|
5803
|
+
* Width of the datepicker of type number denoting pixels or string.
|
|
5804
|
+
* @group Props
|
|
5805
|
+
*/
|
|
4514
5806
|
this.width = '100%';
|
|
5807
|
+
/**
|
|
5808
|
+
* Placeholder text.
|
|
5809
|
+
* @group Props
|
|
5810
|
+
*/
|
|
4515
5811
|
this.placeholder = 'MM/DD/YYYY';
|
|
5812
|
+
/**
|
|
5813
|
+
* Bottom hint text for the input field.
|
|
5814
|
+
* @group Props
|
|
5815
|
+
*/
|
|
4516
5816
|
this.hint = '';
|
|
5817
|
+
/**
|
|
5818
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
5819
|
+
* @group Props
|
|
5820
|
+
*/
|
|
4517
5821
|
this.clearable = false;
|
|
5822
|
+
/**
|
|
5823
|
+
* Hides hint and validation errors.
|
|
5824
|
+
* @group Props
|
|
5825
|
+
*/
|
|
4518
5826
|
this.hideDetails = false;
|
|
5827
|
+
/**
|
|
5828
|
+
* Whether the component should have persistent clear icon.
|
|
5829
|
+
* @group Props
|
|
5830
|
+
*/
|
|
4519
5831
|
this.persistentClear = false;
|
|
5832
|
+
/**
|
|
5833
|
+
* Whether to show button to be able to select today's date.
|
|
5834
|
+
* @group Props
|
|
5835
|
+
*/
|
|
4520
5836
|
this.showTodayButton = true;
|
|
5837
|
+
/**
|
|
5838
|
+
* Whether the datepicker dropdown should open on input focus.
|
|
5839
|
+
* @group Props
|
|
5840
|
+
*/
|
|
4521
5841
|
this.openOnInputFocus = false;
|
|
5842
|
+
/**
|
|
5843
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
5844
|
+
* @group Props
|
|
5845
|
+
*/
|
|
4522
5846
|
this.infoTooltip = '';
|
|
5847
|
+
/**
|
|
5848
|
+
* InfoTooltip class for styling.
|
|
5849
|
+
* @group Props
|
|
5850
|
+
*/
|
|
4523
5851
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
5852
|
+
/**
|
|
5853
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
5854
|
+
* @group Props
|
|
5855
|
+
*/
|
|
4524
5856
|
this.infoTooltipMaxWidth = '100%';
|
|
5857
|
+
/**
|
|
5858
|
+
* Whether the infoTooltip is persistent.
|
|
5859
|
+
* @group Props
|
|
5860
|
+
*/
|
|
4525
5861
|
this.infoTooltipPersistent = false;
|
|
5862
|
+
/**
|
|
5863
|
+
* Position of infoTooltip, it can be "top", "bottom", "left" or "right".
|
|
5864
|
+
* @group Props
|
|
5865
|
+
*/
|
|
4526
5866
|
this.infoTooltipPosition = 'top';
|
|
5867
|
+
/**
|
|
5868
|
+
* Styling appearance of datepicker input, it can be 'outlined', 'underlined' or 'borderless.
|
|
5869
|
+
* @group Props
|
|
5870
|
+
*/
|
|
4527
5871
|
this.appearance = 'outlined';
|
|
5872
|
+
/**
|
|
5873
|
+
* Callback to invoke on value change.
|
|
5874
|
+
* @param {Date | null} value - value change.
|
|
5875
|
+
* @group Emits
|
|
5876
|
+
*/
|
|
4528
5877
|
this.valueChanged = new EventEmitter();
|
|
4529
5878
|
this.stringDate = '';
|
|
4530
5879
|
this.isOpened = false;
|
|
@@ -4799,6 +6148,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4799
6148
|
args: ['calendarMenu']
|
|
4800
6149
|
}] } });
|
|
4801
6150
|
|
|
6151
|
+
/**
|
|
6152
|
+
* CpsButtonToggleComponent is used to select values using buttons.
|
|
6153
|
+
* @group Components
|
|
6154
|
+
*/
|
|
4802
6155
|
class CpsButtonToggleComponent {
|
|
4803
6156
|
set value(value) {
|
|
4804
6157
|
this._value = value;
|
|
@@ -4810,19 +6163,76 @@ class CpsButtonToggleComponent {
|
|
|
4810
6163
|
constructor(_control, renderer) {
|
|
4811
6164
|
this._control = _control;
|
|
4812
6165
|
this.renderer = renderer;
|
|
6166
|
+
/**
|
|
6167
|
+
* Label of the toggle buttons.
|
|
6168
|
+
* @group Props
|
|
6169
|
+
*/
|
|
4813
6170
|
this.label = '';
|
|
6171
|
+
/**
|
|
6172
|
+
* An array of options.
|
|
6173
|
+
* @group Props
|
|
6174
|
+
*/
|
|
4814
6175
|
this.options = [];
|
|
6176
|
+
/**
|
|
6177
|
+
* Specifies if multiple values can be selected.
|
|
6178
|
+
* @group Props
|
|
6179
|
+
*/
|
|
4815
6180
|
this.multiple = false;
|
|
6181
|
+
/**
|
|
6182
|
+
* Specifies that the component should be disabled.
|
|
6183
|
+
* @group Props
|
|
6184
|
+
*/
|
|
4816
6185
|
this.disabled = false;
|
|
4817
|
-
|
|
6186
|
+
/**
|
|
6187
|
+
* Whether at least one of the options is mandatory.
|
|
6188
|
+
* @group Props
|
|
6189
|
+
*/
|
|
6190
|
+
this.mandatory = true;
|
|
6191
|
+
/**
|
|
6192
|
+
* Whether all buttons should have equal widths.
|
|
6193
|
+
* @group Props
|
|
6194
|
+
*/
|
|
4818
6195
|
this.equalWidths = true;
|
|
6196
|
+
/**
|
|
6197
|
+
* Position of the option tooltip, can be 'top', 'bottom', 'left' or 'right'.
|
|
6198
|
+
* @group Props
|
|
6199
|
+
*/
|
|
4819
6200
|
this.optionTooltipPosition = 'bottom';
|
|
6201
|
+
/**
|
|
6202
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
6203
|
+
* @group Props
|
|
6204
|
+
*/
|
|
4820
6205
|
this.infoTooltip = '';
|
|
6206
|
+
/**
|
|
6207
|
+
* Info tooltip class for styling.
|
|
6208
|
+
* @group Props
|
|
6209
|
+
*/
|
|
4821
6210
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
6211
|
+
/**
|
|
6212
|
+
* Size of infoTooltip, of type number or string.
|
|
6213
|
+
* @group Props
|
|
6214
|
+
*/
|
|
4822
6215
|
this.infoTooltipMaxWidth = '100%';
|
|
6216
|
+
/**
|
|
6217
|
+
* Whether the infoTooltip is persistent.
|
|
6218
|
+
* @group Props
|
|
6219
|
+
*/
|
|
4823
6220
|
this.infoTooltipPersistent = false;
|
|
6221
|
+
/**
|
|
6222
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
6223
|
+
* @group Props
|
|
6224
|
+
*/
|
|
4824
6225
|
this.infoTooltipPosition = 'top';
|
|
6226
|
+
/**
|
|
6227
|
+
* Value of the component.
|
|
6228
|
+
* @group Props
|
|
6229
|
+
*/
|
|
4825
6230
|
this._value = undefined;
|
|
6231
|
+
/**
|
|
6232
|
+
* Callback to invoke on value change.
|
|
6233
|
+
* @param {any} any - value changed.
|
|
6234
|
+
* @group Emits
|
|
6235
|
+
*/
|
|
4826
6236
|
this.valueChanged = new EventEmitter();
|
|
4827
6237
|
this.largestButtonWidth = 0;
|
|
4828
6238
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -4967,6 +6377,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4967
6377
|
type: Output
|
|
4968
6378
|
}] } });
|
|
4969
6379
|
|
|
6380
|
+
/**
|
|
6381
|
+
* TableColumnFilterConstraintComponent is an internal filtering constraint component in table and treetable.
|
|
6382
|
+
* @group Components
|
|
6383
|
+
*/
|
|
4970
6384
|
class TableColumnFilterConstraintComponent {
|
|
4971
6385
|
get isCategoryDropdownOpened() {
|
|
4972
6386
|
var _a;
|
|
@@ -4975,12 +6389,36 @@ class TableColumnFilterConstraintComponent {
|
|
|
4975
6389
|
constructor(dt, tt) {
|
|
4976
6390
|
this.dt = dt;
|
|
4977
6391
|
this.tt = tt;
|
|
6392
|
+
/**
|
|
6393
|
+
* Type of filter constraint.
|
|
6394
|
+
* @group Props
|
|
6395
|
+
*/
|
|
4978
6396
|
this.type = 'text';
|
|
6397
|
+
/**
|
|
6398
|
+
* An array of category options.
|
|
6399
|
+
* @group Props
|
|
6400
|
+
*/
|
|
4979
6401
|
this.categoryOptions = [];
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
6402
|
+
/**
|
|
6403
|
+
* Whether to show category filter as button toggles.
|
|
6404
|
+
* @group Props
|
|
6405
|
+
*/
|
|
6406
|
+
this.asButtonToggle = false;
|
|
6407
|
+
/**
|
|
6408
|
+
* Single selection for category filter.
|
|
6409
|
+
* @group Props
|
|
6410
|
+
*/
|
|
6411
|
+
this.singleSelection = false;
|
|
6412
|
+
/**
|
|
6413
|
+
* Placeholder for input field.
|
|
6414
|
+
* @group Props
|
|
6415
|
+
*/
|
|
6416
|
+
this.placeholder = '';
|
|
6417
|
+
/**
|
|
6418
|
+
* Whether the filter should have an apply button.
|
|
6419
|
+
* @group Props
|
|
6420
|
+
*/
|
|
6421
|
+
this.hasApplyButton = true;
|
|
4984
6422
|
this.booleanOptions = [
|
|
4985
6423
|
{ label: 'True', value: 'true' },
|
|
4986
6424
|
{ label: 'False', value: 'false' }
|
|
@@ -5079,6 +6517,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5079
6517
|
args: ['categoryAutocompleteComponent']
|
|
5080
6518
|
}] } });
|
|
5081
6519
|
|
|
6520
|
+
/**
|
|
6521
|
+
* TableColumnFilterComponent is an internal filter component in table and treetable.
|
|
6522
|
+
* @group Components
|
|
6523
|
+
*/
|
|
5082
6524
|
class TableColumnFilterComponent {
|
|
5083
6525
|
get isCategoryDropdownOpened() {
|
|
5084
6526
|
var _a, _b;
|
|
@@ -5090,20 +6532,80 @@ class TableColumnFilterComponent {
|
|
|
5090
6532
|
this.elementRef = elementRef;
|
|
5091
6533
|
this.dt = dt;
|
|
5092
6534
|
this.tt = tt;
|
|
6535
|
+
/**
|
|
6536
|
+
* Type of filter in table, it can be of type "number", "boolean", "text", "date" or "category".
|
|
6537
|
+
* @group Props
|
|
6538
|
+
*/
|
|
5093
6539
|
this.type = 'text';
|
|
6540
|
+
/**
|
|
6541
|
+
* Whether the filter menu should be persistent.
|
|
6542
|
+
* @group Props
|
|
6543
|
+
*/
|
|
5094
6544
|
this.persistent = false;
|
|
6545
|
+
/**
|
|
6546
|
+
* Whether the filter should have clear button.
|
|
6547
|
+
* @group Props
|
|
6548
|
+
*/
|
|
5095
6549
|
this.showClearButton = true;
|
|
6550
|
+
/**
|
|
6551
|
+
* Whether the filter should have apply button.
|
|
6552
|
+
* @group Props
|
|
6553
|
+
*/
|
|
5096
6554
|
this.showApplyButton = true;
|
|
6555
|
+
/**
|
|
6556
|
+
* Whether the filter should have close button.
|
|
6557
|
+
* @group Props
|
|
6558
|
+
*/
|
|
5097
6559
|
this.showCloseButton = false;
|
|
6560
|
+
/**
|
|
6561
|
+
* Whether the filter should have match modes.
|
|
6562
|
+
* @group Props
|
|
6563
|
+
*/
|
|
5098
6564
|
this.showMatchModes = true;
|
|
6565
|
+
/**
|
|
6566
|
+
* Match modes for filter.
|
|
6567
|
+
* @group Props
|
|
6568
|
+
*/
|
|
5099
6569
|
this.matchModes = [];
|
|
6570
|
+
/**
|
|
6571
|
+
* Whether the filter should have operator.
|
|
6572
|
+
* @group Props
|
|
6573
|
+
*/
|
|
5100
6574
|
this.showOperator = true;
|
|
6575
|
+
/**
|
|
6576
|
+
* Maximum number of constraints.
|
|
6577
|
+
* @group Props
|
|
6578
|
+
*/
|
|
5101
6579
|
this.maxConstraints = 2;
|
|
6580
|
+
/**
|
|
6581
|
+
* Title of the filter.
|
|
6582
|
+
* @group Props
|
|
6583
|
+
*/
|
|
5102
6584
|
this.headerTitle = '';
|
|
6585
|
+
/**
|
|
6586
|
+
* Whether the filter should hide on clear.
|
|
6587
|
+
* @group Props
|
|
6588
|
+
*/
|
|
5103
6589
|
this.hideOnClear = false;
|
|
6590
|
+
/**
|
|
6591
|
+
* Options for category filter.
|
|
6592
|
+
* @group Props
|
|
6593
|
+
*/
|
|
5104
6594
|
this.categoryOptions = [];
|
|
5105
|
-
|
|
5106
|
-
|
|
6595
|
+
/**
|
|
6596
|
+
* Whether to show category filter as button toggles.
|
|
6597
|
+
* @group Props
|
|
6598
|
+
*/
|
|
6599
|
+
this.asButtonToggle = false;
|
|
6600
|
+
/**
|
|
6601
|
+
* Single selection for category filter.
|
|
6602
|
+
* @group Props
|
|
6603
|
+
*/
|
|
6604
|
+
this.singleSelection = false;
|
|
6605
|
+
/**
|
|
6606
|
+
* Placeholder for filter constraints.
|
|
6607
|
+
* @group Props
|
|
6608
|
+
*/
|
|
5107
6609
|
this.placeholder = '';
|
|
5108
6610
|
this.operator = FilterOperator.AND;
|
|
5109
6611
|
this.operatorOptions = [
|
|
@@ -5415,24 +6917,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5415
6917
|
args: ['mouseleave']
|
|
5416
6918
|
}] } });
|
|
5417
6919
|
|
|
6920
|
+
/**
|
|
6921
|
+
* CpsTableColumnFilterDirective is a filtering directive used to filter single or multiple columns in table.
|
|
6922
|
+
* @group Directives
|
|
6923
|
+
*/
|
|
5418
6924
|
class CpsTableColumnFilterDirective {
|
|
5419
6925
|
constructor(elementRef, viewContainerRef) {
|
|
5420
6926
|
this.elementRef = elementRef;
|
|
5421
6927
|
this.viewContainerRef = viewContainerRef;
|
|
6928
|
+
/**
|
|
6929
|
+
* Type of a filter in table, it can be of type "number", "boolean", "text", "date" or "category".
|
|
6930
|
+
* @group Props
|
|
6931
|
+
*/
|
|
5422
6932
|
this.filterType = 'text';
|
|
6933
|
+
/**
|
|
6934
|
+
* Whether the filter menu should be persistent.
|
|
6935
|
+
* @group Props
|
|
6936
|
+
*/
|
|
5423
6937
|
this.filterPersistent = false;
|
|
6938
|
+
/**
|
|
6939
|
+
* Whether the filter should have clear button.
|
|
6940
|
+
* @group Props
|
|
6941
|
+
*/
|
|
5424
6942
|
this.filterShowClearButton = true;
|
|
6943
|
+
/**
|
|
6944
|
+
* Whether the filter should have apply button.
|
|
6945
|
+
* @group Props
|
|
6946
|
+
*/
|
|
5425
6947
|
this.filterShowApplyButton = true;
|
|
6948
|
+
/**
|
|
6949
|
+
* Whether the filter should have close button.
|
|
6950
|
+
* @group Props
|
|
6951
|
+
*/
|
|
5426
6952
|
this.filterShowCloseButton = false;
|
|
6953
|
+
/**
|
|
6954
|
+
* Whether the filter should have match modes.
|
|
6955
|
+
* @group Props
|
|
6956
|
+
*/
|
|
5427
6957
|
this.filterShowMatchModes = true;
|
|
6958
|
+
/**
|
|
6959
|
+
* Match modes for filter.
|
|
6960
|
+
* @group Props
|
|
6961
|
+
*/
|
|
5428
6962
|
this.filterMatchModes = [];
|
|
6963
|
+
/**
|
|
6964
|
+
* Whether the filter should have operator.
|
|
6965
|
+
* @group Props
|
|
6966
|
+
*/
|
|
5429
6967
|
this.filterShowOperator = true;
|
|
6968
|
+
/**
|
|
6969
|
+
* Maximum number of constraints.
|
|
6970
|
+
* @group Props
|
|
6971
|
+
*/
|
|
5430
6972
|
this.filterMaxConstraints = 2;
|
|
6973
|
+
/**
|
|
6974
|
+
* Title of the filter.
|
|
6975
|
+
* @group Props
|
|
6976
|
+
*/
|
|
5431
6977
|
this.filterHeaderTitle = '';
|
|
6978
|
+
/**
|
|
6979
|
+
* Whether the filter should hide on clear.
|
|
6980
|
+
* @group Props
|
|
6981
|
+
*/
|
|
5432
6982
|
this.filterHideOnClear = false;
|
|
6983
|
+
/**
|
|
6984
|
+
* Options for category filter.
|
|
6985
|
+
* @group Props
|
|
6986
|
+
*/
|
|
5433
6987
|
this.filterCategoryOptions = [];
|
|
5434
|
-
|
|
5435
|
-
|
|
6988
|
+
/**
|
|
6989
|
+
* Whether to show category filter as button toggles.
|
|
6990
|
+
* @group Props
|
|
6991
|
+
*/
|
|
6992
|
+
this.filterAsButtonToggle = false;
|
|
6993
|
+
/**
|
|
6994
|
+
* Single selection for category filter.
|
|
6995
|
+
* @group Props
|
|
6996
|
+
*/
|
|
6997
|
+
this.filterSingleSelection = false;
|
|
6998
|
+
/**
|
|
6999
|
+
* Placeholder for filter constraints.
|
|
7000
|
+
* @group Props
|
|
7001
|
+
*/
|
|
5436
7002
|
this.filterPlaceholder = '';
|
|
5437
7003
|
this.filterCompRef = this.viewContainerRef.createComponent(TableColumnFilterComponent);
|
|
5438
7004
|
}
|
|
@@ -5532,6 +7098,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5532
7098
|
type: Input
|
|
5533
7099
|
}] } });
|
|
5534
7100
|
|
|
7101
|
+
/**
|
|
7102
|
+
* CpsTableHeaderSelectableDirective is a directive used to apply a checkbox to a header cell.
|
|
7103
|
+
* @group Directives
|
|
7104
|
+
*/
|
|
5535
7105
|
class CpsTableHeaderSelectableDirective {
|
|
5536
7106
|
constructor(elementRef, viewContainerRef) {
|
|
5537
7107
|
this.elementRef = elementRef;
|
|
@@ -5557,6 +7127,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5557
7127
|
}]
|
|
5558
7128
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; } });
|
|
5559
7129
|
|
|
7130
|
+
/**
|
|
7131
|
+
* CpsTableRowSelectableDirective is a directive used to apply a checkbox to a body cell.
|
|
7132
|
+
* @group Directives
|
|
7133
|
+
*/
|
|
5560
7134
|
class CpsTableRowSelectableDirective {
|
|
5561
7135
|
constructor(elementRef, viewContainerRef) {
|
|
5562
7136
|
this.elementRef = elementRef;
|
|
@@ -5585,12 +7159,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5585
7159
|
args: ['cpsTRowSelectable']
|
|
5586
7160
|
}] } });
|
|
5587
7161
|
|
|
7162
|
+
/**
|
|
7163
|
+
* CpsTreeTableColumnSortableDirective is a sorting directive used to sort single or multiple columns in treetable.
|
|
7164
|
+
* @group Directives
|
|
7165
|
+
*/
|
|
5588
7166
|
class CpsTreeTableColumnSortableDirective extends TTSortableColumn {
|
|
5589
7167
|
constructor(elementRef, viewContainerRef, tt) {
|
|
5590
7168
|
super(tt);
|
|
5591
7169
|
this.elementRef = elementRef;
|
|
5592
7170
|
this.viewContainerRef = viewContainerRef;
|
|
5593
7171
|
this.tt = tt;
|
|
7172
|
+
/**
|
|
7173
|
+
* Name of the column to be sorted.
|
|
7174
|
+
* @group Props
|
|
7175
|
+
*/
|
|
5594
7176
|
this.field = '';
|
|
5595
7177
|
this.sortIconRef =
|
|
5596
7178
|
this.viewContainerRef.createComponent(CpsSortIconComponent);
|
|
@@ -5775,6 +7357,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5775
7357
|
}] }];
|
|
5776
7358
|
} });
|
|
5777
7359
|
|
|
7360
|
+
/**
|
|
7361
|
+
* CpsTreeTableHeaderSelectableDirective is a directive used to apply a checkbox to a header cell.
|
|
7362
|
+
* @group Directives
|
|
7363
|
+
*/
|
|
5778
7364
|
class CpsTreeTableHeaderSelectableDirective {
|
|
5779
7365
|
constructor(elementRef, viewContainerRef) {
|
|
5780
7366
|
this.elementRef = elementRef;
|
|
@@ -5801,6 +7387,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5801
7387
|
}]
|
|
5802
7388
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; } });
|
|
5803
7389
|
|
|
7390
|
+
/**
|
|
7391
|
+
* CpsTreeTableRowSelectableDirective is a directive used to apply a checkbox to a body cell.
|
|
7392
|
+
* @group Directives
|
|
7393
|
+
*/
|
|
5804
7394
|
class CpsTreeTableRowSelectableDirective {
|
|
5805
7395
|
constructor(elementRef, viewContainerRef) {
|
|
5806
7396
|
this.elementRef = elementRef;
|
|
@@ -5830,6 +7420,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5830
7420
|
args: ['cpsTTRowSelectable']
|
|
5831
7421
|
}] } });
|
|
5832
7422
|
|
|
7423
|
+
/**
|
|
7424
|
+
* CpsTreetableRowTogglerDirective is a directive used to apply a chevron toggler icon to a body cell.
|
|
7425
|
+
* @group Directives
|
|
7426
|
+
*/
|
|
5833
7427
|
class CpsTreetableRowTogglerDirective {
|
|
5834
7428
|
constructor(elementRef, viewContainerRef) {
|
|
5835
7429
|
this.elementRef = elementRef;
|
|
@@ -5869,88 +7463,395 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5869
7463
|
function treeTableFactory(tableComponent) {
|
|
5870
7464
|
return tableComponent.primengTreeTable;
|
|
5871
7465
|
}
|
|
7466
|
+
/**
|
|
7467
|
+
* CpsTreeTableComponent is used to display hierarchical data in tabular format.
|
|
7468
|
+
* @group Components
|
|
7469
|
+
*/
|
|
5872
7470
|
class CpsTreeTableComponent {
|
|
5873
7471
|
// eslint-disable-next-line no-useless-constructor
|
|
5874
7472
|
constructor(cdRef, renderer, ngZone) {
|
|
5875
7473
|
this.cdRef = cdRef;
|
|
5876
7474
|
this.renderer = renderer;
|
|
5877
7475
|
this.ngZone = ngZone;
|
|
7476
|
+
/**
|
|
7477
|
+
* An array of objects to display.
|
|
7478
|
+
* @group Props
|
|
7479
|
+
*/
|
|
5878
7480
|
this.data = [];
|
|
7481
|
+
/**
|
|
7482
|
+
* An array of objects to represent dynamic columns.
|
|
7483
|
+
* @group Props
|
|
7484
|
+
*/
|
|
5879
7485
|
this.columns = [];
|
|
7486
|
+
/**
|
|
7487
|
+
* A key used to retrieve the header from columns.
|
|
7488
|
+
* @group Props
|
|
7489
|
+
*/
|
|
5880
7490
|
this.colHeaderName = 'header';
|
|
7491
|
+
/**
|
|
7492
|
+
* A key used to retrieve the field from columns.
|
|
7493
|
+
* @group Props
|
|
7494
|
+
*/
|
|
5881
7495
|
this.colFieldName = 'field';
|
|
7496
|
+
/**
|
|
7497
|
+
* Treetable min width of type number denoting pixels or string.
|
|
7498
|
+
* @group Props
|
|
7499
|
+
*/
|
|
5882
7500
|
this.minWidth = '';
|
|
7501
|
+
/**
|
|
7502
|
+
* Whether minWidth prop is used for treetable body only, excluding toolbar and paginator.
|
|
7503
|
+
* @group Props
|
|
7504
|
+
*/
|
|
5883
7505
|
this.minWidthForBodyOnly = true;
|
|
5884
7506
|
/**
|
|
5885
7507
|
* Whether the cell widths scale according to their content or not.
|
|
5886
7508
|
* @group Props
|
|
5887
7509
|
*/
|
|
5888
7510
|
this.autoLayout = true;
|
|
7511
|
+
/**
|
|
7512
|
+
* Whether the treetable should have alternating stripes.
|
|
7513
|
+
* @group Props
|
|
7514
|
+
*/
|
|
5889
7515
|
this.striped = true;
|
|
7516
|
+
/**
|
|
7517
|
+
* Whether the treetable should have borders.
|
|
7518
|
+
* @group Props
|
|
7519
|
+
*/
|
|
5890
7520
|
this.bordered = true;
|
|
7521
|
+
/**
|
|
7522
|
+
* Size of treetable cells, it can be "small", "normal" or "large".
|
|
7523
|
+
* @group Props
|
|
7524
|
+
*/
|
|
5891
7525
|
this.size = 'normal';
|
|
7526
|
+
/**
|
|
7527
|
+
* Whether the treetable should have row selection.
|
|
7528
|
+
* @group Props
|
|
7529
|
+
*/
|
|
5892
7530
|
this.selectable = false;
|
|
7531
|
+
/**
|
|
7532
|
+
* Whether the treetable should have rows highlighting on hover.
|
|
7533
|
+
* @group Props
|
|
7534
|
+
*/
|
|
5893
7535
|
this.rowHover = true;
|
|
7536
|
+
/**
|
|
7537
|
+
* Whether the treetable should show row menu.
|
|
7538
|
+
* @group Props
|
|
7539
|
+
*/
|
|
5894
7540
|
this.showRowMenu = false;
|
|
7541
|
+
/**
|
|
7542
|
+
* When enabled, a loader component is displayed.
|
|
7543
|
+
* @group Props
|
|
7544
|
+
*/
|
|
5895
7545
|
this.loading = false;
|
|
7546
|
+
/**
|
|
7547
|
+
* Inline style of the treetable.
|
|
7548
|
+
* @group Props
|
|
7549
|
+
*/
|
|
5896
7550
|
this.tableStyle = undefined;
|
|
7551
|
+
/**
|
|
7552
|
+
* Style class of the treetable.
|
|
7553
|
+
* @group Props
|
|
7554
|
+
*/
|
|
5897
7555
|
this.tableStyleClass = '';
|
|
5898
|
-
|
|
7556
|
+
/**
|
|
7557
|
+
* Makes all columns sortable if columns prop is provided.
|
|
7558
|
+
* @group Props
|
|
7559
|
+
*/
|
|
7560
|
+
this.sortable = false;
|
|
7561
|
+
/**
|
|
7562
|
+
* Defines whether sorting works on single column or on multiple columns.
|
|
7563
|
+
* @group Props
|
|
7564
|
+
*/
|
|
5899
7565
|
this.sortMode = 'single';
|
|
7566
|
+
/**
|
|
7567
|
+
* Whether to use the default sorting or a custom one using sortFunction.
|
|
7568
|
+
* @group Props
|
|
7569
|
+
*/
|
|
5900
7570
|
this.customSort = false;
|
|
7571
|
+
/**
|
|
7572
|
+
* Whether the treetable has toolbar.
|
|
7573
|
+
* @group Props
|
|
7574
|
+
*/
|
|
5901
7575
|
this.hasToolbar = true;
|
|
7576
|
+
/**
|
|
7577
|
+
* Toolbar size, it can be "small" or "normal".
|
|
7578
|
+
* @group Props
|
|
7579
|
+
*/
|
|
5902
7580
|
this.toolbarSize = 'normal';
|
|
7581
|
+
/**
|
|
7582
|
+
* Toolbar title.
|
|
7583
|
+
* @group Props
|
|
7584
|
+
*/
|
|
5903
7585
|
this.toolbarTitle = '';
|
|
7586
|
+
/**
|
|
7587
|
+
* Toolbar icon name.
|
|
7588
|
+
* @group Props
|
|
7589
|
+
*/
|
|
5904
7590
|
this.toolbarIcon = '';
|
|
7591
|
+
/**
|
|
7592
|
+
* Toolbar icon color.
|
|
7593
|
+
* @group Props
|
|
7594
|
+
*/
|
|
5905
7595
|
this.toolbarIconColor = '';
|
|
7596
|
+
/**
|
|
7597
|
+
* Makes treetable scrollable.
|
|
7598
|
+
* @group Props
|
|
7599
|
+
*/
|
|
5906
7600
|
this.scrollable = true;
|
|
5907
|
-
|
|
5908
|
-
|
|
7601
|
+
/**
|
|
7602
|
+
* Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
|
|
7603
|
+
* @group Props
|
|
7604
|
+
*/
|
|
7605
|
+
this.scrollHeight = '';
|
|
7606
|
+
/**
|
|
7607
|
+
* Whether only the elements within scrollable area should be added into the DOM. Works only if scrollable prop is true.
|
|
7608
|
+
* @group Props
|
|
7609
|
+
*/
|
|
7610
|
+
this.virtualScroll = false;
|
|
7611
|
+
/**
|
|
7612
|
+
* Height of a virtual scroll item in fixed pixels.
|
|
7613
|
+
* @group Props
|
|
7614
|
+
*/
|
|
5909
7615
|
this.virtualScrollItemHeight = 0;
|
|
7616
|
+
/**
|
|
7617
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
7618
|
+
* @group Props
|
|
7619
|
+
*/
|
|
5910
7620
|
this.numToleratedItems = 10;
|
|
7621
|
+
/**
|
|
7622
|
+
* Whether the treetable should have paginator.
|
|
7623
|
+
* @group Props
|
|
7624
|
+
*/
|
|
5911
7625
|
this.paginator = false;
|
|
7626
|
+
/**
|
|
7627
|
+
* Whether to show paginator even there is only one page.
|
|
7628
|
+
* @group Props
|
|
7629
|
+
*/
|
|
5912
7630
|
this.alwaysShowPaginator = true;
|
|
7631
|
+
/**
|
|
7632
|
+
* Array of integer values to display inside rows per page dropdown of paginator.
|
|
7633
|
+
* @group Props
|
|
7634
|
+
*/
|
|
5913
7635
|
this.rowsPerPageOptions = [];
|
|
7636
|
+
/**
|
|
7637
|
+
* Index of the first row to be displayed.
|
|
7638
|
+
* @group Props
|
|
7639
|
+
*/
|
|
5914
7640
|
this.first = 0;
|
|
7641
|
+
/**
|
|
7642
|
+
* Number of rows to display per page.
|
|
7643
|
+
* @group Props
|
|
7644
|
+
*/
|
|
5915
7645
|
this.rows = 0;
|
|
7646
|
+
/**
|
|
7647
|
+
* Whether to reset page on rows change.
|
|
7648
|
+
* @group Props
|
|
7649
|
+
*/
|
|
5916
7650
|
this.resetPageOnRowsChange = false;
|
|
7651
|
+
/**
|
|
7652
|
+
* Whether to reset page on treetable data sorting.
|
|
7653
|
+
* @group Props
|
|
7654
|
+
*/
|
|
5917
7655
|
this.resetPageOnSort = true;
|
|
7656
|
+
/**
|
|
7657
|
+
* Number of total records.
|
|
7658
|
+
* @group Props
|
|
7659
|
+
*/
|
|
5918
7660
|
this.totalRecords = 0;
|
|
7661
|
+
/**
|
|
7662
|
+
* Text to display when there is no data.
|
|
7663
|
+
* @group Props
|
|
7664
|
+
*/
|
|
5919
7665
|
this.emptyMessage = 'No data';
|
|
7666
|
+
/**
|
|
7667
|
+
* Height of treetable's body when there is no data, of type number denoting pixels or string.
|
|
7668
|
+
* @group Props
|
|
7669
|
+
*/
|
|
5920
7670
|
this.emptyBodyHeight = '';
|
|
7671
|
+
/**
|
|
7672
|
+
* Defines if data is loaded and interacted with in lazy manner.
|
|
7673
|
+
* @group Props
|
|
7674
|
+
*/
|
|
5921
7675
|
this.lazy = false;
|
|
7676
|
+
/**
|
|
7677
|
+
* Whether to call lazy loading on initialization.
|
|
7678
|
+
* @group Props
|
|
7679
|
+
*/
|
|
5922
7680
|
this.lazyLoadOnInit = true;
|
|
7681
|
+
/**
|
|
7682
|
+
* Whether to show global filter in the toolbar.
|
|
7683
|
+
* @group Props
|
|
7684
|
+
*/
|
|
5923
7685
|
this.showGlobalFilter = false;
|
|
7686
|
+
/**
|
|
7687
|
+
* Global filter placeholder.
|
|
7688
|
+
* @group Props
|
|
7689
|
+
*/
|
|
5924
7690
|
this.globalFilterPlaceholder = 'Search';
|
|
7691
|
+
/**
|
|
7692
|
+
* An array of fields to use in global filtering.
|
|
7693
|
+
* @group Props
|
|
7694
|
+
*/
|
|
5925
7695
|
this.globalFilterFields = [];
|
|
5926
|
-
|
|
7696
|
+
/**
|
|
7697
|
+
* Whether to clear global filter on data loading.
|
|
7698
|
+
* @group Props
|
|
7699
|
+
*/
|
|
7700
|
+
this.clearGlobalFilterOnLoading = false;
|
|
7701
|
+
/**
|
|
7702
|
+
* Whether to show remove button in the toolbar when rows are selected.
|
|
7703
|
+
* @group Props
|
|
7704
|
+
*/
|
|
5927
7705
|
this.showRemoveBtnOnSelect = true;
|
|
7706
|
+
/**
|
|
7707
|
+
* Whether removeBtnOnSelect is disabled.
|
|
7708
|
+
* @group Props
|
|
7709
|
+
*/
|
|
5928
7710
|
this.removeBtnOnSelectDisabled = false;
|
|
7711
|
+
/**
|
|
7712
|
+
* Whether to show additional button in the toolbar when rows are selected.
|
|
7713
|
+
* @group Props
|
|
7714
|
+
*/
|
|
5929
7715
|
this.showAdditionalBtnOnSelect = false;
|
|
7716
|
+
/**
|
|
7717
|
+
* AdditionalBtnOnSelect title.
|
|
7718
|
+
* @group Props
|
|
7719
|
+
*/
|
|
5930
7720
|
this.additionalBtnOnSelectTitle = 'Select action';
|
|
7721
|
+
/**
|
|
7722
|
+
* Whether additionalBtnOnSelect is disabled.
|
|
7723
|
+
* @group Props
|
|
7724
|
+
*/
|
|
5931
7725
|
this.additionalBtnOnSelectDisabled = false;
|
|
7726
|
+
/**
|
|
7727
|
+
* Whether to show action button in the toolbar.
|
|
7728
|
+
* @group Props
|
|
7729
|
+
*/
|
|
5932
7730
|
this.showActionBtn = false;
|
|
7731
|
+
/**
|
|
7732
|
+
* Action button title.
|
|
7733
|
+
* @group Props
|
|
7734
|
+
*/
|
|
5933
7735
|
this.actionBtnTitle = 'Action';
|
|
7736
|
+
/**
|
|
7737
|
+
* Whether actionBtn is disabled.
|
|
7738
|
+
* @group Props
|
|
7739
|
+
*/
|
|
5934
7740
|
this.actionBtnDisabled = false;
|
|
7741
|
+
/**
|
|
7742
|
+
* Whether to show data reload button in the toolbar.
|
|
7743
|
+
* @group Props
|
|
7744
|
+
*/
|
|
5935
7745
|
this.showDataReloadBtn = false;
|
|
7746
|
+
/**
|
|
7747
|
+
* Whether dataReloadBtn is disabled.
|
|
7748
|
+
* @group Props
|
|
7749
|
+
*/
|
|
5936
7750
|
this.dataReloadBtnDisabled = false;
|
|
5937
|
-
|
|
7751
|
+
/**
|
|
7752
|
+
* Whether the treetable should show columnsToggle menu, where you can choose which columns to be displayed. If external body template is provided, use columnsSelected event emitter.
|
|
7753
|
+
* @group Props
|
|
7754
|
+
*/
|
|
7755
|
+
this.showColumnsToggleBtn = false;
|
|
7756
|
+
/**
|
|
7757
|
+
* Whether columnsToggle button is disabled.
|
|
7758
|
+
* @group Props
|
|
7759
|
+
*/
|
|
5938
7760
|
this.columnsToggleBtnDisabled = false;
|
|
5939
|
-
|
|
7761
|
+
/**
|
|
7762
|
+
* Array of initial columns to show in the treetable. If not provided, all columns are initially visible.
|
|
7763
|
+
* @group Props
|
|
7764
|
+
*/
|
|
7765
|
+
this.initialColumns = [];
|
|
7766
|
+
/**
|
|
7767
|
+
* Callback to invoke on selected node change.
|
|
7768
|
+
* @param {any[]} array - selection changed.
|
|
7769
|
+
* @group Emits
|
|
7770
|
+
*/
|
|
5940
7771
|
this.selectionChanged = new EventEmitter();
|
|
7772
|
+
/**
|
|
7773
|
+
* Callback to invoke when action button is clicked.
|
|
7774
|
+
* @param {void} void - action button clicked.
|
|
7775
|
+
* @group Emits
|
|
7776
|
+
*/
|
|
5941
7777
|
this.actionBtnClicked = new EventEmitter();
|
|
7778
|
+
/**
|
|
7779
|
+
* Callback to invoke when additional button on select is clicked.
|
|
7780
|
+
* @param {any[]} any[] - selected data.
|
|
7781
|
+
* @group Emits
|
|
7782
|
+
*/
|
|
5942
7783
|
this.additionalBtnOnSelectClicked = new EventEmitter();
|
|
7784
|
+
/**
|
|
7785
|
+
* Callback to invoke when edit-row button is clicked.
|
|
7786
|
+
* @param {any} any - button clicked.
|
|
7787
|
+
* @group Emits
|
|
7788
|
+
*/
|
|
5943
7789
|
this.editRowBtnClicked = new EventEmitter();
|
|
7790
|
+
/**
|
|
7791
|
+
* Callback to invoke when rows are removed.
|
|
7792
|
+
* @param {any} any - rows removed.
|
|
7793
|
+
* @group Emits
|
|
7794
|
+
*/
|
|
5944
7795
|
this.rowsRemoved = new EventEmitter();
|
|
7796
|
+
/**
|
|
7797
|
+
* Callback to invoke when page is changed.
|
|
7798
|
+
* @param {any} any - page changed.
|
|
7799
|
+
* @group Emits
|
|
7800
|
+
*/
|
|
5945
7801
|
this.pageChanged = new EventEmitter();
|
|
7802
|
+
/**
|
|
7803
|
+
* Callback to invoke when data is sorted.
|
|
7804
|
+
* @param {any} any - Sort data.
|
|
7805
|
+
* @group Emits
|
|
7806
|
+
*/
|
|
5946
7807
|
this.sorted = new EventEmitter();
|
|
7808
|
+
/**
|
|
7809
|
+
* Callback to invoke when data is filtered.
|
|
7810
|
+
* @param {any} any - Custom filter event.
|
|
7811
|
+
* @group Emits
|
|
7812
|
+
*/
|
|
5947
7813
|
this.filtered = new EventEmitter();
|
|
7814
|
+
/**
|
|
7815
|
+
* Callback to invoke on selected columns.
|
|
7816
|
+
* @param {any[]} object[] - selection changed.
|
|
7817
|
+
* @group Emits
|
|
7818
|
+
*/
|
|
5948
7819
|
this.columnsSelected = new EventEmitter();
|
|
7820
|
+
/**
|
|
7821
|
+
* Callback to invoke when paging, sorting or filtering happens in lazy mode.
|
|
7822
|
+
* @param {any} any - Custom lazy load event.
|
|
7823
|
+
* @group Emits
|
|
7824
|
+
*/
|
|
5949
7825
|
this.lazyLoaded = new EventEmitter();
|
|
7826
|
+
/**
|
|
7827
|
+
* Callback to invoke when data reload button is clicked.
|
|
7828
|
+
* @param {any} any - data reload button clicked.
|
|
7829
|
+
* @group Emits
|
|
7830
|
+
*/
|
|
5950
7831
|
this.dataReloadBtnClicked = new EventEmitter();
|
|
7832
|
+
/**
|
|
7833
|
+
* Callback to invoke when a node is expanded.
|
|
7834
|
+
* @param {any} any - Node instance.
|
|
7835
|
+
* @group Emits
|
|
7836
|
+
*/
|
|
5951
7837
|
this.nodeExpanded = new EventEmitter();
|
|
7838
|
+
/**
|
|
7839
|
+
* Callback to invoke when a node is collapsed.
|
|
7840
|
+
* @param {any} any - Node collapse event.
|
|
7841
|
+
* @group Emits
|
|
7842
|
+
*/
|
|
5952
7843
|
this.nodeCollapsed = new EventEmitter();
|
|
7844
|
+
/**
|
|
7845
|
+
* Callback to invoke when a node is selected.
|
|
7846
|
+
* @param {any} any - Node instance.
|
|
7847
|
+
* @group Emits
|
|
7848
|
+
*/
|
|
5953
7849
|
this.nodeSelected = new EventEmitter();
|
|
7850
|
+
/**
|
|
7851
|
+
* Callback to invoke when a node is unselected.
|
|
7852
|
+
* @param {any} any - Custom node unselect event.
|
|
7853
|
+
* @group Emits
|
|
7854
|
+
*/
|
|
5954
7855
|
this.nodeUnselected = new EventEmitter();
|
|
5955
7856
|
/**
|
|
5956
7857
|
* A function to implement custom sorting. customSort must be true.
|
|
@@ -6758,23 +8659,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6758
8659
|
args: ['colToggleMenu']
|
|
6759
8660
|
}] } });
|
|
6760
8661
|
|
|
8662
|
+
/**
|
|
8663
|
+
* CpsTreeTableColumnFilterDirective is a filtering directive used to filter single or multiple columns in treetable.
|
|
8664
|
+
* @group Directives
|
|
8665
|
+
*/
|
|
6761
8666
|
class CpsTreeTableColumnFilterDirective {
|
|
6762
8667
|
constructor(elementRef, viewContainerRef) {
|
|
6763
8668
|
this.elementRef = elementRef;
|
|
6764
8669
|
this.viewContainerRef = viewContainerRef;
|
|
8670
|
+
/**
|
|
8671
|
+
* Type of filter in treetable, it can be of type "number", "boolean", "text", "date" or "category".
|
|
8672
|
+
* @group Props
|
|
8673
|
+
*/
|
|
6765
8674
|
this.filterType = 'text';
|
|
8675
|
+
/**
|
|
8676
|
+
* Whether the filter menu should be persistent.
|
|
8677
|
+
* @group Props
|
|
8678
|
+
*/
|
|
6766
8679
|
this.filterPersistent = false;
|
|
8680
|
+
/**
|
|
8681
|
+
* Whether the filter should have clear button.
|
|
8682
|
+
* @group Props
|
|
8683
|
+
*/
|
|
6767
8684
|
this.filterShowClearButton = true;
|
|
8685
|
+
/**
|
|
8686
|
+
* Whether the filter should have apply button.
|
|
8687
|
+
* @group Props
|
|
8688
|
+
*/
|
|
6768
8689
|
this.filterShowApplyButton = true;
|
|
8690
|
+
/**
|
|
8691
|
+
* Whether the filter should have close button.
|
|
8692
|
+
* @group Props
|
|
8693
|
+
*/
|
|
6769
8694
|
this.filterShowCloseButton = false;
|
|
8695
|
+
/**
|
|
8696
|
+
* Whether the filter should have match modes.
|
|
8697
|
+
* @group Props
|
|
8698
|
+
*/
|
|
6770
8699
|
this.filterShowMatchModes = true;
|
|
8700
|
+
/**
|
|
8701
|
+
* Match modes for filter.
|
|
8702
|
+
* @group Props
|
|
8703
|
+
*/
|
|
6771
8704
|
this.filterMatchModes = [];
|
|
8705
|
+
/**
|
|
8706
|
+
* Whether the filter should have operator.
|
|
8707
|
+
* @group Props
|
|
8708
|
+
*/
|
|
6772
8709
|
this.filterShowOperator = true;
|
|
8710
|
+
/**
|
|
8711
|
+
* Title of the filter.
|
|
8712
|
+
* @group Props
|
|
8713
|
+
*/
|
|
6773
8714
|
this.filterHeaderTitle = '';
|
|
8715
|
+
/**
|
|
8716
|
+
* Whether the filter should hide on clear.
|
|
8717
|
+
* @group Props
|
|
8718
|
+
*/
|
|
6774
8719
|
this.filterHideOnClear = false;
|
|
8720
|
+
/**
|
|
8721
|
+
* Options for category filter.
|
|
8722
|
+
* @group Props
|
|
8723
|
+
*/
|
|
6775
8724
|
this.filterCategoryOptions = [];
|
|
6776
|
-
|
|
6777
|
-
|
|
8725
|
+
/**
|
|
8726
|
+
* Whether to show category filter as button toggles.
|
|
8727
|
+
* @group Props
|
|
8728
|
+
*/
|
|
8729
|
+
this.filterAsButtonToggle = false;
|
|
8730
|
+
/**
|
|
8731
|
+
* Single selection for category filter.
|
|
8732
|
+
* @group Props
|
|
8733
|
+
*/
|
|
8734
|
+
this.filterSingleSelection = false;
|
|
8735
|
+
/**
|
|
8736
|
+
* Placeholder for filter constraints.
|
|
8737
|
+
* @group Props
|
|
8738
|
+
*/
|
|
6778
8739
|
this.filterPlaceholder = '';
|
|
6779
8740
|
this.filterCompRef = this.viewContainerRef.createComponent(TableColumnFilterComponent);
|
|
6780
8741
|
}
|
|
@@ -6872,7 +8833,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6872
8833
|
type: Input
|
|
6873
8834
|
}] } });
|
|
6874
8835
|
|
|
8836
|
+
/**
|
|
8837
|
+
* CpsTagComponent is used to categorize content.
|
|
8838
|
+
* @group Components
|
|
8839
|
+
*/
|
|
6875
8840
|
class CpsTagComponent {
|
|
8841
|
+
/**
|
|
8842
|
+
* Tag value.
|
|
8843
|
+
* @group Props
|
|
8844
|
+
*/
|
|
6876
8845
|
set value(value) {
|
|
6877
8846
|
this._value = value;
|
|
6878
8847
|
this.onChange(value);
|
|
@@ -6882,11 +8851,36 @@ class CpsTagComponent {
|
|
|
6882
8851
|
}
|
|
6883
8852
|
constructor(_control) {
|
|
6884
8853
|
this._control = _control;
|
|
6885
|
-
|
|
8854
|
+
/**
|
|
8855
|
+
* Type of the tag. It can be security, classification or custom, has higher precedence over color.
|
|
8856
|
+
* @group Props
|
|
8857
|
+
*/
|
|
8858
|
+
this.type = 'custom';
|
|
8859
|
+
/**
|
|
8860
|
+
* Label of the tag.
|
|
8861
|
+
* @group Props
|
|
8862
|
+
*/
|
|
6886
8863
|
this.label = '';
|
|
8864
|
+
/**
|
|
8865
|
+
* Color of the tag.
|
|
8866
|
+
* @group Props
|
|
8867
|
+
*/
|
|
6887
8868
|
this.color = '';
|
|
8869
|
+
/**
|
|
8870
|
+
* Whether the tag should be disabled.
|
|
8871
|
+
* @group Props
|
|
8872
|
+
*/
|
|
6888
8873
|
this.disabled = false;
|
|
8874
|
+
/**
|
|
8875
|
+
* Whether the tag should be selectable.
|
|
8876
|
+
* @group Props
|
|
8877
|
+
*/
|
|
6889
8878
|
this.selectable = false;
|
|
8879
|
+
/**
|
|
8880
|
+
* Callback to invoke on value change.
|
|
8881
|
+
* @param {boolean} boolean - value change.
|
|
8882
|
+
* @group Emits
|
|
8883
|
+
*/
|
|
6890
8884
|
this.valueChanged = new EventEmitter();
|
|
6891
8885
|
this.classesList = [];
|
|
6892
8886
|
this.tagColor = '';
|
|
@@ -6971,15 +8965,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6971
8965
|
type: Output
|
|
6972
8966
|
}] } });
|
|
6973
8967
|
|
|
8968
|
+
/**
|
|
8969
|
+
* CpsPaginatorComponent is a generic component to display content in paged format.
|
|
8970
|
+
* @group Components
|
|
8971
|
+
*/
|
|
6974
8972
|
class CpsPaginatorComponent {
|
|
6975
8973
|
constructor() {
|
|
8974
|
+
/**
|
|
8975
|
+
* Zero-relative number of the first row to be displayed.
|
|
8976
|
+
* @group Props
|
|
8977
|
+
*/
|
|
6976
8978
|
this.first = 0;
|
|
8979
|
+
/**
|
|
8980
|
+
* Rows count to display per page.
|
|
8981
|
+
* @group Props
|
|
8982
|
+
*/
|
|
6977
8983
|
this.rows = 0;
|
|
8984
|
+
/**
|
|
8985
|
+
* Number of total records.
|
|
8986
|
+
* @group Props
|
|
8987
|
+
*/
|
|
6978
8988
|
this.totalRecords = 0;
|
|
8989
|
+
/**
|
|
8990
|
+
* Array of integer values to display inside rows per page dropdown.
|
|
8991
|
+
* @group Props
|
|
8992
|
+
*/
|
|
6979
8993
|
this.rowsPerPageOptions = [];
|
|
8994
|
+
/**
|
|
8995
|
+
* Whether to show it even there is only one page.
|
|
8996
|
+
* @group Props
|
|
8997
|
+
*/
|
|
6980
8998
|
this.alwaysShow = true;
|
|
8999
|
+
/**
|
|
9000
|
+
* Color of paginator background.
|
|
9001
|
+
* @group Props
|
|
9002
|
+
*/
|
|
6981
9003
|
this.backgroundColor = 'transparent';
|
|
9004
|
+
/**
|
|
9005
|
+
* Whether to reset page index when the number of rows per page changes.
|
|
9006
|
+
* @group Props
|
|
9007
|
+
*/
|
|
6982
9008
|
this.resetPageOnRowsChange = false;
|
|
9009
|
+
/**
|
|
9010
|
+
* Callback to invoke when page changes, the event object contains information about the new state.
|
|
9011
|
+
* @param {any} any - page changed.
|
|
9012
|
+
* @group Emits
|
|
9013
|
+
*/
|
|
6983
9014
|
this.pageChanged = new EventEmitter();
|
|
6984
9015
|
this.rowOptions = [];
|
|
6985
9016
|
}
|
|
@@ -7039,6 +9070,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7039
9070
|
args: ['paginator']
|
|
7040
9071
|
}] } });
|
|
7041
9072
|
|
|
9073
|
+
/**
|
|
9074
|
+
* The CpsPaginatePipe is a pipe designed to provide a set of items in batches, taking into account specified pagination parameters.
|
|
9075
|
+
* @group Pipes
|
|
9076
|
+
*/
|
|
7042
9077
|
class CpsPaginatePipe {
|
|
7043
9078
|
transform(items, config) {
|
|
7044
9079
|
if (!items) {
|
|
@@ -7063,18 +9098,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7063
9098
|
}]
|
|
7064
9099
|
}] });
|
|
7065
9100
|
|
|
9101
|
+
/**
|
|
9102
|
+
* CpsExpansionPanelComponent is a component that provides content on expansion.
|
|
9103
|
+
* @group Components
|
|
9104
|
+
*/
|
|
7066
9105
|
class CpsExpansionPanelComponent {
|
|
7067
9106
|
constructor() {
|
|
9107
|
+
/**
|
|
9108
|
+
* Title of the expansionPanel element.
|
|
9109
|
+
* @group Props
|
|
9110
|
+
*/
|
|
7068
9111
|
this.headerTitle = '';
|
|
9112
|
+
/**
|
|
9113
|
+
* Background color of the expansion panel element.
|
|
9114
|
+
* @group Props
|
|
9115
|
+
*/
|
|
7069
9116
|
this.backgroundColor = 'transparent';
|
|
9117
|
+
/**
|
|
9118
|
+
* Whether to show the chevron icon.
|
|
9119
|
+
* @group Props
|
|
9120
|
+
*/
|
|
7070
9121
|
this.showChevron = true;
|
|
9122
|
+
/**
|
|
9123
|
+
* Indicates current expansion state.
|
|
9124
|
+
* @group Props
|
|
9125
|
+
*/
|
|
7071
9126
|
this.isExpanded = false;
|
|
9127
|
+
/**
|
|
9128
|
+
* Whether expansion panel is disabled.
|
|
9129
|
+
* @group Props
|
|
9130
|
+
*/
|
|
7072
9131
|
this.disabled = false;
|
|
9132
|
+
/**
|
|
9133
|
+
* If true, expansion panel element will have borders.
|
|
9134
|
+
* @group Props
|
|
9135
|
+
*/
|
|
7073
9136
|
this.bordered = true;
|
|
9137
|
+
/**
|
|
9138
|
+
* The border radius of the component.
|
|
9139
|
+
* @group Props
|
|
9140
|
+
*/
|
|
7074
9141
|
this.borderRadius = '4px';
|
|
9142
|
+
/**
|
|
9143
|
+
* The width of the expansion panel of type number denoting pixels or string.
|
|
9144
|
+
* @group Props
|
|
9145
|
+
*/
|
|
7075
9146
|
this.width = '100%';
|
|
9147
|
+
/**
|
|
9148
|
+
* Name of the icon in front of the title.
|
|
9149
|
+
* @group Props
|
|
9150
|
+
*/
|
|
7076
9151
|
this.prefixIcon = '';
|
|
9152
|
+
/**
|
|
9153
|
+
* Callback to invoke after a tab gets collapsed.
|
|
9154
|
+
* @param {void}
|
|
9155
|
+
* @group Emits
|
|
9156
|
+
*/
|
|
7077
9157
|
this.afterCollapse = new EventEmitter();
|
|
9158
|
+
/**
|
|
9159
|
+
* Callback to invoke after a tab gets expanded.
|
|
9160
|
+
* @param {void}
|
|
9161
|
+
* @group Emits
|
|
9162
|
+
*/
|
|
7078
9163
|
this.afterExpand = new EventEmitter();
|
|
7079
9164
|
}
|
|
7080
9165
|
ngOnInit() {
|
|
@@ -7175,13 +9260,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7175
9260
|
type: Output
|
|
7176
9261
|
}] } });
|
|
7177
9262
|
|
|
9263
|
+
/**
|
|
9264
|
+
* CpsSidebarMenuComponent is a vertical menu panel component displayed at the edge of the screen.
|
|
9265
|
+
* @group Components
|
|
9266
|
+
*/
|
|
7178
9267
|
class CpsSidebarMenuComponent {
|
|
7179
9268
|
// eslint-disable-next-line no-useless-constructor
|
|
7180
9269
|
constructor(_router) {
|
|
7181
9270
|
this._router = _router;
|
|
9271
|
+
/**
|
|
9272
|
+
* An array of menu items.
|
|
9273
|
+
* @group Props
|
|
9274
|
+
*/
|
|
7182
9275
|
this.items = [];
|
|
9276
|
+
/**
|
|
9277
|
+
* Indicates current expansion state of the sidebar.
|
|
9278
|
+
* @group Props
|
|
9279
|
+
*/
|
|
7183
9280
|
this.isExpanded = true;
|
|
9281
|
+
/**
|
|
9282
|
+
* Whether the menu items should allow activating only exact links.
|
|
9283
|
+
* @group Props
|
|
9284
|
+
*/
|
|
7184
9285
|
this.exactRoutes = false;
|
|
9286
|
+
/**
|
|
9287
|
+
* Height of the sidebar, of type number denoting pixels or string.
|
|
9288
|
+
* @group Props
|
|
9289
|
+
*/
|
|
7185
9290
|
this.height = '100%';
|
|
7186
9291
|
}
|
|
7187
9292
|
ngOnInit() {
|
|
@@ -7256,7 +9361,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7256
9361
|
args: ['popupMenu']
|
|
7257
9362
|
}] } });
|
|
7258
9363
|
|
|
9364
|
+
/**
|
|
9365
|
+
* CpsTextareaComponent is a textarea component.
|
|
9366
|
+
* @group Components
|
|
9367
|
+
*/
|
|
7259
9368
|
class CpsTextareaComponent {
|
|
9369
|
+
/**
|
|
9370
|
+
* Value of the textarea.
|
|
9371
|
+
* @group Props
|
|
9372
|
+
*/
|
|
7260
9373
|
set value(value) {
|
|
7261
9374
|
if (!value)
|
|
7262
9375
|
value = '';
|
|
@@ -7269,27 +9382,119 @@ class CpsTextareaComponent {
|
|
|
7269
9382
|
constructor(_control, _elementRef) {
|
|
7270
9383
|
this._control = _control;
|
|
7271
9384
|
this._elementRef = _elementRef;
|
|
9385
|
+
/**
|
|
9386
|
+
* Label of the textarea.
|
|
9387
|
+
* @group Props
|
|
9388
|
+
*/
|
|
7272
9389
|
this.label = '';
|
|
9390
|
+
/**
|
|
9391
|
+
* Placeholder text for the textarea.
|
|
9392
|
+
* @group Props
|
|
9393
|
+
*/
|
|
7273
9394
|
this.placeholder = 'Please enter';
|
|
9395
|
+
/**
|
|
9396
|
+
* Number of rows in the textarea.
|
|
9397
|
+
* @group Props
|
|
9398
|
+
*/
|
|
7274
9399
|
this.rows = 5;
|
|
9400
|
+
/**
|
|
9401
|
+
* The cols attribute specifies the visible width of a textarea.
|
|
9402
|
+
* @group Props
|
|
9403
|
+
*/
|
|
7275
9404
|
this.cols = 20;
|
|
9405
|
+
/**
|
|
9406
|
+
* Whether the textarea can auto focus.
|
|
9407
|
+
* @group Props
|
|
9408
|
+
*/
|
|
7276
9409
|
this.autofocus = false;
|
|
9410
|
+
/**
|
|
9411
|
+
* Bottom hint text for the textarea.
|
|
9412
|
+
* @group Props
|
|
9413
|
+
*/
|
|
7277
9414
|
this.hint = '';
|
|
9415
|
+
/**
|
|
9416
|
+
* Whether the textarea is disabled.
|
|
9417
|
+
* @group Props
|
|
9418
|
+
*/
|
|
7278
9419
|
this.disabled = false;
|
|
9420
|
+
/**
|
|
9421
|
+
* Width of the textarea, it can be of type number denoting pixels or string.
|
|
9422
|
+
* @group Props
|
|
9423
|
+
*/
|
|
7279
9424
|
this.width = '100%';
|
|
9425
|
+
/**
|
|
9426
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
9427
|
+
* @group Props
|
|
9428
|
+
*/
|
|
7280
9429
|
this.clearable = false;
|
|
9430
|
+
/**
|
|
9431
|
+
* Hides hint and validation errors.
|
|
9432
|
+
* @group Props
|
|
9433
|
+
*/
|
|
7281
9434
|
this.hideDetails = false;
|
|
9435
|
+
/**
|
|
9436
|
+
* Whether the textarea should have persistent clear icon.
|
|
9437
|
+
* @group Props
|
|
9438
|
+
*/
|
|
7282
9439
|
this.persistentClear = false;
|
|
9440
|
+
/**
|
|
9441
|
+
* Error message.
|
|
9442
|
+
* @group Props
|
|
9443
|
+
*/
|
|
7283
9444
|
this.error = '';
|
|
9445
|
+
/**
|
|
9446
|
+
* Whether the component can be resized vertically or not.
|
|
9447
|
+
* @group Props
|
|
9448
|
+
*/
|
|
7284
9449
|
this.resizable = 'vertical';
|
|
9450
|
+
/**
|
|
9451
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
9452
|
+
* @group Props
|
|
9453
|
+
*/
|
|
7285
9454
|
this.infoTooltip = '';
|
|
9455
|
+
/**
|
|
9456
|
+
* Info tooltip class for styling.
|
|
9457
|
+
* @group Props
|
|
9458
|
+
*/
|
|
7286
9459
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
9460
|
+
/**
|
|
9461
|
+
* Max width of infoTooltip, of type number denoting pixels or string.
|
|
9462
|
+
* @group Props
|
|
9463
|
+
*/
|
|
7287
9464
|
this.infoTooltipMaxWidth = '100%';
|
|
9465
|
+
/**
|
|
9466
|
+
* Whether the infoTooltip is persistent.
|
|
9467
|
+
* @group Props
|
|
9468
|
+
*/
|
|
7288
9469
|
this.infoTooltipPersistent = false;
|
|
9470
|
+
/**
|
|
9471
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
9472
|
+
* @group Props
|
|
9473
|
+
*/
|
|
7289
9474
|
this.infoTooltipPosition = 'top';
|
|
9475
|
+
/**
|
|
9476
|
+
* Callback to invoke on value change.
|
|
9477
|
+
* @param {string} string - value changed.
|
|
9478
|
+
* @group Emits
|
|
9479
|
+
*/
|
|
7290
9480
|
this.valueChanged = new EventEmitter();
|
|
9481
|
+
/**
|
|
9482
|
+
* Callback to invoke when the component receives focus.
|
|
9483
|
+
* @param {any}
|
|
9484
|
+
* @group Emits
|
|
9485
|
+
*/
|
|
7291
9486
|
this.focused = new EventEmitter();
|
|
9487
|
+
/**
|
|
9488
|
+
* Callback to invoke when the prefixIcon is clicked.
|
|
9489
|
+
* @param {any}
|
|
9490
|
+
* @group Emits
|
|
9491
|
+
*/
|
|
7292
9492
|
this.prefixIconClicked = new EventEmitter();
|
|
9493
|
+
/**
|
|
9494
|
+
* Callback to invoke when the component loses focus.
|
|
9495
|
+
* @param {any}
|
|
9496
|
+
* @group Emits
|
|
9497
|
+
*/
|
|
7293
9498
|
this.blurred = new EventEmitter();
|
|
7294
9499
|
this._statusChangesSubscription = new Subscription();
|
|
7295
9500
|
this._value = '';
|
|
@@ -7446,16 +9651,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7446
9651
|
type: Output
|
|
7447
9652
|
}] } });
|
|
7448
9653
|
|
|
9654
|
+
/**
|
|
9655
|
+
* CpsTabComponent is a tab within a tab-group.
|
|
9656
|
+
* @group Components
|
|
9657
|
+
*/
|
|
7449
9658
|
class CpsTabComponent {
|
|
7450
9659
|
constructor() {
|
|
9660
|
+
/**
|
|
9661
|
+
* Label of the tab.
|
|
9662
|
+
* @group Props
|
|
9663
|
+
*/
|
|
7451
9664
|
this.label = '';
|
|
9665
|
+
/**
|
|
9666
|
+
* Icon before the label.
|
|
9667
|
+
* @group Props
|
|
9668
|
+
*/
|
|
7452
9669
|
this.icon = '';
|
|
9670
|
+
/**
|
|
9671
|
+
* Whether tab is disabled.
|
|
9672
|
+
* @group Props
|
|
9673
|
+
*/
|
|
7453
9674
|
this.disabled = false;
|
|
9675
|
+
/**
|
|
9676
|
+
* Whether to show the tooltip on tab hover.
|
|
9677
|
+
* @group Props
|
|
9678
|
+
*/
|
|
7454
9679
|
this.tooltipText = '';
|
|
9680
|
+
/**
|
|
9681
|
+
* Class for styling the tab tooltip.
|
|
9682
|
+
* @group Props
|
|
9683
|
+
*/
|
|
7455
9684
|
this.tooltipContentClass = 'cps-tooltip-content';
|
|
9685
|
+
/**
|
|
9686
|
+
* Max width of the tooltip, of type number denoting pixels or string.
|
|
9687
|
+
* @group Props
|
|
9688
|
+
*/
|
|
7456
9689
|
this.tooltipMaxWidth = '100%';
|
|
9690
|
+
/**
|
|
9691
|
+
* Whether the tooltip should have persistent info.
|
|
9692
|
+
* @group Props
|
|
9693
|
+
*/
|
|
7457
9694
|
this.tooltipPersistent = false;
|
|
9695
|
+
/**
|
|
9696
|
+
* Badge value to show on the tab after the label in a form of a circle.
|
|
9697
|
+
* @group Props
|
|
9698
|
+
*/
|
|
7458
9699
|
this.badgeValue = '';
|
|
9700
|
+
/**
|
|
9701
|
+
* Tooltip text to show on badge hover.
|
|
9702
|
+
* @group Props
|
|
9703
|
+
*/
|
|
7459
9704
|
this.badgeTooltip = '';
|
|
7460
9705
|
this.active = false;
|
|
7461
9706
|
}
|
|
@@ -7488,15 +9733,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7488
9733
|
args: [TemplateRef]
|
|
7489
9734
|
}] } });
|
|
7490
9735
|
|
|
9736
|
+
/**
|
|
9737
|
+
* CpsTabGroupComponent is a navigation component that displays items as tab headers.
|
|
9738
|
+
* @group Components
|
|
9739
|
+
*/
|
|
7491
9740
|
class CpsTabGroupComponent {
|
|
7492
9741
|
// eslint-disable-next-line no-useless-constructor
|
|
7493
9742
|
constructor(cdRef) {
|
|
7494
9743
|
this.cdRef = cdRef;
|
|
9744
|
+
/**
|
|
9745
|
+
* Index of the selected tab.
|
|
9746
|
+
* @group Props
|
|
9747
|
+
*/
|
|
7495
9748
|
this.selectedIndex = 0;
|
|
7496
|
-
|
|
9749
|
+
/**
|
|
9750
|
+
* Whether to apply an alternative 'subtabs' styling.
|
|
9751
|
+
* @group Props
|
|
9752
|
+
*/
|
|
9753
|
+
this.isSubTabs = false;
|
|
9754
|
+
/**
|
|
9755
|
+
* Transition options of how content appears, it can be "slide" or "fade".
|
|
9756
|
+
* @group Props
|
|
9757
|
+
*/
|
|
7497
9758
|
this.animationType = 'slide';
|
|
9759
|
+
/**
|
|
9760
|
+
* Background styling of tabs.
|
|
9761
|
+
* @group Props
|
|
9762
|
+
*/
|
|
7498
9763
|
this.tabsBackground = 'inherit';
|
|
9764
|
+
/**
|
|
9765
|
+
* Callback to invoke before tab change.
|
|
9766
|
+
* @param {TabChangeEvent} any - tab changed.
|
|
9767
|
+
* @group Emits
|
|
9768
|
+
*/
|
|
7499
9769
|
this.beforeTabChanged = new EventEmitter();
|
|
9770
|
+
/**
|
|
9771
|
+
* Callback to invoke after tab change.
|
|
9772
|
+
* @param {TabChangeEvent} any - tab changed.
|
|
9773
|
+
* @group Emits
|
|
9774
|
+
*/
|
|
7500
9775
|
this.afterTabChanged = new EventEmitter();
|
|
7501
9776
|
this.backBtnVisible = false;
|
|
7502
9777
|
this.forwardBtnVisible = false;
|
|
@@ -8316,7 +10591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
8316
10591
|
|
|
8317
10592
|
/**
|
|
8318
10593
|
* Service for showing CpsDialog.
|
|
8319
|
-
* @group
|
|
10594
|
+
* @group Services
|
|
8320
10595
|
*/
|
|
8321
10596
|
class CpsDialogService {
|
|
8322
10597
|
// eslint-disable-next-line no-useless-constructor
|