@sparkelf/dsh-dataops-managed 0.3.32 → 0.3.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -789,22 +789,22 @@ window.__ModuleLoader__.load({
789
789
  document.head.appendChild(tag);
790
790
  }
791
791
  var ManagedDataOpsSection_module_css_default = {
792
- "fields": "_2dqzjG_fields",
793
- "row": "_2dqzjG_row",
794
- "copy": "_2dqzjG_copy",
795
- "actions": "_2dqzjG_actions",
796
- "meta": "_2dqzjG_meta",
797
- "reviewRows": "_2dqzjG_reviewRows",
798
- "heading": "_2dqzjG_heading",
792
+ "label": "_2dqzjG_label",
799
793
  "section": "_2dqzjG_section",
800
794
  "card": "_2dqzjG_card",
801
795
  "refusal": "_2dqzjG_refusal",
802
- "reviewRow": "_2dqzjG_reviewRow",
796
+ "row": "_2dqzjG_row",
797
+ "copy": "_2dqzjG_copy",
798
+ "status": "_2dqzjG_status",
799
+ "meta": "_2dqzjG_meta",
803
800
  "reviewActions": "_2dqzjG_reviewActions",
804
801
  "title": "_2dqzjG_title",
805
- "status": "_2dqzjG_status",
802
+ "fields": "_2dqzjG_fields",
803
+ "reviewRows": "_2dqzjG_reviewRows",
804
+ "actions": "_2dqzjG_actions",
806
805
  "reviewHint": "_2dqzjG_reviewHint",
807
- "label": "_2dqzjG_label"
806
+ "reviewRow": "_2dqzjG_reviewRow",
807
+ "heading": "_2dqzjG_heading"
808
808
  };
809
809
  //#endregion
810
810
  //#region src/client/ReviewSettingsCard.tsx
@@ -1685,24 +1685,24 @@ window.__ModuleLoader__.load({
1685
1685
  document.head.appendChild(tag);
1686
1686
  }
1687
1687
  var NotificationBell_module_css_default = {
1688
- "linkButton": "tE0trG_linkButton",
1688
+ "empty": "tE0trG_empty",
1689
1689
  "dot": "tE0trG_dot",
1690
- "rowBody": "tE0trG_rowBody",
1691
- "button": "tE0trG_button",
1692
- "actions": "tE0trG_actions",
1690
+ "demo": "tE0trG_demo",
1691
+ "linkButton": "tE0trG_linkButton",
1692
+ "badge": "tE0trG_badge",
1693
1693
  "dialog": "tE0trG_dialog",
1694
- "pager": "tE0trG_pager",
1694
+ "rowTitle": "tE0trG_rowTitle",
1695
1695
  "rowTime": "tE0trG_rowTime",
1696
1696
  "rowMeta": "tE0trG_rowMeta",
1697
- "demo": "tE0trG_demo",
1697
+ "button": "tE0trG_button",
1698
1698
  "rowText": "tE0trG_rowText",
1699
- "bell": "tE0trG_bell",
1700
1699
  "list": "tE0trG_list",
1701
- "rowTitle": "tE0trG_rowTitle",
1702
- "rowIcon": "tE0trG_rowIcon",
1700
+ "bell": "tE0trG_bell",
1703
1701
  "row": "tE0trG_row",
1704
- "empty": "tE0trG_empty",
1705
- "badge": "tE0trG_badge"
1702
+ "actions": "tE0trG_actions",
1703
+ "rowBody": "tE0trG_rowBody",
1704
+ "pager": "tE0trG_pager",
1705
+ "rowIcon": "tE0trG_rowIcon"
1706
1706
  };
1707
1707
  //#endregion
1708
1708
  //#region src/client/NotificationBell.tsx
@@ -1993,62 +1993,62 @@ window.__ModuleLoader__.load({
1993
1993
  document.head.appendChild(tag);
1994
1994
  }
1995
1995
  var SkillPlazaSection_module_css_default = {
1996
- "rejectedTag": "_9FdZvq_rejectedTag",
1997
- "title": "_9FdZvq_title",
1998
- "cardTitle": "_9FdZvq_cardTitle",
1999
- "empty": "_9FdZvq_empty",
2000
- "tagTop": "_9FdZvq_tagTop",
2001
- "auditFooter": "_9FdZvq_auditFooter",
2002
- "risk": "_9FdZvq_risk",
2003
- "tabCount": "_9FdZvq_tabCount",
2004
- "riskFailed": "_9FdZvq_riskFailed",
2005
- "sharedTag": "_9FdZvq_sharedTag",
2006
- "riskScore": "_9FdZvq_riskScore",
2007
- "findings": "_9FdZvq_findings",
2008
- "noteField": "_9FdZvq_noteField",
2009
- "cardTop": "_9FdZvq_cardTop",
2010
1996
  "mine": "_9FdZvq_mine",
2011
- "card": "_9FdZvq_card",
2012
- "cardEnd": "_9FdZvq_cardEnd",
2013
- "reviewButton": "_9FdZvq_reviewButton",
2014
- "findingText": "_9FdZvq_findingText",
2015
- "section": "_9FdZvq_section",
2016
- "cardDesc": "_9FdZvq_cardDesc",
2017
- "cardMarks": "_9FdZvq_cardMarks",
2018
1997
  "riskHead": "_9FdZvq_riskHead",
1998
+ "severity": "_9FdZvq_severity",
1999
+ "demoTag": "_9FdZvq_demoTag",
2000
+ "findings": "_9FdZvq_findings",
2001
+ "findingText": "_9FdZvq_findingText",
2002
+ "audit": "_9FdZvq_audit",
2003
+ "cardTop": "_9FdZvq_cardTop",
2004
+ "detailButton": "_9FdZvq_detailButton",
2005
+ "risk": "_9FdZvq_risk",
2019
2006
  "findingHint": "_9FdZvq_findingHint",
2020
- "departmentLabel": "_9FdZvq_departmentLabel",
2021
- "emptyText": "_9FdZvq_emptyText",
2022
- "mark": "_9FdZvq_mark",
2023
- "auditDialog": "_9FdZvq_auditDialog",
2024
- "riskEmpty": "_9FdZvq_riskEmpty",
2025
- "reviewNote": "_9FdZvq_reviewNote",
2007
+ "noteField": "_9FdZvq_noteField",
2026
2008
  "reviewError": "_9FdZvq_reviewError",
2009
+ "cardDesc": "_9FdZvq_cardDesc",
2027
2010
  "tabActive": "_9FdZvq_tabActive",
2028
- "cards": "_9FdZvq_cards",
2011
+ "tab": "_9FdZvq_tab",
2012
+ "cardMarks": "_9FdZvq_cardMarks",
2013
+ "tagTop": "_9FdZvq_tagTop",
2014
+ "title": "_9FdZvq_title",
2015
+ "detailLabel": "_9FdZvq_detailLabel",
2016
+ "detailRow": "_9FdZvq_detailRow",
2017
+ "departmentSelect": "_9FdZvq_departmentSelect",
2018
+ "detailValue": "_9FdZvq_detailValue",
2019
+ "reviewButton": "_9FdZvq_reviewButton",
2020
+ "head": "_9FdZvq_head",
2021
+ "riskScore": "_9FdZvq_riskScore",
2022
+ "riskFailed": "_9FdZvq_riskFailed",
2023
+ "cardIcon": "_9FdZvq_cardIcon",
2024
+ "empty": "_9FdZvq_empty",
2025
+ "titleCount": "_9FdZvq_titleCount",
2029
2026
  "finding": "_9FdZvq_finding",
2030
- "detailButton": "_9FdZvq_detailButton",
2031
- "demoTag": "_9FdZvq_demoTag",
2032
- "riskSummary": "_9FdZvq_riskSummary",
2027
+ "reviewNote": "_9FdZvq_reviewNote",
2033
2028
  "notice": "_9FdZvq_notice",
2034
- "detail": "_9FdZvq_detail",
2035
- "detailValue": "_9FdZvq_detailValue",
2036
- "severity": "_9FdZvq_severity",
2037
- "pendingTag": "_9FdZvq_pendingTag",
2038
- "departmentSelect": "_9FdZvq_departmentSelect",
2029
+ "tabs": "_9FdZvq_tabs",
2039
2030
  "emptyIcon": "_9FdZvq_emptyIcon",
2031
+ "rejectedTag": "_9FdZvq_rejectedTag",
2032
+ "section": "_9FdZvq_section",
2033
+ "auditFooter": "_9FdZvq_auditFooter",
2034
+ "departmentLabel": "_9FdZvq_departmentLabel",
2040
2035
  "departmentBar": "_9FdZvq_departmentBar",
2036
+ "sharedTag": "_9FdZvq_sharedTag",
2037
+ "detail": "_9FdZvq_detail",
2038
+ "emptyText": "_9FdZvq_emptyText",
2041
2039
  "dialog": "_9FdZvq_dialog",
2042
- "status": "_9FdZvq_status",
2043
- "cardIcon": "_9FdZvq_cardIcon",
2044
- "detailRow": "_9FdZvq_detailRow",
2045
- "titleCount": "_9FdZvq_titleCount",
2046
- "tab": "_9FdZvq_tab",
2047
- "audit": "_9FdZvq_audit",
2048
- "head": "_9FdZvq_head",
2040
+ "auditDialog": "_9FdZvq_auditDialog",
2049
2041
  "headRow": "_9FdZvq_headRow",
2050
- "detailLabel": "_9FdZvq_detailLabel",
2051
- "tabs": "_9FdZvq_tabs"
2042
+ "cardEnd": "_9FdZvq_cardEnd",
2043
+ "pendingTag": "_9FdZvq_pendingTag",
2044
+ "cardTitle": "_9FdZvq_cardTitle",
2045
+ "riskEmpty": "_9FdZvq_riskEmpty",
2046
+ "card": "_9FdZvq_card",
2047
+ "status": "_9FdZvq_status",
2048
+ "tabCount": "_9FdZvq_tabCount",
2049
+ "riskSummary": "_9FdZvq_riskSummary",
2050
+ "cards": "_9FdZvq_cards",
2051
+ "mark": "_9FdZvq_mark"
2052
2052
  };
2053
2053
  //#endregion
2054
2054
  //#region src/client/SkillPlazaSection.tsx
@@ -2713,19 +2713,19 @@ window.__ModuleLoader__.load({
2713
2713
  document.head.appendChild(tag);
2714
2714
  }
2715
2715
  var WanxiangBrand_module_css_default = {
2716
- "unitCore": "s0HPxG_unitCore",
2717
- "mark": "s0HPxG_mark",
2718
- "unit-top": "s0HPxG_unit-top",
2719
- "sidebarName": "s0HPxG_sidebarName",
2720
- "unit-right": "s0HPxG_unit-right",
2721
- "wordmark": "s0HPxG_wordmark",
2722
2716
  "animatedMark": "s0HPxG_animatedMark",
2723
2717
  "unit-core": "s0HPxG_unit-core",
2724
- "unitTop": "s0HPxG_unitTop",
2718
+ "unitCore": "s0HPxG_unitCore",
2725
2719
  "harness": "s0HPxG_harness",
2726
- "unit-left": "s0HPxG_unit-left",
2720
+ "wordmark": "s0HPxG_wordmark",
2721
+ "unitTop": "s0HPxG_unitTop",
2722
+ "mark": "s0HPxG_mark",
2723
+ "unit-top": "s0HPxG_unit-top",
2727
2724
  "unitRight": "s0HPxG_unitRight",
2728
- "unitLeft": "s0HPxG_unitLeft"
2725
+ "unitLeft": "s0HPxG_unitLeft",
2726
+ "unit-left": "s0HPxG_unit-left",
2727
+ "unit-right": "s0HPxG_unit-right",
2728
+ "sidebarName": "s0HPxG_sidebarName"
2729
2729
  };
2730
2730
  //#endregion
2731
2731
  //#region src/client/WanxiangBrand.tsx
@@ -3142,72 +3142,72 @@ window.__ModuleLoader__.load({
3142
3142
  document.head.appendChild(tag);
3143
3143
  }
3144
3144
  var PermissionCenterSection_module_css_default = {
3145
- "matrix": "PNbOqW_matrix",
3146
- "treeName": "PNbOqW_treeName",
3147
- "candidate": "PNbOqW_candidate",
3148
- "protected": "PNbOqW_protected",
3145
+ "waiting": "PNbOqW_waiting",
3149
3146
  "field": "PNbOqW_field",
3150
- "tabs": "PNbOqW_tabs",
3151
- "matrixScroll": "PNbOqW_matrixScroll",
3152
- "comboboxOption": "PNbOqW_comboboxOption",
3153
- "dialogBody": "PNbOqW_dialogBody",
3154
- "matrixModule": "PNbOqW_matrixModule",
3155
- "dialog": "PNbOqW_dialog",
3156
- "candidates": "PNbOqW_candidates",
3157
- "detailGrid": "PNbOqW_detailGrid",
3158
- "comboboxSearch": "PNbOqW_comboboxSearch",
3147
+ "treeName": "PNbOqW_treeName",
3148
+ "deptAdmins": "PNbOqW_deptAdmins",
3149
+ "adminTag": "PNbOqW_adminTag",
3159
3150
  "rowActions": "PNbOqW_rowActions",
3160
- "treeActions": "PNbOqW_treeActions",
3151
+ "muted": "PNbOqW_muted",
3152
+ "treeChildren": "PNbOqW_treeChildren",
3153
+ "comboboxList": "PNbOqW_comboboxList",
3161
3154
  "combobox": "PNbOqW_combobox",
3162
- "treeRoot": "PNbOqW_treeRoot",
3155
+ "dialog": "PNbOqW_dialog",
3156
+ "comboboxHint": "PNbOqW_comboboxHint",
3157
+ "panelHead": "PNbOqW_panelHead",
3163
3158
  "comboboxTrigger": "PNbOqW_comboboxTrigger",
3164
- "comboboxPlaceholder": "PNbOqW_comboboxPlaceholder",
3165
3159
  "demo": "PNbOqW_demo",
3166
- "empty": "PNbOqW_empty",
3160
+ "department": "PNbOqW_department",
3161
+ "protected": "PNbOqW_protected",
3162
+ "candidates": "PNbOqW_candidates",
3163
+ "treeToggle": "PNbOqW_treeToggle",
3164
+ "scopeBadge": "PNbOqW_scopeBadge",
3165
+ "dialogBody": "PNbOqW_dialogBody",
3166
+ "search": "PNbOqW_search",
3167
+ "comboboxEmpty": "PNbOqW_comboboxEmpty",
3168
+ "permission": "PNbOqW_permission",
3169
+ "matrixNote": "PNbOqW_matrixNote",
3170
+ "treeRow": "PNbOqW_treeRow",
3171
+ "candidate": "PNbOqW_candidate",
3172
+ "matrixPermission": "PNbOqW_matrixPermission",
3167
3173
  "dialogHint": "PNbOqW_dialogHint",
3168
- "page": "PNbOqW_page",
3169
3174
  "notice": "PNbOqW_notice",
3175
+ "panel": "PNbOqW_panel",
3176
+ "matrix": "PNbOqW_matrix",
3177
+ "matrixScroll": "PNbOqW_matrixScroll",
3178
+ "detailGrid": "PNbOqW_detailGrid",
3179
+ "table": "PNbOqW_table",
3180
+ "permDescription": "PNbOqW_permDescription",
3181
+ "permCopy": "PNbOqW_permCopy",
3182
+ "page": "PNbOqW_page",
3183
+ "matrixGroup": "PNbOqW_matrixGroup",
3184
+ "treeActions": "PNbOqW_treeActions",
3185
+ "onlyAdmin": "PNbOqW_onlyAdmin",
3186
+ "subtitle": "PNbOqW_subtitle",
3170
3187
  "sectionTitle": "PNbOqW_sectionTitle",
3171
- "readOnly": "PNbOqW_readOnly",
3172
- "departments": "PNbOqW_departments",
3173
- "adminTag": "PNbOqW_adminTag",
3188
+ "comboboxSearch": "PNbOqW_comboboxSearch",
3189
+ "comboboxCheck": "PNbOqW_comboboxCheck",
3190
+ "tabs": "PNbOqW_tabs",
3191
+ "comboboxOptionActive": "PNbOqW_comboboxOptionActive",
3174
3192
  "pager": "PNbOqW_pager",
3175
- "subtitle": "PNbOqW_subtitle",
3176
- "deptAdmins": "PNbOqW_deptAdmins",
3193
+ "departments": "PNbOqW_departments",
3194
+ "empty": "PNbOqW_empty",
3195
+ "tabActive": "PNbOqW_tabActive",
3177
3196
  "title": "PNbOqW_title",
3178
- "matrixPermission": "PNbOqW_matrixPermission",
3179
- "comboboxList": "PNbOqW_comboboxList",
3180
- "treeToggle": "PNbOqW_treeToggle",
3181
- "comboboxEmpty": "PNbOqW_comboboxEmpty",
3182
- "treeChildren": "PNbOqW_treeChildren",
3183
- "scopeBadge": "PNbOqW_scopeBadge",
3184
- "panelFoot": "PNbOqW_panelFoot",
3185
- "comboboxCheck": "PNbOqW_comboboxCheck",
3186
- "onlyAdmin": "PNbOqW_onlyAdmin",
3187
3197
  "head": "PNbOqW_head",
3188
- "search": "PNbOqW_search",
3189
- "matrixNote": "PNbOqW_matrixNote",
3190
- "comboboxOptionActive": "PNbOqW_comboboxOptionActive",
3191
- "panelHead": "PNbOqW_panelHead",
3192
- "error": "PNbOqW_error",
3193
- "department": "PNbOqW_department",
3194
- "comboboxHint": "PNbOqW_comboboxHint",
3195
- "matrixGroup": "PNbOqW_matrixGroup",
3196
- "permission": "PNbOqW_permission",
3198
+ "readOnly": "PNbOqW_readOnly",
3199
+ "matrixModule": "PNbOqW_matrixModule",
3197
3200
  "dialogFooter": "PNbOqW_dialogFooter",
3198
- "tab": "PNbOqW_tab",
3199
- "treeSpacer": "PNbOqW_treeSpacer",
3200
3201
  "tableScroll": "PNbOqW_tableScroll",
3201
- "permCopy": "PNbOqW_permCopy",
3202
- "tabActive": "PNbOqW_tabActive",
3203
- "table": "PNbOqW_table",
3204
- "waiting": "PNbOqW_waiting",
3205
- "treeRow": "PNbOqW_treeRow",
3206
- "comboboxMenu": "PNbOqW_comboboxMenu",
3202
+ "treeSpacer": "PNbOqW_treeSpacer",
3207
3203
  "copied": "PNbOqW_copied",
3208
- "panel": "PNbOqW_panel",
3209
- "muted": "PNbOqW_muted",
3210
- "permDescription": "PNbOqW_permDescription"
3204
+ "tab": "PNbOqW_tab",
3205
+ "treeRoot": "PNbOqW_treeRoot",
3206
+ "comboboxOption": "PNbOqW_comboboxOption",
3207
+ "error": "PNbOqW_error",
3208
+ "comboboxMenu": "PNbOqW_comboboxMenu",
3209
+ "panelFoot": "PNbOqW_panelFoot",
3210
+ "comboboxPlaceholder": "PNbOqW_comboboxPlaceholder"
3211
3211
  };
3212
3212
  //#endregion
3213
3213
  //#region src/client/combobox.ts
@@ -4645,18 +4645,18 @@ window.__ModuleLoader__.load({
4645
4645
  document.head.appendChild(tag);
4646
4646
  }
4647
4647
  var WorkspaceUpgradePrompt_module_css_default = {
4648
+ "sessionRow": "razUfG_sessionRow",
4649
+ "copy": "razUfG_copy",
4650
+ "sessionTitle": "razUfG_sessionTitle",
4651
+ "title": "razUfG_title",
4648
4652
  "sessionPath": "razUfG_sessionPath",
4649
- "dialogBody": "razUfG_dialogBody",
4650
4653
  "error": "razUfG_error",
4651
- "copy": "razUfG_copy",
4652
- "dialogText": "razUfG_dialogText",
4653
- "sessionList": "razUfG_sessionList",
4654
+ "actions": "razUfG_actions",
4654
4655
  "banner": "razUfG_banner",
4655
- "title": "razUfG_title",
4656
+ "dialogBody": "razUfG_dialogBody",
4657
+ "sessionList": "razUfG_sessionList",
4656
4658
  "body": "razUfG_body",
4657
- "actions": "razUfG_actions",
4658
- "sessionRow": "razUfG_sessionRow",
4659
- "sessionTitle": "razUfG_sessionTitle"
4659
+ "dialogText": "razUfG_dialogText"
4660
4660
  };
4661
4661
  //#endregion
4662
4662
  //#region src/client/WorkspaceUpgradePrompt.tsx
@@ -4834,14 +4834,20 @@ window.__ModuleLoader__.load({
4834
4834
  //#endregion
4835
4835
  //#region src/client/ResourceCatalogSidebar.tsx
4836
4836
  /**
4837
- * The tab's own data-catalog tree (168px): 全部 / 收藏 / 置顶 + one row per catalog.
4837
+ * The tab's own data-catalog tree (168px).
4838
4838
  *
4839
- * The portal page inside the iframe is the product's card list and detail view; the host
4840
- * sidebar owns the tree and only sends the active filter to that page, so the portal never
4841
- * renders its own left column in embed mode.
4839
+ * 全部 / 收藏 / 置顶 stay as they were. The catalog section mirrors the portal's folder tree:
4840
+ * multi-root (数据中台 / 交投), expandable folders, counts and a recursive filter. Data comes
4841
+ * from GET /resources/folder-tree through the Host bridge; the right-hand portal iframe only
4842
+ * receives the resulting resource ids, so the portal page itself never renders its own sidebar
4843
+ * in embed mode.
4842
4844
  *
4843
4845
  * @module client/ResourceCatalogSidebar
4844
4846
  */
4847
+ const DOMAIN_LABELS = {
4848
+ "data-platform": "数据中台",
4849
+ jiaotou: "交投"
4850
+ };
4845
4851
  const CSS = `
4846
4852
  .dsh-cat{flex:0 0 168px;width:168px;min-width:0;border-right:1px solid var(--dsw-alias-border-l1,#2a2c33);padding:8px 6px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;color:var(--dsw-alias-label-primary,#e6e8ee)}
4847
4853
  .dsh-cat__head{display:flex;align-items:center;gap:6px;height:34px;padding:0 6px 0 8px;flex:0 0 auto}
@@ -4859,9 +4865,49 @@ window.__ModuleLoader__.load({
4859
4865
  .dsh-cat__item.is-active{background:var(--dsw-alias-interactive-bg-active,rgba(255,255,255,.10));color:var(--dsw-alias-label-primary,#fff)}
4860
4866
  .dsh-cat__item .n{margin-left:auto;font-size:10px;color:var(--dsw-alias-label-caption,#8b93a4);font-variant-numeric:tabular-nums}
4861
4867
  .dsh-cat__item .ico{width:14px;text-align:center;font-size:11px;flex:0 0 auto}
4868
+ .dsh-cat__tree{display:flex;flex-direction:column;gap:1px;padding:0 2px 6px}
4869
+ .dsh-cat__node{display:flex;flex-direction:column}
4870
+ .dsh-cat__row{display:flex;align-items:center;gap:5px;width:100%;height:28px;padding:0 6px;border:0;border-radius:4px;background:transparent;color:var(--dsw-alias-label-secondary,#aab2c2);font-size:12px;text-align:left;cursor:pointer}
4871
+ .dsh-cat__row:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.06))}
4872
+ .dsh-cat__row.is-active{background:var(--dsw-alias-interactive-bg-active,rgba(255,255,255,.10));color:var(--dsw-alias-label-primary,#fff)}
4873
+ .dsh-cat__tw{width:12px;height:12px;flex:0 0 auto;display:grid;place-items:center;color:var(--dsw-alias-label-caption,#8b93a4);transition:transform .15s ease}
4874
+ .dsh-cat__row.is-open .dsh-cat__tw{transform:rotate(90deg)}
4875
+ .dsh-cat__folder{width:14px;height:14px;flex:0 0 auto;color:var(--dsw-alias-state-business-primary,#5b9dff)}
4876
+ .dsh-cat__row.is-active .dsh-cat__folder{color:inherit}
4877
+ .dsh-cat__nm{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
4878
+ .dsh-cat__cnt{margin-left:auto;font-size:10px;color:var(--dsw-alias-label-caption,#8b93a4);font-variant-numeric:tabular-nums}
4879
+ .dsh-cat__kids{display:none;flex-direction:column;gap:1px;margin-left:13px;padding-left:4px;border-left:1px solid var(--dsw-alias-border-l1,#2a2c33)}
4880
+ .dsh-cat__kids.is-open{display:flex}
4862
4881
  `;
4882
+ const folderIcon = (open) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
4883
+ className: "dsh-cat__folder",
4884
+ viewBox: "0 0 16 16",
4885
+ fill: "none",
4886
+ stroke: "currentColor",
4887
+ strokeWidth: "1.3",
4888
+ "aria-hidden": "true",
4889
+ children: open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
4890
+ d: "M1.9 5.2h4.2l1.1 1.5h6.9l-1.5 6.1H2.6z",
4891
+ strokeLinejoin: "round"
4892
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
4893
+ d: "M1.9 4.2h4l1.1 1.6h7.1v7.1a1 1 0 0 1-1 1H2.9a1 1 0 0 1-1-1z",
4894
+ strokeLinejoin: "round"
4895
+ })
4896
+ });
4897
+ const normalizeNode = (node) => {
4898
+ const id = Number(node.id);
4899
+ const name = String(node.name ?? node.key ?? id);
4900
+ const children = Array.isArray(node.children) ? node.children.map((child) => normalizeNode(child)) : [];
4901
+ return {
4902
+ id,
4903
+ name,
4904
+ label: String(node.chineseName ?? DOMAIN_LABELS[name] ?? node.name ?? node.key ?? id),
4905
+ count: Number(node.recursiveResourceCount ?? node.resourceCount ?? 0),
4906
+ children
4907
+ };
4908
+ };
4863
4909
  function ResourceCatalogSidebar({ onFilter }) {
4864
- const [catalogs, setCatalogs] = (0, react.useState)([]);
4910
+ const [folders, setFolders] = (0, react.useState)([]);
4865
4911
  const [total, setTotal] = (0, react.useState)(0);
4866
4912
  const [favorites, setFavorites] = (0, react.useState)([]);
4867
4913
  const [pinned, setPinned] = (0, react.useState)([]);
@@ -4869,6 +4915,8 @@ window.__ModuleLoader__.load({
4869
4915
  const [pinnedTotal, setPinnedTotal] = (0, react.useState)(0);
4870
4916
  const [active, setActive] = (0, react.useState)("all");
4871
4917
  const [query, setQuery] = (0, react.useState)("");
4918
+ const [openKeys, setOpenKeys] = (0, react.useState)(() => /* @__PURE__ */ new Set());
4919
+ const [expandedOnce, setExpandedOnce] = (0, react.useState)(false);
4872
4920
  (0, react.useEffect)(() => {
4873
4921
  const style = document.createElement("style");
4874
4922
  style.dataset.dataopsCatalogTree = "true";
@@ -4881,22 +4929,24 @@ window.__ModuleLoader__.load({
4881
4929
  let timer;
4882
4930
  const load = async () => {
4883
4931
  try {
4884
- const [listResponse, favoriteResponse, pinnedResponse] = await Promise.all([
4932
+ const [treeResponse, listResponse, favoriteResponse, pinnedResponse] = await Promise.all([
4933
+ fetch("/integrations/dataops/resources/folder-tree", { headers: { accept: "application/json" } }),
4885
4934
  fetch("/integrations/dataops/resources?page=1&pageSize=100", { headers: { accept: "application/json" } }),
4886
4935
  fetch("/integrations/dataops/resources/favorites?page=1&pageSize=100", { headers: { accept: "application/json" } }),
4887
4936
  fetch("/integrations/dataops/resources/pinned?page=1&pageSize=100", { headers: { accept: "application/json" } })
4888
4937
  ]);
4889
4938
  if (!live) return false;
4890
- if (!listResponse.ok) throw new Error("HTTP " + String(listResponse.status));
4891
- const list = await listResponse.json();
4892
- const counts = /* @__PURE__ */ new Map();
4893
- for (const row of list.items ?? []) {
4894
- if (typeof row.catalog !== "string" || row.catalog.trim() === "") continue;
4895
- counts.set(row.catalog, (counts.get(row.catalog) ?? 0) + 1);
4939
+ if (!treeResponse.ok) throw new Error("HTTP " + String(treeResponse.status));
4940
+ const roots = ((await treeResponse.json()).nodes ?? []).map(normalizeNode);
4941
+ setFolders(roots);
4942
+ if (!expandedOnce) {
4943
+ setOpenKeys(new Set(roots.filter((node) => node.children.length > 0).map((node) => node.id)));
4944
+ setExpandedOnce(true);
4945
+ }
4946
+ if (listResponse.ok) {
4947
+ const list = await listResponse.json();
4948
+ setTotal(typeof list.total === "number" ? list.total : (list.items ?? []).length);
4896
4949
  }
4897
- setCatalogs([...counts.entries()].sort((a, b) => a[0].localeCompare(b[0], "zh-CN")));
4898
- const nextTotal = typeof list.total === "number" ? list.total : (list.items ?? []).length;
4899
- setTotal(nextTotal);
4900
4950
  if (favoriteResponse.ok) {
4901
4951
  const page = await favoriteResponse.json();
4902
4952
  setFavorites((page.items ?? []).map((item) => item.resourceId ?? item.resource?.id).filter((id) => typeof id === "number"));
@@ -4924,31 +4974,22 @@ window.__ModuleLoader__.load({
4924
4974
  live = false;
4925
4975
  if (timer !== void 0) window.clearTimeout(timer);
4926
4976
  };
4927
- }, []);
4928
- const select = (0, react.useCallback)((key) => {
4929
- setActive(key);
4930
- if (key === "all") onFilter({ scope: "all" });
4931
- else if (key === "favorites") onFilter({
4932
- scope: "favorites",
4933
- ids: favorites
4934
- });
4935
- else if (key === "pinned") onFilter({
4936
- scope: "pinned",
4937
- ids: pinned
4938
- });
4939
- else onFilter({
4940
- scope: "catalog",
4941
- catalog: key.slice(8)
4942
- });
4943
- }, [
4944
- favorites,
4945
- pinned,
4946
- onFilter
4947
- ]);
4977
+ }, [expandedOnce]);
4948
4978
  const item = (key, icon, label, count) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
4949
4979
  type: "button",
4950
4980
  className: "dsh-cat__item" + (active === key ? " is-active" : ""),
4951
- onClick: () => select(key),
4981
+ onClick: () => {
4982
+ setActive(key);
4983
+ if (key === "all") onFilter({ scope: "all" });
4984
+ else if (key === "favorites") onFilter({
4985
+ scope: "favorites",
4986
+ ids: favorites
4987
+ });
4988
+ else onFilter({
4989
+ scope: "pinned",
4990
+ ids: pinned
4991
+ });
4992
+ },
4952
4993
  "data-catalog-key": key,
4953
4994
  children: [
4954
4995
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -4970,7 +5011,81 @@ window.__ModuleLoader__.load({
4970
5011
  })
4971
5012
  ]
4972
5013
  }, key);
4973
- const visibleCatalogs = query.trim() === "" ? catalogs : catalogs.filter(([name]) => name.toLowerCase().includes(query.trim().toLowerCase()));
5014
+ const selectNode = (0, react.useCallback)(async (node) => {
5015
+ setActive("node:" + String(node.id));
5016
+ setOpenKeys((previous) => new Set(previous).add(node.id));
5017
+ try {
5018
+ const response = await fetch("/integrations/dataops/resources?catalogNodeId=" + String(node.id) + "&page=1&pageSize=100", { headers: { accept: "application/json" } });
5019
+ if (!response.ok) return;
5020
+ const page = await response.json();
5021
+ onFilter({
5022
+ scope: "catalogNode",
5023
+ nodeId: node.id,
5024
+ ids: (page.items ?? []).map((row) => row.id)
5025
+ });
5026
+ } catch {}
5027
+ }, [onFilter]);
5028
+ const matches = (node) => {
5029
+ const q = query.trim().toLowerCase();
5030
+ if (q === "") return true;
5031
+ return node.label.toLowerCase().includes(q) || node.children.some(matches);
5032
+ };
5033
+ const nodeHtml = (node) => {
5034
+ const open = openKeys.has(node.id);
5035
+ const activeNode = active === "node:" + String(node.id);
5036
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5037
+ className: "dsh-cat__node",
5038
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
5039
+ type: "button",
5040
+ className: "dsh-cat__row" + (open ? " is-open" : "") + (activeNode ? " is-active" : ""),
5041
+ onClick: () => {
5042
+ selectNode(node);
5043
+ },
5044
+ title: node.label,
5045
+ "data-catalog-key": "node:" + String(node.id),
5046
+ children: [
5047
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5048
+ className: "dsh-cat__tw",
5049
+ role: node.children.length > 0 ? "button" : void 0,
5050
+ "aria-label": node.children.length > 0 ? open ? "收起目录" : "展开目录" : void 0,
5051
+ onClick: (event) => {
5052
+ if (node.children.length === 0) return;
5053
+ event.stopPropagation();
5054
+ setOpenKeys((previous) => {
5055
+ const next = new Set(previous);
5056
+ if (next.has(node.id)) next.delete(node.id);
5057
+ else next.add(node.id);
5058
+ return next;
5059
+ });
5060
+ },
5061
+ children: node.children.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
5062
+ viewBox: "0 0 16 16",
5063
+ width: "10",
5064
+ height: "10",
5065
+ fill: "none",
5066
+ stroke: "currentColor",
5067
+ strokeWidth: "2.2",
5068
+ strokeLinecap: "round",
5069
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6 3.5 10.5 8 6 12.5" })
5070
+ }) : null
5071
+ }),
5072
+ folderIcon(open),
5073
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5074
+ className: "dsh-cat__nm",
5075
+ children: node.label
5076
+ }),
5077
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5078
+ className: "dsh-cat__cnt",
5079
+ children: node.count
5080
+ })
5081
+ ]
5082
+ }), node.children.length > 0 && matches(node) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5083
+ className: "dsh-cat__kids" + (open ? " is-open" : ""),
5084
+ children: node.children.filter(matches).map(nodeHtml)
5085
+ }) : null]
5086
+ }, node.id);
5087
+ };
5088
+ const visibleFolders = folders.filter(matches);
4974
5089
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
4975
5090
  className: "dsh-cat",
