hazo_config 2.4.3 → 2.6.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.
Files changed (49) hide show
  1. package/CHANGE_LOG.md +73 -0
  2. package/dist/components/app_config.d.ts.map +1 -1
  3. package/dist/components/app_config.js +14 -13
  4. package/dist/components/app_config_list_editor/app_config_list_editor.d.ts.map +1 -1
  5. package/dist/components/app_config_list_editor/app_config_list_editor.js +8 -4
  6. package/dist/components/app_config_list_editor/components/bulk_edit_modal.d.ts.map +1 -1
  7. package/dist/components/app_config_list_editor/components/bulk_edit_modal.js +5 -4
  8. package/dist/components/app_config_list_editor/components/color_swatch_picker.d.ts.map +1 -1
  9. package/dist/components/app_config_list_editor/components/color_swatch_picker.js +2 -1
  10. package/dist/components/app_config_list_editor/components/delete_dialog.d.ts.map +1 -1
  11. package/dist/components/app_config_list_editor/components/delete_dialog.js +2 -1
  12. package/dist/components/app_config_list_editor/components/edit_modal.d.ts.map +1 -1
  13. package/dist/components/app_config_list_editor/components/edit_modal.js +14 -7
  14. package/dist/components/app_config_list_editor/components/empty_state.d.ts.map +1 -1
  15. package/dist/components/app_config_list_editor/components/empty_state.js +2 -1
  16. package/dist/components/app_config_list_editor/components/import_export_buttons.d.ts.map +1 -1
  17. package/dist/components/app_config_list_editor/components/import_export_buttons.js +8 -7
  18. package/dist/components/app_config_list_editor/components/list_item_row.d.ts.map +1 -1
  19. package/dist/components/app_config_list_editor/components/list_item_row.js +4 -3
  20. package/dist/components/app_config_list_editor/components/save_status_indicator.d.ts.map +1 -1
  21. package/dist/components/app_config_list_editor/components/save_status_indicator.js +2 -1
  22. package/dist/components/app_config_list_editor/components/search_bar.d.ts.map +1 -1
  23. package/dist/components/app_config_list_editor/components/search_bar.js +2 -1
  24. package/dist/components/config_editor.d.ts.map +1 -1
  25. package/dist/components/config_editor.js +5 -4
  26. package/dist/components/config_viewer.d.ts.map +1 -1
  27. package/dist/components/config_viewer.js +3 -2
  28. package/dist/components/ui/button.d.ts +1 -1
  29. package/dist/components/ui/button.d.ts.map +1 -1
  30. package/dist/lib/clone_to_override.d.ts +26 -0
  31. package/dist/lib/clone_to_override.d.ts.map +1 -0
  32. package/dist/lib/clone_to_override.js +60 -0
  33. package/dist/lib/index.d.ts +3 -0
  34. package/dist/lib/index.d.ts.map +1 -1
  35. package/dist/lib/index.js +7 -0
  36. package/dist/lib/override_count.d.ts +14 -0
  37. package/dist/lib/override_count.d.ts.map +1 -0
  38. package/dist/lib/override_count.js +32 -0
  39. package/dist/lib/strings.d.ts +2 -0
  40. package/dist/lib/strings.d.ts.map +1 -0
  41. package/dist/lib/strings.js +18 -0
  42. package/dist/lib/two_tier.d.ts +60 -0
  43. package/dist/lib/two_tier.d.ts.map +1 -0
  44. package/dist/lib/two_tier.js +56 -0
  45. package/dist/locales/en.json +104 -0
  46. package/dist/server-data/index.d.ts +17 -0
  47. package/dist/server-data/index.d.ts.map +1 -0
  48. package/dist/server-data/index.js +16 -0
  49. package/package.json +20 -5
