powerpagestoolkit 3.0.3216 → 3.0.4041

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.
@@ -0,0 +1,11 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ /********/ /********/ export default abstract class InputMask {
3
+ abstract input: HTMLInputElement;
4
+ constructor();
5
+ protected abstract setupEventListeners(): void;
6
+ protected abstract formatInput(): void;
7
+ protected onFocus(): void;
8
+ protected onBlur(): void;
9
+ setValue(value: any): void;
10
+ abstract destroy(): void;
11
+ }
@@ -0,0 +1,36 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ import InputMask from "./InputMask.d.ts";
3
+ interface MoneyInputMaskOptions extends InputMaskOptions {
4
+ prefix: CurrencySymbol;
5
+ decimalPlaces: number;
6
+ thousandsSeparator: string;
7
+ decimalSeparator: string;
8
+ allowNegative: boolean;
9
+ }
10
+ export default class MoneyMask extends InputMask {
11
+ input: HTMLInputElement;
12
+ protected options: MoneyInputMaskOptions;
13
+ private buffer;
14
+ private charAtSelection;
15
+ private charBeforeSelection;
16
+ private lengthOf0FormattedValue;
17
+ private readonly digitRegex;
18
+ private readonly nonDigitRegex;
19
+ private readonly thousandsRegex;
20
+ private readonly separatorRegex;
21
+ constructor(inputElement: HTMLInputElement, options?: Partial<MoneyInputMaskOptions>);
22
+ private escapeRegExp;
23
+ private formatAndDisplay;
24
+ protected setupEventListeners(): void;
25
+ protected formatInput(): void;
26
+ protected formatNumber(value: number): string;
27
+ protected onSelectionChange(_e: Event): void;
28
+ protected onInput(_e: Event): void;
29
+ private mapRawIndexToFormattedPosition;
30
+ protected onFocus(): void;
31
+ protected onBlur(): void;
32
+ getNumericalValue(): number;
33
+ setValue(value: number): void;
34
+ destroy(): void;
35
+ }
36
+ export {};
@@ -0,0 +1,25 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ import InputMask from "./InputMask.d.ts";
3
+ type CountryCodeFormat = "+" | "()" | "00";
4
+ interface PhoneNumberMaskOptions {
5
+ countryCode?: string;
6
+ countryCodeFormat?: CountryCodeFormat;
7
+ format: string;
8
+ }
9
+ export default class PhoneNumberMask extends InputMask {
10
+ input: HTMLInputElement;
11
+ protected options: PhoneNumberMaskOptions;
12
+ constructor(inputElement: HTMLInputElement, options?: Partial<PhoneNumberMaskOptions>);
13
+ protected setupEventListeners(): void;
14
+ protected formatInput(): void;
15
+ private formatPhoneNumber;
16
+ protected onFocus(): void;
17
+ protected onBlur(): void;
18
+ getDigits(): string;
19
+ getCountryCode(): string;
20
+ getPhoneDigits(): string;
21
+ setValue(digits: string): void;
22
+ isValid(): boolean;
23
+ destroy(): void;
24
+ }
25
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerpagestoolkit",
3
- "version": "3.0.3216",
3
+ "version": "3.0.4041",
4
4
  "description": "Reference, manipulate, and engage with Power Pages sites through the nodes in the DOM; use a variety of custom methods that allow customizing your power pages site quicker and easier. ",
5
5
  "main": "./dist/src/index.js",
6
6
  "module": "./dist/src/index.js",
@@ -41,7 +41,6 @@
41
41
  "dev": "tsc --watch"
42
42
  },
43
43
  "devDependencies": {
44
- "esbuild-plugin-copy": "^2.1.1",
45
44
  "@babel/preset-env": "^7.25.8",
46
45
  "@types/node": "^22.8.6",
47
46
  "@typescript-eslint/parser": "^8.20.0",
@@ -49,6 +48,7 @@
49
48
  "css-loader": "^7.1.2",
50
49
  "esbuild": "^0.24.2",
51
50
  "esbuild-css-modules-plugin": "^3.1.2",
51
+ "esbuild-plugin-copy": "^2.1.1",
52
52
  "eslint": "^8.57.1",
53
53
  "eslint-plugin-import": "^2.31.0",
54
54
  "globals": "^15.14.0",
@@ -79,5 +79,8 @@
79
79
  "form-management",
80
80
  "frontend",
81
81
  "web-development"
82
- ]
82
+ ],
83
+ "dependencies": {
84
+ "dompurify": "^3.2.4"
85
+ }
83
86
  }
@@ -1,8 +0,0 @@
1
- /// <reference path="../globals.d.ts" />
2
- /**
3
- *
4
- * @param {string} titleString The text to display in the tooltip flyout content
5
- * @param iconStyle Optional CSS styles to apply to the info icon
6
- * @returns
7
- */
8
- export default function CreateInfoEl(titleString: string, iconStyle?: Partial<CSSStyleDeclaration>): HTMLSpanElement;