4976
5091
  "aria-label": "数据目录",
@@ -4983,7 +5098,7 @@ window.__ModuleLoader__.load({
4983
5098
  viewBox: "0 0 16 16",
4984
5099
  fill: "none",
4985
5100
  stroke: "currentColor",
4986
- "stroke-width": "1.4",
5101
+ strokeWidth: "1.4",
4987
5102
  "aria-hidden": "true",
4988
5103
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M1.8 4.2h4l1.2 1.6h7.2v7.2a1 1 0 0 1-1 1H2.8a1 1 0 0 1-1-1z" })
4989
5104
  }),
@@ -5003,7 +5118,7 @@ window.__ModuleLoader__.load({
5003
5118
  height: "13",
5004
5119
  fill: "none",
5005
5120
  stroke: "currentColor",
5006
- "stroke-width": "1.4",
5121
+ strokeWidth: "1.4",
5007
5122
  "aria-hidden": "true",
5008
5123
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
5009
5124
  x: "1.8",
@@ -5024,7 +5139,7 @@ window.__ModuleLoader__.load({
5024
5139
  height: "12",
5025
5140
  fill: "none",
5026
5141
  stroke: "currentColor",
5027
- "stroke-width": "1.5",
5142
+ strokeWidth: "1.5",
5028
5143
  "aria-hidden": "true",
5029
5144
  style: { opacity: .7 },
5030
5145
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
@@ -5046,15 +5161,17 @@ window.__ModuleLoader__.load({
5046
5161
  className: "dsh-cat__title",
5047
5162
  children: "数据目录"
5048
5163
  }),
5049
- catalogs.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5050
- style: {
5051
- padding: "4px 8px",
5052
- fontSize: 10.5,
5053
- opacity: .7
5054
- },
5055
- children: "暂无目录"
5056
- }) : null,
5057
- visibleCatalogs.map(([name, count]) => item("catalog:" + name, "▸", name, count))
5164
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5165
+ className: "dsh-cat__tree",
5166
+ children: visibleFolders.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5167
+ style: {
5168
+ padding: "4px 8px",
5169
+ fontSize: 10.5,
5170
+ opacity: .7
5171
+ },
5172
+ children: "暂无目录"
5173
+ }) : visibleFolders.map(nodeHtml)
5174
+ })
5058
5175
  ]
5059
5176
  });
5060
5177
  }
@@ -5226,10 +5343,14 @@ window.__ModuleLoader__.load({
5226
5343
  const postFilter = (0, react.useCallback)(() => {
5227
5344
  const frame = iframeRef.current?.contentWindow;
5228
5345
  if (!frame) return;
5346
+ const payload = filter.scope === "catalogNode" ? {
5347
+ scope: "favorites",
5348
+ ids: filter.ids ?? []
5349
+ } : filter;
5229
5350
  frame.postMessage({
5230
5351
  source: "dsh-host",
5231
5352
  type: "filter",
5232
- ...filter
5353
+ ...payload
5233
5354
  }, "*");
5234
5355
  }, [filter]);
5235
5356
  (0, react.useEffect)(() => {