@@ -0,0 +1,104 @@
1
+ {
2
+ "common.cancel": "Cancel",
3
+ "common.delete": "Delete",
4
+ "common.select_placeholder": "Select...",
5
+ "common.hide_value": "Hide value",
6
+ "common.show_value": "Show value",
7
+ "save_status.saving": "Saving...",
8
+ "save_status.saved": "Saved",
9
+ "save_status.error": "Error saving",
10
+ "search.placeholder": "Search {{item_label}}...",
11
+ "search.aria_label": "Search {{item_label}}",
12
+ "search.clear_aria_label": "Clear search",
13
+ "empty_state.title": "No {{item_label}} yet",
14
+ "empty_state.description": "Get started by adding your first {{item}}.",
15
+ "empty_state.cta": "Add your first {{item}}",
16
+ "import_export.export": "Export",
17
+ "import_export.export_title": "Export as JSON",
18
+ "import_export.import": "Import",
19
+ "import_export.import_title": "Import from JSON",
20
+ "import_export.error_read_file": "Failed to read file",
21
+ "import_export.error_invalid_json": "Invalid JSON file",
22
+ "import_export.error_no_valid_items": "No valid items found",
23
+ "import_export.added": "Added {{count}}",
24
+ "import_export.skipped": "{{count}} skipped",
25
+ "import_export.invalid": "{{count}} invalid",
26
+ "list_item.select_item_aria": "Select item",
27
+ "list_item.edit_item_aria": "Edit item",
28
+ "list_item.delete_item_aria": "Delete item",
29
+ "list_editor.select_all_aria": "Select all",
30
+ "list_editor.add": "Add",
31
+ "list_editor.max_items_title": "Maximum of {{max}} items reached",
32
+ "list_editor.selected_count": "{{count}} selected",
33
+ "list_editor.clear": "Clear",
34
+ "list_editor.edit_selected": "Edit selected",
35
+ "list_editor.delete_selected": "Delete selected",
36
+ "list_editor.no_items_matching": "No {{item_label}} matching “{{term}}”",
37
+ "list_editor.max_reached_note": "Maximum of {{max}} {{item_label}} reached.",
38
+ "list_editor.delete_confirm_title": "Delete “{{name}}”?",
39
+ "list_editor.bulk_delete_title": "Delete {{count}} selected {{label}}?",
40
+ "list_editor.bulk_delete_description": "This action cannot be undone.",
41
+ "list_editor.bulk_delete_confirm_label": "Delete {{count}}",
42
+ "bulk_edit.title": "Edit {{count}} selected items",
43
+ "bulk_edit.description": "Enable a field below to apply a new value to all selected items. Disabled fields are left unchanged.",
44
+ "bulk_edit.leave_unchanged": "Leave unchanged",
45
+ "bulk_edit.no_fields": "No editable fields configured.",
46
+ "bulk_edit.apply": "Apply to {{count}} items",
47
+ "edit_modal.field_required": "{{label}} is required",
48
+ "edit_modal.id_required": "ID is required",
49
+ "edit_modal.id_duplicate": "This ID already exists",
50
+ "edit_modal.auto_generated_hint": "Auto-generated from {{source}}",
51
+ "edit_modal.title_new": "New {{item_type}}",
52
+ "edit_modal.title_edit": "Edit {{item_type}}",
53
+ "edit_modal.saving": "Saving…",
54
+ "edit_modal.add_button": "Add {{item_type}}",
55
+ "edit_modal.save_changes": "Save Changes",
56
+ "edit_modal.tag_search_placeholder": "Type to search...",
57
+ "edit_modal.no_matching_options": "No matching options",
58
+ "color_swatch.select_aria": "Select color {{color}}",
59
+ "config_editor.title": "Configuration Editor",
60
+ "config_editor.unsaved_suffix": "(unsaved changes)",
61
+ "config_editor.refresh_aria": "Refresh configuration",
62
+ "config_editor.refresh": "Refresh",
63
+ "config_editor.save_aria": "Save configuration",
64
+ "config_editor.save": "Save",
65
+ "config_editor.sections_heading": "Sections",
66
+ "config_editor.sections_aria": "Configuration sections",
67
+ "config_editor.add_new_key_heading": "Add New Key",
68
+ "config_editor.key_name_label": "Key name",
69
+ "config_editor.value_label": "Value",
70
+ "config_editor.add_key": "Add Key",
71
+ "config_editor.select_section_prompt": "Select a section to view/edit",
72
+ "config_editor.delete_key_aria": "Delete {{key}}",
73
+ "config_viewer.empty": "No configuration sections found",
74
+ "config_viewer.save_changes_aria": "Save changes",
75
+ "config_viewer.cancel_editing_aria": "Cancel editing",
76
+ "config_viewer.edit_key_aria": "Edit {{key}}",
77
+ "config_viewer.empty_value": "(empty)",
78
+ "app_config.title_default": "Configuration",
79
+ "app_config.loading": "Loading configuration...",
80
+ "app_config.unsaved_changes": "You have unsaved changes",
81
+ "app_config.refresh": "Refresh",
82
+ "app_config.save": "Save",
83
+ "app_config.saving": "Saving...",
84
+ "app_config.sections_heading": "Sections",
85
+ "app_config.no_sections": "No sections yet. Click + to add your first section.",
86
+ "app_config.add_key": "Add Key",
87
+ "app_config.no_keys": "No keys in this section yet. Click “Add Key” to get started.",
88
+ "app_config.select_section_prompt": "Select a section to view and edit keys",
89
+ "app_config.create_first_section_prompt": "Click + to create your first configuration section",
90
+ "app_config.delete_key_confirm": "Delete key “{{key}}”?",
91
+ "app_config.invalid_json": "Invalid JSON format",
92
+ "app_config.dialog_title_add_section": "Add New Section",
93
+ "app_config.dialog_title_add_key": "Add New Key",
94
+ "app_config.section_name_label": "Section Name",
95
+ "app_config.section_name_placeholder": "e.g., integrations, notifications",
96
+ "app_config.key_name_label": "Key Name",
97
+ "app_config.key_name_placeholder": "e.g., api_key, webhook_url",
98
+ "app_config.type_label": "Type",
99
+ "app_config.type_general": "General (Text)",
100
+ "app_config.type_json": "JSON (Object)",
101
+ "app_config.value_label": "Value",
102
+ "app_config.value_placeholder": "Enter value",
103
+ "app_config.create_section": "Create Section"
104
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * hazo_connect-backed data helpers for hazo_config
3
+ *
4
+ * This entry point contains code that depends on `hazo_connect` (an
5
+ * optional peer dependency), separate from `hazo_config/server` (which is
6
+ * Node fs/path-only for the INI-backed `HazoConfig`) and the main/`/lib`
7
+ * entry points (pure, no database dependency). Only import from here if you
8
+ * have `hazo_connect` installed and want the two-tier global/override CRUD
9
+ * helpers -- consumers of `HazoConfig` or `mergeTwoTier` alone are
10
+ * unaffected either way.
11
+ *
12
+ * Usage:
13
+ * import { cloneToOverride, getOverrideCount } from 'hazo_config/server-data'
14
+ */
15
+ export { cloneToOverride, CloneToOverrideError } from '../lib/clone_to_override.js';
16
+ export { getOverrideCount } from '../lib/override_count.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server-data/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * hazo_connect-backed data helpers for hazo_config
3
+ *
4
+ * This entry point contains code that depends on `hazo_connect` (an
5
+ * optional peer dependency), separate from `hazo_config/server` (which is
6
+ * Node fs/path-only for the INI-backed `HazoConfig`) and the main/`/lib`
7
+ * entry points (pure, no database dependency). Only import from here if you
8
+ * have `hazo_connect` installed and want the two-tier global/override CRUD
9
+ * helpers -- consumers of `HazoConfig` or `mergeTwoTier` alone are
10
+ * unaffected either way.
11
+ *
12
+ * Usage:
13
+ * import { cloneToOverride, getOverrideCount } from 'hazo_config/server-data'
14
+ */
15
+ export { cloneToOverride, CloneToOverrideError } from '../lib/clone_to_override.js';
16
+ export { getOverrideCount } from '../lib/override_count.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_config",
3
- "version": "2.4.3",
3
+ "version": "2.6.0",
4
4
  "description": "Config wrapper with error handling",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,9 +30,16 @@
30
30
  "types": "./dist/lib/index.d.ts",
31
31
  "import": "./dist/lib/index.js",
32
32
  "default": "./dist/lib/index.js"
33
+ },
34
+ "./server-data": {
35
+ "types": "./dist/server-data/index.d.ts",
36
+ "import": "./dist/server-data/index.js",
37
+ "default": "./dist/server-data/index.js"
33
38
  }
