hazo_collab_forms 6.0.7 → 6.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.
Files changed (73) hide show
  1. package/CHANGE_LOG.md +17 -0
  2. package/README.md +27 -0
  3. package/dist/components/_internal_form_set.d.ts +5 -0
  4. package/dist/components/_internal_form_set.d.ts.map +1 -1
  5. package/dist/components/_internal_form_set.js +1 -1
  6. package/dist/components/_internal_form_set.js.map +1 -1
  7. package/dist/components/hazo_collab_form_combo.d.ts.map +1 -1
  8. package/dist/components/hazo_collab_form_combo.js +1 -1
  9. package/dist/components/hazo_collab_form_combo.js.map +1 -1
  10. package/dist/components/hazo_collab_form_currency.d.ts.map +1 -1
  11. package/dist/components/hazo_collab_form_currency.js +1 -1
  12. package/dist/components/hazo_collab_form_currency.js.map +1 -1
  13. package/dist/components/hazo_collab_form_date.d.ts.map +1 -1
  14. package/dist/components/hazo_collab_form_date.js +1 -1
  15. package/dist/components/hazo_collab_form_date.js.map +1 -1
  16. package/dist/components/hazo_collab_form_inputbox.d.ts.map +1 -1
  17. package/dist/components/hazo_collab_form_inputbox.js +1 -1
  18. package/dist/components/hazo_collab_form_inputbox.js.map +1 -1
  19. package/dist/components/hazo_collab_form_masked.d.ts.map +1 -1
  20. package/dist/components/hazo_collab_form_masked.js +1 -1
  21. package/dist/components/hazo_collab_form_masked.js.map +1 -1
  22. package/dist/components/hazo_collab_form_percentage.d.ts.map +1 -1
  23. package/dist/components/hazo_collab_form_percentage.js +1 -1
  24. package/dist/components/hazo_collab_form_percentage.js.map +1 -1
  25. package/dist/components/hazo_collab_form_textarea.d.ts.map +1 -1
  26. package/dist/components/hazo_collab_form_textarea.js +1 -1
  27. package/dist/components/hazo_collab_form_textarea.js.map +1 -1
  28. package/dist/components/hazo_collab_form_view/context.d.ts.map +1 -1
  29. package/dist/components/hazo_collab_form_view/context.js +6 -0
  30. package/dist/components/hazo_collab_form_view/context.js.map +1 -1
  31. package/dist/components/hazo_collab_form_view/types.d.ts +7 -0
  32. package/dist/components/hazo_collab_form_view/types.d.ts.map +1 -1
  33. package/dist/components/hazo_validation_rule_editor/components/rule_editor.d.ts.map +1 -1
  34. package/dist/components/hazo_validation_rule_editor/components/rule_editor.js +24 -5
  35. package/dist/components/hazo_validation_rule_editor/components/rule_editor.js.map +1 -1
  36. package/dist/components/hazo_validation_rule_editor/components/rule_list.d.ts.map +1 -1
  37. package/dist/components/hazo_validation_rule_editor/components/rule_list.js +1 -1
  38. package/dist/components/hazo_validation_rule_editor/components/rule_list.js.map +1 -1
  39. package/dist/components/hazo_validation_rule_editor/context.d.ts +3 -1
  40. package/dist/components/hazo_validation_rule_editor/context.d.ts.map +1 -1
  41. package/dist/components/hazo_validation_rule_editor/context.js +8 -2
  42. package/dist/components/hazo_validation_rule_editor/context.js.map +1 -1
  43. package/dist/components/hazo_validation_rule_editor/hooks/use_validation_rules.d.ts +18 -0
  44. package/dist/components/hazo_validation_rule_editor/hooks/use_validation_rules.d.ts.map +1 -1
  45. package/dist/components/hazo_validation_rule_editor/hooks/use_validation_rules.js +64 -8
  46. package/dist/components/hazo_validation_rule_editor/hooks/use_validation_rules.js.map +1 -1
  47. package/dist/components/hazo_validation_rule_editor/types.d.ts +15 -0
  48. package/dist/components/hazo_validation_rule_editor/types.d.ts.map +1 -1
  49. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.d.ts +1 -1
  50. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.d.ts.map +1 -1
  51. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.js +2 -2
  52. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.js.map +1 -1
  53. package/dist/components/shared/use_base_form_field.d.ts +2 -0
  54. package/dist/components/shared/use_base_form_field.d.ts.map +1 -1
  55. package/dist/components/shared/use_base_form_field.js +8 -0
  56. package/dist/components/shared/use_base_form_field.js.map +1 -1
  57. package/dist/components/thread_form/components/key_info_drawer.d.ts +5 -0
  58. package/dist/components/thread_form/components/key_info_drawer.d.ts.map +1 -1
  59. package/dist/components/thread_form/components/key_info_drawer.js +2 -2
  60. package/dist/components/thread_form/components/key_info_drawer.js.map +1 -1
  61. package/dist/components/thread_form/thread_form.d.ts.map +1 -1
  62. package/dist/components/thread_form/thread_form.js +2 -2
  63. package/dist/components/thread_form/thread_form.js.map +1 -1
  64. package/dist/components/thread_form/types.d.ts +6 -0
  65. package/dist/components/thread_form/types.d.ts.map +1 -1
  66. package/dist/components/thread_form/types.js.map +1 -1
  67. package/dist/types/validation.d.ts +8 -0
  68. package/dist/types/validation.d.ts.map +1 -1
  69. package/dist/utils/date_format.d.ts +8 -30
  70. package/dist/utils/date_format.d.ts.map +1 -1
  71. package/dist/utils/date_format.js +6 -64
  72. package/dist/utils/date_format.js.map +1 -1
  73. package/package.json +14 -14
