@solidxai/core-ui 0.1.13-beta.4 → 0.1.13-beta.6

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 (149) hide show
  1. package/dist/components/auth/AuthTabs.d.ts.map +1 -1
  2. package/dist/components/auth/AuthTabs.js +1 -1
  3. package/dist/components/auth/AuthTabs.js.map +1 -1
  4. package/dist/components/auth/AuthTabs.tsx +1 -0
  5. package/dist/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
  6. package/dist/components/auth/SolidChangeForcePassword.js +2 -2
  7. package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
  8. package/dist/components/auth/SolidChangeForcePassword.tsx +9 -8
  9. package/dist/components/common/SettingsComponent.d.ts.map +1 -1
  10. package/dist/components/common/SettingsComponent.js +1 -1
  11. package/dist/components/common/SettingsComponent.js.map +1 -1
  12. package/dist/components/common/SettingsComponent.tsx +1 -0
  13. package/dist/components/common/SolidFieldTooltip.d.ts.map +1 -1
  14. package/dist/components/common/SolidFieldTooltip.js +1 -33
  15. package/dist/components/common/SolidFieldTooltip.js.map +1 -1
  16. package/dist/components/common/SolidFieldTooltip.tsx +8 -64
  17. package/dist/components/common/SolidMaterialSymbol.d.ts +1 -1
  18. package/dist/components/common/SolidMaterialSymbol.d.ts.map +1 -1
  19. package/dist/components/common/SolidMaterialSymbol.js +6 -37
  20. package/dist/components/common/SolidMaterialSymbol.js.map +1 -1
  21. package/dist/components/common/SolidMaterialSymbol.tsx +6 -54
  22. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts.map +1 -1
  23. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js +2 -2
  24. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js.map +1 -1
  25. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.tsx +2 -0
  26. package/dist/components/core/card/CardItem.d.ts.map +1 -1
  27. package/dist/components/core/card/CardItem.js +1 -1
  28. package/dist/components/core/card/CardItem.js.map +1 -1
  29. package/dist/components/core/card/CardItem.tsx +16 -14
  30. package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
  31. package/dist/components/core/card/SolidCardView.js +69 -40
  32. package/dist/components/core/card/SolidCardView.js.map +1 -1
  33. package/dist/components/core/card/SolidCardView.tsx +55 -24
  34. package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.module.css +99 -0
  35. package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.d.ts.map +1 -1
  36. package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js +76 -5
  37. package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js.map +1 -1
  38. package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.tsx +39 -4
  39. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  40. package/dist/components/core/common/SolidGlobalSearchElement.js +172 -124
  41. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  42. package/dist/components/core/common/SolidGlobalSearchElement.tsx +73 -84
  43. package/dist/components/core/common/globalSearchPersistence.d.ts +3 -0
  44. package/dist/components/core/common/globalSearchPersistence.d.ts.map +1 -1
  45. package/dist/components/core/common/globalSearchPersistence.js +33 -24
  46. package/dist/components/core/common/globalSearchPersistence.js.map +1 -1
  47. package/dist/components/core/common/globalSearchPersistence.ts +34 -27
  48. package/dist/components/core/filter/fields/SolidMediaMultipleField.js +2 -2
  49. package/dist/components/core/filter/fields/SolidMediaMultipleField.js.map +1 -1
  50. package/dist/components/core/filter/fields/SolidMediaMultipleField.tsx +2 -2
  51. package/dist/components/core/filter/fields/SolidMediaSingleField.js +2 -2
  52. package/dist/components/core/filter/fields/SolidMediaSingleField.js.map +1 -1
  53. package/dist/components/core/filter/fields/SolidMediaSingleField.tsx +2 -2
  54. package/dist/components/core/filter/fields/SolidShortTextField.js +2 -2
  55. package/dist/components/core/filter/fields/SolidShortTextField.js.map +1 -1
  56. package/dist/components/core/filter/fields/SolidShortTextField.tsx +2 -2
  57. package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
  58. package/dist/components/core/kanban/KanbanCard.js +1 -1
  59. package/dist/components/core/kanban/KanbanCard.js.map +1 -1
  60. package/dist/components/core/kanban/KanbanCard.tsx +18 -16
  61. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  62. package/dist/components/core/kanban/SolidKanbanView.js +67 -48
  63. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  64. package/dist/components/core/kanban/SolidKanbanView.tsx +51 -11
  65. package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts +1 -1
  66. package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts.map +1 -1
  67. package/dist/components/core/kanban/SolidKanbanViewConfigure.js +11 -2
  68. package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
  69. package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +35 -0
  70. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  71. package/dist/components/core/list/SolidListView.js +6 -2
  72. package/dist/components/core/list/SolidListView.js.map +1 -1
  73. package/dist/components/core/list/SolidListView.tsx +7 -1
  74. package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
  75. package/dist/components/core/list/SolidListViewConfigure.js +15 -11
  76. package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
  77. package/dist/components/core/list/SolidListViewConfigure.tsx +25 -6
  78. package/dist/components/core/list/SolidListViewHeaderContextMenuButton.d.ts +1 -1
  79. package/dist/components/core/list/SolidListViewHeaderContextMenuButton.d.ts.map +1 -1
  80. package/dist/components/core/list/SolidListViewHeaderContextMenuButton.js +3 -1
  81. package/dist/components/core/list/SolidListViewHeaderContextMenuButton.js.map +1 -1
  82. package/dist/components/core/list/SolidListViewHeaderContextMenuButton.tsx +3 -1
  83. package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
  84. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +7 -0
  85. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
  86. package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +5 -0
  87. package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -1
  88. package/dist/components/core/list/columns/SolidMediaSingleColumn.js +3 -0
  89. package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
  90. package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +2 -0
  91. package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.d.ts.map +1 -1
  92. package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js +3 -0
  93. package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js.map +1 -1
  94. package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +2 -0
  95. package/dist/components/core/model/CreateModel.css +10 -0
  96. package/dist/components/core/model/FieldMetaDataForm.css +10 -0
  97. package/dist/components/core/model/FieldMetaDataForm.js +8 -8
  98. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  99. package/dist/components/core/model/FieldMetaDataForm.tsx +13 -13
  100. package/dist/components/core/module/ModuleMetadataExplorer.css +23 -0
  101. package/dist/components/core/module/ModuleMetadataExplorer.d.ts.map +1 -1
  102. package/dist/components/core/module/ModuleMetadataExplorer.js +1 -1
  103. package/dist/components/core/module/ModuleMetadataExplorer.js.map +1 -1
  104. package/dist/components/core/module/ModuleMetadataExplorer.tsx +9 -0
  105. package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
  106. package/dist/components/core/tree/SolidTreeView.js +249 -138
  107. package/dist/components/core/tree/SolidTreeView.js.map +1 -1
  108. package/dist/components/core/tree/SolidTreeView.tsx +220 -92
  109. package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.d.ts.map +1 -1
  110. package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.js +1 -1
  111. package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.js.map +1 -1
  112. package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.tsx +1 -0
  113. package/dist/components/layout/AdminHeaderActions.js +6 -13
  114. package/dist/components/layout/AdminHeaderActions.js.map +1 -1
  115. package/dist/components/layout/AdminHeaderActions.tsx +11 -11
  116. package/dist/components/layout/AdminLayout.d.ts.map +1 -1
  117. package/dist/components/layout/AdminLayout.js +2 -2
  118. package/dist/components/layout/AdminLayout.js.map +1 -1
  119. package/dist/components/layout/AdminLayout.tsx +5 -4
  120. package/dist/components/layout/AppSidebar.d.ts.map +1 -1
  121. package/dist/components/layout/AppSidebar.js +17 -2
  122. package/dist/components/layout/AppSidebar.js.map +1 -1
  123. package/dist/components/layout/AppSidebar.tsx +21 -2
  124. package/dist/components/shad-cn-ui/SolidDatePicker.d.ts +1 -1
  125. package/dist/components/shad-cn-ui/SolidDatePicker.d.ts.map +1 -1
  126. package/dist/components/shad-cn-ui/SolidDatePicker.js +35 -3
  127. package/dist/components/shad-cn-ui/SolidDatePicker.js.map +1 -1
  128. package/dist/components/shad-cn-ui/SolidDatePicker.tsx +84 -0
  129. package/dist/components/shad-cn-ui/SolidTooltip.d.ts.map +1 -1
  130. package/dist/components/shad-cn-ui/SolidTooltip.js +55 -2
  131. package/dist/components/shad-cn-ui/SolidTooltip.js.map +1 -1
  132. package/dist/components/shad-cn-ui/SolidTooltip.tsx +95 -1
  133. package/dist/helpers/downloadMediaFile.d.ts.map +1 -1
  134. package/dist/helpers/downloadMediaFile.js +80 -5
  135. package/dist/helpers/downloadMediaFile.js.map +1 -1
  136. package/dist/helpers/downloadMediaFile.tsx +33 -6
  137. package/dist/resources/globals.css +109 -1
  138. package/dist/resources/solid-custom.css +53 -3
  139. package/dist/resources/solid-tailwind-generated.css +1 -1
  140. package/dist/routes/pages/admin/core/DashboardPage.d.ts.map +1 -1
  141. package/dist/routes/pages/admin/core/DashboardPage.js +2 -2
  142. package/dist/routes/pages/admin/core/DashboardPage.js.map +1 -1
  143. package/dist/routes/pages/admin/core/DashboardPage.tsx +2 -0
  144. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
  145. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +1 -1
  146. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
  147. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +1 -0
  148. package/dist/types/css-modules.d.ts +2 -0
  149. package/package.json +1 -1