34
39
  },
35
40
  "scripts": {
41
+ "clean": "rm -rf dist",
42
+ "prebuild": "npm run clean",
36
43
  "build": "tsc -p tsconfig.build.json",
37
44
  "prepublishOnly": "npm run build",
38
45
  "storybook": "npx storybook dev -p 6006",
@@ -91,7 +98,7 @@
91
98
  "@types/react": "^18.3.3",
92
99
  "@types/react-dom": "^18.3.0",
93
100
  "@vitejs/plugin-react": "^4.2.0",
94
- "hazo_connect": "^4.0.0",
101
+ "hazo_connect": "^4.3.2",
95
102
  "jsdom": "^24.1.3",
96
103
  "postcss": "^8.4.49",
97
104
  "react": "^18.2.0",
@@ -103,17 +110,25 @@
103
110
  "vitest": "^4.0.15"
104
111
  },
105
112
  "peerDependencies": {
106
- "hazo_core": "^2.0.0",
107
- "hazo_theme": "^1.3.0",
108
- "hazo_ui": "^6.8.0",
113
+ "hazo_connect": "^4.3.2",
114
+ "hazo_core": "^2.4.0",
115
+ "hazo_i18n": "^0.9.0",
116
+ "hazo_theme": "^1.4.0",
117
+ "hazo_ui": "^6.14.0",
109
118
  "react": "^18.0.0 || ^19.0.0",
110
119
  "react-dom": "^18.0.0 || ^19.0.0",
111
120
  "tailwindcss": "^4.0.0"
112
121
  },
113
122
  "peerDependenciesMeta": {
123
+ "hazo_connect": {
124
+ "optional": true
125
+ },
114
126
  "hazo_core": {
115
127
  "optional": true
116
128
  },
129
+ "hazo_i18n": {
130
+ "optional": true
131
+ },
117
132
  "tailwindcss": {
118
133
  "optional": true
119
134
  },