@@ -1,67 +1,9 @@
1
1
  /**
2
- * Date formatting utilities for hazo_collab_forms
3
- * Provides SSR-safe date formatting options
2
+ * Date formatting utilities re-exported from hazo_core.
3
+ *
4
+ * Canonical location moved to hazo_core/src/utils/dates.ts.
5
+ * This re-export maintains backward compatibility for existing hazo_collab_forms consumers.
6
+ * Will be removed in hazo_collab_forms v7 — import from 'hazo_core' directly.
4
7
  */
5
- /**
6
- * Default date format
7
- */
8
- export const DEFAULT_DATE_FORMAT = 'iso';
9
- /**
10
- * Format a date according to the specified format
11
- * @param date - Date object, ISO string, or undefined
12
- * @param format - Format type (iso, dmy, mdy, locale)
13
- * @returns Formatted date string, or empty string if date is invalid
14
- */
15
- export function format_date(date, format = DEFAULT_DATE_FORMAT) {
16
- if (!date)
17
- return '';
18
- // Parse date if string
19
- let date_obj;
20
- if (typeof date === 'string') {
21
- // Handle ISO date strings by adding time component to avoid timezone issues
22
- date_obj = new Date(date.includes('T') ? date : date + 'T00:00:00');
23
- }
24
- else {
25
- date_obj = date;
26
- }
27
- // Validate date
28
- if (isNaN(date_obj.getTime())) {
29
- return typeof date === 'string' ? date : '';
30
- }
31
- // Get date components
32
- const year = date_obj.getFullYear();
33
- const month = String(date_obj.getMonth() + 1).padStart(2, '0');
34
- const day = String(date_obj.getDate()).padStart(2, '0');
35
- switch (format) {
36
- case 'iso':
37
- return `${year}-${month}-${day}`;
38
- case 'dmy':
39
- return `${day}/${month}/${year}`;
40
- case 'mdy':
41
- return `${month}/${day}/${year}`;
42
- case 'locale':
43
- // Use locale formatting (not SSR-safe)
44
- return date_obj.toLocaleDateString();
45
- default:
46
- return `${year}-${month}-${day}`;
47
- }
48
- }
49
- /**
50
- * Format a date range according to the specified format
51
- * @param from - Start date
52
- * @param to - End date
53
- * @param format - Format type
54
- * @returns Formatted date range string
55
- */
56
- export function format_date_range(from, to, format = DEFAULT_DATE_FORMAT) {
57
- const from_str = format_date(from, format);
58
- const to_str = format_date(to, format);
59
- if (from_str && to_str)
60
- return `${from_str} - ${to_str}`;
61
- if (from_str)
62
- return `From ${from_str}`;
63
- if (to_str)
64
- return `To ${to_str}`;
65
- return '';
66
- }
8
+ export { format_date, format_date_range, DEFAULT_DATE_FORMAT, } from 'hazo_core';
67
9
  //# sourceMappingURL=date_format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date_format.js","sourceRoot":"","sources":["../../src/utils/date_format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAe,KAAK,CAAC;AAErD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,IAAsC,EACtC,SAAqB,mBAAmB;IAExC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,uBAAuB;IACvB,IAAI,QAAc,CAAC;IACnB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,4EAA4E;QAC5E,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,WAAW,CAAC,CAAC;IACtE,CAAC;SAAM,CA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,MAAM;QAAE,OAAO,GAAG,QAAQ,MAAM,MAAM,EAAE,CAAC;IACzD,IAAI,QAAQ;QAAE,OAAO,QAAQ,QAAQ,EAAE,CAAC;IACxC,IAAI,MAAM;QAAE,OAAO,MAAM,MAAM,EAAE,CAAC;IAClC,OAAO,EAAE,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"date_format.js","sourceRoot":"","sources":["../../src/utils/date_format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_collab_forms",
