@qualcomm-ui/angular-core 1.0.6 → 1.1.1
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.
|
@@ -45,9 +45,7 @@ class HighlightDirective {
|
|
|
45
45
|
@for (chunk of chunks(); track $index) {
|
|
46
46
|
@if (chunk.match) {
|
|
47
47
|
<mark>{{ chunk.text }}</mark>
|
|
48
|
-
} @else {
|
|
49
|
-
{{ chunk.text }}
|
|
50
|
-
}
|
|
48
|
+
} @else {{{chunk.text}}}
|
|
51
49
|
}
|
|
52
50
|
`, isInline: true });
|
|
53
51
|
}
|
|
@@ -56,13 +54,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
56
54
|
args: [{
|
|
57
55
|
selector: "[q-highlight]",
|
|
58
56
|
standalone: true,
|
|
57
|
+
// prevent prettier formatting from introducing whitespaces in the markup
|
|
58
|
+
// prettier-ignore
|
|
59
59
|
template: `
|
|
60
60
|
@for (chunk of chunks(); track $index) {
|
|
61
61
|
@if (chunk.match) {
|
|
62
62
|
<mark>{{ chunk.text }}</mark>
|
|
63
|
-
} @else {
|
|
64
|
-
{{ chunk.text }}
|
|
65
|
-
}
|
|
63
|
+
} @else {{{chunk.text}}}
|
|
66
64
|
}
|
|
67
65
|
`,
|
|
68
66
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualcomm-ui-angular-core-highlight.mjs","sources":["../../src/highlight/highlight.directive.ts","../../src/highlight/qualcomm-ui-angular-core-highlight.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {booleanAttribute, Component, computed, input} from \"@angular/core\"\n\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport {highlightWord} from \"@qualcomm-ui/utils/highlight-word\"\n\n@Component({\n selector: \"[q-highlight]\",\n standalone: true,\n template: `\n @for (chunk of chunks(); track $index) {\n @if (chunk.match) {\n <mark>{{ chunk.text }}</mark>\n } @else {
|
|
1
|
+
{"version":3,"file":"qualcomm-ui-angular-core-highlight.mjs","sources":["../../src/highlight/highlight.directive.ts","../../src/highlight/qualcomm-ui-angular-core-highlight.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {booleanAttribute, Component, computed, input} from \"@angular/core\"\n\nimport type {Booleanish} from \"@qualcomm-ui/utils/coercion\"\nimport {highlightWord} from \"@qualcomm-ui/utils/highlight-word\"\n\n@Component({\n selector: \"[q-highlight]\",\n standalone: true,\n // prevent prettier formatting from introducing whitespaces in the markup\n // prettier-ignore\n template: `\n @for (chunk of chunks(); track $index) {\n @if (chunk.match) {\n <mark>{{ chunk.text }}</mark>\n } @else {{{chunk.text}}}\n }\n `,\n})\nexport class HighlightDirective {\n /**\n * Whether to match whole words only\n */\n readonly exactMatch = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Whether to ignore case while matching\n */\n readonly ignoreCase = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * Whether to match multiple instances of the query\n */\n readonly matchAll = input<boolean | undefined, Booleanish>(undefined, {\n transform: booleanAttribute,\n })\n\n /**\n * The query to highlight in the text\n */\n readonly query = input.required<string | string[] | undefined>()\n\n /**\n * The text to highlight\n */\n readonly text = input.required<string | null | undefined>()\n\n readonly chunks = computed(() => {\n return highlightWord({\n exactMatch: this.exactMatch(),\n ignoreCase: this.ignoreCase(),\n matchAll: this.matchAll(),\n query: this.query() || \"\",\n text: this.text() || \"\",\n })\n })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;MAoBa,kBAAkB,CAAA;AAC7B;;AAEG;IACM,UAAU,GAAG,KAAK,CAAkC,SAAS,8CACpE,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ilities.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"author": "Ryan Bower",
|
|
6
6
|
"license": "BSD-3-Clause-Clear",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"@angular/forms": ">=20 <22",
|
|
197
197
|
"@angular/platform-browser": ">=20 <22",
|
|
198
198
|
"@angular/platform-browser-dynamic": ">=20 <22",
|
|
199
|
-
"@qualcomm-ui/core": "^1.0.
|
|
199
|
+
"@qualcomm-ui/core": "^1.0.9",
|
|
200
200
|
"@qualcomm-ui/dom": "^1.0.5",
|
|
201
201
|
"@qualcomm-ui/utils": "^1.0.3",
|
|
202
202
|
"@tanstack/virtual-core": ">=3.13.12",
|