hazo_collab_forms 3.0.10 → 3.0.13
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/dist/components/clarification/clarification_card.d.ts.map +1 -1
- package/dist/components/clarification/clarification_card.js +11 -9
- package/dist/components/clarification/clarification_card.js.map +1 -1
- package/dist/components/hazo_fb_form/hazo_fb_form.d.ts.map +1 -1
- package/dist/components/hazo_fb_form/hazo_fb_form.js +3 -5
- package/dist/components/hazo_fb_form/hazo_fb_form.js.map +1 -1
- package/dist/components/hazo_fb_form/types.d.ts +4 -0
- package/dist/components/hazo_fb_form/types.d.ts.map +1 -1
- package/dist/components/hazo_fb_form/views/back_office_view.d.ts.map +1 -1
- package/dist/components/hazo_fb_form/views/back_office_view.js +3 -2
- package/dist/components/hazo_fb_form/views/back_office_view.js.map +1 -1
- package/dist/components/hazo_fb_form/views/front_office_view.d.ts.map +1 -1
- package/dist/components/hazo_fb_form/views/front_office_view.js +10 -5
- package/dist/components/hazo_fb_form/views/front_office_view.js.map +1 -1
- package/dist/components/hazo_fb_form/views/summary_review_view.d.ts.map +1 -1
- package/dist/components/hazo_fb_form/views/summary_review_view.js +10 -1
- package/dist/components/hazo_fb_form/views/summary_review_view.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/shared/collapsible_card/collapsible_card.d.ts +38 -0
- package/dist/components/shared/collapsible_card/collapsible_card.d.ts.map +1 -0
- package/dist/components/shared/collapsible_card/collapsible_card.js +34 -0
- package/dist/components/shared/collapsible_card/collapsible_card.js.map +1 -0
- package/dist/components/shared/collapsible_card/index.d.ts +3 -0
- package/dist/components/shared/collapsible_card/index.d.ts.map +1 -0
- package/dist/components/shared/collapsible_card/index.js +2 -0
- package/dist/components/shared/collapsible_card/index.js.map +1 -0
- package/dist/components/shared/description_with_ihelp.d.ts +15 -0
- package/dist/components/shared/description_with_ihelp.d.ts.map +1 -0
- package/dist/components/shared/description_with_ihelp.js +45 -0
- package/dist/components/shared/description_with_ihelp.js.map +1 -0
- package/package.json +9 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { IhelpIcon } from './ihelp_icon.js';
|
|
5
|
+
/**
|
|
6
|
+
* Parses a description string containing {ihelp:context_key}text{/ihelp} markers
|
|
7
|
+
* and renders inline text with IhelpIcon components.
|
|
8
|
+
*
|
|
9
|
+
* Example:
|
|
10
|
+
* "Provide details of {ihelp:dividends_help}dividends{/ihelp}, {ihelp:dist_help}distributions{/ihelp}"
|
|
11
|
+
*
|
|
12
|
+
* Renders: "Provide details of dividends ℹ️, distributions ℹ️"
|
|
13
|
+
*/
|
|
14
|
+
export function DescriptionWithIhelp({ description, className, ihelp_size = 13, }) {
|
|
15
|
+
const parts = parse_description_ihelp(description);
|
|
16
|
+
// No ihelp markers found — render plain text
|
|
17
|
+
if (parts.length === 1 && parts[0].type === 'text') {
|
|
18
|
+
return _jsx("p", { className: className, children: parts[0].content });
|
|
19
|
+
}
|
|
20
|
+
return (_jsx("p", { className: className, children: parts.map((part, i) => part.type === 'text' ? (_jsx(React.Fragment, { children: part.content }, i)) : (_jsxs("span", { className: "inline-flex items-center gap-0.5", children: [part.content, _jsx(IhelpIcon, { context_key: part.context_key, size: ihelp_size })] }, i))) }));
|
|
21
|
+
}
|
|
22
|
+
function parse_description_ihelp(description) {
|
|
23
|
+
const pattern = /\{ihelp:([^}]+)\}(.*?)\{\/ihelp\}/g;
|
|
24
|
+
const parts = [];
|
|
25
|
+
let last_index = 0;
|
|
26
|
+
let match;
|
|
27
|
+
while ((match = pattern.exec(description)) !== null) {
|
|
28
|
+
// Text before this match
|
|
29
|
+
if (match.index > last_index) {
|
|
30
|
+
parts.push({ type: 'text', content: description.slice(last_index, match.index) });
|
|
31
|
+
}
|
|
32
|
+
parts.push({ type: 'ihelp', content: match[2], context_key: match[1] });
|
|
33
|
+
last_index = match.index + match[0].length;
|
|
34
|
+
}
|
|
35
|
+
// Remaining text after last match
|
|
36
|
+
if (last_index < description.length) {
|
|
37
|
+
parts.push({ type: 'text', content: description.slice(last_index) });
|
|
38
|
+
}
|
|
39
|
+
// No matches at all
|
|
40
|
+
if (parts.length === 0) {
|
|
41
|
+
parts.push({ type: 'text', content: description });
|
|
42
|
+
}
|
|
43
|
+
return parts;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=description_with_ihelp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description_with_ihelp.js","sourceRoot":"","sources":["../../../src/components/shared/description_with_ihelp.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,WAAW,EACX,SAAS,EACT,UAAU,GAAG,EAAE,GAKhB;IACC,MAAM,KAAK,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAEnD,6CAA6C;IAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACnD,OAAO,YAAG,SAAS,EAAE,SAAS,YAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAAK,CAAC;IACzD,CAAC;IAED,OAAO,CACL,YAAG,SAAS,EAAE,SAAS,YACpB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CACrB,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,KAAK,CAAC,QAAQ,cAAU,IAAI,CAAC,OAAO,IAAhB,CAAC,C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,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_collab_forms",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.13",
|
|
4
4
|
"description": "Collaboration form elements",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.client.js",
|
|
@@ -82,11 +82,18 @@
|
|
|
82
82
|
},
|
|
83
83
|
"homepage": "https://github.com/pub12/hazo_collab_forms#readme",
|
|
84
84
|
"devDependencies": {
|
|
85
|
+
"@dnd-kit/core": "^6.3.1",
|
|
86
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
87
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
85
88
|
"@types/node": "^20.11.0",
|
|
86
89
|
"@types/react": "^18.2.48",
|
|
87
90
|
"@types/react-dom": "^18.2.18",
|
|
91
|
+
"hazo_config": "^2.1.0",
|
|
92
|
+
"hazo_ihelp": "^2.0.4",
|
|
88
93
|
"hazo_llm_api": "^1.2.8",
|
|
89
94
|
"hazo_logs": "^1.0.10",
|
|
95
|
+
"hazo_notes": "^1.1.5",
|
|
96
|
+
"lucide-react": "^1.7.0",
|
|
90
97
|
"patch-package": "^8.0.0",
|
|
91
98
|
"typescript": "^5.3.3"
|
|
92
99
|
},
|
|
@@ -108,9 +115,9 @@
|
|
|
108
115
|
"hazo_config": "^2.0.2",
|
|
109
116
|
"hazo_connect": ">=2.4.0",
|
|
110
117
|
"hazo_files": "^1.4.4",
|
|
118
|
+
"hazo_ihelp": ">=1.0.0",
|
|
111
119
|
"hazo_llm_api": ">=1.0.0",
|
|
112
120
|
"hazo_logs": "^1.0.10",
|
|
113
|
-
"hazo_ihelp": ">=1.0.0",
|
|
114
121
|
"hazo_notes": "^1.1.5",
|
|
115
122
|
"hazo_pdf": ">=1.0.0",
|
|
116
123
|
"lucide-react": ">=0.344.0",
|