@ni/nimble-angular 32.3.4 → 32.3.5

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/README.md CHANGED
@@ -126,7 +126,7 @@ For best results, always use `ngModel`, `formControl`, or `formControlName` bind
126
126
 
127
127
  ### Using Nimble breadcrumb with Angular's RouterLink
128
128
 
129
- `nimble-breadcrumb-item` supports the [Angular RouterLink directive](https://angular.io/api/router/RouterLink) for breadcrumb navigation in an Angular app using routing.
129
+ `nimble-breadcrumb-item` supports the [Angular RouterLink directive](https://angular.dev/api/router/RouterLink) for breadcrumb navigation in an Angular app using routing.
130
130
  However, the attribute name `nimbleRouterLink` should be used instead of `routerLink` - for example:
131
131
  ```html
132
132
  <nimble-breadcrumb-item [nimbleRouterLink]="breadcrumb.url">
@@ -1 +1 @@
1
- {"version":3,"file":"ni-nimble-angular-internal-utilities.mjs","sources":["../../../nimble-angular/internal-utilities/template-value-helpers.ts","../../../nimble-angular/internal-utilities/ni-nimble-angular-internal-utilities.ts"],"sourcesContent":["/**\n * Conversion helpers for values coming from template attributes or property bindings\n */\n\n// Values assigned to directives can come from template attributes, ie <my-element my-number=\"4\"></my-element>\n// or from property bindings, ie <my-element [my-number]=\"someNumber\"></my-element>\n// So setters for our directives accept both string values from template attributes and\n// the expected property type. This file has helpers for common property types.\n// More context: https://v13.angular.io/guide/template-typecheck#input-setter-coercion\n\ntype BooleanAttribute = '' | null;\nexport type BooleanValueOrAttribute = boolean | BooleanAttribute;\nexport type NumberValueOrAttribute = number | string;\n\n/**\n * Converts values from templates (empty string or null) or boolean bindings to a boolean property representation\n */\nexport const toBooleanProperty = (value: BooleanValueOrAttribute): boolean => {\n if (value === false || value === null) {\n return false;\n }\n // For boolean attributes the empty string value is true\n return true;\n};\n\n/**\n * Converts values from templates (empty string or null) or boolean bindings to an Aria boolean\n * attribute representation (the strings \"true\" or \"false\")\n */\nexport const toBooleanAriaAttribute = (value: BooleanValueOrAttribute): 'true' | 'false' => {\n if (value === false || value === null) {\n return 'false';\n }\n // For boolean attributes the empty string value is true\n return 'true';\n};\n\n/**\n * Converts values from templates (number representation as a string) or number bindings to a number property representation\n */\nexport const toNumberProperty = (value: NumberValueOrAttribute): number => {\n // Angular: https://github.com/angular/angular/blob/2664bc2b3ef4ee5fd671f915828cfcc274a36c77/packages/forms/src/directives/number_value_accessor.ts#L67\n // And Fast: https://github.com/microsoft/fast/blob/46bb6d9aab2c37105f4434db3795e176c2354a4f/packages/web-components/fast-element/src/components/attributes.ts#L100\n // Handle numeric conversions from the view differently\n // Since Number(val) https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-constructor-number-value\n // and val * 1 https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-applystringornumericbinaryoperator\n // Are identical (use ToNumeric algorithm), went with Number() for clarity\n return Number(value);\n};\n\n/**\n * Converts values from templates (number representation as a string) or number bindings to a number property representation.\n * The values of `null` and `undefined` are also supported, and they are not converted.\n */\nexport const toNullableNumberProperty = (value: NumberValueOrAttribute | null | undefined): number | null | undefined => {\n if (value === undefined || value === null) {\n return value;\n }\n\n return toNumberProperty(value);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG;AAYH;;AAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,KAA8B,KAAa;IACzE,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,IAAI,EAAE;AACnC,QAAA,OAAO,KAAK;IAChB;;AAEA,IAAA,OAAO,IAAI;AACf;AAEA;;;AAGG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAA8B,KAAsB;IACvF,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,IAAI,EAAE;AACnC,QAAA,OAAO,OAAO;IAClB;;AAEA,IAAA,OAAO,MAAM;AACjB;AAEA;;AAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAA6B,KAAY;;;;;;;AAOtE,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC;AACxB;AAEA;;;AAGG;AACI,MAAM,wBAAwB,GAAG,CAAC,KAAgD,KAA+B;IACpH,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;AACvC,QAAA,OAAO,KAAK;IAChB;AAEA,IAAA,OAAO,gBAAgB,CAAC,KAAK,CAAC;AAClC;;AC5DA;;AAEG;;;;"}
1
+ {"version":3,"file":"ni-nimble-angular-internal-utilities.mjs","sources":["../../../nimble-angular/internal-utilities/template-value-helpers.ts","../../../nimble-angular/internal-utilities/ni-nimble-angular-internal-utilities.ts"],"sourcesContent":["/**\n * Conversion helpers for values coming from template attributes or property bindings\n */\n\n// Values assigned to directives can come from template attributes, ie <my-element my-number=\"4\"></my-element>\n// or from property bindings, ie <my-element [my-number]=\"someNumber\"></my-element>\n// So setters for our directives accept both string values from template attributes and\n// the expected property type. This file has helpers for common property types.\n// More context: https://angular.dev/tools/cli/template-typecheck#input-setter-coercion\n\ntype BooleanAttribute = '' | null;\nexport type BooleanValueOrAttribute = boolean | BooleanAttribute;\nexport type NumberValueOrAttribute = number | string;\n\n/**\n * Converts values from templates (empty string or null) or boolean bindings to a boolean property representation\n */\nexport const toBooleanProperty = (value: BooleanValueOrAttribute): boolean => {\n if (value === false || value === null) {\n return false;\n }\n // For boolean attributes the empty string value is true\n return true;\n};\n\n/**\n * Converts values from templates (empty string or null) or boolean bindings to an Aria boolean\n * attribute representation (the strings \"true\" or \"false\")\n */\nexport const toBooleanAriaAttribute = (value: BooleanValueOrAttribute): 'true' | 'false' => {\n if (value === false || value === null) {\n return 'false';\n }\n // For boolean attributes the empty string value is true\n return 'true';\n};\n\n/**\n * Converts values from templates (number representation as a string) or number bindings to a number property representation\n */\nexport const toNumberProperty = (value: NumberValueOrAttribute): number => {\n // Angular: https://github.com/angular/angular/blob/2664bc2b3ef4ee5fd671f915828cfcc274a36c77/packages/forms/src/directives/number_value_accessor.ts#L67\n // And Fast: https://github.com/microsoft/fast/blob/46bb6d9aab2c37105f4434db3795e176c2354a4f/packages/web-components/fast-element/src/components/attributes.ts#L100\n // Handle numeric conversions from the view differently\n // Since Number(val) https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-constructor-number-value\n // and val * 1 https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-applystringornumericbinaryoperator\n // Are identical (use ToNumeric algorithm), went with Number() for clarity\n return Number(value);\n};\n\n/**\n * Converts values from templates (number representation as a string) or number bindings to a number property representation.\n * The values of `null` and `undefined` are also supported, and they are not converted.\n */\nexport const toNullableNumberProperty = (value: NumberValueOrAttribute | null | undefined): number | null | undefined => {\n if (value === undefined || value === null) {\n return value;\n }\n\n return toNumberProperty(value);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG;AAYH;;AAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,KAA8B,KAAa;IACzE,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,IAAI,EAAE;AACnC,QAAA,OAAO,KAAK;IAChB;;AAEA,IAAA,OAAO,IAAI;AACf;AAEA;;;AAGG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAA8B,KAAsB;IACvF,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,IAAI,EAAE;AACnC,QAAA,OAAO,OAAO;IAClB;;AAEA,IAAA,OAAO,MAAM;AACjB;AAEA;;AAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAA6B,KAAY;;;;;;;AAOtE,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC;AACxB;AAEA;;;AAGG;AACI,MAAM,wBAAwB,GAAG,CAAC,KAAgD,KAA+B;IACpH,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;AACvC,QAAA,OAAO,KAAK;IAChB;AAEA,IAAA,OAAO,gBAAgB,CAAC,KAAK,CAAC;AAClC;;AC5DA;;AAEG;;;;"}
@@ -307,7 +307,7 @@ export { IconSeverity } from '@ni/nimble-components/dist/esm/icon-base/types';
307
307
  * - Copy `isUrlTree` function from url_tree.ts into this file instead of importing
308
308
  * - Hardcode `isAnchorElement` to `true` so that the directive will correctly set the `href` on elements within nimble that represent anchors
309
309
  * - Make `href` a `@HostBindinding` to avoid using Angular's private sanitization APIs because `href` bindings automatically are sanitized by
310
- * Angular (see https://angular.io/guide/security#sanitization-and-security-contexts). Implementations leveraging RouterLink should have a test
310
+ * Angular (see https://angular.dev/best-practices/security#sanitization-and-security-contexts). Implementations leveraging RouterLink should have a test
311
311
  * ensuring sanitization is called.
312
312
  * - Comment out uneccessary export of the deprecated `RouterLinkWithHref`
313
313
  */