@qualcomm-ui/angular-core 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +9 -0
  2. package/checkbox/core-checkbox-root.directive.d.ts +1 -1
  3. package/checkbox/core-checkbox-root.directive.d.ts.map +1 -1
  4. package/esm2022/checkbox/core-checkbox-root.directive.js.map +1 -1
  5. package/esm2022/collection/use-list-collection.js.map +1 -1
  6. package/esm2022/common/use-is-destroyed.js.map +1 -1
  7. package/esm2022/common/use-is-mounted.js.map +1 -1
  8. package/esm2022/locale/locale-context.service.js.map +1 -1
  9. package/esm2022/locale/use-filter.js.map +1 -1
  10. package/esm2022/machine/q-bind.directive.js +4 -2
  11. package/esm2022/machine/q-bind.directive.js.map +1 -1
  12. package/esm2022/number-input/core-number-input-control.directive.js.map +1 -1
  13. package/esm2022/number-input/core-number-input-decrement-trigger.directive.js.map +1 -1
  14. package/esm2022/number-input/core-number-input-error-indicator.directive.js.map +1 -1
  15. package/esm2022/number-input/core-number-input-error-text.directive.js.map +1 -1
  16. package/esm2022/number-input/core-number-input-hint.directive.js.map +1 -1
  17. package/esm2022/number-input/core-number-input-increment-trigger.directive.js.map +1 -1
  18. package/esm2022/number-input/core-number-input-input-group.directive.js.map +1 -1
  19. package/esm2022/number-input/core-number-input-input.directive.js.map +1 -1
  20. package/esm2022/number-input/core-number-input-label.directive.js.map +1 -1
  21. package/esm2022/number-input/core-number-input-root.directive.js +3 -1
  22. package/esm2022/number-input/core-number-input-root.directive.js.map +1 -1
  23. package/esm2022/number-input/number-input-context.service.js.map +1 -1
  24. package/esm2022/number-input/number-input.validators.js.map +1 -1
  25. package/esm2022/password-input/core-password-input-root.directive.js +1 -1
  26. package/esm2022/password-input/core-password-input-root.directive.js.map +1 -1
  27. package/esm2022/popover/core-popover-root.directive.js.map +1 -1
  28. package/esm2022/portal/portal.directive.js.map +1 -1
  29. package/esm2022/radio/core-radio-group.directive.js +3 -1
  30. package/esm2022/radio/core-radio-group.directive.js.map +1 -1
  31. package/esm2022/select/core-select-error-indicator.directive.js.map +1 -1
  32. package/esm2022/select/core-select-error-text.directive.js.map +1 -1
  33. package/esm2022/select/core-select-hint.directive.js.map +1 -1
  34. package/esm2022/select/core-select-indicator.directive.js.map +1 -1
  35. package/esm2022/select/select-item-context.service.js.map +1 -1
  36. package/esm2022/switch/core-switch-root.directive.js.map +1 -1
  37. package/esm2022/tabs/core-tabs-root.directive.js +3 -1
  38. package/esm2022/tabs/core-tabs-root.directive.js.map +1 -1
  39. package/esm2022/text-input/core-text-input-error-indicator.directive.js.map +1 -1
  40. package/esm2022/text-input/core-text-input-root.directive.js +1 -1
  41. package/esm2022/text-input/core-text-input-root.directive.js.map +1 -1
  42. package/machine/q-bind.directive.d.ts.map +1 -1
  43. package/number-input/core-number-input-root.directive.d.ts +1 -0
  44. package/number-input/core-number-input-root.directive.d.ts.map +1 -1
  45. package/package.json +27 -27
  46. package/password-input/core-password-input-root.directive.d.ts +1 -1
  47. package/password-input/core-password-input-root.directive.d.ts.map +1 -1
  48. package/popover/core-popover-root.directive.d.ts +1 -1
  49. package/popover/core-popover-root.directive.d.ts.map +1 -1
  50. package/radio/core-radio-group.directive.d.ts +1 -0
  51. package/radio/core-radio-group.directive.d.ts.map +1 -1
  52. package/switch/core-switch-root.directive.d.ts +1 -1
  53. package/switch/core-switch-root.directive.d.ts.map +1 -1
  54. package/tabs/core-tabs-root.directive.d.ts +1 -0
  55. package/tabs/core-tabs-root.directive.d.ts.map +1 -1
  56. package/text-input/core-text-input-root.directive.d.ts +1 -1
  57. package/text-input/core-text-input-root.directive.d.ts.map +1 -1
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # @qualcomm-ui/angular-core
2
+
3
+ Design-agnostic Angular building blocks and utilities.
4
+
5
+ This package provides low-level Angular primitives that power the QUI component library. For comprehensive documentation and usage guides, visit the [Angular documentation](https://angular-next.qui.qualcomm.com/).
6
+
7
+ ## License
8
+
9
+ Licensed under the [BSD-3-Clause-Clear License](https://spdx.org/licenses/BSD-3-Clause-Clear.html).
@@ -35,7 +35,7 @@ export declare class CoreCheckboxRootDirective extends AbstractCheckboxFormContr
35
35
  */
36
36
  readonly value: import("@angular/core").InputSignal<string | undefined>;
37
37
  protected readonly checkboxContextService: CheckboxContextService;
38
- protected document: Document;
38
+ protected readonly document: Document;
39
39
  protected readonly hostId: import("@angular/core").Signal<string>;
40
40
  protected readonly trackBindings: ((opts?: import("dist/machine").TrackBindingsConfig) => void) & {
41
41
  extendWith: (computedProps: () => import("dist/machine").Dict) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"core-checkbox-root.directive.d.ts","sourceRoot":"","sources":["../../../src/checkbox/core-checkbox-root.directive.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,MAAM,EACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAC,KAAK,oBAAoB,EAAC,MAAM,gBAAgB,CAAA;AAQxD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mCAAmC,CAAA;AACrE,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAA;AAC3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAA;AAG3D,OAAO,EAAC,oCAAoC,EAAC,MAAM,4CAA4C,CAAA;AAC/F,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAA;;AAEjE,qBACa,yBACX,SAAQ,oCACR,YACE,cAAc,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,CAAC,EAClE,oBAAoB,EACpB,MAAM;IAER;;;;OAIG;IACH,QAAQ,CAAC,GAAG,6DAA0C;IAEtD;;;OAGG;IACH,QAAQ,CAAC,WAAW,6CACX,UAAU,GAAG,QAAQ,GAAG,IAAI,eAClC;IAEH;;;OAG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IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;oBAClB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;oBACjC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;gBAC3B,CAAC;gBACD,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;oBAC3C,IAAI,CAAC,SAAS,EAAE,CAAA;gBAClB,CAAC;YACH,CAAC;YACD,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE;gBACzB,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,kCAAkC;oBAClC,IAAI,CAAC,SAAS,EAAE,CAAA;gBAClB,CAAC;YACH,CAAC;YACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;YACzB,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE;YAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SACpB,CAAC,CAAC,EACH,IAAI,CAAC,QAAQ,CACd,CAAA;QAED,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAC9B,QAAQ,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAC3D,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGA/FU,yBAAyB;4FAAzB,yBAAyB;;4FAAzB,yBAAyB;kBADrC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n type OnInit,\n} from \"@angular/core\"\nimport {type ControlValueAccessor} from \"@angular/forms\"\n\nimport {useId} from \"@qualcomm-ui/angular-core/common\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n type CheckboxApiProps,\n checkboxMachine,\n createCheckboxApi,\n} from \"@qualcomm-ui/core/checkbox\"\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {AbstractCheckboxFormControlDirective} from \"./abstract-checkbox-form-control.directive\"\nimport {CheckboxContextService} from \"./checkbox-context.service\"\n\n@Directive()\nexport class CoreCheckboxRootDirective\n extends AbstractCheckboxFormControlDirective\n implements\n SignalifyInput<Omit<CheckboxApiProps, \"checked\" | \"form\" | \"ids\">>,\n ControlValueAccessor,\n OnInit\n{\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>(undefined)\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<\n (() => ShadowRoot | Document | Node) | undefined\n >()\n\n /**\n * If true and the checkbox is not checked, the checkbox will be in the\n * `indeterminate` state.\n */\n readonly indeterminate = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * {@link https://www.w3schools.com/html/html_id.asp id attribute}. If\n * omitted, a unique identifier will be generated for accessibility.)\n */\n readonly id = input<string | undefined>(undefined)\n\n /**\n * The value of checkbox input. Useful for form submission.\n * @default \"on\"\n */\n readonly value = input<string | undefined>()\n\n protected readonly checkboxContextService = inject(CheckboxContextService)\n protected document = inject(DOCUMENT)\n\n protected readonly hostId = computed(() => useId(this, this.id()))\n protected readonly trackBindings = useTrackBindings(() =>\n this.checkboxContextService.context().getRootBindings({id: this.hostId()}),\n )\n\n override ngOnInit() {\n super.ngOnInit()\n\n const machine = useMachine(\n checkboxMachine,\n computed<Explicit<CheckboxApiProps>>(() => ({\n checked: this.checked(),\n defaultChecked: this.defaultChecked(),\n dir: this.dir(),\n disabled: this.isDisabled(),\n // angular handles this automatically with ngModel and Reactive Forms\n form: undefined,\n getRootNode: this.getRootNode() || (() => this.document),\n ids: undefined,\n indeterminate: this.indeterminate(),\n invalid: this.invalid(),\n name: this.name(),\n onCheckedChange: (checked) => {\n this.onChange(checked)\n if (!this.control) {\n this.checkedChanged.emit(checked)\n this.checked.set(checked)\n }\n if (this.control && !this.control?.touched) {\n this.onTouched()\n }\n },\n onFocusChange: (focused) => {\n if (!focused) {\n // only trigger onTouched on blur.\n this.onTouched()\n }\n },\n readOnly: this.readOnly(),\n required: this.isRequired(),\n value: this.value(),\n })),\n this.injector,\n )\n\n this.checkboxContextService.init(\n computed(() => createCheckboxApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
1
+ {"version":3,"file":"core-checkbox-root.directive.js","sourceRoot":"","sources":["../../../src/checkbox/core-checkbox-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,GAEN,MAAM,eAAe,CAAA;AACtB,OAAO,EAA2B,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAC,KAAK,EAAC,MAAM,kCAAkC,CAAA;AACtD,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAEL,eAAe,EACf,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AAKnC,OAAO,EAAC,oCAAoC,EAAC,MAAM,4CAA4C,CAAA;AAC/F,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAA;;AAGjE,MAAM,OAAO,yBACX,SAAQ,oCAAoC;IAM5C;;;;OAIG;IACM,GAAG,GAAG,KAAK,CAAwB,SAAS,+CAAC,CAAA;IAEtD;;;OAGG;IACM,WAAW,GAAG,KAAK,iEAEzB,CAAA;IAEH;;;O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,eAAe,EAAE,CAAC,OAAO,EAAE,EAAE;gBAC3B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;gBACtB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;oBAClB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;oBACjC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;gBAC3B,CAAC;gBACD,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;oBAC3C,IAAI,CAAC,SAAS,EAAE,CAAA;gBAClB,CAAC;YACH,CAAC;YACD,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE;gBACzB,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,kCAAkC;oBAClC,IAAI,CAAC,SAAS,EAAE,CAAA;gBAClB,CAAC;YACH,CAAC;YACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;YACzB,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE;YAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SACpB,CAAC,CAAC,EACH,IAAI,CAAC,QAAQ,CACd,CAAA;QAED,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAC9B,QAAQ,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAC3D,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGA/FU,yBAAyB;4FAAzB,yBAAyB;;4FAAzB,yBAAyB;kBADrC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n type OnInit,\n} from \"@angular/core\"\nimport {type ControlValueAccessor} from \"@angular/forms\"\n\nimport {useId} from \"@qualcomm-ui/angular-core/common\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n type CheckboxApiProps,\n checkboxMachine,\n createCheckboxApi,\n} from \"@qualcomm-ui/core/checkbox\"\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {AbstractCheckboxFormControlDirective} from \"./abstract-checkbox-form-control.directive\"\nimport {CheckboxContextService} from \"./checkbox-context.service\"\n\n@Directive()\nexport class CoreCheckboxRootDirective\n extends AbstractCheckboxFormControlDirective\n implements\n SignalifyInput<Omit<CheckboxApiProps, \"checked\" | \"form\" | \"ids\">>,\n ControlValueAccessor,\n OnInit\n{\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>(undefined)\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<\n (() => ShadowRoot | Document | Node) | undefined\n >()\n\n /**\n * If true and the checkbox is not checked, the checkbox will be in the\n * `indeterminate` state.\n */\n readonly indeterminate = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * {@link https://www.w3schools.com/html/html_id.asp id attribute}. If\n * omitted, a unique identifier will be generated for accessibility.)\n */\n readonly id = input<string | undefined>(undefined)\n\n /**\n * The value of checkbox input. Useful for form submission.\n * @default \"on\"\n */\n readonly value = input<string | undefined>()\n\n protected readonly checkboxContextService = inject(CheckboxContextService)\n protected readonly document = inject(DOCUMENT)\n\n protected readonly hostId = computed(() => useId(this, this.id()))\n protected readonly trackBindings = useTrackBindings(() =>\n this.checkboxContextService.context().getRootBindings({id: this.hostId()}),\n )\n\n override ngOnInit() {\n super.ngOnInit()\n\n const machine = useMachine(\n checkboxMachine,\n computed<Explicit<CheckboxApiProps>>(() => ({\n checked: this.checked(),\n defaultChecked: this.defaultChecked(),\n dir: this.dir(),\n disabled: this.isDisabled(),\n // angular handles this automatically with ngModel and Reactive Forms\n form: undefined,\n getRootNode: this.getRootNode() || (() => this.document),\n ids: undefined,\n indeterminate: this.indeterminate(),\n invalid: this.invalid(),\n name: this.name(),\n onCheckedChange: (checked) => {\n this.onChange(checked)\n if (!this.control) {\n this.checkedChanged.emit(checked)\n this.checked.set(checked)\n }\n if (this.control && !this.control?.touched) {\n this.onTouched()\n }\n },\n onFocusChange: (focused) => {\n if (!focused) {\n // only trigger onTouched on blur.\n this.onTouched()\n }\n },\n readOnly: this.readOnly(),\n required: this.isRequired(),\n value: this.value(),\n })),\n this.injector,\n )\n\n this.checkboxContextService.init(\n computed(() => createCheckboxApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-list-collection.js","sourceRoot":"","sources":["../../../src/collection/use-list-collection.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EACL,QAAQ,EACR,YAAY,GAGb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAA;AAC1D,OAAO,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAA;AAC9D,OAAO,EACL,cAAc,GAEf,MAAM,+BAA+B,CAAA;AA4BtC;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAgC;IAEhC,MAAM,EACJ,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,SAAS,EAChB,KAAK,EACL,GAAG,iBAAiB,EACrB,GAAG,KAAK,CAAA;IAET,IAAI,QAEH,CAAA;IACD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,SAAS,CAAC,EAAC,WAAW,EAAE,MAAM,EAAC,CAAC,CA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AAE,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE;aACrC,CAAC,CACH,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {\r\n computed,\r\n linkedSignal,\r\n type Signal,\r\n type WritableSignal,\r\n} from \"@angular/core\"\r\n\r\nimport {useFilter} from \"@qualcomm-ui/angular-core/locale\"\r\nimport {accessSignal} from \"@qualcomm-ui/angular-core/signals\"\r\nimport {\r\n ListCollection,\r\n type ListCollectionOptions,\r\n} from \"@qualcomm-ui/utils/collection\"\r\nimport type {FilterReturn} from \"@qualcomm-ui/utils/i18n\"\r\n\r\nexport interface UseListCollectionProps<T>\r\n extends Omit<ListCollectionOptions<T>, \"items\"> {\r\n /**\r\n * Filter strategy for the items. Use one of the predefined options, or pass as a\r\n * function for full control.\r\n *\r\n * @option `contains` - Checks if string contains substring using locale-aware exact matching\r\n * @option `endsWith` - Checks if string ends with substring using locale-aware exact matching\r\n * @option `startsWith` - Checks if string starts with substring using locale-aware exact matching\r\n * @option `fuzzyContains` - Checks if string contains substring within Levenshtein distance threshold\r\n */\r\n filter:\r\n | keyof FilterReturn\r\n | ((itemText: string, filterText: string, item: T) => boolean)\r\n /**\r\n * Optional filter text which will filter the items.\r\n */\r\n filterText?: Signal<string>\r\n /**\r\n * The items to use in the collection, prior to filtering.\r\n */\r\n items: Signal<T[]> | T[]\r\n limit?: number\r\n}\r\n\r\n/**\r\n * @returns an object containing the mutable collection and filterText\r\n */\r\nexport function useListCollection<T>(\r\n props: UseListCollectionProps<T>,\r\n): UseListCollectionReturn<T> {\r\n const {\r\n filter: filterProp,\r\n filterText: filterTextProp,\r\n items: itemsProp,\r\n limit,\r\n ...collectionOptions\r\n } = props\r\n\r\n let filterFn: Signal<\r\n ((itemText: string, filterText: string, item: T) => boolean) | undefined\r\n >\r\n if (typeof filterProp === \"string\") {\r\n const hook = useFilter({sensitivity: \"base\"})\r\n filterFn = computed(() => hook()[filterProp])\r\n } else {\r\n filterFn = computed(() => filterProp)\r\n }\r\n\r\n const baseCollection = linkedSignal(\r\n () =>\r\n new ListCollection({\r\n ...collectionOptions,\r\n items: accessSignal(itemsProp) ?? [],\r\n }),\r\n )\r\n const filterText = linkedSignal<string>(() => filterTextProp?.() || \"\")\r\n\r\n const collection = computed(() => {\r\n let result = baseCollection()\r\n const filter = filterFn()\r\n\r\n if (filterText() && filter) {\r\n result = result.filter((itemString: string, _index: number, item: T) =>\r\n filter(itemString, filterText(), item),\r\n )\r\n }\r\n\r\n if (limit != null) {\r\n result = new ListCollection({\r\n ...collectionOptions,\r\n items: result.items.slice(0, limit),\r\n })\r\n }\r\n\r\n return result\r\n })\r\n\r\n return {\r\n collection,\r\n filterText,\r\n reset: () => {\r\n baseCollection.set(\r\n new ListCollection({\r\n ...collectionOptions,\r\n items: accessSignal(itemsProp) ?? [],\r\n }),\r\n )\r\n },\r\n }\r\n}\r\n\r\nexport interface UseListCollectionReturn<T> {\r\n /**\r\n * The filtered collection. Pass this as input to your select/combobox.\r\n */\r\n collection: Signal<ListCollection<T>>\r\n /**\r\n * Mutable filter text which will filter the items when set. This may also be\r\n * passed as an input property to this hook.\r\n */\r\n filterText: WritableSignal<string>\r\n /**\r\n * Helper function to reset the collection to its initial state.\r\n */\r\n reset: () => void\r\n}\r\n"]}
1
+ {"version":3,"file":"use-list-collection.js","sourceRoot":"","sources":["../../../src/collection/use-list-collection.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EACL,QAAQ,EACR,YAAY,GAGb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAA;AAC1D,OAAO,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAA;AAC9D,OAAO,EACL,cAAc,GAEf,MAAM,+BAA+B,CAAA;AA4BtC;;GAEG;AACH,MAAM,UAA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G,iBAAiB;gBACpB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;aACpC,CAAC,CAAA;QACJ,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,sDAAC,CAAA;IAEF,OAAO;QACL,UAAU;QACV,UAAU;QACV,KAAK,EAAE,GAAG,EAAE;YACV,cAAc,CAAC,GAAG,CAChB,IAAI,cAAc,CAAC;gBACjB,GAAG,iBAAiB;gBACpB,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE;aACrC,CAAC,CACH,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {\n computed,\n linkedSignal,\n type Signal,\n type WritableSignal,\n} from \"@angular/core\"\n\nimport {useFilter} from \"@qualcomm-ui/angular-core/locale\"\nimport {accessSignal} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n ListCollection,\n type ListCollectionOptions,\n} from \"@qualcomm-ui/utils/collection\"\nimport type {FilterReturn} from \"@qualcomm-ui/utils/i18n\"\n\nexport interface UseListCollectionProps<T>\n extends Omit<ListCollectionOptions<T>, \"items\"> {\n /**\n * Filter strategy for the items. Use one of the predefined options, or pass as a\n * function for full control.\n *\n * @option `contains` - Checks if string contains substring using locale-aware exact matching\n * @option `endsWith` - Checks if string ends with substring using locale-aware exact matching\n * @option `startsWith` - Checks if string starts with substring using locale-aware exact matching\n * @option `fuzzyContains` - Checks if string contains substring within Levenshtein distance threshold\n */\n filter:\n | keyof FilterReturn\n | ((itemText: string, filterText: string, item: T) => boolean)\n /**\n * Optional filter text which will filter the items.\n */\n filterText?: Signal<string>\n /**\n * The items to use in the collection, prior to filtering.\n */\n items: Signal<T[]> | T[]\n limit?: number\n}\n\n/**\n * @returns an object containing the mutable collection and filterText\n */\nexport function useListCollection<T>(\n props: UseListCollectionProps<T>,\n): UseListCollectionReturn<T> {\n const {\n filter: filterProp,\n filterText: filterTextProp,\n items: itemsProp,\n limit,\n ...collectionOptions\n } = props\n\n let filterFn: Signal<\n ((itemText: string, filterText: string, item: T) => boolean) | undefined\n >\n if (typeof filterProp === \"string\") {\n const hook = useFilter({sensitivity: \"base\"})\n filterFn = computed(() => hook()[filterProp])\n } else {\n filterFn = computed(() => filterProp)\n }\n\n const baseCollection = linkedSignal(\n () =>\n new ListCollection({\n ...collectionOptions,\n items: accessSignal(itemsProp) ?? [],\n }),\n )\n const filterText = linkedSignal<string>(() => filterTextProp?.() || \"\")\n\n const collection = computed(() => {\n let result = baseCollection()\n const filter = filterFn()\n\n if (filterText() && filter) {\n result = result.filter((itemString: string, _index: number, item: T) =>\n filter(itemString, filterText(), item),\n )\n }\n\n if (limit != null) {\n result = new ListCollection({\n ...collectionOptions,\n items: result.items.slice(0, limit),\n })\n }\n\n return result\n })\n\n return {\n collection,\n filterText,\n reset: () => {\n baseCollection.set(\n new ListCollection({\n ...collectionOptions,\n items: accessSignal(itemsProp) ?? [],\n }),\n )\n },\n }\n}\n\nexport interface UseListCollectionReturn<T> {\n /**\n * The filtered collection. Pass this as input to your select/combobox.\n */\n collection: Signal<ListCollection<T>>\n /**\n * Mutable filter text which will filter the items when set. This may also be\n * passed as an input property to this hook.\n */\n filterText: WritableSignal<string>\n /**\n * Helper function to reset the collection to its initial state.\n */\n reset: () => void\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-is-destroyed.js","sourceRoot":"","sources":["../../../src/common/use-is-destroyed.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAA;AAEhD;;;;;GAKG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IACrC,IAAI,SAAS,GAAG,KAAK,CAAA;IACrB,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;QACxB,SAAS,GAAG,IAAI,CAAA;IAClB,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,EAAE;QACV,OAAO,SAAS,CAAA;IAClB,CAAC,CAAA;AACH,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {DestroyRef, inject} from \"@angular/core\"\r\n\r\n/**\r\n * Creates a utility that provides a check for whether a component has been\r\n * destroyed.\r\n *\r\n * @returns A single method for checking the destroy status of the component.\r\n */\r\nexport function useIsDestroyed(): () => boolean {\r\n const destroyRef = inject(DestroyRef)\r\n let destroyed = false\r\n destroyRef.onDestroy(() => {\r\n destroyed = true\r\n })\r\n return () => {\r\n return destroyed\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"use-is-destroyed.js","sourceRoot":"","sources":["../../../src/common/use-is-destroyed.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAA;AAEhD;;;;;GAKG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IACrC,IAAI,SAAS,GAAG,KAAK,CAAA;IACrB,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;QACxB,SAAS,GAAG,IAAI,CAAA;IAClB,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,EAAE;QACV,OAAO,SAAS,CAAA;IAClB,CAAC,CAAA;AACH,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DestroyRef, inject} from \"@angular/core\"\n\n/**\n * Creates a utility that provides a check for whether a component has been\n * destroyed.\n *\n * @returns A single method for checking the destroy status of the component.\n */\nexport function useIsDestroyed(): () => boolean {\n const destroyRef = inject(DestroyRef)\n let destroyed = false\n destroyRef.onDestroy(() => {\n destroyed = true\n })\n return () => {\n return destroyed\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-is-mounted.js","sourceRoot":"","sources":["../../../src/common/use-is-mounted.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAA;AAEjD;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,WAAW,EAAE,CAAA;IACvB,CAAC,CAAA;AACH,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {useIsDestroyed} from \"./use-is-destroyed\"\r\n\r\n/**\r\n * Creates a utility that provides a check for whether a component is still mounted.\r\n *\r\n * @returns A single method for checking the status of the component.\r\n */\r\nexport function useIsMounted(): () => boolean {\r\n const isDestroyed = useIsDestroyed()\r\n return () => {\r\n return !isDestroyed()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"use-is-mounted.js","sourceRoot":"","sources":["../../../src/common/use-is-mounted.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAA;AAEjD;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,WAAW,EAAE,CAAA;IACvB,CAAC,CAAA;AACH,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {useIsDestroyed} from \"./use-is-destroyed\"\n\n/**\n * Creates a utility that provides a check for whether a component is still mounted.\n *\n * @returns A single method for checking the status of the component.\n */\nexport function useIsMounted(): () => boolean {\n const isDestroyed = useIsDestroyed()\n return () => {\n return !isDestroyed()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"locale-context.service.js","sourceRoot":"","sources":["../../../src/locale/locale-context.service.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAExC,OAAO,EAEL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;;AAI1C,MAAM,OAAO,oBAAqB,SAAQ,qBAA6B;wGAA1D,oBAAoB;4GAApB,oBAAoB;;4FAApB,oBAAoB;kBADhC,UAAU;;AAGX,MAAM,CAAC,MAAM,CACX,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACrB,GAAuB,gBAAgB,CACtC,eAAe,EACf,oBAAoB,EACpB,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,CAC9B,CAAA","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {Injectable} from \"@angular/core\"\r\n\r\nimport {\r\n type ApiContext,\r\n BaseApiContextService,\r\n createApiContext,\r\n} from \"@qualcomm-ui/angular-core/machine\"\r\nimport type {Locale} from \"@qualcomm-ui/utils/direction\"\r\n\r\n@Injectable()\r\nexport class LocaleContextService extends BaseApiContextService<Locale> {}\r\n\r\nexport const [\r\n LOCALE_CONTEXT,\r\n useLocaleContext,\r\n provideLocaleContext,\r\n]: ApiContext<Locale> = createApiContext<Locale>(\r\n \"LocaleContext\",\r\n LocaleContextService,\r\n {dir: \"ltr\", locale: \"en-US\"},\r\n)\r\n"]}
1
+ {"version":3,"file":"locale-context.service.js","sourceRoot":"","sources":["../../../src/locale/locale-context.service.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAExC,OAAO,EAEL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;;AAI1C,MAAM,OAAO,oBAAqB,SAAQ,qBAA6B;wGAA1D,oBAAoB;4GAApB,oBAAoB;;4FAApB,oBAAoB;kBADhC,UAAU;;AAGX,MAAM,CAAC,MAAM,CACX,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACrB,GAAuB,gBAAgB,CACtC,eAAe,EACf,oBAAoB,EACpB,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,CAC9B,CAAA","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {Injectable} from \"@angular/core\"\n\nimport {\n type ApiContext,\n BaseApiContextService,\n createApiContext,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {Locale} from \"@qualcomm-ui/utils/direction\"\n\n@Injectable()\nexport class LocaleContextService extends BaseApiContextService<Locale> {}\n\nexport const [\n LOCALE_CONTEXT,\n useLocaleContext,\n provideLocaleContext,\n]: ApiContext<Locale> = createApiContext<Locale>(\n \"LocaleContext\",\n LocaleContextService,\n {dir: \"ltr\", locale: \"en-US\"},\n)\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-filter.js","sourceRoot":"","sources":["../../../src/locale/use-filter.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAc,MAAM,eAAe,CAAA;AAE3D,OAAO,EACL,YAAY,GAGb,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAA;AAK7D,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,GAAG,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;IAC1D,OAAO,QAAQ,CAAC,GAAG,EAAE;QACnB,MAAM,aAAa,GAAG,GAAG,EAAE,OAAO,EAAE,EAAE,CAAA;QACtC,OAAO,YAAY,CAAC;YAClB,GAAG,KAAK;YACR,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,aAAa,EAAE,MAAM,IAAI,OAAO;SACzD,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, inject, type Signal} from \"@angular/core\"\r\n\r\nimport {\r\n createFilter,\r\n type FilterOptions,\r\n type FilterReturn,\r\n} from \"@qualcomm-ui/utils/i18n\"\r\n\r\nimport {LocaleContextService} from \"./locale-context.service\"\r\n\r\nexport interface UseFilterProps extends FilterOptions {}\r\nexport interface UseFilterReturn extends FilterReturn {}\r\n\r\nexport function useFilter(props: UseFilterProps): Signal<UseFilterReturn> {\r\n const env = inject(LocaleContextService, {optional: true})\r\n return computed(() => {\r\n const localeContext = env?.context?.()\r\n return createFilter({\r\n ...props,\r\n locale: props.locale ?? localeContext?.locale ?? \"en-US\",\r\n })\r\n })\r\n}\r\n"]}
1
+ {"version":3,"file":"use-filter.js","sourceRoot":"","sources":["../../../src/locale/use-filter.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAc,MAAM,eAAe,CAAA;AAE3D,OAAO,EACL,YAAY,GAGb,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAA;AAK7D,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,GAAG,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;IAC1D,OAAO,QAAQ,CAAC,GAAG,EAAE;QACnB,MAAM,aAAa,GAAG,GAAG,EAAE,OAAO,EAAE,EAAE,CAAA;QACtC,OAAO,YAAY,CAAC;YAClB,GAAG,KAAK;YACR,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,aAAa,EAAE,MAAM,IAAI,OAAO;SACzD,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, inject, type Signal} from \"@angular/core\"\n\nimport {\n createFilter,\n type FilterOptions,\n type FilterReturn,\n} from \"@qualcomm-ui/utils/i18n\"\n\nimport {LocaleContextService} from \"./locale-context.service\"\n\nexport interface UseFilterProps extends FilterOptions {}\nexport interface UseFilterReturn extends FilterReturn {}\n\nexport function useFilter(props: UseFilterProps): Signal<UseFilterReturn> {\n const env = inject(LocaleContextService, {optional: true})\n return computed(() => {\n const localeContext = env?.context?.()\n return createFilter({\n ...props,\n locale: props.locale ?? localeContext?.locale ?? \"en-US\",\n })\n })\n}\n"]}
@@ -56,8 +56,10 @@ export class QBindDirective {
56
56
  }
57
57
  addClass(names) {
58
58
  const el = this.elementRef.nativeElement;
59
- for (const name of names.split(",")) {
60
- this.renderer.addClass(el, name);
59
+ for (const className of names.split(" ")) {
60
+ for (const name of className.split(",")) {
61
+ this.renderer.addClass(el, name);
62
+ }
61
63
  }
62
64
  }
63
65
  removeStyle(style) {
@@ -1 +1 @@
1
- {"version":3,"file":"q-bind.directive.js","sourceRoot":"","sources":["../../../src/machine/q-bind.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,UAAU,EACV,MAAM,EACN,QAAQ,EACR,KAAK,EAEL,SAAS,EACT,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAC,QAAQ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AA;oBAC9B,SAAQ;gBACV,KAAK,OAAO;oBACV,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAgB,CAAC,CAAA;oBAChD,IAAI,CAAC,QAAQ,CAAC,KAAoB,CAAC,CAAA;oBACnC,SAAQ;gBACV,KAAK,OAAO,CAAC;gBACb,KAAK,SAAS,CAAC;gBACf,KAAK,aAAa;oBAChB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;oBAC1C,SAAQ;YACZ,CAAC;YAED,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;gBAChD,SAAQ;YACV,CAAC;YAED,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;YAC1C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;YACzC,CAAC;QACH,CAAC;IACH,CAAC;wGA7JU,cAAc;4FAAd,cAAc;;4FAAd,cAAc;kBAH1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;iBACrB","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n type OnDestroy,\n Renderer2,\n RendererStyleFlags2,\n runInInjectionContext,\n} from \"@angular/core\"\n\nimport {isEqual} from \"@qualcomm-ui/utils/equal\"\nimport {isNumber, isString} from \"@qualcomm-ui/utils/guard\"\n\nimport type {Dict, StyleObject} from \"./normalize-props\"\n\nexport interface NgBindOptions {\n /**\n * This list of properties will not be spread onto the target element.\n */\n omittedProps?: string[]\n}\n\n/**\n * A directive similar to Vue's `v-bind` that spreads an object's properties onto\n * the host element. For the best performance, use a stable reference to a signal\n * instead of an object literal in the template. Converts callbacks from `on*`\n * syntax to their corresponding Angular event callbacks. Does not account for\n * input/output properties due to Angular limitations.\n *\n * @example\n * <!-- bad: new object every time -->\n * <div [q-bind]=\"{class: 'a', onClick: click}\"></div>\n *\n * <!-- good: stable reference -->\n * <div [q-bind]=\"buttonProps\"></div>\n */\n@Directive({\n selector: \"[q-bind]\",\n})\nexport class QBindDirective implements OnDestroy {\n readonly bind = input.required<Dict | undefined>({alias: \"q-bind\"})\n\n readonly bindOptions = input<NgBindOptions>({}, {alias: \"q-bind-options\"})\n\n private readonly elementRef = inject(ElementRef<HTMLElement>)\n private readonly renderer = inject(Renderer2)\n private readonly injector = inject(Injector)\n private readonly listeners = new Map<string, VoidFunction>()\n private prev: Dict = {}\n\n readonly omittedProps = computed(() => {\n const opts = this.bindOptions()\n return new Set(Array.from(opts.omittedProps || []))\n })\n\n constructor() {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n const next = this.bind()\n if (!isEqual(next, this.prev)) {\n this.handleAttrs(this.prev, next || {})\n this.prev = {...next}\n }\n })\n })\n }\n\n ngOnDestroy(): void {\n this.listeners.forEach((unlisten) => unlisten())\n this.listeners.clear()\n }\n\n private removeClass(names?: string): void {\n if (!names) {\n return\n }\n\n const el = this.elementRef.nativeElement\n for (const name of names.split(\",\")) {\n this.renderer.removeClass(el, name)\n }\n }\n\n private addClass(names: string): void {\n const el = this.elementRef.nativeElement\n for (const name of names.split(\",\")) {\n this.renderer.addClass(el, name)\n }\n }\n\n private removeStyle(style?: StyleObject): void {\n if (!style) {\n return\n }\n\n const el = this.elementRef.nativeElement\n for (const name of Object.keys(style)) {\n this.renderer.removeStyle(el, name, RendererStyleFlags2.DashCase)\n }\n }\n\n private addStyle(style: StyleObject): void {\n const el = this.elementRef.nativeElement\n for (const [name, value] of Object.entries(style)) {\n this.renderer.setStyle(el, name, value, RendererStyleFlags2.DashCase)\n }\n }\n\n private addEventListener(name: string, callback: EventListener): void {\n const eventName = name.substring(2)\n\n this.listeners.get(name)?.()\n const unlisten = this.renderer.listen(\n this.elementRef.nativeElement,\n eventName,\n callback,\n )\n this.listeners.set(name, unlisten)\n }\n\n private handleAttrs(prevProps: Dict, nextProps: Dict): void {\n const el = this.elementRef.nativeElement\n\n for (const [name, value] of Object.entries(prevProps)) {\n if (name in nextProps || this.omittedProps().has(name)) {\n continue\n }\n\n if (name.startsWith(\"on\")) {\n this.listeners.get(name)?.()\n this.listeners.delete(name)\n continue\n }\n\n switch (name) {\n case \"class\":\n this.removeClass(value as string)\n continue\n case \"style\":\n this.removeStyle(value as StyleObject)\n continue\n case \"value\":\n this.renderer.setProperty(el, \"value\", undefined)\n continue\n case \"textContent\":\n this.renderer.setProperty(el, \"textContent\", \"\")\n continue\n case \"checked\":\n this.renderer.setProperty(el, \"checked\", false)\n continue\n }\n this.renderer.removeAttribute(el, name)\n }\n\n for (const [name, value] of Object.entries(nextProps)) {\n if (name in prevProps && isEqual(value, prevProps[name])) {\n continue\n }\n\n if (name.startsWith(\"on\")) {\n const prevHandler = prevProps[name]\n if (isEqual(prevHandler, value)) {\n continue\n }\n\n this.addEventListener(name, value as EventListener)\n continue\n }\n\n switch (name) {\n case \"class\":\n this.removeClass(prevProps[name] as string)\n this.addClass(value as string)\n continue\n case \"style\":\n this.removeStyle(prevProps[name] as StyleObject)\n this.addStyle(value as StyleObject)\n continue\n case \"value\":\n case \"checked\":\n case \"textContent\":\n this.renderer.setProperty(el, name, value)\n continue\n }\n\n if (isString(value) || isNumber(value)) {\n this.renderer.setAttribute(el, name, `${value}`)\n continue\n }\n\n if (value === true) {\n this.renderer.setAttribute(el, name, \"\")\n } else {\n this.renderer.removeAttribute(el, name)\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"q-bind.directive.js","sourceRo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d,cAAc;;4FAAd,cAAc;kBAH1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;iBACrB","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n type OnDestroy,\n Renderer2,\n RendererStyleFlags2,\n runInInjectionContext,\n} from \"@angular/core\"\n\nimport {isEqual} from \"@qualcomm-ui/utils/equal\"\nimport {isNumber, isString} from \"@qualcomm-ui/utils/guard\"\n\nimport type {Dict, StyleObject} from \"./normalize-props\"\n\nexport interface NgBindOptions {\n /**\n * This list of properties will not be spread onto the target element.\n */\n omittedProps?: string[]\n}\n\n/**\n * A directive similar to Vue's `v-bind` that spreads an object's properties onto\n * the host element. For the best performance, use a stable reference to a signal\n * instead of an object literal in the template. Converts callbacks from `on*`\n * syntax to their corresponding Angular event callbacks. Does not account for\n * input/output properties due to Angular limitations.\n *\n * @example\n * <!-- bad: new object every time -->\n * <div [q-bind]=\"{class: 'a', onClick: click}\"></div>\n *\n * <!-- good: stable reference -->\n * <div [q-bind]=\"buttonProps\"></div>\n */\n@Directive({\n selector: \"[q-bind]\",\n})\nexport class QBindDirective implements OnDestroy {\n readonly bind = input.required<Dict | undefined>({alias: \"q-bind\"})\n\n readonly bindOptions = input<NgBindOptions>({}, {alias: \"q-bind-options\"})\n\n private readonly elementRef = inject(ElementRef<HTMLElement>)\n private readonly renderer = inject(Renderer2)\n private readonly injector = inject(Injector)\n private readonly listeners = new Map<string, VoidFunction>()\n private prev: Dict = {}\n\n readonly omittedProps = computed(() => {\n const opts = this.bindOptions()\n return new Set(Array.from(opts.omittedProps || []))\n })\n\n constructor() {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n const next = this.bind()\n if (!isEqual(next, this.prev)) {\n this.handleAttrs(this.prev, next || {})\n this.prev = {...next}\n }\n })\n })\n }\n\n ngOnDestroy(): void {\n this.listeners.forEach((unlisten) => unlisten())\n this.listeners.clear()\n }\n\n private removeClass(names?: string): void {\n if (!names) {\n return\n }\n\n const el = this.elementRef.nativeElement\n for (const name of names.split(\",\")) {\n this.renderer.removeClass(el, name)\n }\n }\n\n private addClass(names: string): void {\n const el = this.elementRef.nativeElement\n for (const className of names.split(\" \")) {\n for (const name of className.split(\",\")) {\n this.renderer.addClass(el, name)\n }\n }\n }\n\n private removeStyle(style?: StyleObject): void {\n if (!style) {\n return\n }\n\n const el = this.elementRef.nativeElement\n for (const name of Object.keys(style)) {\n this.renderer.removeStyle(el, name, RendererStyleFlags2.DashCase)\n }\n }\n\n private addStyle(style: StyleObject): void {\n const el = this.elementRef.nativeElement\n for (const [name, value] of Object.entries(style)) {\n this.renderer.setStyle(el, name, value, RendererStyleFlags2.DashCase)\n }\n }\n\n private addEventListener(name: string, callback: EventListener): void {\n const eventName = name.substring(2)\n\n this.listeners.get(name)?.()\n const unlisten = this.renderer.listen(\n this.elementRef.nativeElement,\n eventName,\n callback,\n )\n this.listeners.set(name, unlisten)\n }\n\n private handleAttrs(prevProps: Dict, nextProps: Dict): void {\n const el = this.elementRef.nativeElement\n\n for (const [name, value] of Object.entries(prevProps)) {\n if (name in nextProps || this.omittedProps().has(name)) {\n continue\n }\n\n if (name.startsWith(\"on\")) {\n this.listeners.get(name)?.()\n this.listeners.delete(name)\n continue\n }\n\n switch (name) {\n case \"class\":\n this.removeClass(value as string)\n continue\n case \"style\":\n this.removeStyle(value as StyleObject)\n continue\n case \"value\":\n this.renderer.setProperty(el, \"value\", undefined)\n continue\n case \"textContent\":\n this.renderer.setProperty(el, \"textContent\", \"\")\n continue\n case \"checked\":\n this.renderer.setProperty(el, \"checked\", false)\n continue\n }\n this.renderer.removeAttribute(el, name)\n }\n\n for (const [name, value] of Object.entries(nextProps)) {\n if (name in prevProps && isEqual(value, prevProps[name])) {\n continue\n }\n\n if (name.startsWith(\"on\")) {\n const prevHandler = prevProps[name]\n if (isEqual(prevHandler, value)) {\n continue\n }\n\n this.addEventListener(name, value as EventListener)\n continue\n }\n\n switch (name) {\n case \"class\":\n this.removeClass(prevProps[name] as string)\n this.addClass(value as string)\n continue\n case \"style\":\n this.removeStyle(prevProps[name] as StyleObject)\n this.addStyle(value as StyleObject)\n continue\n case \"value\":\n case \"checked\":\n case \"textContent\":\n this.renderer.setProperty(el, name, value)\n continue\n }\n\n if (isString(value) || isNumber(value)) {\n this.renderer.setAttribute(el, name, `${value}`)\n continue\n }\n\n if (value === true) {\n this.renderer.setAttribute(el, name, \"\")\n } else {\n this.renderer.removeAttribute(el, name)\n }\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-control.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-control.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,SAAS,EAAc,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,+BAA+B;IACvB,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,kBAAkB,EAAE,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGATU,+BAA+B;4FAA/B,+BAA+B;;4FAA/B,+BAA+B;kBAD3C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {Directive, type OnInit} from \"@angular/core\"\r\n\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputControlDirective implements OnInit {\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getControlBindings()\r\n })\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-control.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-control.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,SAAS,EAAc,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,+BAA+B;IACvB,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,kBAAkB,EAAE,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGATU,+BAA+B;4FAA/B,+BAA+B;;4FAA/B,+BAA+B;kBAD3C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {Directive, type OnInit} from \"@angular/core\"\n\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputControlDirective implements OnInit {\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getControlBindings()\n })\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-decrement-trigger.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-decrement-trigger.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,wCAAwC;IAC1C,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,2BAA2B,CAAC;YAC3D,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,wCAAwC;4FAAxC,wCAAwC;;4FAAxC,wCAAwC;kBADpD,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\r\n\r\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputDecrementTriggerDirective implements OnInit {\r\n readonly id = input<string>()\r\n\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getDecrementTriggerBindings({\r\n id: this.hostId(),\r\n onDestroy: this.onDestroy,\r\n })\r\n })\r\n\r\n private readonly hostId = computed(() => useId(this, this.id()))\r\n\r\n private readonly onDestroy = useOnDestroy()\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-decrement-trigger.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-decrement-trigger.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,wCAAwC;IAC1C,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,2BAA2B,CAAC;YAC3D,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,wCAAwC;4FAAxC,wCAAwC;;4FAAxC,wCAAwC;kBADpD,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\n\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputDecrementTriggerDirective implements OnInit {\n readonly id = input<string>()\n\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getDecrementTriggerBindings({\n id: this.hostId(),\n onDestroy: this.onDestroy,\n })\n })\n\n private readonly hostId = computed(() => useId(this, this.id()))\n\n private readonly onDestroy = useOnDestroy()\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-error-indicator.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-error-indicator.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,SAAS,EAAc,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,sCAAsC;IAC9B,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,yBAAyB,EAAE,CAAA;IAC9D,CAAC,CAAC,CAAA;IAEF,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGATU,sCAAsC;4FAAtC,sCAAsC;;4FAAtC,sCAAsC;kBADlD,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {Directive, type OnInit} from \"@angular/core\"\r\n\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputErrorIndicatorDirective implements OnInit {\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getErrorIndicatorBindings()\r\n })\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-error-indicator.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-error-indicator.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,SAAS,EAAc,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,sCAAsC;IAC9B,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,yBAAyB,EAAE,CAAA;IAC9D,CAAC,CAAC,CAAA;IAEF,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGATU,sCAAsC;4FAAtC,sCAAsC;;4FAAtC,sCAAsC;kBADlD,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {Directive, type OnInit} from \"@angular/core\"\n\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputErrorIndicatorDirective implements OnInit {\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getErrorIndicatorBindings()\n })\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-error-text.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-error-text.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,iCAAiC;IACnC,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,oBAAoB,CAAC;YACpD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,iCAAiC;4FAAjC,iCAAiC;;4FAAjC,iCAAiC;kBAD7C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\r\n\r\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputErrorTextDirective implements OnInit {\r\n readonly id = input<string>()\r\n\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getErrorTextBindings({\r\n id: this.hostId(),\r\n onDestroy: this.onDestroy,\r\n })\r\n })\r\n\r\n private readonly hostId = computed(() => useId(this, this.id()))\r\n\r\n private readonly onDestroy = useOnDestroy()\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-error-text.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-error-text.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,iCAAiC;IACnC,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,oBAAoB,CAAC;YACpD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,iCAAiC;4FAAjC,iCAAiC;;4FAAjC,iCAAiC;kBAD7C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\n\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputErrorTextDirective implements OnInit {\n readonly id = input<string>()\n\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getErrorTextBindings({\n id: this.hostId(),\n onDestroy: this.onDestroy,\n })\n })\n\n private readonly hostId = computed(() => useId(this, this.id()))\n\n private readonly onDestroy = useOnDestroy()\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-hint.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-hint.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,4BAA4B;IAC9B,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,CAAC;YAC/C,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,4BAA4B;4FAA5B,4BAA4B;;4FAA5B,4BAA4B;kBADxC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\r\n\r\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputHintDirective implements OnInit {\r\n readonly id = input<string>()\r\n\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getHintBindings({\r\n id: this.hostId(),\r\n onDestroy: this.onDestroy,\r\n })\r\n })\r\n\r\n private readonly hostId = computed(() => useId(this, this.id()))\r\n\r\n private readonly onDestroy = useOnDestroy()\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-hint.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-hint.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,4BAA4B;IAC9B,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,CAAC;YAC/C,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,4BAA4B;4FAA5B,4BAA4B;;4FAA5B,4BAA4B;kBADxC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\n\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputHintDirective implements OnInit {\n readonly id = input<string>()\n\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getHintBindings({\n id: this.hostId(),\n onDestroy: this.onDestroy,\n })\n })\n\n private readonly hostId = computed(() => useId(this, this.id()))\n\n private readonly onDestroy = useOnDestroy()\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-increment-trigger.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-increment-trigger.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,wCAAwC;IAC1C,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,2BAA2B,CAAC;YAC3D,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,wCAAwC;4FAAxC,wCAAwC;;4FAAxC,wCAAwC;kBADpD,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\r\n\r\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputIncrementTriggerDirective implements OnInit {\r\n readonly id = input<string>()\r\n\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getIncrementTriggerBindings({\r\n id: this.hostId(),\r\n onDestroy: this.onDestroy,\r\n })\r\n })\r\n\r\n private readonly hostId = computed(() => useId(this, this.id()))\r\n\r\n private readonly onDestroy = useOnDestroy()\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-increment-trigger.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-increment-trigger.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,wCAAwC;IAC1C,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,2BAA2B,CAAC;YAC3D,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,wCAAwC;4FAAxC,wCAAwC;;4FAAxC,wCAAwC;kBADpD,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\n\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputIncrementTriggerDirective implements OnInit {\n readonly id = input<string>()\n\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getIncrementTriggerBindings({\n id: this.hostId(),\n onDestroy: this.onDestroy,\n })\n })\n\n private readonly hostId = computed(() => useId(this, this.id()))\n\n private readonly onDestroy = useOnDestroy()\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-input-group.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-input-group.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,SAAS,EAAc,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,kCAAkC;IAC1B,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,qBAAqB,EAAE,CAAA;IAC1D,CAAC,CAAC,CAAA;IAEF,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGATU,kCAAkC;4FAAlC,kCAAkC;;4FAAlC,kCAAkC;kBAD9C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {Directive, type OnInit} from \"@angular/core\"\r\n\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputInputGroupDirective implements OnInit {\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getInputGroupBindings()\r\n })\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-input-group.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-input-group.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,SAAS,EAAc,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,kCAAkC;IAC1B,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,qBAAqB,EAAE,CAAA;IAC1D,CAAC,CAAC,CAAA;IAEF,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGATU,kCAAkC;4FAAlC,kCAAkC;;4FAAlC,kCAAkC;kBAD9C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {Directive, type OnInit} from \"@angular/core\"\n\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputInputGroupDirective implements OnInit {\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getInputGroupBindings()\n })\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-input.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-input.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,6BAA6B;IAC/B,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC;YAChD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,6BAA6B;4FAA7B,6BAA6B;;4FAA7B,6BAA6B;kBADzC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\r\n\r\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputInputDirective implements OnInit {\r\n readonly id = input<string>()\r\n\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getInputBindings({\r\n id: this.hostId(),\r\n onDestroy: this.onDestroy,\r\n })\r\n })\r\n\r\n private readonly hostId = computed(() => useId(this, this.id()))\r\n\r\n private readonly onDestroy = useOnDestroy()\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-input.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-input.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,6BAA6B;IAC/B,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC;YAChD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,6BAA6B;4FAA7B,6BAA6B;;4FAA7B,6BAA6B;kBADzC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\n\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputInputDirective implements OnInit {\n readonly id = input<string>()\n\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getInputBindings({\n id: this.hostId(),\n onDestroy: this.onDestroy,\n })\n })\n\n private readonly hostId = computed(() => useId(this, this.id()))\n\n private readonly onDestroy = useOnDestroy()\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-label.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-label.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,6BAA6B;IAC/B,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC;YAChD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,6BAA6B;4FAA7B,6BAA6B;;4FAA7B,6BAA6B;kBADzC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\r\n\r\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\r\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\r\n\r\nimport {useNumberInputContext} from \"./number-input-context.service\"\r\n\r\n@Directive()\r\nexport class CoreNumberInputLabelDirective implements OnInit {\r\n readonly id = input<string>()\r\n\r\n protected readonly numberInputContext = useNumberInputContext()\r\n\r\n protected readonly trackBindings = useTrackBindings(() => {\r\n return this.numberInputContext().getLabelBindings({\r\n id: this.hostId(),\r\n onDestroy: this.onDestroy,\r\n })\r\n })\r\n\r\n private readonly hostId = computed(() => useId(this, this.id()))\r\n\r\n private readonly onDestroy = useOnDestroy()\r\n\r\n ngOnInit() {\r\n this.trackBindings()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"core-number-input-label.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-label.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAErE,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAElE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gCAAgC,CAAA;;AAGpE,MAAM,OAAO,6BAA6B;IAC/B,EAAE,GAAG,KAAK,wDAAU,CAAA;IAEV,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAE5C,aAAa,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACvD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC;YAChD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEe,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kDAAC,CAAA;IAE/C,SAAS,GAAG,YAAY,EAAE,CAAA;IAE3C,QAAQ;QACN,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGAlBU,6BAA6B;4FAA7B,6BAA6B;;4FAA7B,6BAA6B;kBADzC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {computed, Directive, input, type OnInit} from \"@angular/core\"\n\nimport {useId, useOnDestroy} from \"@qualcomm-ui/angular-core/common\"\nimport {useTrackBindings} from \"@qualcomm-ui/angular-core/machine\"\n\nimport {useNumberInputContext} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputLabelDirective implements OnInit {\n readonly id = input<string>()\n\n protected readonly numberInputContext = useNumberInputContext()\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext().getLabelBindings({\n id: this.hostId(),\n onDestroy: this.onDestroy,\n })\n })\n\n private readonly hostId = computed(() => useId(this, this.id()))\n\n private readonly onDestroy = useOnDestroy()\n\n ngOnInit() {\n this.trackBindings()\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  // Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
2
  // SPDX-License-Identifier: BSD-3-Clause-Clear
3
+ import { DOCUMENT } from "@angular/common";
3
4
  import { booleanAttribute, computed, Directive, inject, input, output, } from "@angular/core";
4
5
  import { numberAttributeOrUndefined } from "@qualcomm-ui/angular-core/attributes";
5
6
  import { useIsMounted } from "@qualcomm-ui/angular-core/common";
@@ -114,6 +115,7 @@ export class CoreNumberInputRootDirective extends AbstractNumberInputFormControl
114
115
  * Function invoked when the value overflows or underflows the min/max range
115
116
  */
116
117
  valueInvalid = output();
118
+ document = inject(DOCUMENT);
117
119
  isMounted = useIsMounted();
118
120
  numberInputContext = inject(NumberInputContextService);
119
121
  trackBindings = useTrackBindings(() => {
@@ -135,7 +137,7 @@ export class CoreNumberInputRootDirective extends AbstractNumberInputFormControl
135
137
  // angular handles this automatically with ngModel and Reactive Forms
136
138
  form: undefined,
137
139
  formatOptions: this.formatOptions(),
138
- getRootNode: this.getRootNode(),
140
+ getRootNode: this.getRootNode() ?? (() => this.document),
139
141
  ids: undefined,
140
142
  inputMode: this.inputMode(),
141
143
  invalid: this.isInvalid(),
@@ -1 +1 @@
1
- {"version":3,"file":"core-number-input-root.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,0BAA0B,EAAC,MAAM,sCAAsC,CAAA;AAC/E,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EACL,oBAAoB,EAGpB,kBAAkB,GAInB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAe,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EAAC,uCAAuC,EAAC,MAAM,gDAAgD,CAAA;AACtG,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAA;;AAGxE,MAAM,OAAO,4BACX,SAAQ,uCAAuC;IAQ/C;;OAEG;IACM,eAAe,GAAG,KAAK,CAAkC,SAAS,mDACzE,SAAS,EAAE,gBAAgB,OADgD;YAC3E,SAAS,EAAE,gBAAgB;SAC5B,GAAC,CAAA;IAEF;;;OAGG;IACM,aAAa,GAAG,KAAK,CAAkC,SAAS,iDACvE,SAAS,EAAE,gBAAgB,OAD8C;YACzE,SAAS,EAAE,gBAAgB;SAC5B,GAAC,CAAA;IAEF;;;OAGG;IACM,gBAAgB,GAAG,KAAK,CAC/B,SAAS,oDAEP,SAAS,EAAE,gBAAgB,OAD7B;YACE,SAAS,EAAE,gBAAgB;SAC5B,GACF,CAAA;IAED;;;;OAIG;IACM,GAAG,GAAG,KAAK,CAAwB,SAAS,+CAAC,CAAA;IAEtD;;;;OAIG;IACM,kBAAkB,GAAG,KAAK,CACjC,SAAS,sDAEP,SA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,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAC9D,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGA3NU,4BAA4B;4FAA5B,4BAA4B;;4FAA5B,4BAA4B;kBADxC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n type OnInit,\n output,\n} from \"@angular/core\"\n\nimport {numberAttributeOrUndefined} from \"@qualcomm-ui/angular-core/attributes\"\nimport {useIsMounted} from \"@qualcomm-ui/angular-core/common\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n createNumberInputApi,\n type NumberInputApiProps,\n type NumberInputIntlTranslations,\n numberInputMachine,\n type NumberInputMode,\n type NumberInputValueChangeDetails,\n type NumberInputValueInvalidDetails,\n} from \"@qualcomm-ui/core/number-input\"\nimport type {Booleanish, NumberInput} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport {type Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {AbstractNumberInputFormControlDirective} from \"./abstract-number-input-form-control.directive\"\nimport {NumberInputContextService} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputRootDirective\n extends AbstractNumberInputFormControlDirective\n implements\n OnInit,\n Omit<\n SignalifyInput<NumberInputApiProps>,\n \"defaultValue\" | \"form\" | \"ids\" | \"value\"\n >\n{\n /**\n * Whether to allow mouse wheel to change the value\n */\n readonly allowMouseWheel = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Whether to allow the value to overflow the min/max range\n * @default true\n */\n readonly allowOverflow = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Whether to clamp the value when the input loses focus (blur)\n * @default true\n */\n readonly clampValueOnBlur = input<boolean | undefined, Booleanish>(\n undefined,\n {\n transform: booleanAttribute,\n },\n )\n\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>(undefined)\n\n /**\n * Whether to focus the input when the value changes\n *\n * @default true\n */\n readonly focusInputOnChange = input<boolean | undefined, Booleanish>(\n undefined,\n {\n transform: booleanAttribute,\n },\n )\n\n /**\n * The options to pass to the `Intl.NumberFormat` constructor\n */\n readonly formatOptions = input<Intl.NumberFormatOptions | undefined>()\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<\n (() => ShadowRoot | Document | Node) | undefined\n >()\n\n /**\n * Hints at the type of data that might be entered by the user. It also determines\n * the type of keyboard shown to the user on mobile devices\n * @default \"decimal\"\n */\n readonly inputMode = input<NumberInputMode | undefined>()\n\n /**\n * The maximum value of the number input\n * @default Number.MAX_SAFE_INTEGER\n */\n readonly max = input<number | undefined, NumberInput>(undefined, {\n transform: numberAttributeOrUndefined,\n })\n\n /**\n * The minimum value of the number input\n * @default Number.MIN_SAFE_INTEGER\n */\n readonly min = input<number | undefined, NumberInput>(undefined, {\n transform: numberAttributeOrUndefined,\n })\n\n /**\n * The current locale. Based on the BCP 47 definition.\n *\n * @default 'en-US'\n */\n readonly locale = input<string | undefined>()\n\n /**\n * The pattern used to check the <input> element's value against\n *\n * @default \"[0-9]*(.[0-9]+)?\"\n */\n readonly pattern = input<string | undefined>()\n\n /**\n * Whether to spin the value when the increment/decrement button is pressed\n * @default true\n */\n readonly spinOnPress = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Amount to increment/decrement the value when using stepper buttons or arrow keys.\n * @default 1\n */\n readonly step = input<number | undefined, NumberInput>(undefined, {\n transform: numberAttributeOrUndefined,\n })\n\n /**\n * Specifies the localized strings that identify the accessibility elements and\n * their states\n */\n readonly translations = input<NumberInputIntlTranslations | undefined>()\n\n /**\n * Event emitted when the checkbox is checked or unchecked. This is only emitted\n * on interaction. It doesn't emit in response to programmatic form control\n * changes.\n */\n readonly valueChanged = output<NumberInputValueChangeDetails>()\n\n /**\n * Function invoked when the value overflows or underflows the min/max range\n */\n readonly valueInvalid = output<NumberInputValueInvalidDetails>()\n\n protected readonly isMounted = useIsMounted()\n\n protected readonly numberInputContext = inject(NumberInputContextService)\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext.context().getRootBindings()\n })\n\n override ngOnInit() {\n super.ngOnInit()\n\n const machine = useMachine(\n numberInputMachine,\n computed<Explicit<NumberInputApiProps>>(() => {\n return {\n allowMouseWheel: this.allowMouseWheel(),\n allowOverflow: this.allowOverflow(),\n clampValueOnBlur: this.clampValueOnBlur(),\n defaultValue: this.defaultValue()\n ? `${this.defaultValue() ?? \"\"}`\n : \"\",\n dir: this.dir(),\n disabled: this.isDisabled(),\n focusInputOnChange: this.focusInputOnChange(),\n // angular handles this automatically with ngModel and Reactive Forms\n form: undefined,\n formatOptions: this.formatOptions(),\n getRootNode: this.getRootNode(),\n ids: undefined,\n inputMode: this.inputMode(),\n invalid: this.isInvalid(),\n locale: this.locale(),\n max: this.max(),\n min: this.min(),\n name: this.name(),\n onFocusChange: (details) => {\n if (!details.focused) {\n // only trigger onTouched on blur.\n this.onTouched()\n }\n },\n onValueChange: (details) => {\n this.stringValue.set(details.value)\n if (!this.control) {\n if (this.isMounted()) {\n this.valueChanged.emit(details)\n }\n this.value.set(details.valueAsNumber)\n return\n }\n // ngModel is bound to the root, but change events happen on the <input>\n // element and are forwarded to the machine. So we need to fire the\n // value change event to keep the form in sync.\n this.onChange(details.valueAsNumber)\n if (!this.control?.touched) {\n this.control.markAsTouched?.()\n }\n if (!this.control?.dirty) {\n this.control.markAsDirty?.()\n }\n },\n onValueInvalid: (details) => {\n this.valueInvalid.emit(details)\n },\n pattern: this.pattern(),\n readOnly: this.readOnly(),\n required: this.isRequired(),\n spinOnPress: this.spinOnPress(),\n step: this.step(),\n translations: this.translations(),\n value: this.stringValue(),\n }\n }),\n this.injector,\n )\n\n this.numberInputContext.init(\n computed(() => createNumberInputApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
1
+ {"version":3,"file":"core-number-input-root.directive.js","sourceRoot":"","sources":["../../../src/number-input/core-number-input-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,0BAA0B,EAAC,MAAM,sCAAsC,CAAA;AAC/E,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EACL,oBAAoB,EAGpB,kBAAkB,GAInB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAe,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EAAC,uCAAuC,EAAC,MAAM,gDAAgD,CAAA;AACtG,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAA;;AAGxE,MAAM,OAAO,4BACX,SAAQ,uCAAuC;IAQ/C;;OAEG;IACM,eAAe,GAAG,KAAK,CAAkC,SAAS,mDACzE,SAAS,EAAE,gBAAgB,OADgD;YAC3E,SAAS,EAAE,gBAAgB;SAC5B,GAAC,CAAA;IAEF;;;OAGG;IACM,aAAa,GAAG,KAAK,CAAkC,SAAS,iDACvE,SAAS,EAAE,gBAAgB,OAD8C;YACzE,SAAS,EAAE,gBAAgB;SAC5B,GAAC,CAAA;IAEF;;;OAGG;IACM,gBAAgB,GAAG,KAAK,CAC/B,SAA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AAC,UAAU,EAAE;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;gBAC/B,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;gBACjB,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;gBACjC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aAC1B,CAAA;QACH,CAAC,CAAC,EACF,IAAI,CAAC,QAAQ,CACd,CAAA;QAED,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAC1B,QAAQ,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAC9D,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGA7NU,4BAA4B;4FAA5B,4BAA4B;;4FAA5B,4BAA4B;kBADxC,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n type OnInit,\n output,\n} from \"@angular/core\"\n\nimport {numberAttributeOrUndefined} from \"@qualcomm-ui/angular-core/attributes\"\nimport {useIsMounted} from \"@qualcomm-ui/angular-core/common\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n createNumberInputApi,\n type NumberInputApiProps,\n type NumberInputIntlTranslations,\n numberInputMachine,\n type NumberInputMode,\n type NumberInputValueChangeDetails,\n type NumberInputValueInvalidDetails,\n} from \"@qualcomm-ui/core/number-input\"\nimport type {Booleanish, NumberInput} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport {type Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {AbstractNumberInputFormControlDirective} from \"./abstract-number-input-form-control.directive\"\nimport {NumberInputContextService} from \"./number-input-context.service\"\n\n@Directive()\nexport class CoreNumberInputRootDirective\n extends AbstractNumberInputFormControlDirective\n implements\n OnInit,\n Omit<\n SignalifyInput<NumberInputApiProps>,\n \"defaultValue\" | \"form\" | \"ids\" | \"value\"\n >\n{\n /**\n * Whether to allow mouse wheel to change the value\n */\n readonly allowMouseWheel = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Whether to allow the value to overflow the min/max range\n * @default true\n */\n readonly allowOverflow = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Whether to clamp the value when the input loses focus (blur)\n * @default true\n */\n readonly clampValueOnBlur = input<boolean | undefined, Booleanish>(\n undefined,\n {\n transform: booleanAttribute,\n },\n )\n\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>(undefined)\n\n /**\n * Whether to focus the input when the value changes\n *\n * @default true\n */\n readonly focusInputOnChange = input<boolean | undefined, Booleanish>(\n undefined,\n {\n transform: booleanAttribute,\n },\n )\n\n /**\n * The options to pass to the `Intl.NumberFormat` constructor\n */\n readonly formatOptions = input<Intl.NumberFormatOptions | undefined>()\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<\n (() => ShadowRoot | Document | Node) | undefined\n >()\n\n /**\n * Hints at the type of data that might be entered by the user. It also determines\n * the type of keyboard shown to the user on mobile devices\n * @default \"decimal\"\n */\n readonly inputMode = input<NumberInputMode | undefined>()\n\n /**\n * The maximum value of the number input\n * @default Number.MAX_SAFE_INTEGER\n */\n readonly max = input<number | undefined, NumberInput>(undefined, {\n transform: numberAttributeOrUndefined,\n })\n\n /**\n * The minimum value of the number input\n * @default Number.MIN_SAFE_INTEGER\n */\n readonly min = input<number | undefined, NumberInput>(undefined, {\n transform: numberAttributeOrUndefined,\n })\n\n /**\n * The current locale. Based on the BCP 47 definition.\n *\n * @default 'en-US'\n */\n readonly locale = input<string | undefined>()\n\n /**\n * The pattern used to check the <input> element's value against\n *\n * @default \"[0-9]*(.[0-9]+)?\"\n */\n readonly pattern = input<string | undefined>()\n\n /**\n * Whether to spin the value when the increment/decrement button is pressed\n * @default true\n */\n readonly spinOnPress = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Amount to increment/decrement the value when using stepper buttons or arrow keys.\n * @default 1\n */\n readonly step = input<number | undefined, NumberInput>(undefined, {\n transform: numberAttributeOrUndefined,\n })\n\n /**\n * Specifies the localized strings that identify the accessibility elements and\n * their states\n */\n readonly translations = input<NumberInputIntlTranslations | undefined>()\n\n /**\n * Event emitted when the checkbox is checked or unchecked. This is only emitted\n * on interaction. It doesn't emit in response to programmatic form control\n * changes.\n */\n readonly valueChanged = output<NumberInputValueChangeDetails>()\n\n /**\n * Function invoked when the value overflows or underflows the min/max range\n */\n readonly valueInvalid = output<NumberInputValueInvalidDetails>()\n\n protected readonly document = inject(DOCUMENT)\n\n protected readonly isMounted = useIsMounted()\n\n protected readonly numberInputContext = inject(NumberInputContextService)\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.numberInputContext.context().getRootBindings()\n })\n\n override ngOnInit() {\n super.ngOnInit()\n\n const machine = useMachine(\n numberInputMachine,\n computed<Explicit<NumberInputApiProps>>(() => {\n return {\n allowMouseWheel: this.allowMouseWheel(),\n allowOverflow: this.allowOverflow(),\n clampValueOnBlur: this.clampValueOnBlur(),\n defaultValue: this.defaultValue()\n ? `${this.defaultValue() ?? \"\"}`\n : \"\",\n dir: this.dir(),\n disabled: this.isDisabled(),\n focusInputOnChange: this.focusInputOnChange(),\n // angular handles this automatically with ngModel and Reactive Forms\n form: undefined,\n formatOptions: this.formatOptions(),\n getRootNode: this.getRootNode() ?? (() => this.document),\n ids: undefined,\n inputMode: this.inputMode(),\n invalid: this.isInvalid(),\n locale: this.locale(),\n max: this.max(),\n min: this.min(),\n name: this.name(),\n onFocusChange: (details) => {\n if (!details.focused) {\n // only trigger onTouched on blur.\n this.onTouched()\n }\n },\n onValueChange: (details) => {\n this.stringValue.set(details.value)\n if (!this.control) {\n if (this.isMounted()) {\n this.valueChanged.emit(details)\n }\n this.value.set(details.valueAsNumber)\n return\n }\n // ngModel is bound to the root, but change events happen on the <input>\n // element and are forwarded to the machine. So we need to fire the\n // value change event to keep the form in sync.\n this.onChange(details.valueAsNumber)\n if (!this.control?.touched) {\n this.control.markAsTouched?.()\n }\n if (!this.control?.dirty) {\n this.control.markAsDirty?.()\n }\n },\n onValueInvalid: (details) => {\n this.valueInvalid.emit(details)\n },\n pattern: this.pattern(),\n readOnly: this.readOnly(),\n required: this.isRequired(),\n spinOnPress: this.spinOnPress(),\n step: this.step(),\n translations: this.translations(),\n value: this.stringValue(),\n }\n }),\n this.injector,\n )\n\n this.numberInputContext.init(\n computed(() => createNumberInputApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"number-input-context.service.js","sourceRoot":"","sources":["../../../src/number-input/number-input-context.service.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAExC,OAAO,EAEL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;;AAI1C,MAAM,OAAO,yBAA0B,SAAQ,qBAAqC;wGAAvE,yBAAyB;4GAAzB,yBAAyB;;4FAAzB,yBAAyB;kBADrC,UAAU;;AAGX,MAAM,CAAC,MAAM,CACX,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EAC1B,GAA+B,gBAAgB,CAC9C,oBAAoB,EACpB,yBAAyB,CAC1B,CAAA","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport {Injectable} from \"@angular/core\"\r\n\r\nimport {\r\n type ApiContext,\r\n BaseApiContextService,\r\n createApiContext,\r\n} from \"@qualcomm-ui/angular-core/machine\"\r\nimport type {NumberInputApi} from \"@qualcomm-ui/core/number-input\"\r\n\r\n@Injectable()\r\nexport class NumberInputContextService extends BaseApiContextService<NumberInputApi> {}\r\n\r\nexport const [\r\n NUMBER_INPUT_CONTEXT,\r\n useNumberInputContext,\r\n provideNumberInputContext,\r\n]: ApiContext<NumberInputApi> = createApiContext<NumberInputApi>(\r\n \"NumberInputContext\",\r\n NumberInputContextService,\r\n)\r\n"]}
1
+ {"version":3,"file":"number-input-context.service.js","sourceRoot":"","sources":["../../../src/number-input/number-input-context.service.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAExC,OAAO,EAEL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;;AAI1C,MAAM,OAAO,yBAA0B,SAAQ,qBAAqC;wGAAvE,yBAAyB;4GAAzB,yBAAyB;;4FAAzB,yBAAyB;kBADrC,UAAU;;AAGX,MAAM,CAAC,MAAM,CACX,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EAC1B,GAA+B,gBAAgB,CAC9C,oBAAoB,EACpB,yBAAyB,CAC1B,CAAA","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {Injectable} from \"@angular/core\"\n\nimport {\n type ApiContext,\n BaseApiContextService,\n createApiContext,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {NumberInputApi} from \"@qualcomm-ui/core/number-input\"\n\n@Injectable()\nexport class NumberInputContextService extends BaseApiContextService<NumberInputApi> {}\n\nexport const [\n NUMBER_INPUT_CONTEXT,\n useNumberInputContext,\n provideNumberInputContext,\n]: ApiContext<NumberInputApi> = createApiContext<NumberInputApi>(\n \"NumberInputContext\",\n NumberInputContextService,\n)\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"number-input.validators.js","sourceRoot":"","sources":["../../../src/number-input/number-input.validators.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAI9C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAwB;IAExB,IACE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3B,OAAO,CAAC,KAAK,KAAK,IAAI;QACtB,OAAO,CAAC,KAAK,KAAK,SAAS,EAC3B,CAAC;QACD,OAAO,EAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,OAAO,CAAC,KAAK,EAAC,EAAC,CAAA;IAC3C,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\r\n// SPDX-License-Identifier: BSD-3-Clause-Clear\r\n\r\nimport type {AbstractControl, ValidationErrors} from \"@angular/forms\"\r\n\r\n/**\r\n * Validator that requires a number value. Will fail if the value is `NaN`, `null`,\r\n * or `undefined`.\r\n */\r\nexport function requiredNumberValidator(\r\n control: AbstractControl,\r\n): ValidationErrors | null {\r\n if (\r\n Number.isNaN(control.value) ||\r\n control.value === null ||\r\n control.value === undefined\r\n ) {\r\n return {required: {value: control.value}}\r\n }\r\n return null\r\n}\r\n"]}
1
+ {"version":3,"file":"number-input.validators.js","sourceRoot":"","sources":["../../../src/number-input/number-input.validators.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAI9C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAwB;IAExB,IACE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3B,OAAO,CAAC,KAAK,KAAK,IAAI;QACtB,OAAO,CAAC,KAAK,KAAK,SAAS,EAC3B,CAAC;QACD,OAAO,EAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,OAAO,CAAC,KAAK,EAAC,EAAC,CAAA;IAC3C,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {AbstractControl, ValidationErrors} from \"@angular/forms\"\n\n/**\n * Validator that requires a number value. Will fail if the value is `NaN`, `null`,\n * or `undefined`.\n */\nexport function requiredNumberValidator(\n control: AbstractControl,\n): ValidationErrors | null {\n if (\n Number.isNaN(control.value) ||\n control.value === null ||\n control.value === undefined\n ) {\n return {required: {value: control.value}}\n }\n return null\n}\n"]}
@@ -68,7 +68,7 @@ export class CorePasswordInputRootDirective extends AbstractInputFormControlDire
68
68
  disabled: this.isDisabled(),
69
69
  // angular handles this automatically with ngModel and Reactive Forms
70
70
  form: undefined,
71
- getRootNode: this.getRootNode(),
71
+ getRootNode: this.getRootNode() ?? (() => this.document),
72
72
  ids: undefined,
73
73
  invalid: this.isInvalid(),
74
74
  name: this.name(),
@@ -1 +1 @@
1
- {"version":3,"file":"core-password-input-root.directive.js","sourceRoot":"","sources":["../../../src/password-input/core-password-input-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAC,iCAAiC,EAAC,MAAM,iCAAiC,CAAA;AACjF,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EACL,sBAAsB,EAGtB,oBAAoB,GACrB,MAAM,kCAAkC,CAAA;AAKzC,OAAO,EAAC,2BAA2B,EAAC,MAAM,kCAAkC,CAAA;;AAG5E,MAAM,OAAO,8BACX,SAAQ,iCAAiC;IAKzC;;;;;OAKG;IACM,YAAY,GAAG,KAAK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,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;YACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;SACxB,CAAC,CAAC,EACH,IAAI,CAAC,QAAQ,CACd,CAAA;QAED,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAC5B,QAAQ,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAChE,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGApIU,8BAA8B;4FAA9B,8BAA8B;;4FAA9B,8BAA8B;kBAD1C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n type OnInit,\n output,\n} from \"@angular/core\"\n\nimport {useIsMounted} from \"@qualcomm-ui/angular-core/common\"\nimport {AbstractInputFormControlDirective} from \"@qualcomm-ui/angular-core/input\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n createPasswordInputApi,\n type PasswordInputApiProps,\n type PasswordInputIntlTranslations,\n passwordInputMachine,\n} from \"@qualcomm-ui/core/password-input\"\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {PasswordInputContextService} from \"./password-input-context.service\"\n\n@Directive()\nexport class CorePasswordInputRootDirective\n extends AbstractInputFormControlDirective\n implements\n Omit<SignalifyInput<PasswordInputApiProps>, \"form\" | \"ids\" | \"value\">,\n OnInit\n{\n /**\n * The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete autocomplete}\n * attribute for the password input.\n *\n * @default \"current-password\"\n */\n readonly autoComplete = input<\n \"current-password\" | \"new-password\" | undefined\n >()\n\n /**\n * The default visibility of the password input.\n */\n readonly defaultVisible = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>(undefined)\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<\n (() => ShadowRoot | Document | Node) | undefined\n >()\n\n /**\n * Localized messages to use for element labels.\n */\n readonly translations = input<PasswordInputIntlTranslations | undefined>()\n\n /**\n * Whether the password input is visible.\n */\n readonly visible = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Event emitted when the input value changes. This is only emitted on\n * interaction. It doesn't emit in response to programmatic form control changes.\n */\n readonly valueChanged = output<string>()\n\n /**\n * Function called when the visibility changes.\n */\n readonly visibleChanged = output<boolean>()\n\n protected document = inject(DOCUMENT)\n\n protected readonly isMounted = useIsMounted()\n\n protected readonly passwordInputService = inject(PasswordInputContextService)\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.passwordInputService.context().getRootBindings()\n })\n\n override ngOnInit() {\n super.ngOnInit()\n\n const machine = useMachine(\n passwordInputMachine,\n computed<Explicit<PasswordInputApiProps>>(() => ({\n autoComplete: this.autoComplete(),\n defaultValue: this.defaultValue(),\n defaultVisible: this.defaultVisible(),\n dir: this.dir(),\n disabled: this.isDisabled(),\n // angular handles this automatically with ngModel and Reactive Forms\n form: undefined,\n getRootNode: this.getRootNode(),\n ids: undefined,\n invalid: this.isInvalid(),\n name: this.name(),\n onFocusChange: (focused) => {\n if (!focused) {\n // only trigger onTouched on blur.\n this.onTouched()\n }\n },\n onValueChange: (value) => {\n if (!this.control) {\n if (this.isMounted()) {\n this.valueChanged.emit(value)\n }\n this.value.set(value)\n return\n }\n // ngModel is bound to the root, but change events happen on the <input>\n // element and are forwarded to the machine. So we need to fire the value\n // change event to keep the form in sync.\n this.onChange(value)\n if (!this.control?.touched) {\n this.control.markAsTouched?.()\n }\n if (!this.control?.dirty) {\n this.control.markAsDirty?.()\n }\n },\n onVisibleChange: (value) => {\n if (this.isMounted()) {\n this.visibleChanged.emit(value)\n }\n },\n readOnly: this.readOnly(),\n required: this.isRequired(),\n translations: this.translations(),\n value: this.value(),\n visible: this.visible(),\n })),\n this.injector,\n )\n\n this.passwordInputService.init(\n computed(() => createPasswordInputApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
1
+ {"version":3,"file":"core-password-input-root.directive.js","sourceRoot":"","sources":["../../../src/password-input/core-password-input-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAC,iCAAiC,EAAC,MAAM,iCAAiC,CAAA;AACjF,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EACL,sBAAsB,EAGtB,oBAAoB,GACrB,MAAM,kCAAkC,CAAA;AAKzC,OAAO,EAAC,2BAA2B,EAAC,MAAM,kCAAkC,CAAA;;AAG5E,MAAM,OAAO,8BACX,SAAQ,iCAAiC;IAKzC;;;;;OAKG;IACM,YAAY,GAAG,KAAK,kEAE1B,CAAA;IAEH;;OAEG;IACM,cAAc,GAAG,KAAK,CAAkC,SAAS,kDACxE,SAAS,EAAE,gBAAgB,OAD+C;YAC1E,SAAS,EAAE,gBAAgB;SAC5B,GAAC,CAAA;IAEF;;;;OAIG;IACM,GAAG,GAAG,KAAK,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C,CAAC,EACH,IAAI,CAAC,QAAQ,CACd,CAAA;QAED,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAC5B,QAAQ,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAChE,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGApIU,8BAA8B;4FAA9B,8BAA8B;;4FAA9B,8BAA8B;kBAD1C,SAAS","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n type OnInit,\n output,\n} from \"@angular/core\"\n\nimport {useIsMounted} from \"@qualcomm-ui/angular-core/common\"\nimport {AbstractInputFormControlDirective} from \"@qualcomm-ui/angular-core/input\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n createPasswordInputApi,\n type PasswordInputApiProps,\n type PasswordInputIntlTranslations,\n passwordInputMachine,\n} from \"@qualcomm-ui/core/password-input\"\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {PasswordInputContextService} from \"./password-input-context.service\"\n\n@Directive()\nexport class CorePasswordInputRootDirective\n extends AbstractInputFormControlDirective\n implements\n Omit<SignalifyInput<PasswordInputApiProps>, \"form\" | \"ids\" | \"value\">,\n OnInit\n{\n /**\n * The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete autocomplete}\n * attribute for the password input.\n *\n * @default \"current-password\"\n */\n readonly autoComplete = input<\n \"current-password\" | \"new-password\" | undefined\n >()\n\n /**\n * The default visibility of the password input.\n */\n readonly defaultVisible = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>(undefined)\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<\n (() => ShadowRoot | Document | Node) | undefined\n >()\n\n /**\n * Localized messages to use for element labels.\n */\n readonly translations = input<PasswordInputIntlTranslations | undefined>()\n\n /**\n * Whether the password input is visible.\n */\n readonly visible = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Event emitted when the input value changes. This is only emitted on\n * interaction. It doesn't emit in response to programmatic form control changes.\n */\n readonly valueChanged = output<string>()\n\n /**\n * Function called when the visibility changes.\n */\n readonly visibleChanged = output<boolean>()\n\n protected readonly document = inject(DOCUMENT)\n\n protected readonly isMounted = useIsMounted()\n\n protected readonly passwordInputService = inject(PasswordInputContextService)\n\n protected readonly trackBindings = useTrackBindings(() => {\n return this.passwordInputService.context().getRootBindings()\n })\n\n override ngOnInit() {\n super.ngOnInit()\n\n const machine = useMachine(\n passwordInputMachine,\n computed<Explicit<PasswordInputApiProps>>(() => ({\n autoComplete: this.autoComplete(),\n defaultValue: this.defaultValue(),\n defaultVisible: this.defaultVisible(),\n dir: this.dir(),\n disabled: this.isDisabled(),\n // angular handles this automatically with ngModel and Reactive Forms\n form: undefined,\n getRootNode: this.getRootNode() ?? (() => this.document),\n ids: undefined,\n invalid: this.isInvalid(),\n name: this.name(),\n onFocusChange: (focused) => {\n if (!focused) {\n // only trigger onTouched on blur.\n this.onTouched()\n }\n },\n onValueChange: (value) => {\n if (!this.control) {\n if (this.isMounted()) {\n this.valueChanged.emit(value)\n }\n this.value.set(value)\n return\n }\n // ngModel is bound to the root, but change events happen on the <input>\n // element and are forwarded to the machine. So we need to fire the value\n // change event to keep the form in sync.\n this.onChange(value)\n if (!this.control?.touched) {\n this.control.markAsTouched?.()\n }\n if (!this.control?.dirty) {\n this.control.markAsDirty?.()\n }\n },\n onVisibleChange: (value) => {\n if (this.isMounted()) {\n this.visibleChanged.emit(value)\n }\n },\n readOnly: this.readOnly(),\n required: this.isRequired(),\n translations: this.translations(),\n value: this.value(),\n visible: this.visible(),\n })),\n this.injector,\n )\n\n this.passwordInputService.init(\n computed(() => createPasswordInputApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"core-popover-root.directive.js","sourceRoot":"","sources":["../../../src/popover/core-popover-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAA;AAEhE,OAAO,EACL,gBAAgB,EAEhB,cAAc,GACf,MAAM,2BAA2B,CAAA;AAYlC,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;;AAG/D,MAAM,OAAO,wBAAwB;IAGnC;;;;;OAKG;IACM,SAAS,GAAG,KAAK,+DAAgC,CAAA;IAE1D;;;;OAIG;IACM,aAAa,GAAG,KAAK,mEAAuB,CAAA;IAErD;;;;OAIG;IACM,sBAAsB,GAAG,KAAK,4EAAuB,CAAA;IAE9D;;;OAGG;IACM,WAAW,GAAG,KAAK,iEAAuB,CAAA;IAEnD;;;;OAIG;IACM,GAAG,GAAG,KAAK,yDAAyB,CAAA;IAE7C;;;OAGG;IACM,WAAW,GAAG,KAAK,iEAAsC,CAAA;I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,CAAC,KAAK,EAAE,EAAE;oBAC9B,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;wBACrB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;oBACrC,CAAC;gBACH,CAAC;gBACD,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE;oBAC1B,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;wBACrB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;oBACnC,CAAC;gBACH,CAAC;gBACD,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;gBACjB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE;gBAC7C,SAAS,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACvC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;gBAC/B,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;aAClC,CAAA;QACH,CAAC,CAAC,EACF,IAAI,CAAC,QAAQ,CACd,CAAA;QAED,IAAI,CAAC,cAAc,CAAC,IAAI,CACtB,QAAQ,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAC1D,CAAA;QAED,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;wGA7LU,wBAAwB;4FAAxB,wBAAwB,y7DAsHW,eAAe;;4FAtHlD,wBAAwB;kBADpC,SAAS;krDAuHsC,eAAe,QAAE;4BAC7D,WAAW,EAAE,IAAI;yBAClB","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n contentChild,\n Directive,\n inject,\n Injector,\n input,\n type OnInit,\n output,\n} from \"@angular/core\"\n\nimport {useIsMounted} from \"@qualcomm-ui/angular-core/common\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport {PortalDirective} from \"@qualcomm-ui/angular-core/portal\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n createPopoverApi,\n type PopoverApiProps,\n popoverMachine,\n} from \"@qualcomm-ui/core/popover\"\nimport type {LayerDismissEvent} from \"@qualcomm-ui/dom/dismissable\"\nimport type {PositioningOptions} from \"@qualcomm-ui/dom/floating-ui\"\nimport type {\n FocusOutsideEvent,\n InteractOutsideEvent,\n PointerDownOutsideEvent,\n} from \"@qualcomm-ui/dom/interact-outside\"\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {PopoverContextService} from \"./popover-context.service\"\n\n@Directive()\nexport class CorePopoverRootDirective\n implements SignalifyInput<Omit<PopoverApiProps, \"ids\" | \"portalled\">>, OnInit\n{\n /**\n * Whether to automatically set focus on the first focusable\n * content within the popover when opened.\n *\n * @default true\n */\n readonly autoFocus = input<PopoverApiProps[\"autoFocus\"]>()\n\n /**\n * Whether to close the popover when the escape key is pressed.\n *\n * @default true\n */\n readonly closeOnEscape = input<boolean | undefined>()\n\n /**\n * Whether to close the popover when the user clicks outside the popover.\n *\n * @default true\n */\n readonly closeOnInteractOutside = input<boolean | undefined>()\n\n /**\n * The initial open state of the popover when rendered.\n * Use when you don't need to control the open state of the popover.\n */\n readonly defaultOpen = input<boolean | undefined>()\n\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>()\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<() => ShadowRoot | Document | Node>()\n\n /**\n * The element to focus on when the popover is opened.\n */\n readonly initialFocusEl = input<(() => HTMLElement | null) | undefined>()\n\n /**\n * Whether the popover should be modal. When set to `true`:\n * - interaction with outside elements will be disabled\n * - only popover content will be visible to screen readers\n * - scrolling is blocked\n * - focus is trapped within the popover\n *\n * @default false\n */\n readonly modal = input<boolean | undefined>()\n\n /**\n * The controlled open state of the popover\n */\n readonly open = input<boolean | undefined>()\n\n /**\n * The persistent elements that:\n * - should not have pointer-events disabled\n * - should not trigger the dismiss event\n */\n readonly persistentElements = input<Array<() => Element | null> | undefined>()\n\n /**\n * The options used to position the popover content.\n *\n * @inheritDoc\n */\n readonly positioning = input<PositioningOptions>()\n\n /**\n * On close, restore focus to the element that triggered the open event.\n *\n * @default true\n */\n readonly restoreFocus = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Fired when the popover opens or closes.\n */\n readonly openChanged = output<{open: boolean}>()\n\n /**\n * Function called when the escape key is pressed\n */\n readonly escapeKeyDown = output<KeyboardEvent>()\n\n /**\n * Function called when the focus is moved outside the component\n */\n readonly focusOutside = output<FocusOutsideEvent>()\n\n /**\n * Function called when an interaction happens outside the component\n */\n readonly interactOutside = output<InteractOutsideEvent>()\n\n /**\n * Function called when the pointer is pressed down outside the component\n */\n readonly pointerDownOutside = output<PointerDownOutsideEvent>()\n\n /**\n * Function called when this layer is closed due to a parent layer being closed\n */\n readonly requestDismissed = output<LayerDismissEvent>()\n\n protected readonly portalChild = contentChild(PortalDirective, {\n descendants: true,\n })\n protected document = inject(DOCUMENT)\n protected readonly injector = inject(Injector)\n protected readonly isMounted = useIsMounted()\n protected readonly popoverContext = inject(PopoverContextService)\n protected readonly trackBindings = useTrackBindings(() =>\n this.popoverContext.context().getRootBindings(),\n )\n\n ngOnInit() {\n const machine = useMachine(\n popoverMachine,\n computed<Explicit<PopoverApiProps>>(() => {\n const portal = this.portalChild()\n return {\n autoFocus: this.autoFocus(),\n closeOnEscape: this.closeOnEscape(),\n closeOnInteractOutside: this.closeOnInteractOutside(),\n defaultOpen: this.defaultOpen(),\n dir: this.dir(),\n getRootNode: this.getRootNode() || (() => this.document),\n ids: undefined,\n initialFocusEl: this.initialFocusEl(),\n modal: this.modal(),\n onEscapeKeyDown: (event) => {\n if (this.isMounted()) {\n this.escapeKeyDown.emit(event)\n }\n },\n onFocusOutside: (event) => {\n if (this.isMounted()) {\n this.focusOutside.emit(event)\n }\n },\n onInteractOutside: (event) => {\n if (this.isMounted()) {\n this.interactOutside.emit(event)\n }\n },\n onOpenChange: (open) => {\n if (this.isMounted()) {\n this.openChanged.emit({open})\n }\n },\n onPointerDownOutside: (event) => {\n if (this.isMounted()) {\n this.pointerDownOutside.emit(event)\n }\n },\n onRequestDismiss: (event) => {\n if (this.isMounted()) {\n this.requestDismissed.emit(event)\n }\n },\n open: this.open(),\n persistentElements: this.persistentElements(),\n portalled: portal && !portal.disabled(),\n positioning: this.positioning(),\n restoreFocus: this.restoreFocus(),\n }\n }),\n this.injector,\n )\n\n this.popoverContext.init(\n computed(() => createPopoverApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}
1
+ {"version":3,"file":"core-popover-root.directive.js","sourceRoot":"","sources":["../../../src/popover/core-popover-root.directive.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,8CAA8C;AAE9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAA;AAEhE,OAAO,EACL,gBAAgB,EAEhB,cAAc,GACf,MAAM,2BAA2B,CAAA;AAYlC,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;;AAG/D,MAAM,OAAO,wBAAwB;IAGnC;;;;;OAKG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,eAAe,QAAE;4BAC7D,WAAW,EAAE,IAAI;yBAClB","sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {DOCUMENT} from \"@angular/common\"\nimport {\n booleanAttribute,\n computed,\n contentChild,\n Directive,\n inject,\n Injector,\n input,\n type OnInit,\n output,\n} from \"@angular/core\"\n\nimport {useIsMounted} from \"@qualcomm-ui/angular-core/common\"\nimport {\n normalizeProps,\n useMachine,\n useTrackBindings,\n} from \"@qualcomm-ui/angular-core/machine\"\nimport {PortalDirective} from \"@qualcomm-ui/angular-core/portal\"\nimport type {SignalifyInput} from \"@qualcomm-ui/angular-core/signals\"\nimport {\n createPopoverApi,\n type PopoverApiProps,\n popoverMachine,\n} from \"@qualcomm-ui/core/popover\"\nimport type {LayerDismissEvent} from \"@qualcomm-ui/dom/dismissable\"\nimport type {PositioningOptions} from \"@qualcomm-ui/dom/floating-ui\"\nimport type {\n FocusOutsideEvent,\n InteractOutsideEvent,\n PointerDownOutsideEvent,\n} from \"@qualcomm-ui/dom/interact-outside\"\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport type {Direction} from \"@qualcomm-ui/utils/direction\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\n\nimport {PopoverContextService} from \"./popover-context.service\"\n\n@Directive()\nexport class CorePopoverRootDirective\n implements SignalifyInput<Omit<PopoverApiProps, \"ids\" | \"portalled\">>, OnInit\n{\n /**\n * Whether to automatically set focus on the first focusable\n * content within the popover when opened.\n *\n * @default true\n */\n readonly autoFocus = input<PopoverApiProps[\"autoFocus\"]>()\n\n /**\n * Whether to close the popover when the escape key is pressed.\n *\n * @default true\n */\n readonly closeOnEscape = input<boolean | undefined>()\n\n /**\n * Whether to close the popover when the user clicks outside the popover.\n *\n * @default true\n */\n readonly closeOnInteractOutside = input<boolean | undefined>()\n\n /**\n * The initial open state of the popover when rendered.\n * Use when you don't need to control the open state of the popover.\n */\n readonly defaultOpen = input<boolean | undefined>()\n\n /**\n * The document's text/writing direction.\n *\n * @default \"ltr\"\n */\n readonly dir = input<Direction | undefined>()\n\n /**\n * A root node to correctly resolve the Document in custom environments. i.e.,\n * Iframes, Electron.\n */\n readonly getRootNode = input<() => ShadowRoot | Document | Node>()\n\n /**\n * The element to focus on when the popover is opened.\n */\n readonly initialFocusEl = input<(() => HTMLElement | null) | undefined>()\n\n /**\n * Whether the popover should be modal. When set to `true`:\n * - interaction with outside elements will be disabled\n * - only popover content will be visible to screen readers\n * - scrolling is blocked\n * - focus is trapped within the popover\n *\n * @default false\n */\n readonly modal = input<boolean | undefined>()\n\n /**\n * The controlled open state of the popover\n */\n readonly open = input<boolean | undefined>()\n\n /**\n * The persistent elements that:\n * - should not have pointer-events disabled\n * - should not trigger the dismiss event\n */\n readonly persistentElements = input<Array<() => Element | null> | undefined>()\n\n /**\n * The options used to position the popover content.\n *\n * @inheritDoc\n */\n readonly positioning = input<PositioningOptions>()\n\n /**\n * On close, restore focus to the element that triggered the open event.\n *\n * @default true\n */\n readonly restoreFocus = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Fired when the popover opens or closes.\n */\n readonly openChanged = output<{open: boolean}>()\n\n /**\n * Function called when the escape key is pressed\n */\n readonly escapeKeyDown = output<KeyboardEvent>()\n\n /**\n * Function called when the focus is moved outside the component\n */\n readonly focusOutside = output<FocusOutsideEvent>()\n\n /**\n * Function called when an interaction happens outside the component\n */\n readonly interactOutside = output<InteractOutsideEvent>()\n\n /**\n * Function called when the pointer is pressed down outside the component\n */\n readonly pointerDownOutside = output<PointerDownOutsideEvent>()\n\n /**\n * Function called when this layer is closed due to a parent layer being closed\n */\n readonly requestDismissed = output<LayerDismissEvent>()\n\n protected readonly portalChild = contentChild(PortalDirective, {\n descendants: true,\n })\n protected readonly document = inject(DOCUMENT)\n protected readonly injector = inject(Injector)\n protected readonly isMounted = useIsMounted()\n protected readonly popoverContext = inject(PopoverContextService)\n protected readonly trackBindings = useTrackBindings(() =>\n this.popoverContext.context().getRootBindings(),\n )\n\n ngOnInit() {\n const machine = useMachine(\n popoverMachine,\n computed<Explicit<PopoverApiProps>>(() => {\n const portal = this.portalChild()\n return {\n autoFocus: this.autoFocus(),\n closeOnEscape: this.closeOnEscape(),\n closeOnInteractOutside: this.closeOnInteractOutside(),\n defaultOpen: this.defaultOpen(),\n dir: this.dir(),\n getRootNode: this.getRootNode() || (() => this.document),\n ids: undefined,\n initialFocusEl: this.initialFocusEl(),\n modal: this.modal(),\n onEscapeKeyDown: (event) => {\n if (this.isMounted()) {\n this.escapeKeyDown.emit(event)\n }\n },\n onFocusOutside: (event) => {\n if (this.isMounted()) {\n this.focusOutside.emit(event)\n }\n },\n onInteractOutside: (event) => {\n if (this.isMounted()) {\n this.interactOutside.emit(event)\n }\n },\n onOpenChange: (open) => {\n if (this.isMounted()) {\n this.openChanged.emit({open})\n }\n },\n onPointerDownOutside: (event) => {\n if (this.isMounted()) {\n this.pointerDownOutside.emit(event)\n }\n },\n onRequestDismiss: (event) => {\n if (this.isMounted()) {\n this.requestDismissed.emit(event)\n }\n },\n open: this.open(),\n persistentElements: this.persistentElements(),\n portalled: portal && !portal.disabled(),\n positioning: this.positioning(),\n restoreFocus: this.restoreFocus(),\n }\n }),\n this.injector,\n )\n\n this.popoverContext.init(\n computed(() => createPopoverApi(machine, normalizeProps)),\n )\n\n this.trackBindings()\n }\n}\n"]}