@@ -3198,7 +3198,7 @@ const FieldMetaDataForm = ({
3198
3198
  <div className="mt-1 flex flex-wrap -mx-2 -mt-2 md:mt-0">
3199
3199
  {currentFields.includes("required") && (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && (
3200
3200
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3201
- <div className="flex items-center">
3201
+ <div className="solid-field-checkbox-row">
3202
3202
  <SolidCheckbox
3203
3203
  id="required"
3204
3204
  name="required"
@@ -3210,7 +3210,7 @@ const FieldMetaDataForm = ({
3210
3210
  checked={formik.values.required}
3211
3211
  disabled={formik.values.isPrimaryKey || formik.values.unique}
3212
3212
  />
3213
- <label htmlFor="required" className={classNames("form-field-label", styles.fieldLabel, "ml-2")}>
3213
+ <label htmlFor="required" className={classNames("form-field-label", styles.fieldLabel)}>
3214
3214
  Required {formik.values.isPrimaryKey && "(Auto-enabled for Primary Key)"}
3215
3215
  {!formik.values.isPrimaryKey && formik.values.unique && "(Auto-enabled for Unique)"}
3216
3216
  </label>
@@ -3224,7 +3224,7 @@ const FieldMetaDataForm = ({
3224
3224
  )}
3225
3225
  {currentFields.includes("unique") && selectedTypeValue !== 'relation' && (
3226
3226
  <div className="field flex w-1/2 flex-col gap-2 px-2 pt-2">
3227
- <div className="flex items-center">
3227
+ <div className="solid-field-checkbox-row">
3228
3228
  <SolidCheckbox
3229
3229
  id="unique"
3230
3230
  name="unique"
@@ -3245,7 +3245,7 @@ const FieldMetaDataForm = ({
3245
3245
  checked={formik.values.unique}
3246
3246
  disabled={formik.values.isPrimaryKey}
3247
3247
  />
3248
- <label htmlFor="unique" className={classNames("form-field-label", styles.fieldLabel, "ml-2")}>
3248
+ <label htmlFor="unique" className={classNames("form-field-label", styles.fieldLabel)}>
3249
3249
  Unique {formik.values.isPrimaryKey && "(Auto-enabled for Primary Key)"}
3250
3250
  </label>
3251
3251
  </div>
@@ -3258,7 +3258,7 @@ const FieldMetaDataForm = ({
3258
3258
  )}
3259
3259
  {currentFields.includes("index") && selectedTypeValue !== 'relation' && (
3260
3260
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3261
- <div className="flex items-center">
3261
+ <div className="solid-field-checkbox-row">
3262
3262
  <SolidCheckbox
3263
3263
  id="index"
3264
3264
  name="index"
@@ -3267,7 +3267,7 @@ const FieldMetaDataForm = ({
3267
3267
  }}
3268
3268
  checked={formik.values.index}
3269
3269
  />
3270
- <label htmlFor="index" className={classNames("form-field-label", styles.fieldLabel, "ml-2")}>
3270
+ <label htmlFor="index" className={classNames("form-field-label", styles.fieldLabel)}>
3271
3271
  Index
3272
3272
  </label>
3273
3273
  </div>
@@ -3278,7 +3278,7 @@ const FieldMetaDataForm = ({
3278
3278
  )}
3279
3279
  {currentFields.includes("private") && selectedTypeValue !== 'relation' && (
3280
3280
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3281
- <div className="flex items-center">
3281
+ <div className="solid-field-checkbox-row">
3282
3282
  <SolidCheckbox
3283
3283
  id="private"
3284
3284
  name="private"
@@ -3287,7 +3287,7 @@ const FieldMetaDataForm = ({
3287
3287
  }}
3288
3288
  checked={formik.values.private}
3289
3289
  />
3290
- <label htmlFor="private" className={classNames("form-field-label", styles.fieldLabel, "ml-2")}>
3290
+ <label htmlFor="private" className={classNames("form-field-label", styles.fieldLabel)}>
3291
3291
  Private
3292
3292
  </label>
3293
3293
  </div>
@@ -3301,7 +3301,7 @@ const FieldMetaDataForm = ({
3301
3301
  )}
3302
3302
  {currentFields.includes("encrypt") && selectedTypeValue !== 'relation' && (
3303
3303
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3304
- <div className="flex items-center gap-2">
3304
+ <div className="solid-field-checkbox-row">
3305
3305
  <SolidCheckbox
3306
3306
  id="encrypt"
3307
3307
  name="encrypt"
@@ -3322,7 +3322,7 @@ const FieldMetaDataForm = ({
3322
3322
  )}
3323
3323
  {currentFields.includes("isMultiSelect") && (
3324
3324
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3325
- <div className="flex items-center">
3325
+ <div className="solid-field-checkbox-row">
3326
3326
  <SolidCheckbox
3327
3327
  id="isMultiSelect"
3328
3328
  name="isMultiSelect"
@@ -3331,7 +3331,7 @@ const FieldMetaDataForm = ({
3331
3331
  }}
3332
3332
  checked={formik.values.isMultiSelect}
3333
3333
  />
3334
- <label htmlFor="isMultiSelect" className={classNames("form-field-label", styles.fieldLabel, "ml-2")}>
3334
+ <label htmlFor="isMultiSelect" className={classNames("form-field-label", styles.fieldLabel)}>
3335
3335
  Is MultiSelect
3336
3336
  </label>
3337
3337
  </div>
@@ -3342,7 +3342,7 @@ const FieldMetaDataForm = ({
3342
3342
  )}
3343
3343
  {currentFields.includes("enableAuditTracking") && formik.values.relationType !== "one-to-many" && (
3344
3344
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3345
- <div className="flex items-center gap-2">
3345
+ <div className="solid-field-checkbox-row">
3346
3346
  <SolidCheckbox
3347
3347
  id="enableAuditTracking"
3348
3348
  name="enableAuditTracking"
@@ -3364,7 +3364,7 @@ const FieldMetaDataForm = ({
3364
3364
  )}
3365
3365
  {currentFields.includes("isUserKey") && formik.values.unique && (
3366
3366
  <div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
3367
- <div className="flex items-center gap-2">
3367
+ <div className="solid-field-checkbox-row">
3368
3368
  <SolidCheckbox
3369
3369
  id="isUserKey"
3370
3370
  name="isUserKey"
@@ -258,6 +258,7 @@
258
258
  gap: 1rem;
259
259
  padding: 0.65rem 0.9rem 0.55rem;
260
260
  border-bottom: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
261
+ flex-wrap: wrap;
261
262
  }
262
263
 
263
264
  .solid-module-explorer-main-title {
@@ -324,6 +325,21 @@
324
325
  justify-content: flex-end;
325
326
  }
326
327
 
328
+ .solid-module-explorer-field-name-note {
329
+ margin: 0.75rem 0.9rem 0;
330
+ padding: 0.65rem 0.75rem;
331
+ border: 1px solid color-mix(in srgb, #d97706 28%, transparent);
332
+ border-radius: 0.7rem;
333
+ background: color-mix(in srgb, #f59e0b 9%, var(--surface-card, #fff));
334
+ color: color-mix(in srgb, #b45309 82%, var(--foreground));
335
+ font-size: 0.8rem;
336
+ line-height: 1.45;
337
+ }
338
+
339
+ .solid-module-explorer-field-name-note strong {
340
+ font-weight: 700;
341
+ }
342
+
327
343
  .solid-module-explorer-actions-menu {
328
344
  min-width: 11rem;
329
345
  }
@@ -663,3 +679,10 @@
663
679
  display: none;
664
680
  }
665
681
  }
682
+
683
+
684
+ @media (max-width: 640px) {
685
+ .solid-module-explorer-main-actions{
686
+ gap: 0;
687
+ }
688
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleMetadataExplorer.d.ts","sourceRoot":"","sources":["../../../../src/components/core/module/ModuleMetadataExplorer.tsx"],"names":[],"mappings":"AA2BA,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AAEtC,KAAK,2BAA2B,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AA4YF,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,QAAgB,EAChB,SAAgB,GACjB,EAAE,2BAA2B,kDA4iB7B"}
1
+ {"version":3,"file":"ModuleMetadataExplorer.d.ts","sourceRoot":"","sources":["../../../../src/components/core/module/ModuleMetadataExplorer.tsx"],"names":[],"mappings":"AA2BA,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AAEtC,KAAK,2BAA2B,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AA4YF,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,QAAgB,EAChB,SAAgB,GACjB,EAAE,2BAA2B,kDAqjB7B"}
@@ -661,6 +661,6 @@ export function ModuleMetadataExplorer(_a) {
661
661
  if (!moduleName) {
662
662
  return null;
663
663
  }
664
- return (_jsxs("div", { className: "solid-module-explorer", children: [_jsxs("div", { className: "solid-module-explorer-panel", children: [loadError && (_jsx("div", { className: "solid-module-explorer-alert", children: _jsx(SolidMessage, { severity: "error", text: "Unable to load metadata explorer: ".concat(extractApiErrorMessage(loadError)), className: "justify-start" }) })), _jsxs("div", { ref: explorerRef, className: "solid-module-explorer-workspace", style: { gridTemplateColumns: "".concat(sidebarWidth, "px 8px minmax(0, 1fr)") }, children: [_jsx("aside", { className: "solid-module-explorer-sidebar", children: _jsxs("div", { className: "solid-module-explorer-sidebar-section solid-module-explorer-sidebar-sections", children: [_jsxs("div", { className: "solid-module-explorer-sidebar-heading", children: [_jsxs("div", { className: "solid-module-explorer-sidebar-heading-main", children: [_jsx("div", { className: "solid-module-explorer-sidebar-title", children: modelSingularName ? "Explorer" : "Sections" }), _jsx(SolidTag, { tone: "info", children: modelSingularName ? scopedTreeNodes.length : sections.length })] }), _jsx("button", { type: "button", className: "solid-module-explorer-sidebar-action", onClick: handleCollapseAll, children: "Collapse all" })] }), _jsxs("div", { className: "solid-module-explorer-sidebar-search", children: [_jsx(SolidInput, { value: treeFilter, onChange: function (event) { return setTreeFilter(event.target.value); }, placeholder: "Search metadata tree" }), _jsx("div", { className: "solid-module-explorer-sidebar-search-icon", children: _jsx(Search, { size: 14 }) })] }), _jsx("div", { className: "solid-module-explorer-section-list solid-module-explorer-tree-list", children: _jsx(MetadataTree, { nodes: filteredTreeNodes, activePath: activePath, expandedPaths: visibleExpandedPaths, onToggle: toggleExpandedPath, onSelect: selectPath }) })] }) }), _jsx("div", { className: "solid-module-explorer-resizer", role: "separator", "aria-orientation": "vertical", "aria-label": "Resize metadata navigation panel", onPointerDown: handleSidebarResizeStart }), _jsxs("section", { className: "solid-module-explorer-main", children: [_jsxs("div", { className: "solid-module-explorer-main-header", children: [_jsxs("div", { className: "solid-module-explorer-main-title", children: [_jsxs("div", { className: "solid-module-explorer-main-heading-row", children: [_jsx("h4", { children: (_j = (_h = activeNode === null || activeNode === void 0 ? void 0 : activeNode.label) !== null && _h !== void 0 ? _h : activeSection === null || activeSection === void 0 ? void 0 : activeSection.title) !== null && _j !== void 0 ? _j : "Metadata" }), _jsx("p", { children: activePath || "Choose a metadata node from the tree." })] }), hasValidationFailure && (_jsx("div", { className: "solid-module-explorer-inline-validation", title: validationSummary, children: validationSummary })), isReadOnlyExplorer && (_jsx("div", { className: "solid-module-explorer-readonly-note", children: "This metadata is browse-only in the explorer." }))] }), _jsxs("div", { className: "solid-module-explorer-main-actions", children: [_jsxs("div", { className: "solid-module-explorer-main-meta", children: [hasMutableChanges && _jsx(SolidTag, { tone: "warn", children: "Unsaved changes" }), editorError && _jsx(SolidTag, { tone: "danger", children: "Invalid JSON" }), isReadOnlyExplorer && _jsx(SolidTag, { tone: "info", children: "Read only" })] }), !isReadOnlyExplorer && (_jsx(SolidButton, { size: "sm", leftIcon: _jsx(Save, { size: 14 }), onClick: handleSave, loading: isSavingSection, disabled: !canSave, children: "Save Section" })), _jsxs(SolidDropdownMenu, { children: [_jsx(SolidDropdownMenuTrigger, { asChild: true, children: _jsx(SolidButton, { variant: "ghost", size: "sm", className: "solid-icon-button", "aria-label": "Explorer actions", children: _jsx(Settings, { size: 16 }) }) }), _jsxs(SolidDropdownMenuContent, { className: "solid-module-explorer-actions-menu", children: [!isReadOnlyExplorer && (_jsx(SolidDropdownMenuItem, { onSelect: handleFormat, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(Wand2, { size: 14 }), _jsx("span", { children: "Format" })] }) })), _jsx(SolidDropdownMenuItem, { onSelect: handleValidate, disabled: isValidatingSection, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(FileSearch, { size: 14 }), _jsx("span", { children: isValidatingSection ? "Validating..." : "Validate" })] }) }), _jsx(SolidDropdownMenuItem, { onSelect: function () { return setIsContextDialogOpen(true); }, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(Settings, { size: 14 }), _jsx("span", { children: "Context" })] }) }), allowSeed && (_jsx(SolidDropdownMenuItem, { onSelect: function () { return setIsSeedDialogOpen(true); }, disabled: !moduleId || isSeedingModule, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(DatabaseZap, { size: 14 }), _jsx("span", { children: isSeedingModule ? "Seeding..." : "Seed" })] }) }))] })] })] })] }), _jsx("div", { className: "solid-module-explorer-editor-wrap", children: _jsx("div", { className: "solid-module-explorer-editor-shell", children: isDocumentLoading ? (_jsx("div", { style: { padding: "1rem" }, className: "solid-module-explorer-empty", children: "Loading metadata JSON..." })) : (_jsx(JsonEditorSurface, { ref: editorRef, value: savedValue, resetToken: editorResetToken, readOnly: isReadOnlyExplorer, onValueChange: setEditorValue, onErrorChange: setEditorError })) }) })] })] })] }), _jsxs(SolidDialog, { open: isContextDialogOpen, onOpenChange: setIsContextDialogOpen, header: "Context", contentClassName: "solid-module-explorer-context-dialog", children: [_jsx(SolidDialogSeparator, {}), _jsx(SolidDialogBody, { children: _jsxs("div", { className: "solid-module-explorer-context-dialog-body", children: [_jsxs("div", { className: "solid-module-explorer-context-dialog-header", children: [_jsx("div", { className: "solid-module-explorer-context-dialog-title", children: (_k = activeNode === null || activeNode === void 0 ? void 0 : activeNode.label) !== null && _k !== void 0 ? _k : "Metadata node" }), _jsx("div", { className: "solid-module-explorer-context-dialog-meta", children: (activeNode === null || activeNode === void 0 ? void 0 : activeNode.sectionTitle) && _jsx(SolidTag, { tone: "info", children: activeNode.sectionTitle }) })] }), _jsxs("div", { className: "solid-module-explorer-context-grid", children: [_jsxs("div", { className: "solid-module-explorer-context-row", children: [_jsx("div", { className: "solid-module-explorer-context-label", children: "JSON Path" }), _jsx("div", { className: "solid-module-explorer-context-value", children: activePath || "-" })] }), _jsxs("div", { className: "solid-module-explorer-context-row", children: [_jsx("div", { className: "solid-module-explorer-context-label", children: "File" }), _jsx("div", { className: "solid-module-explorer-context-value", children: (_l = manifestData === null || manifestData === void 0 ? void 0 : manifestData.filePath) !== null && _l !== void 0 ? _l : "-" })] }), localActionSummary && (_jsxs("div", { className: "solid-module-explorer-context-row", children: [_jsx("div", { className: "solid-module-explorer-context-label", children: "Last Action" }), _jsx("div", { className: "solid-module-explorer-context-value", children: localActionSummary })] }))] }), _jsx("div", { className: "solid-module-explorer-context-note", children: "Clicking any branch or leaf in the tree opens that exact JSON fragment on the right." })] }) })] }), _jsxs(SolidDialog, { open: isSeedDialogOpen, onOpenChange: setIsSeedDialogOpen, contentClassName: "solid-module-explorer-seed-dialog", children: [_jsx(SolidDialogHeader, { children: _jsx(SolidDialogTitle, { children: "Seed Module Metadata" }) }), _jsx(SolidDialogSeparator, {}), _jsx(SolidDialogBody, { children: _jsxs("div", { className: "solid-module-explorer-seed-dialog-body", children: [_jsxs("p", { children: ["Re-seed metadata for ", _jsx("strong", { children: moduleName }), " from its JSON file?"] }), _jsx("p", { className: "solid-module-explorer-seed-dialog-note", children: "This only re-runs metadata seeding for the current module and refreshes database metadata from the module JSON." })] }) }), _jsxs(SolidDialogFooter, { children: [_jsx(SolidButton, { variant: "outline", size: "sm", onClick: function () { return setIsSeedDialogOpen(false); }, disabled: isSeedingModule, children: "Cancel" }), _jsx(SolidButton, { size: "sm", onClick: handleSeedModule, loading: isSeedingModule, disabled: !moduleId, children: "Seed" })] })] })] }));
664
+ return (_jsxs("div", { className: "solid-module-explorer", children: [_jsxs("div", { className: "solid-module-explorer-panel", children: [loadError && (_jsx("div", { className: "solid-module-explorer-alert", children: _jsx(SolidMessage, { severity: "error", text: "Unable to load metadata explorer: ".concat(extractApiErrorMessage(loadError)), className: "justify-start" }) })), _jsxs("div", { ref: explorerRef, className: "solid-module-explorer-workspace", style: { gridTemplateColumns: "".concat(sidebarWidth, "px 8px minmax(0, 1fr)") }, children: [_jsx("aside", { className: "solid-module-explorer-sidebar", children: _jsxs("div", { className: "solid-module-explorer-sidebar-section solid-module-explorer-sidebar-sections", children: [_jsxs("div", { className: "solid-module-explorer-sidebar-heading", children: [_jsxs("div", { className: "solid-module-explorer-sidebar-heading-main", children: [_jsx("div", { className: "solid-module-explorer-sidebar-title", children: modelSingularName ? "Explorer" : "Sections" }), _jsx(SolidTag, { tone: "info", children: modelSingularName ? scopedTreeNodes.length : sections.length })] }), _jsx("button", { type: "button", className: "solid-module-explorer-sidebar-action", onClick: handleCollapseAll, children: "Collapse all" })] }), _jsxs("div", { className: "solid-module-explorer-sidebar-search", children: [_jsx(SolidInput, { value: treeFilter, onChange: function (event) { return setTreeFilter(event.target.value); }, placeholder: "Search metadata tree" }), _jsx("div", { className: "solid-module-explorer-sidebar-search-icon", children: _jsx(Search, { size: 14 }) })] }), _jsx("div", { className: "solid-module-explorer-section-list solid-module-explorer-tree-list", children: _jsx(MetadataTree, { nodes: filteredTreeNodes, activePath: activePath, expandedPaths: visibleExpandedPaths, onToggle: toggleExpandedPath, onSelect: selectPath }) })] }) }), _jsx("div", { className: "solid-module-explorer-resizer", role: "separator", "aria-orientation": "vertical", "aria-label": "Resize metadata navigation panel", onPointerDown: handleSidebarResizeStart }), _jsxs("section", { className: "solid-module-explorer-main", children: [_jsxs("div", { className: "solid-module-explorer-main-header", children: [_jsxs("div", { className: "solid-module-explorer-main-title", children: [_jsxs("div", { className: "solid-module-explorer-main-heading-row", children: [_jsx("h4", { children: (_j = (_h = activeNode === null || activeNode === void 0 ? void 0 : activeNode.label) !== null && _h !== void 0 ? _h : activeSection === null || activeSection === void 0 ? void 0 : activeSection.title) !== null && _j !== void 0 ? _j : "Metadata" }), _jsx("p", { children: activePath || "Choose a metadata node from the tree." })] }), hasValidationFailure && (_jsx("div", { className: "solid-module-explorer-inline-validation", title: validationSummary, children: validationSummary })), isReadOnlyExplorer && (_jsx("div", { className: "solid-module-explorer-readonly-note", children: "This metadata is browse-only in the explorer." }))] }), _jsxs("div", { className: "solid-module-explorer-main-actions", children: [_jsxs("div", { className: "solid-module-explorer-main-meta", children: [hasMutableChanges && _jsx(SolidTag, { tone: "warn", children: "Unsaved changes" }), editorError && _jsx(SolidTag, { tone: "danger", children: "Invalid JSON" }), isReadOnlyExplorer && _jsx(SolidTag, { tone: "info", children: "Read only" })] }), !isReadOnlyExplorer && (_jsx(SolidButton, { size: "sm", leftIcon: _jsx(Save, { size: 14 }), onClick: handleSave, loading: isSavingSection, disabled: !canSave, children: "Save Section" })), _jsxs(SolidDropdownMenu, { children: [_jsx(SolidDropdownMenuTrigger, { asChild: true, children: _jsx(SolidButton, { variant: "ghost", size: "sm", className: "solid-icon-button", "aria-label": "Explorer actions", children: _jsx(Settings, { size: 16 }) }) }), _jsxs(SolidDropdownMenuContent, { className: "solid-module-explorer-actions-menu", children: [!isReadOnlyExplorer && (_jsx(SolidDropdownMenuItem, { onSelect: handleFormat, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(Wand2, { size: 14 }), _jsx("span", { children: "Format" })] }) })), _jsx(SolidDropdownMenuItem, { onSelect: handleValidate, disabled: isValidatingSection, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(FileSearch, { size: 14 }), _jsx("span", { children: isValidatingSection ? "Validating..." : "Validate" })] }) }), _jsx(SolidDropdownMenuItem, { onSelect: function () { return setIsContextDialogOpen(true); }, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(Settings, { size: 14 }), _jsx("span", { children: "Context" })] }) }), allowSeed && (_jsx(SolidDropdownMenuItem, { onSelect: function () { return setIsSeedDialogOpen(true); }, disabled: !moduleId || isSeedingModule, children: _jsxs("div", { className: "solid-module-explorer-actions-item", children: [_jsx(DatabaseZap, { size: 14 }), _jsx("span", { children: isSeedingModule ? "Seeding..." : "Seed" })] }) }))] })] })] })] }), _jsxs("div", { className: "solid-module-explorer-field-name-note", role: "note", children: [_jsx("strong", { children: "Important:" }), " ", "Do not rename a field directly. To change a field name, delete the existing field, save the section, validate the generated code, and then create a new field with the required name. Direct renaming can cause serious metadata and code generation issues."] }), _jsx("div", { className: "solid-module-explorer-editor-wrap", children: _jsx("div", { className: "solid-module-explorer-editor-shell", children: isDocumentLoading ? (_jsx("div", { style: { padding: "1rem" }, className: "solid-module-explorer-empty", children: "Loading metadata JSON..." })) : (_jsx(JsonEditorSurface, { ref: editorRef, value: savedValue, resetToken: editorResetToken, readOnly: isReadOnlyExplorer, onValueChange: setEditorValue, onErrorChange: setEditorError })) }) })] })] })] }), _jsxs(SolidDialog, { open: isContextDialogOpen, onOpenChange: setIsContextDialogOpen, header: "Context", contentClassName: "solid-module-explorer-context-dialog", children: [_jsx(SolidDialogSeparator, {}), _jsx(SolidDialogBody, { children: _jsxs("div", { className: "solid-module-explorer-context-dialog-body", children: [_jsxs("div", { className: "solid-module-explorer-context-dialog-header", children: [_jsx("div", { className: "solid-module-explorer-context-dialog-title", children: (_k = activeNode === null || activeNode === void 0 ? void 0 : activeNode.label) !== null && _k !== void 0 ? _k : "Metadata node" }), _jsx("div", { className: "solid-module-explorer-context-dialog-meta", children: (activeNode === null || activeNode === void 0 ? void 0 : activeNode.sectionTitle) && _jsx(SolidTag, { tone: "info", children: activeNode.sectionTitle }) })] }), _jsxs("div", { className: "solid-module-explorer-context-grid", children: [_jsxs("div", { className: "solid-module-explorer-context-row", children: [_jsx("div", { className: "solid-module-explorer-context-label", children: "JSON Path" }), _jsx("div", { className: "solid-module-explorer-context-value", children: activePath || "-" })] }), _jsxs("div", { className: "solid-module-explorer-context-row", children: [_jsx("div", { className: "solid-module-explorer-context-label", children: "File" }), _jsx("div", { className: "solid-module-explorer-context-value", children: (_l = manifestData === null || manifestData === void 0 ? void 0 : manifestData.filePath) !== null && _l !== void 0 ? _l : "-" })] }), localActionSummary && (_jsxs("div", { className: "solid-module-explorer-context-row", children: [_jsx("div", { className: "solid-module-explorer-context-label", children: "Last Action" }), _jsx("div", { className: "solid-module-explorer-context-value", children: localActionSummary })] }))] }), _jsx("div", { className: "solid-module-explorer-context-note", children: "Clicking any branch or leaf in the tree opens that exact JSON fragment on the right." })] }) })] }), _jsxs(SolidDialog, { open: isSeedDialogOpen, onOpenChange: setIsSeedDialogOpen, contentClassName: "solid-module-explorer-seed-dialog", children: [_jsx(SolidDialogHeader, { children: _jsx(SolidDialogTitle, { children: "Seed Module Metadata" }) }), _jsx(SolidDialogSeparator, {}), _jsx(SolidDialogBody, { children: _jsxs("div", { className: "solid-module-explorer-seed-dialog-body", children: [_jsxs("p", { children: ["Re-seed metadata for ", _jsx("strong", { children: moduleName }), " from its JSON file?"] }), _jsx("p", { className: "solid-module-explorer-seed-dialog-note", children: "This only re-runs metadata seeding for the current module and refreshes database metadata from the module JSON." })] }) }), _jsxs(SolidDialogFooter, { children: [_jsx(SolidButton, { variant: "outline", size: "sm", onClick: function () { return setIsSeedDialogOpen(false); }, disabled: isSeedingModule, children: "Cancel" }), _jsx(SolidButton, { size: "sm", onClick: handleSeedModule, loading: isSeedingModule, disabled: !moduleId, children: "Seed" })] })] })] }));
665
665
  }
666
666
  //# sourceMappingURL=ModuleMetadataExplorer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleMetadataExplorer.js","sourceRoot":"","sources":["../../../../src/components/core/module/ModuleMetadataExplorer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,yCAAyC,EACzC,yCAAyC,EACzC,6BAA6B,EAC7B,8CAA8C,EAC9C,gDAAgD,GACjD,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AAyCtC,SAAS,sBAAsB,CAAC,KAAU;;IACxC,IAAM,OAAO,GAAG,MAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0C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AS,EAAC,mCAAmC,aAChD,cAAK,SAAS,EAAC,qCAAqC,4BAAkB,EACtE,cAAK,SAAS,EAAC,qCAAqC,YAAE,kBAAkB,GAAO,IAC3E,CACP,IACG,EAEN,cAAK,SAAS,EAAC,oCAAoC,qGAE7C,IACF,GACU,IACN,EAEd,MAAC,WAAW,IACV,IAAI,EAAE,gBAAgB,EACtB,YAAY,EAAE,mBAAmB,EACjC,gBAAgB,EAAC,mCAAmC,aAEpD,KAAC,iBAAiB,cAChB,KAAC,gBAAgB,uCAAwC,GACvC,EACpB,KAAC,oBAAoB,KAAG,EACxB,KAAC,eAAe,cACd,eAAK,SAAS,EAAC,wCAAwC,aACrD,iDACuB,2BAAS,UAAU,GAAU,4BAChD,EACJ,YAAG,SAAS,EAAC,wCAAwC,gIAEjD,IACA,GACU,EAClB,MAAC,iBAAiB,eAChB,KAAC,WAAW,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,cAAM,OAAA,mBAAmB,CAAC,KAAK,CAAC,EAA1B,CAA0B,EAAE,QAAQ,EAAE,eAAe,uBAE/F,EACd,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,QAAQ,qBAEjF,IACI,IACR,IACV,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { ChevronDown, ChevronRight, DatabaseZap, FileSearch, Save, Search, Settings, Wand2 } from \"lucide-react\";\nimport React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport {\n useGetModuleMetadataExplorerDocumentQuery,\n useGetModuleMetadataExplorerManifestQuery,\n useSeedModuleMetadataMutation,\n useUpdateModuleMetadataExplorerSectionMutation,\n useValidateModuleMetadataExplorerSectionMutation,\n} from \"../../../redux/api/moduleApi\";\nimport { showToast } from \"../../../redux/features/toastSlice\";\nimport {\n SolidButton,\n SolidDialog,\n SolidDialogBody,\n SolidDialogFooter,\n SolidDialogHeader,\n SolidDialogSeparator,\n SolidDialogTitle,\n SolidDropdownMenu,\n SolidDropdownMenuContent,\n SolidDropdownMenuItem,\n SolidDropdownMenuTrigger,\n SolidInput,\n SolidMessage,\n SolidTag,\n} from \"../../shad-cn-ui\";\nimport \"jsoneditor/dist/jsoneditor.css\";\nimport \"./ModuleMetadataExplorer.css\";\n\ntype ModuleMetadataExplorerProps = {\n moduleName?: string;\n moduleId?: number;\n modelSingularName?: string;\n scopedArrayPath?: string;\n scopedItemValue?: string;\n scopedItemField?: string;\n readOnly?: boolean;\n allowSeed?: boolean;\n};\n\ntype MetadataIssue = {\n path: string;\n message: string;\n severity: \"error\" | \"warning\";\n};\n\ntype ExplorerSectionDefinition = {\n key: string;\n title: string;\n jsonPath: string;\n type: \"object\" | \"array\";\n description: string;\n};\n\ntype ExplorerTreeNode = {\n id: string;\n label: string;\n path: string;\n parentPath: string | null;\n sectionKey: string;\n sectionTitle: string;\n children: ExplorerTreeNode[];\n};\n\ntype JsonEditorHandle = {\n format: () => void;\n};\n\nfunction extractApiErrorMessage(error: any) {\n const message = error?.data?.message ?? error?.message ?? \"Something went wrong\";\n return Array.isArray(message) ? message.join(\", \") : String(message);\n}\n\nfunction serializeJson(value: any) {\n try {\n return JSON.stringify(value);\n } catch (_error) {\n return \"\";\n }\n}\n\nfunction deepCloneJson<T>(value: T): T {\n return JSON.parse(JSON.stringify(value));\n}\n\nfunction humanizeKey(value: string) {\n return value\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/[_-]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim()\n .replace(/^./, (char) => char.toUpperCase());\n}\n\nfunction tokenizePath(path: string) {\n const tokens: Array<string | number> = [];\n const regex = /([^[.\\]]+)|\\[(\\d+)\\]/g;\n let match: RegExpExecArray | null;\n while ((match = regex.exec(path)) !== null) {\n if (match[1] !== undefined) {\n tokens.push(match[1]);\n } else if (match[2] !== undefined) {\n tokens.push(Number(match[2]));\n }\n }\n return tokens;\n}\n\nfunction getValueAtJsonPath(source: any, path: string) {\n if (!path) return source;\n return tokenizePath(path).reduce((current, token) => {\n if (current === undefined || current === null) return undefined;\n return current[token as keyof typeof current];\n }, source);\n}\n\nfunction setValueAtJsonPath(target: any, path: string, value: any) {\n const tokens = tokenizePath(path);\n if (!tokens.length) return;\n\n let current = target;\n for (let index = 0; index < tokens.length - 1; index += 1) {\n current = current[tokens[index] as keyof typeof current];\n }\n\n current[tokens[tokens.length - 1] as keyof typeof current] = value;\n}\n\nfunction appendPath(basePath: string, key: string) {\n return basePath ? `${basePath}.${key}` : key;\n}\n\nfunction getArrayItemLabel(item: any, index: number, parentKey: string) {\n const labelCandidates = [\n \"singularName\",\n \"name\",\n \"displayName\",\n \"pluralName\",\n \"label\",\n \"key\",\n \"title\",\n \"id\",\n ];\n\n for (const candidate of labelCandidates) {\n const nextValue = item?.[candidate];\n if (nextValue !== undefined && nextValue !== null && `${nextValue}`.trim()) {\n return `${nextValue}`;\n }\n }\n\n return `${humanizeKey(parentKey || \"Item\")} ${index + 1}`;\n}\n\nfunction buildTreeNode(\n value: any,\n options: {\n label: string;\n path: string;\n parentPath: string | null;\n sectionKey: string;\n sectionTitle: string;\n hintKey: string;\n },\n): ExplorerTreeNode {\n const { label, path, parentPath, sectionKey, sectionTitle, hintKey } = options;\n\n let children: ExplorerTreeNode[] = [];\n\n if (Array.isArray(value)) {\n children = value\n .filter((item) => item !== null && typeof item === \"object\")\n .map((item, index) => buildTreeNode(item, {\n label: getArrayItemLabel(item, index, hintKey),\n path: `${path}[${index}]`,\n parentPath: path,\n sectionKey,\n sectionTitle,\n hintKey,\n }));\n } else if (value && typeof value === \"object\") {\n children = Object.entries(value)\n .filter(([, nextValue]) => nextValue !== null && typeof nextValue === \"object\")\n .map(([key, nextValue]) => buildTreeNode(nextValue, {\n label: humanizeKey(key),\n path: appendPath(path, key),\n parentPath: path,\n sectionKey,\n sectionTitle,\n hintKey: key,\n }));\n }\n\n return {\n id: path,\n label,\n path,\n parentPath,\n sectionKey,\n sectionTitle,\n children,\n };\n}\n\nfunction buildTreeFromDocument(sections: ExplorerSectionDefinition[], documentValue: any) {\n const nodes = sections\n .map((section) => {\n const sectionValue = getValueAtJsonPath(documentValue, section.jsonPath);\n if (sectionValue === undefined) return null;\n return buildTreeNode(sectionValue, {\n label: section.title,\n path: section.jsonPath,\n parentPath: null,\n sectionKey: section.key,\n sectionTitle: section.title,\n hintKey: section.key,\n });\n })\n .filter(Boolean) as ExplorerTreeNode[];\n\n const nodeMap = new Map<string, ExplorerTreeNode>();\n const visit = (nextNodes: ExplorerTreeNode[]) => {\n nextNodes.forEach((node) => {\n nodeMap.set(node.path, node);\n if (node.children.length) visit(node.children);\n });\n };\n visit(nodes);\n\n return { nodes, nodeMap };\n}\n\nfunction filterTreeNodes(nodes: ExplorerTreeNode[], query: string): ExplorerTreeNode[] {\n const needle = query.trim().toLowerCase();\n if (!needle) return nodes;\n\n const visit = (node: ExplorerTreeNode): ExplorerTreeNode | null => {\n const filteredChildren = node.children\n .map(visit)\n .filter(Boolean) as ExplorerTreeNode[];\n const matches = node.label.toLowerCase().includes(needle) || node.path.toLowerCase().includes(needle);\n\n if (matches || filteredChildren.length) {\n return { ...node, children: filteredChildren };\n }\n\n return null;\n };\n\n return nodes.map(visit).filter(Boolean) as ExplorerTreeNode[];\n}\n\nfunction getAncestorPaths(nodeMap: Map<string, ExplorerTreeNode>, path: string) {\n const paths: string[] = [];\n let current = nodeMap.get(path);\n\n while (current?.parentPath) {\n paths.push(current.parentPath);\n current = nodeMap.get(current.parentPath);\n }\n\n return paths;\n}\n\nfunction getSectionForPath(sections: ExplorerSectionDefinition[], path: string) {\n return sections\n .filter((section) => path === section.jsonPath || path.startsWith(`${section.jsonPath}.`) || path.startsWith(`${section.jsonPath}[`))\n .sort((left, right) => right.jsonPath.length - left.jsonPath.length)[0] ?? null;\n}\n\nfunction filterIssuesForPath(issues: MetadataIssue[], path: string) {\n return issues.filter((issue) => {\n if (!issue.path) return false;\n return issue.path === path || issue.path.startsWith(`${path}.`) || issue.path.startsWith(`${path}[`);\n });\n}\n\nconst JsonEditorSurface = React.forwardRef<JsonEditorHandle, {\n value: any;\n resetToken: string;\n readOnly?: boolean;\n onValueChange: (value: any) => void;\n onErrorChange: (message: string | null) => void;\n}>(function JsonEditorSurface({ value, resetToken, readOnly = false, onValueChange, onErrorChange }, ref) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const editorRef = useRef<any>(null);\n // Keep a ref to the latest value so the async init can seed the editor correctly\n const latestValueRef = useRef<any>(value);\n\n // Sync latest value into ref so async editor init can use it\n useEffect(() => { latestValueRef.current = value; }, [value]);\n\n const emitState = () => {\n const editor = editorRef.current;\n if (!editor) return;\n\n try {\n const nextValue = editor.get();\n onValueChange(nextValue);\n onErrorChange(null);\n } catch (error: any) {\n onErrorChange(error?.message ? String(error.message) : \"The JSON is currently invalid.\");\n }\n };\n\n useImperativeHandle(ref, () => ({\n format() {\n try {\n editorRef.current?.format?.();\n } catch (_error) {\n // jsoneditor already surfaces parse states through onErrorChange\n }\n emitState();\n },\n }), []);\n\n useEffect(() => {\n if (!containerRef.current || editorRef.current) return;\n\n let destroyed = false;\n\n // @ts-ignore\n void import(\"jsoneditor\").then((jsonEditorModule: any) => {\n if (destroyed || !containerRef.current || editorRef.current) {\n return;\n }\n\n const JSONEditor = jsonEditorModule?.default ?? jsonEditorModule;\n editorRef.current = new JSONEditor(containerRef.current, {\n mode: \"code\",\n modes: [\"code\"],\n mainMenuBar: true,\n navigationBar: true,\n statusBar: true,\n search: true,\n enableSort: false,\n enableTransform: false,\n onChange: () => emitState(),\n });\n\n // Seed editor with current value (which may already be set before async init resolved)\n try { editorRef.current.set(latestValueRef.current); } catch (_e) {}\n emitState();\n\n if (editorRef.current?.aceEditor?.setReadOnly) {\n editorRef.current.aceEditor.setReadOnly(readOnly);\n }\n });\n\n return () => {\n destroyed = true;\n editorRef.current?.destroy?.();\n editorRef.current = null;\n };\n }, []);\n\n useEffect(() => {\n if (!editorRef.current) return;\n editorRef.current.set(value);\n emitState();\n }, [resetToken, value]);\n\n useEffect(() => {\n if (!editorRef.current?.aceEditor?.setReadOnly) return;\n editorRef.current.aceEditor.setReadOnly(readOnly);\n }, [readOnly]);\n\n return <div ref={containerRef} className={`solid-module-explorer-editor-host solid-module-explorer-jsoneditor ${readOnly ? \"is-readonly\" : \"\"}`} />;\n});\n\nfunction MetadataTree({\n nodes,\n activePath,\n expandedPaths,\n onToggle,\n onSelect,\n depth = 0,\n}: {\n nodes: ExplorerTreeNode[];\n activePath: string;\n expandedPaths: Set<string>;\n onToggle: (path: string) => void;\n onSelect: (path: string) => void;\n depth?: number;\n}) {\n return (\n <>\n {nodes.map((node) => {\n const isExpanded = expandedPaths.has(node.path);\n const hasChildren = node.children.length > 0;\n const isActive = activePath === node.path;\n\n return (\n <div key={node.id} className=\"solid-module-explorer-tree-node\">\n <div\n className={`solid-module-explorer-tree-row ${isActive ? \"is-active\" : \"\"}`}\n style={{ paddingLeft: `${depth * 0.9}rem` }}\n >\n <button\n type=\"button\"\n className=\"solid-module-explorer-tree-toggle\"\n onClick={() => hasChildren && onToggle(node.path)}\n aria-label={hasChildren ? (isExpanded ? \"Collapse node\" : \"Expand node\") : \"Leaf node\"}\n disabled={!hasChildren}\n >\n {hasChildren ? (isExpanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />) : <span className=\"solid-module-explorer-tree-dot\" />}\n </button>\n <button\n type=\"button\"\n className=\"solid-module-explorer-tree-label\"\n onClick={() => onSelect(node.path)}\n title={node.path}\n >\n {node.label}\n </button>\n </div>\n\n {hasChildren && isExpanded && (\n <MetadataTree\n nodes={node.children}\n activePath={activePath}\n expandedPaths={expandedPaths}\n onToggle={onToggle}\n onSelect={onSelect}\n depth={depth + 1}\n />\n )}\n </div>\n );\n })}\n </>\n );\n}\n\nexport function ModuleMetadataExplorer({\n moduleName,\n moduleId,\n modelSingularName,\n scopedArrayPath,\n scopedItemValue,\n scopedItemField,\n readOnly = false,\n allowSeed = true,\n}: ModuleMetadataExplorerProps) {\n const dispatch = useDispatch();\n const editorRef = useRef<JsonEditorHandle | null>(null);\n const explorerRef = useRef<HTMLDivElement | null>(null);\n const isResizingRef = useRef(false);\n const [activePath, setActivePath] = useState(\"\");\n const [expandedPaths, setExpandedPaths] = useState<Set<string>>(new Set());\n const [treeFilter, setTreeFilter] = useState(\"\");\n const [sidebarWidth, setSidebarWidth] = useState(280);\n const [editorValue, setEditorValue] = useState<any>({});\n const [savedValue, setSavedValue] = useState<any>({});\n const [editorError, setEditorError] = useState<string | null>(null);\n const [editorResetToken, setEditorResetToken] = useState(\"initial\");\n const [validationIssues, setValidationIssues] = useState<MetadataIssue[] | null>(null);\n const [localActionSummary, setLocalActionSummary] = useState(\"\");\n const [isContextDialogOpen, setIsContextDialogOpen] = useState(false);\n const [isSeedDialogOpen, setIsSeedDialogOpen] = useState(false);\n\n const {\n data: manifestData,\n error: manifestError,\n refetch: refetchManifest,\n } = useGetModuleMetadataExplorerManifestQuery(moduleName as string, {\n skip: !moduleName,\n });\n\n const {\n data: documentData,\n isLoading: isDocumentLoading,\n error: documentError,\n refetch: refetchDocument,\n } = useGetModuleMetadataExplorerDocumentQuery(moduleName as string, {\n skip: !moduleName,\n });\n\n const [updateSection, { isLoading: isSavingSection }] = useUpdateModuleMetadataExplorerSectionMutation();\n const [validateSection, { isLoading: isValidatingSection }] = useValidateModuleMetadataExplorerSectionMutation();\n const [seedModuleMetadata, { isLoading: isSeedingModule }] = useSeedModuleMetadataMutation();\n const isReadOnlyExplorer = readOnly || moduleName?.toLowerCase() === \"solid-core\";\n\n const sections = (manifestData?.sections ?? []) as ExplorerSectionDefinition[];\n const fullDocument = documentData?.value ?? {};\n const loadError = !manifestData || !documentData ? (manifestError ?? documentError) : null;\n\n const { nodes: treeNodes, nodeMap } = useMemo(\n () => buildTreeFromDocument(sections, fullDocument),\n [sections, fullDocument],\n );\n\n const scopedRootPath = useMemo(() => {\n // Scope to a specific model definition\n if (modelSingularName) {\n const models = getValueAtJsonPath(fullDocument, \"moduleMetadata.models\");\n if (!Array.isArray(models)) return \"\";\n const modelIndex = models.findIndex((model) => model?.singularName === modelSingularName);\n return modelIndex >= 0 ? `moduleMetadata.models[${modelIndex}]` : \"\";\n }\n // Scope to a specific item in a root-level array (e.g. views, actions, menus)\n if (scopedArrayPath && scopedItemValue) {\n const arr = getValueAtJsonPath(fullDocument, scopedArrayPath);\n if (!Array.isArray(arr)) return \"\";\n const matchField = scopedItemField ?? \"name\";\n const itemIndex = arr.findIndex((item) => item?.[matchField] === scopedItemValue);\n return itemIndex >= 0 ? `${scopedArrayPath}[${itemIndex}]` : \"\";\n }\n return \"\";\n }, [fullDocument, modelSingularName, scopedArrayPath, scopedItemValue, scopedItemField]);\n\n const scopedTreeNodes = useMemo(() => {\n if (!scopedRootPath) return treeNodes;\n const scopedNode = nodeMap.get(scopedRootPath);\n return scopedNode ? [scopedNode] : [];\n }, [nodeMap, scopedRootPath, treeNodes]);\n\n const filteredTreeNodes = useMemo(\n () => filterTreeNodes(scopedTreeNodes, treeFilter),\n [scopedTreeNodes, treeFilter],\n );\n\n const visibleExpandedPaths = useMemo(() => {\n if (!treeFilter.trim()) return expandedPaths;\n const nextExpanded = new Set<string>();\n const visit = (nodesToVisit: ExplorerTreeNode[]) => {\n nodesToVisit.forEach((node) => {\n if (node.children.length) {\n nextExpanded.add(node.path);\n visit(node.children);\n }\n });\n };\n visit(filteredTreeNodes);\n return nextExpanded;\n }, [expandedPaths, filteredTreeNodes, treeFilter]);\n\n const activeNode = activePath ? nodeMap.get(activePath) ?? null : null;\n const activeSection = activePath ? getSectionForPath(sections, activePath) : null;\n const activeValidationIssues = filterIssuesForPath(validationIssues ?? [], activePath);\n const savedSerialized = serializeJson(savedValue);\n const editorSerialized = serializeJson(editorValue);\n const isDirty = editorError ? true : savedSerialized !== editorSerialized;\n const hasMutableChanges = !isReadOnlyExplorer && isDirty;\n const canSave = !isReadOnlyExplorer && isDirty && !editorError;\n const hasValidationFailure = Boolean(editorError) || activeValidationIssues.length > 0;\n const validationSummary = editorError\n ? editorError\n : activeValidationIssues.length\n ? `${activeValidationIssues.length} validation issue${activeValidationIssues.length === 1 ? \"\" : \"s\"}: ${activeValidationIssues[0]?.message ?? \"Review this JSON before saving.\"}`\n : \"\";\n\n useEffect(() => {\n setValidationIssues(documentData?.validation?.issues ?? []);\n }, [documentData?.lastModifiedAt]);\n\n useEffect(() => {\n const handlePointerMove = (event: PointerEvent) => {\n if (!isResizingRef.current || !explorerRef.current) return;\n const bounds = explorerRef.current.getBoundingClientRect();\n const nextWidth = Math.min(Math.max(event.clientX - bounds.left, 220), 520);\n setSidebarWidth(nextWidth);\n };\n\n const handlePointerUp = () => {\n isResizingRef.current = false;\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n };\n\n window.addEventListener(\"pointermove\", handlePointerMove);\n window.addEventListener(\"pointerup\", handlePointerUp);\n\n return () => {\n window.removeEventListener(\"pointermove\", handlePointerMove);\n window.removeEventListener(\"pointerup\", handlePointerUp);\n };\n }, []);\n\n useEffect(() => {\n if (!scopedTreeNodes.length) return;\n\n const isPathInsideScope =\n !scopedRootPath ||\n activePath === scopedRootPath ||\n activePath.startsWith(`${scopedRootPath}.`) ||\n activePath.startsWith(`${scopedRootPath}[`);\n\n if (!activePath || !nodeMap.has(activePath) || !isPathInsideScope) {\n const defaultPath = scopedTreeNodes[0].path;\n setActivePath(defaultPath);\n setExpandedPaths(new Set([defaultPath]));\n }\n }, [activePath, nodeMap, scopedRootPath, scopedTreeNodes]);\n\n useEffect(() => {\n if (!activePath) return;\n const nextValue = getValueAtJsonPath(fullDocument, activePath);\n if (nextValue === undefined) return;\n setSavedValue(nextValue);\n setEditorValue(nextValue);\n setEditorError(null);\n setEditorResetToken(`${activePath}:${documentData?.lastModifiedAt ?? \"\"}`);\n }, [activePath, documentData?.lastModifiedAt, fullDocument]);\n\n const showErrorToast = (error: any) => {\n dispatch(showToast({\n severity: \"error\",\n summary: \"Metadata Explorer\",\n detail: extractApiErrorMessage(error),\n life: 4000,\n }));\n };\n\n const toggleExpandedPath = (path: string) => {\n setExpandedPaths((current) => {\n const next = new Set(current);\n if (next.has(path)) {\n next.delete(path);\n } else {\n next.add(path);\n }\n return next;\n });\n };\n\n const selectPath = (path: string) => {\n if (path === activePath) return;\n if (!isReadOnlyExplorer && isDirty) {\n const shouldProceed = window.confirm(\"You have unsaved metadata changes. Switch nodes and discard them?\");\n if (!shouldProceed) return;\n }\n\n const ancestorPaths = getAncestorPaths(nodeMap, path);\n setExpandedPaths((current) => {\n const next = new Set(current);\n ancestorPaths.forEach((ancestorPath) => next.add(ancestorPath));\n return next;\n });\n setActivePath(path);\n };\n\n const handleSidebarResizeStart = () => {\n isResizingRef.current = true;\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n };\n\n const handleCollapseAll = () => {\n setExpandedPaths(new Set());\n };\n\n const handleFormat = () => {\n editorRef.current?.format();\n };\n\n const buildPatchedDocument = () => {\n const nextDocument = deepCloneJson(fullDocument);\n setValueAtJsonPath(nextDocument, activePath, editorValue);\n return nextDocument;\n };\n\n const buildPatchedSectionValue = () => {\n if (!activeSection) return undefined;\n return getValueAtJsonPath(buildPatchedDocument(), activeSection.jsonPath);\n };\n\n const handleValidate = async () => {\n if (!moduleName || !activePath || !activeSection) return;\n\n if (editorError) {\n setLocalActionSummary(\"Validation blocked because the JSON is currently invalid.\");\n dispatch(showToast({\n severity: \"error\",\n summary: \"Metadata Explorer\",\n detail: \"Fix the invalid JSON before validating.\",\n life: 3500,\n }));\n return;\n }\n\n try {\n const response: any = await validateSection({\n moduleName,\n sectionKey: activeSection.key,\n value: buildPatchedSectionValue(),\n }).unwrap();\n\n setValidationIssues(response?.issues ?? []);\n setLocalActionSummary(response?.valid ? \"Validation passed for the current JSON fragment.\" : \"Validation reported issues for the current JSON fragment.\");\n dispatch(showToast({\n severity: response?.valid ? \"success\" : \"warn\",\n summary: \"Metadata Explorer\",\n detail: response?.valid ? \"Validation passed.\" : \"Validation reported issues.\",\n life: 3000,\n }));\n } catch (error) {\n showErrorToast(error);\n }\n };\n\n const handleSave = async () => {\n if (!moduleName || !activePath || !activeSection) return;\n\n if (editorError) {\n dispatch(showToast({\n severity: \"error\",\n summary: \"Metadata Explorer\",\n detail: \"Fix the invalid JSON before saving.\",\n life: 3500,\n }));\n return;\n }\n\n try {\n const response: any = await updateSection({\n moduleName,\n sectionKey: activeSection.key,\n value: buildPatchedSectionValue(),\n }).unwrap();\n\n setValidationIssues(response?.validation?.issues ?? []);\n setLocalActionSummary(\"JSON fragment saved to the metadata file.\");\n dispatch(showToast({\n severity: \"success\",\n summary: \"Metadata Explorer\",\n detail: \"Metadata saved successfully.\",\n life: 3000,\n }));\n refetchManifest();\n refetchDocument();\n } catch (error) {\n showErrorToast(error);\n }\n };\n\n const handleSeedModule = async () => {\n if (!moduleId) return;\n\n try {\n const response: any = await seedModuleMetadata({ id: moduleId }).unwrap();\n setIsSeedDialogOpen(false);\n setLocalActionSummary(response?.message ?? `Seeded metadata for module ${moduleName}.`);\n dispatch(showToast({\n severity: \"success\",\n summary: \"Metadata Explorer\",\n detail: response?.message ?? \"Module metadata seeded successfully.\",\n life: 3000,\n }));\n refetchManifest();\n refetchDocument();\n } catch (error) {\n showErrorToast(error);\n }\n };\n\n if (!moduleName) {\n return null;\n }\n\n return (\n <div className=\"solid-module-explorer\">\n <div className=\"solid-module-explorer-panel\">\n {loadError && (\n <div className=\"solid-module-explorer-alert\">\n <SolidMessage\n severity=\"error\"\n text={`Unable to load metadata explorer: ${extractApiErrorMessage(loadError)}`}\n className=\"justify-start\"\n />\n </div>\n )}\n\n <div\n ref={explorerRef}\n className=\"solid-module-explorer-workspace\"\n style={{ gridTemplateColumns: `${sidebarWidth}px 8px minmax(0, 1fr)` }}\n >\n <aside className=\"solid-module-explorer-sidebar\">\n <div className=\"solid-module-explorer-sidebar-section solid-module-explorer-sidebar-sections\">\n <div className=\"solid-module-explorer-sidebar-heading\">\n <div className=\"solid-module-explorer-sidebar-heading-main\">\n <div className=\"solid-module-explorer-sidebar-title\">{modelSingularName ? \"Explorer\" : \"Sections\"}</div>\n <SolidTag tone=\"info\">{modelSingularName ? scopedTreeNodes.length : sections.length}</SolidTag>\n </div>\n <button\n type=\"button\"\n className=\"solid-module-explorer-sidebar-action\"\n onClick={handleCollapseAll}\n >\n Collapse all\n </button>\n </div>\n\n <div className=\"solid-module-explorer-sidebar-search\">\n <SolidInput\n value={treeFilter}\n onChange={(event) => setTreeFilter(event.target.value)}\n placeholder=\"Search metadata tree\"\n />\n <div className=\"solid-module-explorer-sidebar-search-icon\">\n <Search size={14} />\n </div>\n </div>\n\n <div className=\"solid-module-explorer-section-list solid-module-explorer-tree-list\">\n <MetadataTree\n nodes={filteredTreeNodes}\n activePath={activePath}\n expandedPaths={visibleExpandedPaths}\n onToggle={toggleExpandedPath}\n onSelect={selectPath}\n />\n </div>\n </div>\n </aside>\n\n <div\n className=\"solid-module-explorer-resizer\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label=\"Resize metadata navigation panel\"\n onPointerDown={handleSidebarResizeStart}\n />\n\n <section className=\"solid-module-explorer-main\">\n <div className=\"solid-module-explorer-main-header\">\n <div className=\"solid-module-explorer-main-title\">\n <div className=\"solid-module-explorer-main-heading-row\">\n <h4>{activeNode?.label ?? activeSection?.title ?? \"Metadata\"}</h4>\n <p>{activePath || \"Choose a metadata node from the tree.\"}</p>\n </div>\n {hasValidationFailure && (\n <div className=\"solid-module-explorer-inline-validation\" title={validationSummary}>\n {validationSummary}\n </div>\n )}\n {isReadOnlyExplorer && (\n <div className=\"solid-module-explorer-readonly-note\">\n This metadata is browse-only in the explorer.\n </div>\n )}\n </div>\n <div className=\"solid-module-explorer-main-actions\">\n <div className=\"solid-module-explorer-main-meta\">\n {hasMutableChanges && <SolidTag tone=\"warn\">Unsaved changes</SolidTag>}\n {editorError && <SolidTag tone=\"danger\">Invalid JSON</SolidTag>}\n {isReadOnlyExplorer && <SolidTag tone=\"info\">Read only</SolidTag>}\n </div>\n {!isReadOnlyExplorer && (\n <SolidButton\n size=\"sm\"\n leftIcon={<Save size={14} />}\n onClick={handleSave}\n loading={isSavingSection}\n disabled={!canSave}\n >\n Save Section\n </SolidButton>\n )}\n <SolidDropdownMenu>\n <SolidDropdownMenuTrigger asChild>\n <SolidButton\n variant=\"ghost\"\n size=\"sm\"\n className=\"solid-icon-button\"\n aria-label=\"Explorer actions\"\n >\n <Settings size={16} />\n </SolidButton>\n </SolidDropdownMenuTrigger>\n <SolidDropdownMenuContent className=\"solid-module-explorer-actions-menu\">\n {!isReadOnlyExplorer && (\n <SolidDropdownMenuItem onSelect={handleFormat}>\n <div className=\"solid-module-explorer-actions-item\">\n <Wand2 size={14} />\n <span>Format</span>\n </div>\n </SolidDropdownMenuItem>\n )}\n <SolidDropdownMenuItem onSelect={handleValidate} disabled={isValidatingSection}>\n <div className=\"solid-module-explorer-actions-item\">\n <FileSearch size={14} />\n <span>{isValidatingSection ? \"Validating...\" : \"Validate\"}</span>\n </div>\n </SolidDropdownMenuItem>\n <SolidDropdownMenuItem onSelect={() => setIsContextDialogOpen(true)}>\n <div className=\"solid-module-explorer-actions-item\">\n <Settings size={14} />\n <span>Context</span>\n </div>\n </SolidDropdownMenuItem>\n {allowSeed && (\n <SolidDropdownMenuItem onSelect={() => setIsSeedDialogOpen(true)} disabled={!moduleId || isSeedingModule}>\n <div className=\"solid-module-explorer-actions-item\">\n <DatabaseZap size={14} />\n <span>{isSeedingModule ? \"Seeding...\" : \"Seed\"}</span>\n </div>\n </SolidDropdownMenuItem>\n )}\n </SolidDropdownMenuContent>\n </SolidDropdownMenu>\n </div>\n </div>\n\n <div className=\"solid-module-explorer-editor-wrap\">\n <div className=\"solid-module-explorer-editor-shell\">\n {isDocumentLoading ? (\n <div style={{ padding: \"1rem\" }} className=\"solid-module-explorer-empty\">\n Loading metadata JSON...\n </div>\n ) : (\n <JsonEditorSurface\n ref={editorRef}\n value={savedValue}\n resetToken={editorResetToken}\n readOnly={isReadOnlyExplorer}\n onValueChange={setEditorValue}\n onErrorChange={setEditorError}\n />\n )}\n </div>\n </div>\n </section>\n </div>\n </div>\n\n <SolidDialog\n open={isContextDialogOpen}\n onOpenChange={setIsContextDialogOpen}\n header=\"Context\"\n contentClassName=\"solid-module-explorer-context-dialog\"\n >\n <SolidDialogSeparator />\n <SolidDialogBody>\n <div className=\"solid-module-explorer-context-dialog-body\">\n <div className=\"solid-module-explorer-context-dialog-header\">\n <div className=\"solid-module-explorer-context-dialog-title\">\n {activeNode?.label ?? \"Metadata node\"}\n </div>\n <div className=\"solid-module-explorer-context-dialog-meta\">\n {activeNode?.sectionTitle && <SolidTag tone=\"info\">{activeNode.sectionTitle}</SolidTag>}\n </div>\n </div>\n\n <div className=\"solid-module-explorer-context-grid\">\n <div className=\"solid-module-explorer-context-row\">\n <div className=\"solid-module-explorer-context-label\">JSON Path</div>\n <div className=\"solid-module-explorer-context-value\">{activePath || \"-\"}</div>\n </div>\n <div className=\"solid-module-explorer-context-row\">\n <div className=\"solid-module-explorer-context-label\">File</div>\n <div className=\"solid-module-explorer-context-value\">{manifestData?.filePath ?? \"-\"}</div>\n </div>\n {localActionSummary && (\n <div className=\"solid-module-explorer-context-row\">\n <div className=\"solid-module-explorer-context-label\">Last Action</div>\n <div className=\"solid-module-explorer-context-value\">{localActionSummary}</div>\n </div>\n )}\n </div>\n\n <div className=\"solid-module-explorer-context-note\">\n Clicking any branch or leaf in the tree opens that exact JSON fragment on the right.\n </div>\n </div>\n </SolidDialogBody>\n </SolidDialog>\n\n <SolidDialog\n open={isSeedDialogOpen}\n onOpenChange={setIsSeedDialogOpen}\n contentClassName=\"solid-module-explorer-seed-dialog\"\n >\n <SolidDialogHeader>\n <SolidDialogTitle>Seed Module Metadata</SolidDialogTitle>\n </SolidDialogHeader>\n <SolidDialogSeparator />\n <SolidDialogBody>\n <div className=\"solid-module-explorer-seed-dialog-body\">\n <p>\n Re-seed metadata for <strong>{moduleName}</strong> from its JSON file?\n </p>\n <p className=\"solid-module-explorer-seed-dialog-note\">\n This only re-runs metadata seeding for the current module and refreshes database metadata from the module JSON.\n </p>\n </div>\n </SolidDialogBody>\n <SolidDialogFooter>\n <SolidButton variant=\"outline\" size=\"sm\" onClick={() => setIsSeedDialogOpen(false)} disabled={isSeedingModule}>\n Cancel\n </SolidButton>\n <SolidButton size=\"sm\" onClick={handleSeedModule} loading={isSeedingModule} disabled={!moduleId}>\n Seed\n </SolidButton>\n </SolidDialogFooter>\n </SolidDialog>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ModuleMetadataExplorer.js","sourceRoot":"","sources":["../../../../src/components/core/module/ModuleMetadataExplorer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,yCAAyC,EACzC,yCAAyC,EACzC,6BAA6B,EAC7B,8CAA8C,EAC9C,gDAAgD,GACjD,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,MAAM,kBA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K,SAAS,EAAC,qCAAqC,YAAE,UAAU,IAAI,GAAG,GAAO,IAC1E,EACN,eAAK,SAAS,EAAC,mCAAmC,aAChD,cAAK,SAAS,EAAC,qCAAqC,qBAAW,EAC/D,cAAK,SAAS,EAAC,qCAAqC,YAAE,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,mCAAI,GAAG,GAAO,IACtF,EACL,kBAAkB,IAAI,CACrB,eAAK,SAAS,EAAC,mCAAmC,aAChD,cAAK,SAAS,EAAC,qCAAqC,4BAAkB,EACtE,cAAK,SAAS,EAAC,qCAAqC,YAAE,kBAAkB,GAAO,IAC3E,CACP,IACG,EAEN,cAAK,SAAS,EAAC,oCAAoC,qGAE7C,IACF,GACU,IACN,EAEd,MAAC,WAAW,IACV,IAAI,EAAE,gBAAgB,EACtB,YAAY,EAAE,mBAAmB,EACjC,gBAAgB,EAAC,mCAAmC,aAEpD,KAAC,iBAAiB,cAChB,KAAC,gBAAgB,uCAAwC,GACvC,EACpB,KAAC,oBAAoB,KAAG,EACxB,KAAC,eAAe,cACd,eAAK,SAAS,EAAC,wCAAwC,aACrD,iDACuB,2BAAS,UAAU,GAAU,4BAChD,EACJ,YAAG,SAAS,EAAC,wCAAwC,gIAEjD,IACA,GACU,EAClB,MAAC,iBAAiB,eAChB,KAAC,WAAW,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,cAAM,OAAA,mBAAmB,CAAC,KAAK,CAAC,EAA1B,CAA0B,EAAE,QAAQ,EAAE,eAAe,uBAE/F,EACd,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,QAAQ,qBAEjF,IACI,IACR,IACV,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { ChevronDown, ChevronRight, DatabaseZap, FileSearch, Save, Search, Settings, Wand2 } from \"lucide-react\";\nimport React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport {\n useGetModuleMetadataExplorerDocumentQuery,\n useGetModuleMetadataExplorerManifestQuery,\n useSeedModuleMetadataMutation,\n useUpdateModuleMetadataExplorerSectionMutation,\n useValidateModuleMetadataExplorerSectionMutation,\n} from \"../../../redux/api/moduleApi\";\nimport { showToast } from \"../../../redux/features/toastSlice\";\nimport {\n SolidButton,\n SolidDialog,\n SolidDialogBody,\n SolidDialogFooter,\n SolidDialogHeader,\n SolidDialogSeparator,\n SolidDialogTitle,\n SolidDropdownMenu,\n SolidDropdownMenuContent,\n SolidDropdownMenuItem,\n SolidDropdownMenuTrigger,\n SolidInput,\n SolidMessage,\n SolidTag,\n} from \"../../shad-cn-ui\";\nimport \"jsoneditor/dist/jsoneditor.css\";\nimport \"./ModuleMetadataExplorer.css\";\n\ntype ModuleMetadataExplorerProps = {\n moduleName?: string;\n moduleId?: number;\n modelSingularName?: string;\n scopedArrayPath?: string;\n scopedItemValue?: string;\n scopedItemField?: string;\n readOnly?: boolean;\n allowSeed?: boolean;\n};\n\ntype MetadataIssue = {\n path: string;\n message: string;\n severity: \"error\" | \"warning\";\n};\n\ntype ExplorerSectionDefinition = {\n key: string;\n title: string;\n jsonPath: string;\n type: \"object\" | \"array\";\n description: string;\n};\n\ntype ExplorerTreeNode = {\n id: string;\n label: string;\n path: string;\n parentPath: string | null;\n sectionKey: string;\n sectionTitle: string;\n children: ExplorerTreeNode[];\n};\n\ntype JsonEditorHandle = {\n format: () => void;\n};\n\nfunction extractApiErrorMessage(error: any) {\n const message = error?.data?.message ?? error?.message ?? \"Something went wrong\";\n return Array.isArray(message) ? message.join(\", \") : String(message);\n}\n\nfunction serializeJson(value: any) {\n try {\n return JSON.stringify(value);\n } catch (_error) {\n return \"\";\n }\n}\n\nfunction deepCloneJson<T>(value: T): T {\n return JSON.parse(JSON.stringify(value));\n}\n\nfunction humanizeKey(value: string) {\n return value\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/[_-]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim()\n .replace(/^./, (char) => char.toUpperCase());\n}\n\nfunction tokenizePath(path: string) {\n const tokens: Array<string | number> = [];\n const regex = /([^[.\\]]+)|\\[(\\d+)\\]/g;\n let match: RegExpExecArray | null;\n while ((match = regex.exec(path)) !== null) {\n if (match[1] !== undefined) {\n tokens.push(match[1]);\n } else if (match[2] !== undefined) {\n tokens.push(Number(match[2]));\n }\n }\n return tokens;\n}\n\nfunction getValueAtJsonPath(source: any, path: string) {\n if (!path) return source;\n return tokenizePath(path).reduce((current, token) => {\n if (current === undefined || current === null) return undefined;\n return current[token as keyof typeof current];\n }, source);\n}\n\nfunction setValueAtJsonPath(target: any, path: string, value: any) {\n const tokens = tokenizePath(path);\n if (!tokens.length) return;\n\n let current = target;\n for (let index = 0; index < tokens.length - 1; index += 1) {\n current = current[tokens[index] as keyof typeof current];\n }\n\n current[tokens[tokens.length - 1] as keyof typeof current] = value;\n}\n\nfunction appendPath(basePath: string, key: string) {\n return basePath ? `${basePath}.${key}` : key;\n}\n\nfunction getArrayItemLabel(item: any, index: number, parentKey: string) {\n const labelCandidates = [\n \"singularName\",\n \"name\",\n \"displayName\",\n \"pluralName\",\n \"label\",\n \"key\",\n \"title\",\n \"id\",\n ];\n\n for (const candidate of labelCandidates) {\n const nextValue = item?.[candidate];\n if (nextValue !== undefined && nextValue !== null && `${nextValue}`.trim()) {\n return `${nextValue}`;\n }\n }\n\n return `${humanizeKey(parentKey || \"Item\")} ${index + 1}`;\n}\n\nfunction buildTreeNode(\n value: any,\n options: {\n label: string;\n path: string;\n parentPath: string | null;\n sectionKey: string;\n sectionTitle: string;\n hintKey: string;\n },\n): ExplorerTreeNode {\n const { label, path, parentPath, sectionKey, sectionTitle, hintKey } = options;\n\n let children: ExplorerTreeNode[] = [];\n\n if (Array.isArray(value)) {\n children = value\n .filter((item) => item !== null && typeof item === \"object\")\n .map((item, index) => buildTreeNode(item, {\n label: getArrayItemLabel(item, index, hintKey),\n path: `${path}[${index}]`,\n parentPath: path,\n sectionKey,\n sectionTitle,\n hintKey,\n }));\n } else if (value && typeof value === \"object\") {\n children = Object.entries(value)\n .filter(([, nextValue]) => nextValue !== null && typeof nextValue === \"object\")\n .map(([key, nextValue]) => buildTreeNode(nextValue, {\n label: humanizeKey(key),\n path: appendPath(path, key),\n parentPath: path,\n sectionKey,\n sectionTitle,\n hintKey: key,\n }));\n }\n\n return {\n id: path,\n label,\n path,\n parentPath,\n sectionKey,\n sectionTitle,\n children,\n };\n}\n\nfunction buildTreeFromDocument(sections: ExplorerSectionDefinition[], documentValue: any) {\n const nodes = sections\n .map((section) => {\n const sectionValue = getValueAtJsonPath(documentValue, section.jsonPath);\n if (sectionValue === undefined) return null;\n return buildTreeNode(sectionValue, {\n label: section.title,\n path: section.jsonPath,\n parentPath: null,\n sectionKey: section.key,\n sectionTitle: section.title,\n hintKey: section.key,\n });\n })\n .filter(Boolean) as ExplorerTreeNode[];\n\n const nodeMap = new Map<string, ExplorerTreeNode>();\n const visit = (nextNodes: ExplorerTreeNode[]) => {\n nextNodes.forEach((node) => {\n nodeMap.set(node.path, node);\n if (node.children.length) visit(node.children);\n });\n };\n visit(nodes);\n\n return { nodes, nodeMap };\n}\n\nfunction filterTreeNodes(nodes: ExplorerTreeNode[], query: string): ExplorerTreeNode[] {\n const needle = query.trim().toLowerCase();\n if (!needle) return nodes;\n\n const visit = (node: ExplorerTreeNode): ExplorerTreeNode | null => {\n const filteredChildren = node.children\n .map(visit)\n .filter(Boolean) as ExplorerTreeNode[];\n const matches = node.label.toLowerCase().includes(needle) || node.path.toLowerCase().includes(needle);\n\n if (matches || filteredChildren.length) {\n return { ...node, children: filteredChildren };\n }\n\n return null;\n };\n\n return nodes.map(visit).filter(Boolean) as ExplorerTreeNode[];\n}\n\nfunction getAncestorPaths(nodeMap: Map<string, ExplorerTreeNode>, path: string) {\n const paths: string[] = [];\n let current = nodeMap.get(path);\n\n while (current?.parentPath) {\n paths.push(current.parentPath);\n current = nodeMap.get(current.parentPath);\n }\n\n return paths;\n}\n\nfunction getSectionForPath(sections: ExplorerSectionDefinition[], path: string) {\n return sections\n .filter((section) => path === section.jsonPath || path.startsWith(`${section.jsonPath}.`) || path.startsWith(`${section.jsonPath}[`))\n .sort((left, right) => right.jsonPath.length - left.jsonPath.length)[0] ?? null;\n}\n\nfunction filterIssuesForPath(issues: MetadataIssue[], path: string) {\n return issues.filter((issue) => {\n if (!issue.path) return false;\n return issue.path === path || issue.path.startsWith(`${path}.`) || issue.path.startsWith(`${path}[`);\n });\n}\n\nconst JsonEditorSurface = React.forwardRef<JsonEditorHandle, {\n value: any;\n resetToken: string;\n readOnly?: boolean;\n onValueChange: (value: any) => void;\n onErrorChange: (message: string | null) => void;\n}>(function JsonEditorSurface({ value, resetToken, readOnly = false, onValueChange, onErrorChange }, ref) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const editorRef = useRef<any>(null);\n // Keep a ref to the latest value so the async init can seed the editor correctly\n const latestValueRef = useRef<any>(value);\n\n // Sync latest value into ref so async editor init can use it\n useEffect(() => { latestValueRef.current = value; }, [value]);\n\n const emitState = () => {\n const editor = editorRef.current;\n if (!editor) return;\n\n try {\n const nextValue = editor.get();\n onValueChange(nextValue);\n onErrorChange(null);\n } catch (error: any) {\n onErrorChange(error?.message ? String(error.message) : \"The JSON is currently invalid.\");\n }\n };\n\n useImperativeHandle(ref, () => ({\n format() {\n try {\n editorRef.current?.format?.();\n } catch (_error) {\n // jsoneditor already surfaces parse states through onErrorChange\n }\n emitState();\n },\n }), []);\n\n useEffect(() => {\n if (!containerRef.current || editorRef.current) return;\n\n let destroyed = false;\n\n // @ts-ignore\n void import(\"jsoneditor\").then((jsonEditorModule: any) => {\n if (destroyed || !containerRef.current || editorRef.current) {\n return;\n }\n\n const JSONEditor = jsonEditorModule?.default ?? jsonEditorModule;\n editorRef.current = new JSONEditor(containerRef.current, {\n mode: \"code\",\n modes: [\"code\"],\n mainMenuBar: true,\n navigationBar: true,\n statusBar: true,\n search: true,\n enableSort: false,\n enableTransform: false,\n onChange: () => emitState(),\n });\n\n // Seed editor with current value (which may already be set before async init resolved)\n try { editorRef.current.set(latestValueRef.current); } catch (_e) {}\n emitState();\n\n if (editorRef.current?.aceEditor?.setReadOnly) {\n editorRef.current.aceEditor.setReadOnly(readOnly);\n }\n });\n\n return () => {\n destroyed = true;\n editorRef.current?.destroy?.();\n editorRef.current = null;\n };\n }, []);\n\n useEffect(() => {\n if (!editorRef.current) return;\n editorRef.current.set(value);\n emitState();\n }, [resetToken, value]);\n\n useEffect(() => {\n if (!editorRef.current?.aceEditor?.setReadOnly) return;\n editorRef.current.aceEditor.setReadOnly(readOnly);\n }, [readOnly]);\n\n return <div ref={containerRef} className={`solid-module-explorer-editor-host solid-module-explorer-jsoneditor ${readOnly ? \"is-readonly\" : \"\"}`} />;\n});\n\nfunction MetadataTree({\n nodes,\n activePath,\n expandedPaths,\n onToggle,\n onSelect,\n depth = 0,\n}: {\n nodes: ExplorerTreeNode[];\n activePath: string;\n expandedPaths: Set<string>;\n onToggle: (path: string) => void;\n onSelect: (path: string) => void;\n depth?: number;\n}) {\n return (\n <>\n {nodes.map((node) => {\n const isExpanded = expandedPaths.has(node.path);\n const hasChildren = node.children.length > 0;\n const isActive = activePath === node.path;\n\n return (\n <div key={node.id} className=\"solid-module-explorer-tree-node\">\n <div\n className={`solid-module-explorer-tree-row ${isActive ? \"is-active\" : \"\"}`}\n style={{ paddingLeft: `${depth * 0.9}rem` }}\n >\n <button\n type=\"button\"\n className=\"solid-module-explorer-tree-toggle\"\n onClick={() => hasChildren && onToggle(node.path)}\n aria-label={hasChildren ? (isExpanded ? \"Collapse node\" : \"Expand node\") : \"Leaf node\"}\n disabled={!hasChildren}\n >\n {hasChildren ? (isExpanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />) : <span className=\"solid-module-explorer-tree-dot\" />}\n </button>\n <button\n type=\"button\"\n className=\"solid-module-explorer-tree-label\"\n onClick={() => onSelect(node.path)}\n title={node.path}\n >\n {node.label}\n </button>\n </div>\n\n {hasChildren && isExpanded && (\n <MetadataTree\n nodes={node.children}\n activePath={activePath}\n expandedPaths={expandedPaths}\n onToggle={onToggle}\n onSelect={onSelect}\n depth={depth + 1}\n />\n )}\n </div>\n );\n })}\n </>\n );\n}\n\nexport function ModuleMetadataExplorer({\n moduleName,\n moduleId,\n modelSingularName,\n scopedArrayPath,\n scopedItemValue,\n scopedItemField,\n readOnly = false,\n allowSeed = true,\n}: ModuleMetadataExplorerProps) {\n const dispatch = useDispatch();\n const editorRef = useRef<JsonEditorHandle | null>(null);\n const explorerRef = useRef<HTMLDivElement | null>(null);\n const isResizingRef = useRef(false);\n const [activePath, setActivePath] = useState(\"\");\n const [expandedPaths, setExpandedPaths] = useState<Set<string>>(new Set());\n const [treeFilter, setTreeFilter] = useState(\"\");\n const [sidebarWidth, setSidebarWidth] = useState(280);\n const [editorValue, setEditorValue] = useState<any>({});\n const [savedValue, setSavedValue] = useState<any>({});\n const [editorError, setEditorError] = useState<string | null>(null);\n const [editorResetToken, setEditorResetToken] = useState(\"initial\");\n const [validationIssues, setValidationIssues] = useState<MetadataIssue[] | null>(null);\n const [localActionSummary, setLocalActionSummary] = useState(\"\");\n const [isContextDialogOpen, setIsContextDialogOpen] = useState(false);\n const [isSeedDialogOpen, setIsSeedDialogOpen] = useState(false);\n\n const {\n data: manifestData,\n error: manifestError,\n refetch: refetchManifest,\n } = useGetModuleMetadataExplorerManifestQuery(moduleName as string, {\n skip: !moduleName,\n });\n\n const {\n data: documentData,\n isLoading: isDocumentLoading,\n error: documentError,\n refetch: refetchDocument,\n } = useGetModuleMetadataExplorerDocumentQuery(moduleName as string, {\n skip: !moduleName,\n });\n\n const [updateSection, { isLoading: isSavingSection }] = useUpdateModuleMetadataExplorerSectionMutation();\n const [validateSection, { isLoading: isValidatingSection }] = useValidateModuleMetadataExplorerSectionMutation();\n const [seedModuleMetadata, { isLoading: isSeedingModule }] = useSeedModuleMetadataMutation();\n const isReadOnlyExplorer = readOnly || moduleName?.toLowerCase() === \"solid-core\";\n\n const sections = (manifestData?.sections ?? []) as ExplorerSectionDefinition[];\n const fullDocument = documentData?.value ?? {};\n const loadError = !manifestData || !documentData ? (manifestError ?? documentError) : null;\n\n const { nodes: treeNodes, nodeMap } = useMemo(\n () => buildTreeFromDocument(sections, fullDocument),\n [sections, fullDocument],\n );\n\n const scopedRootPath = useMemo(() => {\n // Scope to a specific model definition\n if (modelSingularName) {\n const models = getValueAtJsonPath(fullDocument, \"moduleMetadata.models\");\n if (!Array.isArray(models)) return \"\";\n const modelIndex = models.findIndex((model) => model?.singularName === modelSingularName);\n return modelIndex >= 0 ? `moduleMetadata.models[${modelIndex}]` : \"\";\n }\n // Scope to a specific item in a root-level array (e.g. views, actions, menus)\n if (scopedArrayPath && scopedItemValue) {\n const arr = getValueAtJsonPath(fullDocument, scopedArrayPath);\n if (!Array.isArray(arr)) return \"\";\n const matchField = scopedItemField ?? \"name\";\n const itemIndex = arr.findIndex((item) => item?.[matchField] === scopedItemValue);\n return itemIndex >= 0 ? `${scopedArrayPath}[${itemIndex}]` : \"\";\n }\n return \"\";\n }, [fullDocument, modelSingularName, scopedArrayPath, scopedItemValue, scopedItemField]);\n\n const scopedTreeNodes = useMemo(() => {\n if (!scopedRootPath) return treeNodes;\n const scopedNode = nodeMap.get(scopedRootPath);\n return scopedNode ? [scopedNode] : [];\n }, [nodeMap, scopedRootPath, treeNodes]);\n\n const filteredTreeNodes = useMemo(\n () => filterTreeNodes(scopedTreeNodes, treeFilter),\n [scopedTreeNodes, treeFilter],\n );\n\n const visibleExpandedPaths = useMemo(() => {\n if (!treeFilter.trim()) return expandedPaths;\n const nextExpanded = new Set<string>();\n const visit = (nodesToVisit: ExplorerTreeNode[]) => {\n nodesToVisit.forEach((node) => {\n if (node.children.length) {\n nextExpanded.add(node.path);\n visit(node.children);\n }\n });\n };\n visit(filteredTreeNodes);\n return nextExpanded;\n }, [expandedPaths, filteredTreeNodes, treeFilter]);\n\n const activeNode = activePath ? nodeMap.get(activePath) ?? null : null;\n const activeSection = activePath ? getSectionForPath(sections, activePath) : null;\n const activeValidationIssues = filterIssuesForPath(validationIssues ?? [], activePath);\n const savedSerialized = serializeJson(savedValue);\n const editorSerialized = serializeJson(editorValue);\n const isDirty = editorError ? true : savedSerialized !== editorSerialized;\n const hasMutableChanges = !isReadOnlyExplorer && isDirty;\n const canSave = !isReadOnlyExplorer && isDirty && !editorError;\n const hasValidationFailure = Boolean(editorError) || activeValidationIssues.length > 0;\n const validationSummary = editorError\n ? editorError\n : activeValidationIssues.length\n ? `${activeValidationIssues.length} validation issue${activeValidationIssues.length === 1 ? \"\" : \"s\"}: ${activeValidationIssues[0]?.message ?? \"Review this JSON before saving.\"}`\n : \"\";\n\n useEffect(() => {\n setValidationIssues(documentData?.validation?.issues ?? []);\n }, [documentData?.lastModifiedAt]);\n\n useEffect(() => {\n const handlePointerMove = (event: PointerEvent) => {\n if (!isResizingRef.current || !explorerRef.current) return;\n const bounds = explorerRef.current.getBoundingClientRect();\n const nextWidth = Math.min(Math.max(event.clientX - bounds.left, 220), 520);\n setSidebarWidth(nextWidth);\n };\n\n const handlePointerUp = () => {\n isResizingRef.current = false;\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n };\n\n window.addEventListener(\"pointermove\", handlePointerMove);\n window.addEventListener(\"pointerup\", handlePointerUp);\n\n return () => {\n window.removeEventListener(\"pointermove\", handlePointerMove);\n window.removeEventListener(\"pointerup\", handlePointerUp);\n };\n }, []);\n\n useEffect(() => {\n if (!scopedTreeNodes.length) return;\n\n const isPathInsideScope =\n !scopedRootPath ||\n activePath === scopedRootPath ||\n activePath.startsWith(`${scopedRootPath}.`) ||\n activePath.startsWith(`${scopedRootPath}[`);\n\n if (!activePath || !nodeMap.has(activePath) || !isPathInsideScope) {\n const defaultPath = scopedTreeNodes[0].path;\n setActivePath(defaultPath);\n setExpandedPaths(new Set([defaultPath]));\n }\n }, [activePath, nodeMap, scopedRootPath, scopedTreeNodes]);\n\n useEffect(() => {\n if (!activePath) return;\n const nextValue = getValueAtJsonPath(fullDocument, activePath);\n if (nextValue === undefined) return;\n setSavedValue(nextValue);\n setEditorValue(nextValue);\n setEditorError(null);\n setEditorResetToken(`${activePath}:${documentData?.lastModifiedAt ?? \"\"}`);\n }, [activePath, documentData?.lastModifiedAt, fullDocument]);\n\n const showErrorToast = (error: any) => {\n dispatch(showToast({\n severity: \"error\",\n summary: \"Metadata Explorer\",\n detail: extractApiErrorMessage(error),\n life: 4000,\n }));\n };\n\n const toggleExpandedPath = (path: string) => {\n setExpandedPaths((current) => {\n const next = new Set(current);\n if (next.has(path)) {\n next.delete(path);\n } else {\n next.add(path);\n }\n return next;\n });\n };\n\n const selectPath = (path: string) => {\n if (path === activePath) return;\n if (!isReadOnlyExplorer && isDirty) {\n const shouldProceed = window.confirm(\"You have unsaved metadata changes. Switch nodes and discard them?\");\n if (!shouldProceed) return;\n }\n\n const ancestorPaths = getAncestorPaths(nodeMap, path);\n setExpandedPaths((current) => {\n const next = new Set(current);\n ancestorPaths.forEach((ancestorPath) => next.add(ancestorPath));\n return next;\n });\n setActivePath(path);\n };\n\n const handleSidebarResizeStart = () => {\n isResizingRef.current = true;\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n };\n\n const handleCollapseAll = () => {\n setExpandedPaths(new Set());\n };\n\n const handleFormat = () => {\n editorRef.current?.format();\n };\n\n const buildPatchedDocument = () => {\n const nextDocument = deepCloneJson(fullDocument);\n setValueAtJsonPath(nextDocument, activePath, editorValue);\n return nextDocument;\n };\n\n const buildPatchedSectionValue = () => {\n if (!activeSection) return undefined;\n return getValueAtJsonPath(buildPatchedDocument(), activeSection.jsonPath);\n };\n\n const handleValidate = async () => {\n if (!moduleName || !activePath || !activeSection) return;\n\n if (editorError) {\n setLocalActionSummary(\"Validation blocked because the JSON is currently invalid.\");\n dispatch(showToast({\n severity: \"error\",\n summary: \"Metadata Explorer\",\n detail: \"Fix the invalid JSON before validating.\",\n life: 3500,\n }));\n return;\n }\n\n try {\n const response: any = await validateSection({\n moduleName,\n sectionKey: activeSection.key,\n value: buildPatchedSectionValue(),\n }).unwrap();\n\n setValidationIssues(response?.issues ?? []);\n setLocalActionSummary(response?.valid ? \"Validation passed for the current JSON fragment.\" : \"Validation reported issues for the current JSON fragment.\");\n dispatch(showToast({\n severity: response?.valid ? \"success\" : \"warn\",\n summary: \"Metadata Explorer\",\n detail: response?.valid ? \"Validation passed.\" : \"Validation reported issues.\",\n life: 3000,\n }));\n } catch (error) {\n showErrorToast(error);\n }\n };\n\n const handleSave = async () => {\n if (!moduleName || !activePath || !activeSection) return;\n\n if (editorError) {\n dispatch(showToast({\n severity: \"error\",\n summary: \"Metadata Explorer\",\n detail: \"Fix the invalid JSON before saving.\",\n life: 3500,\n }));\n return;\n }\n\n try {\n const response: any = await updateSection({\n moduleName,\n sectionKey: activeSection.key,\n value: buildPatchedSectionValue(),\n }).unwrap();\n\n setValidationIssues(response?.validation?.issues ?? []);\n setLocalActionSummary(\"JSON fragment saved to the metadata file.\");\n dispatch(showToast({\n severity: \"success\",\n summary: \"Metadata Explorer\",\n detail: \"Metadata saved successfully.\",\n life: 3000,\n }));\n refetchManifest();\n refetchDocument();\n } catch (error) {\n showErrorToast(error);\n }\n };\n\n const handleSeedModule = async () => {\n if (!moduleId) return;\n\n try {\n const response: any = await seedModuleMetadata({ id: moduleId }).unwrap();\n setIsSeedDialogOpen(false);\n setLocalActionSummary(response?.message ?? `Seeded metadata for module ${moduleName}.`);\n dispatch(showToast({\n severity: \"success\",\n summary: \"Metadata Explorer\",\n detail: response?.message ?? \"Module metadata seeded successfully.\",\n life: 3000,\n }));\n refetchManifest();\n refetchDocument();\n } catch (error) {\n showErrorToast(error);\n }\n };\n\n if (!moduleName) {\n return null;\n }\n\n return (\n <div className=\"solid-module-explorer\">\n <div className=\"solid-module-explorer-panel\">\n {loadError && (\n <div className=\"solid-module-explorer-alert\">\n <SolidMessage\n severity=\"error\"\n text={`Unable to load metadata explorer: ${extractApiErrorMessage(loadError)}`}\n className=\"justify-start\"\n />\n </div>\n )}\n\n <div\n ref={explorerRef}\n className=\"solid-module-explorer-workspace\"\n style={{ gridTemplateColumns: `${sidebarWidth}px 8px minmax(0, 1fr)` }}\n >\n <aside className=\"solid-module-explorer-sidebar\">\n <div className=\"solid-module-explorer-sidebar-section solid-module-explorer-sidebar-sections\">\n <div className=\"solid-module-explorer-sidebar-heading\">\n <div className=\"solid-module-explorer-sidebar-heading-main\">\n <div className=\"solid-module-explorer-sidebar-title\">{modelSingularName ? \"Explorer\" : \"Sections\"}</div>\n <SolidTag tone=\"info\">{modelSingularName ? scopedTreeNodes.length : sections.length}</SolidTag>\n </div>\n <button\n type=\"button\"\n className=\"solid-module-explorer-sidebar-action\"\n onClick={handleCollapseAll}\n >\n Collapse all\n </button>\n </div>\n\n <div className=\"solid-module-explorer-sidebar-search\">\n <SolidInput\n value={treeFilter}\n onChange={(event) => setTreeFilter(event.target.value)}\n placeholder=\"Search metadata tree\"\n />\n <div className=\"solid-module-explorer-sidebar-search-icon\">\n <Search size={14} />\n </div>\n </div>\n\n <div className=\"solid-module-explorer-section-list solid-module-explorer-tree-list\">\n <MetadataTree\n nodes={filteredTreeNodes}\n activePath={activePath}\n expandedPaths={visibleExpandedPaths}\n onToggle={toggleExpandedPath}\n onSelect={selectPath}\n />\n </div>\n </div>\n </aside>\n\n <div\n className=\"solid-module-explorer-resizer\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label=\"Resize metadata navigation panel\"\n onPointerDown={handleSidebarResizeStart}\n />\n\n <section className=\"solid-module-explorer-main\">\n <div className=\"solid-module-explorer-main-header\">\n <div className=\"solid-module-explorer-main-title\">\n <div className=\"solid-module-explorer-main-heading-row\">\n <h4>{activeNode?.label ?? activeSection?.title ?? \"Metadata\"}</h4>\n <p>{activePath || \"Choose a metadata node from the tree.\"}</p>\n </div>\n {hasValidationFailure && (\n <div className=\"solid-module-explorer-inline-validation\" title={validationSummary}>\n {validationSummary}\n </div>\n )}\n {isReadOnlyExplorer && (\n <div className=\"solid-module-explorer-readonly-note\">\n This metadata is browse-only in the explorer.\n </div>\n )}\n </div>\n <div className=\"solid-module-explorer-main-actions\">\n <div className=\"solid-module-explorer-main-meta\">\n {hasMutableChanges && <SolidTag tone=\"warn\">Unsaved changes</SolidTag>}\n {editorError && <SolidTag tone=\"danger\">Invalid JSON</SolidTag>}\n {isReadOnlyExplorer && <SolidTag tone=\"info\">Read only</SolidTag>}\n </div>\n {!isReadOnlyExplorer && (\n <SolidButton\n size=\"sm\"\n leftIcon={<Save size={14} />}\n onClick={handleSave}\n loading={isSavingSection}\n disabled={!canSave}\n >\n Save Section\n </SolidButton>\n )}\n <SolidDropdownMenu>\n <SolidDropdownMenuTrigger asChild>\n <SolidButton\n variant=\"ghost\"\n size=\"sm\"\n className=\"solid-icon-button\"\n aria-label=\"Explorer actions\"\n >\n <Settings size={16} />\n </SolidButton>\n </SolidDropdownMenuTrigger>\n <SolidDropdownMenuContent className=\"solid-module-explorer-actions-menu\">\n {!isReadOnlyExplorer && (\n <SolidDropdownMenuItem onSelect={handleFormat}>\n <div className=\"solid-module-explorer-actions-item\">\n <Wand2 size={14} />\n <span>Format</span>\n </div>\n </SolidDropdownMenuItem>\n )}\n <SolidDropdownMenuItem onSelect={handleValidate} disabled={isValidatingSection}>\n <div className=\"solid-module-explorer-actions-item\">\n <FileSearch size={14} />\n <span>{isValidatingSection ? \"Validating...\" : \"Validate\"}</span>\n </div>\n </SolidDropdownMenuItem>\n <SolidDropdownMenuItem onSelect={() => setIsContextDialogOpen(true)}>\n <div className=\"solid-module-explorer-actions-item\">\n <Settings size={14} />\n <span>Context</span>\n </div>\n </SolidDropdownMenuItem>\n {allowSeed && (\n <SolidDropdownMenuItem onSelect={() => setIsSeedDialogOpen(true)} disabled={!moduleId || isSeedingModule}>\n <div className=\"solid-module-explorer-actions-item\">\n <DatabaseZap size={14} />\n <span>{isSeedingModule ? \"Seeding...\" : \"Seed\"}</span>\n </div>\n </SolidDropdownMenuItem>\n )}\n </SolidDropdownMenuContent>\n </SolidDropdownMenu>\n </div>\n </div>\n\n {/* {!scopedArrayPath && ( */}\n <div className=\"solid-module-explorer-field-name-note\" role=\"note\">\n <strong>Important:</strong>{\" \"}\n Do not rename a field directly. To change a field name, delete the existing field, save the section,\n validate the generated code, and then create a new field with the required name. Direct renaming can\n cause serious metadata and code generation issues.\n </div>\n {/* )} */}\n\n <div className=\"solid-module-explorer-editor-wrap\">\n <div className=\"solid-module-explorer-editor-shell\">\n {isDocumentLoading ? (\n <div style={{ padding: \"1rem\" }} className=\"solid-module-explorer-empty\">\n Loading metadata JSON...\n </div>\n ) : (\n <JsonEditorSurface\n ref={editorRef}\n value={savedValue}\n resetToken={editorResetToken}\n readOnly={isReadOnlyExplorer}\n onValueChange={setEditorValue}\n onErrorChange={setEditorError}\n />\n )}\n </div>\n </div>\n </section>\n </div>\n </div>\n\n <SolidDialog\n open={isContextDialogOpen}\n onOpenChange={setIsContextDialogOpen}\n header=\"Context\"\n contentClassName=\"solid-module-explorer-context-dialog\"\n >\n <SolidDialogSeparator />\n <SolidDialogBody>\n <div className=\"solid-module-explorer-context-dialog-body\">\n <div className=\"solid-module-explorer-context-dialog-header\">\n <div className=\"solid-module-explorer-context-dialog-title\">\n {activeNode?.label ?? \"Metadata node\"}\n </div>\n <div className=\"solid-module-explorer-context-dialog-meta\">\n {activeNode?.sectionTitle && <SolidTag tone=\"info\">{activeNode.sectionTitle}</SolidTag>}\n </div>\n </div>\n\n <div className=\"solid-module-explorer-context-grid\">\n <div className=\"solid-module-explorer-context-row\">\n <div className=\"solid-module-explorer-context-label\">JSON Path</div>\n <div className=\"solid-module-explorer-context-value\">{activePath || \"-\"}</div>\n </div>\n <div className=\"solid-module-explorer-context-row\">\n <div className=\"solid-module-explorer-context-label\">File</div>\n <div className=\"solid-module-explorer-context-value\">{manifestData?.filePath ?? \"-\"}</div>\n </div>\n {localActionSummary && (\n <div className=\"solid-module-explorer-context-row\">\n <div className=\"solid-module-explorer-context-label\">Last Action</div>\n <div className=\"solid-module-explorer-context-value\">{localActionSummary}</div>\n </div>\n )}\n </div>\n\n <div className=\"solid-module-explorer-context-note\">\n Clicking any branch or leaf in the tree opens that exact JSON fragment on the right.\n </div>\n </div>\n </SolidDialogBody>\n </SolidDialog>\n\n <SolidDialog\n open={isSeedDialogOpen}\n onOpenChange={setIsSeedDialogOpen}\n contentClassName=\"solid-module-explorer-seed-dialog\"\n >\n <SolidDialogHeader>\n <SolidDialogTitle>Seed Module Metadata</SolidDialogTitle>\n </SolidDialogHeader>\n <SolidDialogSeparator />\n <SolidDialogBody>\n <div className=\"solid-module-explorer-seed-dialog-body\">\n <p>\n Re-seed metadata for <strong>{moduleName}</strong> from its JSON file?\n </p>\n <p className=\"solid-module-explorer-seed-dialog-note\">\n This only re-runs metadata seeding for the current module and refreshes database metadata from the module JSON.\n </p>\n </div>\n </SolidDialogBody>\n <SolidDialogFooter>\n <SolidButton variant=\"outline\" size=\"sm\" onClick={() => setIsSeedDialogOpen(false)} disabled={isSeedingModule}>\n Cancel\n </SolidButton>\n <SolidButton size=\"sm\" onClick={handleSeedModule} loading={isSeedingModule} disabled={!moduleId}>\n Seed\n </SolidButton>\n </SolidDialogFooter>\n </SolidDialog>\n </div>\n );\n}\n"]}
@@ -904,6 +904,15 @@ export function ModuleMetadataExplorer({
904
904
  </div>
905
905
  </div>
906
906
 
907
+ {/* {!scopedArrayPath && ( */}
908
+ <div className="solid-module-explorer-field-name-note" role="note">
909
+ <strong>Important:</strong>{" "}
910
+ Do not rename a field directly. To change a field name, delete the existing field, save the section,
911
+ validate the generated code, and then create a new field with the required name. Direct renaming can
912
+ cause serious metadata and code generation issues.
913
+ </div>
914
+ {/* )} */}
915
+
907
916
  <div className="solid-module-explorer-editor-wrap">
908
917
  <div className="solid-module-explorer-editor-shell">
909
918
  {isDocumentLoading ? (
@@ -1 +1 @@
1
- {"version":3,"file":"SolidTreeView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tree/SolidTreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAsCf,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,CAAC,MAAM,EAAE;QACpB,uBAAuB,CAAC,EAAE,GAAG,CAAC;QAC9B,gBAAgB,CAAC,EAAE,GAAG,CAAC;QACvB,sBAAsB,CAAC,EAAE,GAAG,CAAC;QAC7B,2BAA2B,CAAC,EAAE,GAAG,CAAC;KACnC,KAAK,IAAI,CAAC;IACX,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpE,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;QACtB,OAAO,EAA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