primeng 17.8.0 → 17.10.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/api/primeicons.d.ts +5 -5
- package/api/translation.d.ts +1 -0
- package/api/translationkeys.d.ts +1 -0
- package/buttongroup/buttongroup.d.ts +11 -0
- package/buttongroup/index.d.ts +5 -0
- package/buttongroup/public_api.d.ts +1 -0
- package/colorpicker/colorpicker.d.ts +1 -0
- package/esm2022/api/primeicons.mjs +6 -6
- package/esm2022/api/primengconfig.mjs +3 -2
- package/esm2022/api/translation.mjs +1 -1
- package/esm2022/api/translationkeys.mjs +2 -1
- package/esm2022/autocomplete/autocomplete.mjs +11 -11
- package/esm2022/buttongroup/buttongroup.mjs +38 -0
- package/esm2022/buttongroup/primeng-buttongroup.mjs +5 -0
- package/esm2022/buttongroup/public_api.mjs +2 -0
- package/esm2022/calendar/calendar.mjs +9 -9
- package/esm2022/cascadeselect/cascadeselect.mjs +7 -7
- package/esm2022/colorpicker/colorpicker.mjs +7 -1
- package/esm2022/dialog/dialog.mjs +4 -2
- package/esm2022/dropdown/dropdown.mjs +15 -13
- package/esm2022/floatlabel/floatlabel.mjs +44 -0
- package/esm2022/floatlabel/primeng-floatlabel.mjs +5 -0
- package/esm2022/floatlabel/public_api.mjs +2 -0
- package/esm2022/iconfield/iconfield.mjs +44 -0
- package/esm2022/iconfield/primeng-iconfield.mjs +5 -0
- package/esm2022/iconfield/public_api.mjs +2 -0
- package/esm2022/inputicon/inputicon.mjs +38 -0
- package/esm2022/inputicon/primeng-inputicon.mjs +5 -0
- package/esm2022/inputicon/public_api.mjs +2 -0
- package/esm2022/inputnumber/inputnumber.interface.mjs +1 -1
- package/esm2022/inputnumber/inputnumber.mjs +27 -12
- package/esm2022/metergroup/metergroup.interface.mjs +2 -0
- package/esm2022/metergroup/metergroup.mjs +277 -0
- package/esm2022/metergroup/primeng-metergroup.mjs +5 -0
- package/esm2022/metergroup/public_api.mjs +3 -0
- package/esm2022/multiselect/multiselect.mjs +7 -7
- package/esm2022/password/password.mjs +3 -3
- package/esm2022/selectbutton/selectbutton.mjs +2 -2
- package/esm2022/table/table.mjs +27 -15
- package/esm2022/tabmenu/tabmenu.mjs +11 -3
- package/esm2022/togglebutton/togglebutton.mjs +2 -2
- package/esm2022/tree/tree.mjs +14 -7
- package/esm2022/treeselect/treeselect.mjs +9 -9
- package/esm2022/treetable/treetable.mjs +2 -2
- package/esm2022/utils/objectutils.mjs +2 -2
- package/fesm2022/primeng-api.mjs +8 -6
- package/fesm2022/primeng-api.mjs.map +1 -1
- package/fesm2022/primeng-autocomplete.mjs +10 -10
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-buttongroup.mjs +45 -0
- package/fesm2022/primeng-buttongroup.mjs.map +1 -0
- package/fesm2022/primeng-calendar.mjs +8 -8
- package/fesm2022/primeng-calendar.mjs.map +1 -1
- package/fesm2022/primeng-cascadeselect.mjs +6 -6
- package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
- package/fesm2022/primeng-colorpicker.mjs +7 -1
- package/fesm2022/primeng-colorpicker.mjs.map +1 -1
- package/fesm2022/primeng-dialog.mjs +3 -1
- package/fesm2022/primeng-dialog.mjs.map +1 -1
- package/fesm2022/primeng-dropdown.mjs +14 -12
- package/fesm2022/primeng-dropdown.mjs.map +1 -1
- package/fesm2022/primeng-floatlabel.mjs +51 -0
- package/fesm2022/primeng-floatlabel.mjs.map +1 -0
- package/fesm2022/primeng-iconfield.mjs +51 -0
- package/fesm2022/primeng-iconfield.mjs.map +1 -0
- package/fesm2022/primeng-inputicon.mjs +45 -0
- package/fesm2022/primeng-inputicon.mjs.map +1 -0
- package/fesm2022/primeng-inputnumber.mjs +26 -11
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-metergroup.mjs +284 -0
- package/fesm2022/primeng-metergroup.mjs.map +1 -0
- package/fesm2022/primeng-multiselect.mjs +6 -6
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-password.mjs +2 -2
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-selectbutton.mjs +2 -2
- package/fesm2022/primeng-selectbutton.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +26 -14
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-tabmenu.mjs +10 -2
- package/fesm2022/primeng-tabmenu.mjs.map +1 -1
- package/fesm2022/primeng-togglebutton.mjs +2 -2
- package/fesm2022/primeng-togglebutton.mjs.map +1 -1
- package/fesm2022/primeng-tree.mjs +13 -6
- package/fesm2022/primeng-tree.mjs.map +1 -1
- package/fesm2022/primeng-treeselect.mjs +8 -8
- package/fesm2022/primeng-treeselect.mjs.map +1 -1
- package/fesm2022/primeng-treetable.mjs +1 -1
- package/fesm2022/primeng-treetable.mjs.map +1 -1
- package/fesm2022/primeng-utils.mjs +1 -1
- package/fesm2022/primeng-utils.mjs.map +1 -1
- package/floatlabel/floatlabel.d.ts +17 -0
- package/floatlabel/index.d.ts +5 -0
- package/floatlabel/public_api.d.ts +1 -0
- package/iconfield/iconfield.d.ts +25 -0
- package/iconfield/index.d.ts +5 -0
- package/iconfield/public_api.d.ts +1 -0
- package/inputicon/index.d.ts +5 -0
- package/inputicon/inputicon.d.ts +21 -0
- package/inputicon/public_api.d.ts +1 -0
- package/inputnumber/inputnumber.d.ts +3 -2
- package/inputnumber/inputnumber.interface.d.ts +1 -1
- package/metergroup/index.d.ts +5 -0
- package/metergroup/metergroup.d.ts +101 -0
- package/metergroup/metergroup.interface.d.ts +106 -0
- package/metergroup/public_api.d.ts +2 -0
- package/package.json +103 -73
- package/resources/components/button/button.css +32 -9
- package/resources/components/iconfield/iconfield.css +5 -0
- package/resources/components/inputicon/inputicon.css +6 -0
- package/resources/primeng.css +32 -9
- package/resources/primeng.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +129 -0
- package/resources/themes/arya-green/theme.css +129 -0
- package/resources/themes/arya-orange/theme.css +129 -0
- package/resources/themes/arya-purple/theme.css +129 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +129 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +129 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +129 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +129 -0
- package/resources/themes/fluent-light/theme.css +129 -0
- package/resources/themes/lara-dark-blue/theme.css +129 -0
- package/resources/themes/lara-dark-indigo/theme.css +129 -0
- package/resources/themes/lara-dark-purple/theme.css +129 -0
- package/resources/themes/lara-dark-teal/theme.css +129 -0
- package/resources/themes/lara-light-blue/theme.css +129 -0
- package/resources/themes/lara-light-indigo/theme.css +129 -0
- package/resources/themes/lara-light-purple/theme.css +129 -0
- package/resources/themes/lara-light-teal/theme.css +129 -0
- package/resources/themes/luna-amber/theme.css +129 -0
- package/resources/themes/luna-blue/theme.css +129 -0
- package/resources/themes/luna-green/theme.css +129 -0
- package/resources/themes/luna-pink/theme.css +129 -0
- package/resources/themes/md-dark-deeppurple/theme.css +129 -0
- package/resources/themes/md-dark-indigo/theme.css +129 -0
- package/resources/themes/md-light-deeppurple/theme.css +129 -0
- package/resources/themes/md-light-indigo/theme.css +129 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +129 -0
- package/resources/themes/mdc-dark-indigo/theme.css +129 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +129 -0
- package/resources/themes/mdc-light-indigo/theme.css +129 -0
- package/resources/themes/mira/theme.css +129 -0
- package/resources/themes/nano/theme.css +129 -0
- package/resources/themes/nova/theme.css +129 -0
- package/resources/themes/nova-accent/theme.css +129 -0
- package/resources/themes/nova-alt/theme.css +129 -0
- package/resources/themes/rhea/theme.css +129 -0
- package/resources/themes/saga-blue/theme.css +129 -0
- package/resources/themes/saga-green/theme.css +129 -0
- package/resources/themes/saga-orange/theme.css +129 -0
- package/resources/themes/saga-purple/theme.css +129 -0
- package/resources/themes/soho-dark/theme.css +129 -0
- package/resources/themes/soho-light/theme.css +129 -0
- package/resources/themes/tailwind-light/theme.css +129 -0
- package/resources/themes/vela-blue/theme.css +129 -0
- package/resources/themes/vela-green/theme.css +129 -0
- package/resources/themes/vela-orange/theme.css +129 -0
- package/resources/themes/vela-purple/theme.css +129 -0
- package/resources/themes/viva-dark/theme.css +129 -0
- package/resources/themes/viva-light/theme.css +129 -0
- package/table/table.d.ts +3 -1
- package/tabmenu/tabmenu.d.ts +3 -1
- package/treeselect/treeselect.d.ts +2 -2
- package/treetable/treetable.d.ts +1 -1
@@ -0,0 +1,51 @@
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
|
+
import * as i0 from '@angular/core';
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
4
|
+
import { SharedModule } from 'primeng/api';
|
5
|
+
import { RouterModule } from '@angular/router';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* FloatLabel appears on top of the input field when focused.
|
9
|
+
* @group Components
|
10
|
+
*/
|
11
|
+
class FloatLabel {
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FloatLabel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: FloatLabel, selector: "p-floatLabel", ngImport: i0, template: `
|
14
|
+
<span class="p-float-label">
|
15
|
+
<ng-content></ng-content>
|
16
|
+
</span>
|
17
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
18
|
+
}
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FloatLabel, decorators: [{
|
20
|
+
type: Component,
|
21
|
+
args: [{
|
22
|
+
selector: 'p-floatLabel',
|
23
|
+
template: `
|
24
|
+
<span class="p-float-label">
|
25
|
+
<ng-content></ng-content>
|
26
|
+
</span>
|
27
|
+
`,
|
28
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
29
|
+
encapsulation: ViewEncapsulation.None
|
30
|
+
}]
|
31
|
+
}] });
|
32
|
+
class FloatLabelModule {
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FloatLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
34
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: FloatLabelModule, declarations: [FloatLabel], imports: [CommonModule, SharedModule, RouterModule], exports: [FloatLabel, SharedModule] });
|
35
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FloatLabelModule, imports: [CommonModule, SharedModule, RouterModule, SharedModule] });
|
36
|
+
}
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FloatLabelModule, decorators: [{
|
38
|
+
type: NgModule,
|
39
|
+
args: [{
|
40
|
+
imports: [CommonModule, SharedModule, RouterModule],
|
41
|
+
exports: [FloatLabel, SharedModule],
|
42
|
+
declarations: [FloatLabel]
|
43
|
+
}]
|
44
|
+
}] });
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Generated bundle index. Do not edit.
|
48
|
+
*/
|
49
|
+
|
50
|
+
export { FloatLabel, FloatLabelModule };
|
51
|
+
//# sourceMappingURL=primeng-floatlabel.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"primeng-floatlabel.mjs","sources":["../../src/app/components/floatlabel/floatlabel.ts","../../src/app/components/floatlabel/primeng-floatlabel.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, NgModule, ViewEncapsulation } from '@angular/core';\nimport { SharedModule } from 'primeng/api';\nimport { RouterModule } from '@angular/router';\n\n/**\n * FloatLabel appears on top of the input field when focused.\n * @group Components\n */\n@Component({\n selector: 'p-floatLabel',\n template: `\n <span class=\"p-float-label\">\n <ng-content></ng-content>\n </span>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class FloatLabel {}\n\n@NgModule({\n imports: [CommonModule, SharedModule, RouterModule],\n exports: [FloatLabel, SharedModule],\n declarations: [FloatLabel]\n})\nexport class FloatLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAKA;;;AAGG;MAWU,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,EART,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAIQ,UAAU,EAAA,UAAA,EAAA,CAAA;kBAVtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,CAAA;;;;AAIT,IAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACxC,iBAAA,CAAA;;MAQY,gBAAgB,CAAA;uGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAhB,gBAAgB,EAAA,YAAA,EAAA,CAPhB,UAAU,CAAA,EAAA,OAAA,EAAA,CAGT,YAAY,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAHzC,UAAU,EAIG,YAAY,CAAA,EAAA,CAAA,CAAA;AAGzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAJf,YAAY,EAAE,YAAY,EAAE,YAAY,EAC5B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGzB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;oBACnC,YAAY,EAAE,CAAC,UAAU,CAAC;AAC7B,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import * as i1 from '@angular/common';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import * as i0 from '@angular/core';
|
4
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
5
|
+
import { SharedModule } from 'primeng/api';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* IconField wraps an input and an icon.
|
9
|
+
* @group Components
|
10
|
+
*/
|
11
|
+
class IconField {
|
12
|
+
/**
|
13
|
+
* Position of the icon.
|
14
|
+
* @group Props
|
15
|
+
*/
|
16
|
+
iconPosition = 'left';
|
17
|
+
get containerClass() {
|
18
|
+
return {
|
19
|
+
'p-icon-field-left': this.iconPosition === 'left',
|
20
|
+
'p-icon-field-right': this.iconPosition === 'right'
|
21
|
+
};
|
22
|
+
}
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: IconField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: IconField, selector: "p-iconField", inputs: { iconPosition: "iconPosition" }, ngImport: i0, template: ` <span class="p-icon-field" [ngClass]="containerClass"><ng-content></ng-content> </span>`, isInline: true, styles: ["@layer primeng{.p-icon-field{position:relative}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
25
|
+
}
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: IconField, decorators: [{
|
27
|
+
type: Component,
|
28
|
+
args: [{ selector: 'p-iconField', template: ` <span class="p-icon-field" [ngClass]="containerClass"><ng-content></ng-content> </span>`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@layer primeng{.p-icon-field{position:relative}}\n"] }]
|
29
|
+
}], propDecorators: { iconPosition: [{
|
30
|
+
type: Input
|
31
|
+
}] } });
|
32
|
+
class IconFieldModule {
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: IconFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
34
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: IconFieldModule, declarations: [IconField], imports: [CommonModule], exports: [IconField, SharedModule] });
|
35
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: IconFieldModule, imports: [CommonModule, SharedModule] });
|
36
|
+
}
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: IconFieldModule, decorators: [{
|
38
|
+
type: NgModule,
|
39
|
+
args: [{
|
40
|
+
imports: [CommonModule],
|
41
|
+
exports: [IconField, SharedModule],
|
42
|
+
declarations: [IconField]
|
43
|
+
}]
|
44
|
+
}] });
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Generated bundle index. Do not edit.
|
48
|
+
*/
|
49
|
+
|
50
|
+
export { IconField, IconFieldModule };
|
51
|
+
//# sourceMappingURL=primeng-iconfield.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"primeng-iconfield.mjs","sources":["../../src/app/components/iconfield/iconfield.ts","../../src/app/components/iconfield/primeng-iconfield.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, NgModule, ViewEncapsulation } from '@angular/core';\n\nimport { SharedModule } from 'primeng/api';\n\n/**\n * IconField wraps an input and an icon.\n * @group Components\n */\n@Component({\n selector: 'p-iconField',\n template: ` <span class=\"p-icon-field\" [ngClass]=\"containerClass\"><ng-content></ng-content> </span>`,\n styleUrl: './iconfield.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class IconField {\n /**\n * Position of the icon.\n * @group Props\n */\n @Input() iconPosition: 'right' | 'left' = 'left';\n\n get containerClass() {\n return {\n 'p-icon-field-left': this.iconPosition === 'left',\n 'p-icon-field-right': this.iconPosition === 'right'\n };\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [IconField, SharedModule],\n declarations: [IconField]\n})\nexport class IconFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAKA;;;AAGG;MAQU,SAAS,CAAA;AAClB;;;AAGG;IACM,YAAY,GAAqB,MAAM,CAAC;AAEjD,IAAA,IAAI,cAAc,GAAA;QACd,OAAO;AACH,YAAA,mBAAmB,EAAE,IAAI,CAAC,YAAY,KAAK,MAAM;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AA,OAAA,EAAA,CAgBR,YAAY,CAhBb,EAAA,OAAA,EAAA,CAAA,SAAS,EAiBG,YAAY,CAAA,EAAA,CAAA,CAAA;wGAGxB,eAAe,EAAA,OAAA,EAAA,CAJd,YAAY,EACD,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGxB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;oBAClC,YAAY,EAAE,CAAC,SAAS,CAAC;AAC5B,iBAAA,CAAA;;;ACnCD;;AAEG;;;;"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import * as i1 from '@angular/common';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import * as i0 from '@angular/core';
|
4
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
5
|
+
import { SharedModule } from 'primeng/api';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* InputIcon displays an icon.
|
9
|
+
* @group Components
|
10
|
+
*/
|
11
|
+
class InputIcon {
|
12
|
+
/**
|
13
|
+
* Style class of the element.
|
14
|
+
* @group Props
|
15
|
+
*/
|
16
|
+
styleClass;
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: InputIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: InputIcon, selector: "p-inputIcon", inputs: { styleClass: "styleClass" }, ngImport: i0, template: `<span class="p-input-icon" [ngClass]="styleClass"><ng-content></ng-content></span>`, isInline: true, styles: ["@layer primeng{.p-fluid .p-icon-field-left,.p-fluid .p-icon-field-right{width:100%}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
19
|
+
}
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: InputIcon, decorators: [{
|
21
|
+
type: Component,
|
22
|
+
args: [{ selector: 'p-inputIcon', template: `<span class="p-input-icon" [ngClass]="styleClass"><ng-content></ng-content></span>`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@layer primeng{.p-fluid .p-icon-field-left,.p-fluid .p-icon-field-right{width:100%}}\n"] }]
|
23
|
+
}], propDecorators: { styleClass: [{
|
24
|
+
type: Input
|
25
|
+
}] } });
|
26
|
+
class InputIconModule {
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: InputIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
28
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: InputIconModule, declarations: [InputIcon], imports: [CommonModule], exports: [InputIcon, SharedModule] });
|
29
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: InputIconModule, imports: [CommonModule, SharedModule] });
|
30
|
+
}
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: InputIconModule, decorators: [{
|
32
|
+
type: NgModule,
|
33
|
+
args: [{
|
34
|
+
imports: [CommonModule],
|
35
|
+
exports: [InputIcon, SharedModule],
|
36
|
+
declarations: [InputIcon]
|
37
|
+
}]
|
38
|
+
}] });
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Generated bundle index. Do not edit.
|
42
|
+
*/
|
43
|
+
|
44
|
+
export { InputIcon, InputIconModule };
|
45
|
+
//# sourceMappingURL=primeng-inputicon.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"primeng-inputicon.mjs","sources":["../../src/app/components/inputicon/inputicon.ts","../../src/app/components/inputicon/primeng-inputicon.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, NgModule, ViewEncapsulation } from '@angular/core';\nimport { SharedModule } from 'primeng/api';\n\n/**\n * InputIcon displays an icon.\n * @group Components\n */\n@Component({\n selector: 'p-inputIcon',\n template: `<span class=\"p-input-icon\" [ngClass]=\"styleClass\"><ng-content></ng-content></span>`,\n styleUrl: './inputicon.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InputIcon {\n /**\n * Style class of the element.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [InputIcon, SharedModule],\n declarations: [InputIcon]\n})\nexport class InputIconModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAIA;;;AAGG;MAQU,SAAS,CAAA;AAClB;;;AAGG;AACM,IAAA,UAAU,CAAqB;uGAL/B,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,yFALR,CAAoF,kFAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,C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6 +345,7 @@ class InputNumber {
|
|
344
345
|
this._minusSign = this.getMinusSignExpression();
|
345
346
|
this._currency = this.getCurrencyExpression();
|
346
347
|
this._decimal = this.getDecimalExpression();
|
348
|
+
this._decimalChar = this.getDecimalChar();
|
347
349
|
this._suffix = this.getSuffixExpression();
|
348
350
|
this._prefix = this.getPrefixExpression();
|
349
351
|
this._index = (d) => index.get(d);
|
@@ -357,12 +359,16 @@ class InputNumber {
|
|
357
359
|
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
358
360
|
}
|
359
361
|
getDecimalExpression() {
|
362
|
+
const decimalChar = this.getDecimalChar();
|
363
|
+
return new RegExp(`[${decimalChar}]`, 'g');
|
364
|
+
}
|
365
|
+
getDecimalChar() {
|
360
366
|
const formatter = new Intl.NumberFormat(this.locale, { ...this.getOptions(), useGrouping: false });
|
361
|
-
return
|
367
|
+
return formatter
|
362
368
|
.format(1.1)
|
363
369
|
.replace(this._currency, '')
|
364
370
|
.trim()
|
365
|
-
.replace(this._numeral, '')
|
371
|
+
.replace(this._numeral, '');
|
366
372
|
}
|
367
373
|
getGroupingExpression() {
|
368
374
|
const formatter = new Intl.NumberFormat(this.locale, { useGrouping: true });
|
@@ -565,13 +571,20 @@ class InputNumber {
|
|
565
571
|
event.preventDefault();
|
566
572
|
break;
|
567
573
|
case 'ArrowLeft':
|
568
|
-
|
569
|
-
|
574
|
+
for (let index = selectionStart; index <= inputValue.length; index++) {
|
575
|
+
const previousCharIndex = index === 0 ? 0 : index - 1;
|
576
|
+
if (this.isNumeralChar(inputValue.charAt(previousCharIndex))) {
|
577
|
+
this.input.nativeElement.setSelectionRange(index, index);
|
578
|
+
break;
|
579
|
+
}
|
570
580
|
}
|
571
581
|
break;
|
572
582
|
case 'ArrowRight':
|
573
|
-
|
574
|
-
|
583
|
+
for (let index = selectionEnd; index >= 0; index--) {
|
584
|
+
if (this.isNumeralChar(inputValue.charAt(index))) {
|
585
|
+
this.input.nativeElement.setSelectionRange(index, index);
|
586
|
+
break;
|
587
|
+
}
|
575
588
|
}
|
576
589
|
break;
|
577
590
|
case 'Tab':
|
@@ -686,11 +699,16 @@ class InputNumber {
|
|
686
699
|
}
|
687
700
|
let code = event.which || event.keyCode;
|
688
701
|
let char = String.fromCharCode(code);
|
689
|
-
|
702
|
+
let isDecimalSign = this.isDecimalSign(char);
|
690
703
|
const isMinusSign = this.isMinusSign(char);
|
691
704
|
if (code != 13) {
|
692
705
|
event.preventDefault();
|
693
706
|
}
|
707
|
+
if (!isDecimalSign && event.code === 'NumpadDecimal') {
|
708
|
+
isDecimalSign = true;
|
709
|
+
char = this._decimalChar;
|
710
|
+
code = char.charCodeAt(0);
|
711
|
+
}
|
694
712
|
const newValue = this.parseValue(this.input.nativeElement.value + char);
|
695
713
|
const newValueStr = newValue != null ? newValue.toString() : '';
|
696
714
|
if (this.maxlength && newValueStr.length > this.maxlength) {
|
@@ -1051,7 +1069,7 @@ class InputNumber {
|
|
1051
1069
|
}
|
1052
1070
|
onInputBlur(event) {
|
1053
1071
|
this.focused = false;
|
1054
|
-
let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value));
|
1072
|
+
let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value)).toString();
|
1055
1073
|
this.input.nativeElement.value = this.formatValue(newValue);
|
1056
1074
|
this.input.nativeElement.setAttribute('aria-valuenow', newValue);
|
1057
1075
|
this.updateModel(event, newValue);
|
@@ -1096,9 +1114,6 @@ class InputNumber {
|
|
1096
1114
|
clearInterval(this.timer);
|
1097
1115
|
}
|
1098
1116
|
}
|
1099
|
-
getFormatter() {
|
1100
|
-
return this.numberFormat;
|
1101
|
-
}
|
1102
1117
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: InputNumber, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
1103
1118
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: InputNumber, selector: "p-inputNumber", inputs: { showButtons: "showButtons", format: "format", buttonLayout: "buttonLayout", inputId: "inputId", styleClass: "styleClass", style: "style", placeholder: "placeholder", size: "size", maxlength: "maxlength", tabindex: "tabindex", title: "title", ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", name: "name", required: "required", autocomplete: "autocomplete", min: "min", max: "max", incrementButtonClass: "incrementButtonClass", decrementButtonClass: "decrementButtonClass", incrementButtonIcon: "incrementButtonIcon", decrementButtonIcon: "decrementButtonIcon", readonly: "readonly", step: "step", allowEmpty: "allowEmpty", locale: "locale", localeMatcher: "localeMatcher", mode: "mode", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: "useGrouping", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", prefix: "prefix", suffix: "suffix", inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", showClear: "showClear", disabled: "disabled" }, outputs: { onInput: "onInput", onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown", onClear: "onClear" }, host: { properties: { "class.p-inputwrapper-filled": "filled", "class.p-inputwrapper-focus": "focused", "class.p-inputnumber-clearable": "showClear && buttonLayout != \"vertical\"" }, classAttribute: "p-element p-inputwrapper" }, providers: [INPUTNUMBER_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
1104
1119
|
<span
|