@litigiovirtual/ius-design-components 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/litigiovirtual-ius-design-components-tiptap-engine-BA-1k1e0.mjs +247 -0
- package/fesm2022/litigiovirtual-ius-design-components-tiptap-engine-BA-1k1e0.mjs.map +1 -0
- package/fesm2022/litigiovirtual-ius-design-components-utils.mjs +6 -6
- package/fesm2022/litigiovirtual-ius-design-components.mjs +3847 -571
- package/fesm2022/litigiovirtual-ius-design-components.mjs.map +1 -1
- package/package.json +28 -1
- package/types/litigiovirtual-ius-design-components.d.ts +1313 -14
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { mergeAttributes, Editor } from '@tiptap/core';
|
|
2
|
+
import { Mention } from '@tiptap/extension-mention';
|
|
3
|
+
import { Placeholder } from '@tiptap/extensions';
|
|
4
|
+
import { StarterKit } from '@tiptap/starter-kit';
|
|
5
|
+
|
|
6
|
+
/** Nombre de mark/nodo tiptap por cada comando consultable. */
|
|
7
|
+
const ACTIVE_NAME = {
|
|
8
|
+
bold: 'bold',
|
|
9
|
+
italic: 'italic',
|
|
10
|
+
underline: 'underline',
|
|
11
|
+
strikethrough: 'strike',
|
|
12
|
+
bulletList: 'bulletList',
|
|
13
|
+
numberList: 'orderedList',
|
|
14
|
+
link: 'link',
|
|
15
|
+
};
|
|
16
|
+
/** `@label` (o `@id` si no hay label), como `renderText` del golden. */
|
|
17
|
+
function mentionText(attrs) {
|
|
18
|
+
return `@${attrs.label != null ? attrs.label : attrs.id != null ? attrs.id : ''}`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Mención serializada EXACTAMENTE como
|
|
22
|
+
* `<span data-type="mention" class="ius-rte__mention" data-id="…" data-label="…">@label</span>`
|
|
23
|
+
* (parse/render simétricos). Tiptap 3 añade además `data-mention-suggestion-char`;
|
|
24
|
+
* aquí se omite del HTML (un solo trigger, siempre `@`) para que el valor sea el del contrato.
|
|
25
|
+
*/
|
|
26
|
+
const IusMention = Mention.extend({
|
|
27
|
+
addAttributes() {
|
|
28
|
+
return {
|
|
29
|
+
...this.parent?.(),
|
|
30
|
+
mentionSuggestionChar: {
|
|
31
|
+
default: '@',
|
|
32
|
+
parseHTML: () => '@',
|
|
33
|
+
renderHTML: () => ({}),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
parseHTML() {
|
|
38
|
+
return [{ tag: 'span[data-type="mention"]' }];
|
|
39
|
+
},
|
|
40
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
41
|
+
const attrs = node.attrs;
|
|
42
|
+
return [
|
|
43
|
+
'span',
|
|
44
|
+
mergeAttributes({ 'data-type': 'mention' }, this.options.HTMLAttributes, HTMLAttributes, {
|
|
45
|
+
'data-id': String(attrs.id != null ? attrs.id : ''),
|
|
46
|
+
'data-label': String(attrs.label != null ? attrs.label : ''),
|
|
47
|
+
}),
|
|
48
|
+
mentionText(attrs),
|
|
49
|
+
];
|
|
50
|
+
},
|
|
51
|
+
renderText({ node }) {
|
|
52
|
+
return mentionText(node.attrs);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
function toPopupContext(props) {
|
|
56
|
+
return {
|
|
57
|
+
clientRect: () => (props.clientRect ? props.clientRect() : null),
|
|
58
|
+
items: props.items,
|
|
59
|
+
query: props.query,
|
|
60
|
+
command: (item) => props.command({ id: item.id, label: item.label }),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* TiptapEngine — `RichTextEngine` sobre **tiptap 3.27.3** (headless, ProseMirror),
|
|
65
|
+
* Fase 1 de la ng-spec §7. TS vanilla sobre `@tiptap/core` (sin @tiptap/react/vue):
|
|
66
|
+
* port del `engine/tiptap-engine.js` del golden, con tiptap importado de npm
|
|
67
|
+
* (el golden lo carga por ESM CDN porque el design system no tiene bundler).
|
|
68
|
+
*
|
|
69
|
+
* El esquema ES el allowlist del pegado: StarterKit sin heading / blockquote /
|
|
70
|
+
* code / codeBlock / horizontalRule → sobreviven párrafo · hardBreak · bold ·
|
|
71
|
+
* italic · underline · strike · listas · link · mention.
|
|
72
|
+
*/
|
|
73
|
+
class TiptapEngine {
|
|
74
|
+
constructor() {
|
|
75
|
+
this.editor = null;
|
|
76
|
+
this.placeholderText = '';
|
|
77
|
+
}
|
|
78
|
+
mount(host, opts) {
|
|
79
|
+
this.placeholderText = opts.placeholder ?? '';
|
|
80
|
+
const extensions = [
|
|
81
|
+
StarterKit.configure({
|
|
82
|
+
heading: false,
|
|
83
|
+
blockquote: false,
|
|
84
|
+
code: false,
|
|
85
|
+
codeBlock: false,
|
|
86
|
+
horizontalRule: false,
|
|
87
|
+
link: {
|
|
88
|
+
openOnClick: false,
|
|
89
|
+
autolink: true,
|
|
90
|
+
linkOnPaste: true,
|
|
91
|
+
HTMLAttributes: { rel: 'noopener noreferrer nofollow' },
|
|
92
|
+
isAllowedUri: (url, ctx) => ctx.defaultValidate(url) && !String(url).trim().toLowerCase().startsWith('javascript:'),
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
Placeholder.configure({
|
|
96
|
+
placeholder: () => {
|
|
97
|
+
const p = this.placeholderText;
|
|
98
|
+
return typeof p === 'function' ? p() : p;
|
|
99
|
+
},
|
|
100
|
+
}),
|
|
101
|
+
];
|
|
102
|
+
const fetchItems = opts.mentionItems;
|
|
103
|
+
if (fetchItems) {
|
|
104
|
+
const adapter = opts.onMentionRender;
|
|
105
|
+
extensions.push(IusMention.configure({
|
|
106
|
+
HTMLAttributes: { class: 'ius-rte__mention' },
|
|
107
|
+
suggestion: {
|
|
108
|
+
char: '@',
|
|
109
|
+
items: async ({ query }) => (await fetchItems(query)) || [],
|
|
110
|
+
render: () => ({
|
|
111
|
+
onStart: (props) => adapter?.open(toPopupContext(props)),
|
|
112
|
+
onUpdate: (props) => adapter?.update(toPopupContext(props)),
|
|
113
|
+
onKeyDown: ({ event }) => adapter ? adapter.onKeyDown(event) : false,
|
|
114
|
+
onExit: () => adapter?.close(),
|
|
115
|
+
}),
|
|
116
|
+
},
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
this.editor = new Editor({
|
|
120
|
+
element: host,
|
|
121
|
+
extensions,
|
|
122
|
+
content: opts.initialHTML || '',
|
|
123
|
+
editable: opts.editable !== false,
|
|
124
|
+
editorProps: {
|
|
125
|
+
attributes: {
|
|
126
|
+
role: 'textbox',
|
|
127
|
+
'aria-multiline': 'true',
|
|
128
|
+
class: 'ius-rte__editor ius-scroll ius-scroll--sm',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
onUpdate: ({ editor }) => opts.onChange(editor.isEmpty ? '' : editor.getHTML()),
|
|
132
|
+
onSelectionUpdate: () => opts.onSelectionChange?.(),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
destroy() {
|
|
136
|
+
this.editor?.destroy();
|
|
137
|
+
this.editor = null;
|
|
138
|
+
}
|
|
139
|
+
getHTML() {
|
|
140
|
+
if (!this.editor)
|
|
141
|
+
return '';
|
|
142
|
+
return this.editor.isEmpty ? '' : this.editor.getHTML();
|
|
143
|
+
}
|
|
144
|
+
setHTML(html) {
|
|
145
|
+
if (!this.editor)
|
|
146
|
+
return;
|
|
147
|
+
const next = html || '';
|
|
148
|
+
if (next === this.getHTML())
|
|
149
|
+
return; // guarda de eco (no mueve el caret)
|
|
150
|
+
this.editor.commands.setContent(next, { emitUpdate: false });
|
|
151
|
+
}
|
|
152
|
+
focus() {
|
|
153
|
+
this.editor?.commands.focus();
|
|
154
|
+
}
|
|
155
|
+
setEditable(editable) {
|
|
156
|
+
// emitUpdate:false — cambiar la edición no es un cambio de contenido.
|
|
157
|
+
this.editor?.setEditable(editable, false);
|
|
158
|
+
}
|
|
159
|
+
exec(cmd, value) {
|
|
160
|
+
if (!this.editor)
|
|
161
|
+
return;
|
|
162
|
+
const chain = this.editor.chain().focus();
|
|
163
|
+
switch (cmd) {
|
|
164
|
+
case 'bold':
|
|
165
|
+
chain.toggleBold().run();
|
|
166
|
+
break;
|
|
167
|
+
case 'italic':
|
|
168
|
+
chain.toggleItalic().run();
|
|
169
|
+
break;
|
|
170
|
+
case 'underline':
|
|
171
|
+
chain.toggleUnderline().run();
|
|
172
|
+
break;
|
|
173
|
+
case 'strikethrough':
|
|
174
|
+
chain.toggleStrike().run();
|
|
175
|
+
break;
|
|
176
|
+
case 'bulletList':
|
|
177
|
+
chain.toggleBulletList().run();
|
|
178
|
+
break;
|
|
179
|
+
case 'numberList':
|
|
180
|
+
chain.toggleOrderedList().run();
|
|
181
|
+
break;
|
|
182
|
+
case 'link':
|
|
183
|
+
if (typeof value === 'string' && value)
|
|
184
|
+
this.setLink(value);
|
|
185
|
+
break;
|
|
186
|
+
case 'unlink':
|
|
187
|
+
chain.extendMarkRange('link').unsetLink().run();
|
|
188
|
+
break;
|
|
189
|
+
case 'clear':
|
|
190
|
+
chain.unsetAllMarks().clearNodes().run();
|
|
191
|
+
break;
|
|
192
|
+
default:
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
isActive(cmd) {
|
|
197
|
+
const name = ACTIVE_NAME[cmd];
|
|
198
|
+
if (!this.editor || !name)
|
|
199
|
+
return false;
|
|
200
|
+
return this.editor.isActive(name);
|
|
201
|
+
}
|
|
202
|
+
getSelectedText() {
|
|
203
|
+
if (!this.editor)
|
|
204
|
+
return '';
|
|
205
|
+
const { from, to } = this.editor.state.selection;
|
|
206
|
+
return this.editor.state.doc.textBetween(from, to, ' ');
|
|
207
|
+
}
|
|
208
|
+
setLink(href, text) {
|
|
209
|
+
if (!this.editor || !href)
|
|
210
|
+
return;
|
|
211
|
+
const { empty } = this.editor.state.selection;
|
|
212
|
+
if (empty) {
|
|
213
|
+
this.editor
|
|
214
|
+
.chain()
|
|
215
|
+
.focus()
|
|
216
|
+
.insertContent({ type: 'text', text: text || href, marks: [{ type: 'link', attrs: { href } }] })
|
|
217
|
+
.run();
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
this.editor.chain().focus().extendMarkRange('link').setLink({ href }).run();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
insert(fragment) {
|
|
224
|
+
if (!this.editor || !fragment)
|
|
225
|
+
return;
|
|
226
|
+
this.editor.chain().focus().insertContent({ type: 'text', text: fragment }).run();
|
|
227
|
+
}
|
|
228
|
+
insertMentionTrigger() {
|
|
229
|
+
if (!this.editor)
|
|
230
|
+
return;
|
|
231
|
+
const { state } = this.editor;
|
|
232
|
+
const { from, empty } = state.selection;
|
|
233
|
+
// La sugerencia solo abre tras inicio de bloque o espacio (allowedPrefixes de tiptap).
|
|
234
|
+
const before = empty ? state.doc.textBetween(Math.max(0, from - 1), from, '\n', '\n') : '';
|
|
235
|
+
const text = before !== '' && !/\s/.test(before) ? ' @' : '@';
|
|
236
|
+
this.editor.chain().focus().insertContent({ type: 'text', text }).run();
|
|
237
|
+
}
|
|
238
|
+
setPlaceholder(text) {
|
|
239
|
+
this.placeholderText = text;
|
|
240
|
+
// Transacción vacía: repinta la decoración del placeholder sin tocar el documento.
|
|
241
|
+
if (this.editor)
|
|
242
|
+
this.editor.view.dispatch(this.editor.state.tr);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { TiptapEngine };
|
|
247
|
+
//# sourceMappingURL=litigiovirtual-ius-design-components-tiptap-engine-BA-1k1e0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"litigiovirtual-ius-design-components-tiptap-engine-BA-1k1e0.mjs","sources":["../../../projects/ius-design-components/src/lib/rich-text-editor/engine/tiptap-engine.ts"],"sourcesContent":["import { Editor, mergeAttributes, type AnyExtension } from '@tiptap/core';\nimport { Mention, type MentionNodeAttrs } from '@tiptap/extension-mention';\nimport { Placeholder } from '@tiptap/extensions';\nimport { StarterKit } from '@tiptap/starter-kit';\nimport type { SuggestionKeyDownProps, SuggestionProps } from '@tiptap/suggestion';\n\nimport type {\n MentionItem,\n MentionPopupContext,\n RichTextCommand,\n RichTextEngine,\n RichTextEngineOptions,\n} from './rich-text-engine';\n\n/** Nombre de mark/nodo tiptap por cada comando consultable. */\nconst ACTIVE_NAME: Partial<Record<RichTextCommand, string>> = {\n bold: 'bold',\n italic: 'italic',\n underline: 'underline',\n strikethrough: 'strike',\n bulletList: 'bulletList',\n numberList: 'orderedList',\n link: 'link',\n};\n\n/** Atributos que tiptap guarda en el nodo de mención. */\ninterface MentionAttrs {\n id?: string | null;\n label?: string | null;\n}\n\n/** `@label` (o `@id` si no hay label), como `renderText` del golden. */\nfunction mentionText(attrs: MentionAttrs): string {\n return `@${attrs.label != null ? attrs.label : attrs.id != null ? attrs.id : ''}`;\n}\n\n/**\n * Mención serializada EXACTAMENTE como\n * `<span data-type=\"mention\" class=\"ius-rte__mention\" data-id=\"…\" data-label=\"…\">@label</span>`\n * (parse/render simétricos). Tiptap 3 añade además `data-mention-suggestion-char`;\n * aquí se omite del HTML (un solo trigger, siempre `@`) para que el valor sea el del contrato.\n */\nconst IusMention = Mention.extend({\n addAttributes() {\n return {\n ...this.parent?.(),\n mentionSuggestionChar: {\n default: '@',\n parseHTML: () => '@',\n renderHTML: () => ({}),\n },\n };\n },\n parseHTML() {\n return [{ tag: 'span[data-type=\"mention\"]' }];\n },\n renderHTML({ node, HTMLAttributes }) {\n const attrs = node.attrs as MentionAttrs;\n return [\n 'span',\n mergeAttributes({ 'data-type': 'mention' }, this.options.HTMLAttributes, HTMLAttributes, {\n 'data-id': String(attrs.id != null ? attrs.id : ''),\n 'data-label': String(attrs.label != null ? attrs.label : ''),\n }),\n mentionText(attrs),\n ];\n },\n renderText({ node }) {\n return mentionText(node.attrs as MentionAttrs);\n },\n});\n\nfunction toPopupContext(props: SuggestionProps<MentionItem, MentionNodeAttrs>): MentionPopupContext {\n return {\n clientRect: () => (props.clientRect ? props.clientRect() : null),\n items: props.items,\n query: props.query,\n command: (item) => props.command({ id: item.id, label: item.label }),\n };\n}\n\n/**\n * TiptapEngine — `RichTextEngine` sobre **tiptap 3.27.3** (headless, ProseMirror),\n * Fase 1 de la ng-spec §7. TS vanilla sobre `@tiptap/core` (sin @tiptap/react/vue):\n * port del `engine/tiptap-engine.js` del golden, con tiptap importado de npm\n * (el golden lo carga por ESM CDN porque el design system no tiene bundler).\n *\n * El esquema ES el allowlist del pegado: StarterKit sin heading / blockquote /\n * code / codeBlock / horizontalRule → sobreviven párrafo · hardBreak · bold ·\n * italic · underline · strike · listas · link · mention.\n */\nexport class TiptapEngine implements RichTextEngine {\n private editor: Editor | null = null;\n private placeholderText: string | (() => string) = '';\n\n mount(host: HTMLElement, opts: RichTextEngineOptions): void {\n this.placeholderText = opts.placeholder ?? '';\n\n const extensions: AnyExtension[] = [\n StarterKit.configure({\n heading: false,\n blockquote: false,\n code: false,\n codeBlock: false,\n horizontalRule: false,\n link: {\n openOnClick: false,\n autolink: true,\n linkOnPaste: true,\n HTMLAttributes: { rel: 'noopener noreferrer nofollow' },\n isAllowedUri: (url, ctx) =>\n ctx.defaultValidate(url) && !String(url).trim().toLowerCase().startsWith('javascript:'),\n },\n }),\n Placeholder.configure({\n placeholder: () => {\n const p = this.placeholderText;\n return typeof p === 'function' ? p() : p;\n },\n }),\n ];\n\n const fetchItems = opts.mentionItems;\n if (fetchItems) {\n const adapter = opts.onMentionRender;\n extensions.push(\n IusMention.configure({\n HTMLAttributes: { class: 'ius-rte__mention' },\n suggestion: {\n char: '@',\n items: async ({ query }: { query: string }) => (await fetchItems(query)) || [],\n render: () => ({\n onStart: (props: SuggestionProps<MentionItem, MentionNodeAttrs>) =>\n adapter?.open(toPopupContext(props)),\n onUpdate: (props: SuggestionProps<MentionItem, MentionNodeAttrs>) =>\n adapter?.update(toPopupContext(props)),\n onKeyDown: ({ event }: SuggestionKeyDownProps) =>\n adapter ? adapter.onKeyDown(event) : false,\n onExit: () => adapter?.close(),\n }),\n },\n }),\n );\n }\n\n this.editor = new Editor({\n element: host,\n extensions,\n content: opts.initialHTML || '',\n editable: opts.editable !== false,\n editorProps: {\n attributes: {\n role: 'textbox',\n 'aria-multiline': 'true',\n class: 'ius-rte__editor ius-scroll ius-scroll--sm',\n },\n },\n onUpdate: ({ editor }) => opts.onChange(editor.isEmpty ? '' : editor.getHTML()),\n onSelectionUpdate: () => opts.onSelectionChange?.(),\n });\n }\n\n destroy(): void {\n this.editor?.destroy();\n this.editor = null;\n }\n\n getHTML(): string {\n if (!this.editor) return '';\n return this.editor.isEmpty ? '' : this.editor.getHTML();\n }\n\n setHTML(html: string): void {\n if (!this.editor) return;\n const next = html || '';\n if (next === this.getHTML()) return; // guarda de eco (no mueve el caret)\n this.editor.commands.setContent(next, { emitUpdate: false });\n }\n\n focus(): void {\n this.editor?.commands.focus();\n }\n\n setEditable(editable: boolean): void {\n // emitUpdate:false — cambiar la edición no es un cambio de contenido.\n this.editor?.setEditable(editable, false);\n }\n\n exec(cmd: RichTextCommand, value?: string): void {\n if (!this.editor) return;\n const chain = this.editor.chain().focus();\n switch (cmd) {\n case 'bold':\n chain.toggleBold().run();\n break;\n case 'italic':\n chain.toggleItalic().run();\n break;\n case 'underline':\n chain.toggleUnderline().run();\n break;\n case 'strikethrough':\n chain.toggleStrike().run();\n break;\n case 'bulletList':\n chain.toggleBulletList().run();\n break;\n case 'numberList':\n chain.toggleOrderedList().run();\n break;\n case 'link':\n if (typeof value === 'string' && value) this.setLink(value);\n break;\n case 'unlink':\n chain.extendMarkRange('link').unsetLink().run();\n break;\n case 'clear':\n chain.unsetAllMarks().clearNodes().run();\n break;\n default:\n break;\n }\n }\n\n isActive(cmd: RichTextCommand): boolean {\n const name = ACTIVE_NAME[cmd];\n if (!this.editor || !name) return false;\n return this.editor.isActive(name);\n }\n\n getSelectedText(): string {\n if (!this.editor) return '';\n const { from, to } = this.editor.state.selection;\n return this.editor.state.doc.textBetween(from, to, ' ');\n }\n\n setLink(href: string, text?: string): void {\n if (!this.editor || !href) return;\n const { empty } = this.editor.state.selection;\n if (empty) {\n this.editor\n .chain()\n .focus()\n .insertContent({ type: 'text', text: text || href, marks: [{ type: 'link', attrs: { href } }] })\n .run();\n } else {\n this.editor.chain().focus().extendMarkRange('link').setLink({ href }).run();\n }\n }\n\n insert(fragment: string): void {\n if (!this.editor || !fragment) return;\n this.editor.chain().focus().insertContent({ type: 'text', text: fragment }).run();\n }\n\n insertMentionTrigger(): void {\n if (!this.editor) return;\n const { state } = this.editor;\n const { from, empty } = state.selection;\n // La sugerencia solo abre tras inicio de bloque o espacio (allowedPrefixes de tiptap).\n const before = empty ? state.doc.textBetween(Math.max(0, from - 1), from, '\\n', '\\n') : '';\n const text = before !== '' && !/\\s/.test(before) ? ' @' : '@';\n this.editor.chain().focus().insertContent({ type: 'text', text }).run();\n }\n\n setPlaceholder(text: string): void {\n this.placeholderText = text;\n // Transacción vacía: repinta la decoración del placeholder sin tocar el documento.\n if (this.editor) this.editor.view.dispatch(this.editor.state.tr);\n }\n}\n"],"names":[],"mappings":";;;;;AAcA;AACA,MAAM,WAAW,GAA6C;AAC5D,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,UAAU,EAAE,aAAa;AACzB,IAAA,IAAI,EAAE,MAAM;CACb;AAQD;AACA,SAAS,WAAW,CAAC,KAAmB,EAAA;AACtC,IAAA,OAAO,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,IAAI,IAAI,GAAG,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE;AACnF;AAEA;;;;;AAKG;AACH,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,aAAa,GAAA;QACX,OAAO;AACL,YAAA,GAAG,IAAI,CAAC,MAAM,IAAI;AAClB,YA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AAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;QAC1F,MAAM,IAAI,GAAG,MAAM,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,GAAG;QAC7D,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE;IACzE;AAEA,IAAA,cAAc,CAAC,IAAY,EAAA;AACzB,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI;;QAE3B,IAAI,IAAI,CAAC,MAAM;AAAE,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAClE;AACD;;;;"}
|
|
@@ -83,10 +83,10 @@ class CurrencyFormatPipe {
|
|
|
83
83
|
return num.toString();
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
87
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CurrencyFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
87
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: CurrencyFormatPipe, isStandalone: true, name: "currencyFormat" }); }
|
|
88
88
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CurrencyFormatPipe, decorators: [{
|
|
90
90
|
type: Pipe,
|
|
91
91
|
args: [{
|
|
92
92
|
name: 'currencyFormat',
|
|
@@ -125,10 +125,10 @@ class FormatoHoraPipe {
|
|
|
125
125
|
return `${hour12} ${period}`;
|
|
126
126
|
return `${hour12}:${minutes.toString().padStart(2, '0')} ${period}`;
|
|
127
127
|
}
|
|
128
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
129
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.
|
|
128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: FormatoHoraPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
129
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: FormatoHoraPipe, isStandalone: true, name: "formatoHora" }); }
|
|
130
130
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: FormatoHoraPipe, decorators: [{
|
|
132
132
|
type: Pipe,
|
|
133
133
|
args: [{
|
|
134
134
|
name: 'formatoHora',
|