3
- "version": "6.0.7",
3
+ "version": "6.1.1",
4
4
  "description": "Collaboration form elements",
5
5
  "type": "module",
6
6
  "main": "./dist/index.client.js",
@@ -95,7 +95,7 @@
95
95
  "@dnd-kit/sortable": "^10.0.0",
96
96
  "@dnd-kit/utilities": "^3.2.2",
97
97
  "@radix-ui/react-switch": "^1.2.6",
98
- "hazo_audit": "^2.0.1",
98
+ "hazo_audit": "^2.0.2",
99
99
  "@testing-library/jest-dom": "^6.6.3",
100
100
  "@testing-library/react": "^15.0.7",
101
101
  "@types/node": "^20.14.10",
@@ -122,18 +122,18 @@
122
122
  "@radix-ui/react-dialog": "^1.0.0",
123
123
  "@radix-ui/react-label": "^2.0.0",
124
124
  "@radix-ui/react-popover": "^1.0.0",
125
- "hazo_audit": "^2.0.1",
126
- "hazo_auth": "^5.1.30",
127
- "hazo_chat": "^5.2.1",
128
- "hazo_config": "^2.1.0",
129
- "hazo_connect": "^2.6.0",
130
- "hazo_files": "^1.4.4",
131
- "hazo_ihelp": "^2.0.0",
132
- "hazo_llm_api": "^1.2.0",
133
- "hazo_logs": "^1.0.13",
134
- "hazo_notes": "^1.1.5",
135
- "hazo_pdf": "^1.7.0",
136
- "hazo_ui": "^2.17.0",
125
+ "hazo_audit": "^2.0.2",
126
+ "hazo_auth": "^8.0.1",
127
+ "hazo_chat": "^5.2.4",
128
+ "hazo_config": "^2.1.5",
129
+ "hazo_connect": "^2.7.3",
130
+ "hazo_files": "^2.1.1",
131
+ "hazo_ihelp": "^2.1.0",
132
+ "hazo_llm_api": "^1.3.0",
133
+ "hazo_logs": "^2.0.0",
134
+ "hazo_notes": "^1.2.0",
135
+ "hazo_pdf": "^1.7.1",
136
+ "hazo_ui": "^3.0.1",
137
137
  "lucide-react": "^0.553.0",
138
138
  "react": "^18.0.0 || ^19.0.0",
139
139
  "react-dom": "^18.0.0 || ^19.0.0",