dsh-workbench-tasks 5.2.35 → 5.2.40

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 (3) hide show
  1. package/lib/client.js +873 -214
  2. package/lib/index.js +1 -1
  3. package/package.json +2 -2
package/lib/client.js CHANGED
@@ -6379,6 +6379,27 @@ var require_copy = __commonJS({
6379
6379
  create: "\u521B\u5EFA",
6380
6380
  close: "\u5173\u95ED",
6381
6381
  taskId: "\u4EFB\u52A1 ID",
6382
+ stepContent: "\u5185\u5BB9",
6383
+ stepContentHint: "\u6807\u9898\u3001\u63CF\u8FF0\u4E0E\u8BA1\u5212",
6384
+ stepTags: "\u6807\u7B7E",
6385
+ stepTagsHint: "\u641C\u7D22\u5DF2\u6709\u6807\u7B7E\uFF0C\u6216\u8F93\u5165\u65B0\u6807\u7B7E\u56DE\u8F66\u6DFB\u52A0",
6386
+ stepTable: "\u4EFB\u52A1\u8868",
6387
+ stepTableHint: "\u9009\u62E9\u4EFB\u52A1\u5F52\u5230\u54EA\u5F20\u8868",
6388
+ stepTimeline: "\u65F6\u95F4\u7EBF",
6389
+ stepTimelineHint: "\u5173\u8054\u73B0\u6709\u65F6\u95F4\u7EBF\u6216\u65B0\u5EFA",
6390
+ stepWorkspace: "\u5DE5\u4F5C\u533A",
6391
+ stepWorkspaceHint: "\u5173\u8054\u5230\u5DE5\u4F5C\u533A\uFF08\u53EF\u9009\uFF09",
6392
+ stepConfirm: "\u786E\u8BA4",
6393
+ stepConfirmHint: "\u6838\u5BF9\u540E\u521B\u5EFA",
6394
+ stepBelong: "\u5F52\u5C5E",
6395
+ stepBelongHint: "\u65F6\u95F4\u7EBF\u3001\u5DE5\u4F5C\u533A\u4E0E\u4EFB\u52A1\u8868",
6396
+ stepPlan: "\u8BA1\u5212",
6397
+ stepPlanHint: "\u72B6\u6001\u3001\u4F18\u5148\u7EA7\u4E0E\u65E5\u671F",
6398
+ confirmHint: "\u786E\u8BA4\u65E0\u8BEF\u540E\u70B9\u300C\u521B\u5EFA\u300D\uFF1B\u521B\u5EFA\u540E\u4ECD\u53EF\u7F16\u8F91\u6807\u9898\u3001\u63CF\u8FF0\u4E0E\u5F52\u5C5E\u3002",
6399
+ createSteps: "\u521B\u5EFA\u6B65\u9AA4",
6400
+ nextStep: "\u4E0B\u4E00\u6B65",
6401
+ prevStep: "\u4E0A\u4E00\u6B65",
6402
+ workspace: "\u5DE5\u4F5C\u533A",
6382
6403
  addGroup: "\u65B0\u5EFA\u7EC4",
6383
6404
  addTable: "\u65B0\u5EFA\u8868",
6384
6405
  rename: "\u91CD\u547D\u540D",
@@ -6417,6 +6438,10 @@ var require_copy = __commonJS({
6417
6438
  noMore: "\u6CA1\u6709\u66F4\u591A",
6418
6439
  tagSelected: "\u5DF2\u9009",
6419
6440
  tagRemove: "\u79FB\u9664",
6441
+ tagSearchExisting: "\u641C\u7D22\u5DF2\u6709\u6807\u7B7E",
6442
+ tagNewPlaceholder: "\u65B0\u5EFA\u6807\u7B7E\uFF0C\u56DE\u8F66\u6DFB\u52A0\uFF0C\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694",
6443
+ tagAdd: "\u6DFB\u52A0",
6444
+ tagNoPick: "\u8FD8\u6CA1\u6709\u9009\u6807\u7B7E\uFF0C\u4ECE\u4E0B\u9762\u70B9\u4E00\u4E2A\u6216\u76F4\u63A5\u8F93\u5165\u65B0\u6807\u7B7E\u540D",
6420
6445
  workspaceFilter: "\u5DE5\u4F5C\u533A\u7B5B\u9009",
6421
6446
  allWorkspaces: "\u5168\u90E8\u5DE5\u4F5C\u533A",
6422
6447
  noWorkspaces: "\u6682\u65E0\u5DE5\u4F5C\u533A",
@@ -6545,6 +6570,27 @@ var require_copy = __commonJS({
6545
6570
  create: "Create",
6546
6571
  close: "Close",
6547
6572
  taskId: "Task ID",
6573
+ stepContent: "Content",
6574
+ stepContentHint: "Title, description, schedule",
6575
+ stepTags: "Tags",
6576
+ stepTagsHint: "Search existing tags, or type a new one and press Enter",
6577
+ stepTable: "Table",
6578
+ stepTableHint: "Pick the table this task belongs to",
6579
+ stepTimeline: "Timeline",
6580
+ stepTimelineHint: "Attach to an existing timeline or create one",
6581
+ stepWorkspace: "Workspace",
6582
+ stepWorkspaceHint: "Link to a workspace (optional)",
6583
+ stepConfirm: "Review",
6584
+ stepConfirmHint: "Check before creating",
6585
+ stepBelong: "Placement",
6586
+ stepBelongHint: "Timeline, workspace, table",
6587
+ stepPlan: "Schedule",
6588
+ stepPlanHint: "Status, priority, dates",
6589
+ confirmHint: "Review the summary, then Create. Title, description and placement stay editable afterwards.",
6590
+ createSteps: "Create steps",
6591
+ nextStep: "Next",
6592
+ prevStep: "Back",
6593
+ workspace: "Workspace",
6548
6594
  addGroup: "New group",
6549
6595
  addTable: "New table",
6550
6596
  rename: "Rename",
@@ -6583,6 +6629,10 @@ var require_copy = __commonJS({
6583
6629
  noMore: "No more",
6584
6630
  tagSelected: "Selected",
6585
6631
  tagRemove: "Remove",
6632
+ tagSearchExisting: "Search existing tags",
6633
+ tagNewPlaceholder: "New tag \u2014 press Enter to add, comma for several",
6634
+ tagAdd: "Add",
6635
+ tagNoPick: "No tags picked yet \u2014 click one below or type a new name",
6586
6636
  workspaceFilter: "Filter by workspace",
6587
6637
  allWorkspaces: "All workspaces",
6588
6638
  noWorkspaces: "No workspaces",
@@ -7451,17 +7501,43 @@ var init_list = __esm({
7451
7501
  }
7452
7502
  });
7453
7503
 
7504
+ // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-checks.mjs
7505
+ var list_checks_exports = {};
7506
+ __export(list_checks_exports, {
7507
+ __iconData: () => __iconData19,
7508
+ default: () => ListChecks
7509
+ });
7510
+ var __iconData19, ListChecks;
7511
+ var init_list_checks = __esm({
7512
+ "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-checks.mjs"() {
7513
+ init_createLucideIcon();
7514
+ __iconData19 = {
7515
+ name: "list-checks",
7516
+ size: 24,
7517
+ node: [
7518
+ ["path", { d: "M13 5h8", key: "a7qcls" }],
7519
+ ["path", { d: "M13 12h8", key: "h98zly" }],
7520
+ ["path", { d: "M13 19h8", key: "c3s6r1" }],
7521
+ ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
7522
+ ["path", { d: "m3 7 2 2 4-4", key: "1obspn" }]
7523
+ ]
7524
+ };
7525
+ __iconData19.node;
7526
+ ListChecks = createLucideIcon(__iconData19);
7527
+ }
7528
+ });
7529
+
7454
7530
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-check-big.mjs
7455
7531
  var square_check_big_exports = {};
7456
7532
  __export(square_check_big_exports, {
7457
- __iconData: () => __iconData19,
7533
+ __iconData: () => __iconData20,
7458
7534
  default: () => SquareCheckBig
7459
7535
  });
7460
- var __iconData19, SquareCheckBig;
7536
+ var __iconData20, SquareCheckBig;
7461
7537
  var init_square_check_big = __esm({
7462
7538
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-check-big.mjs"() {
7463
7539
  init_createLucideIcon();
7464
- __iconData19 = {
7540
+ __iconData20 = {
7465
7541
  name: "square-check-big",
7466
7542
  size: 24,
7467
7543
  node: [
@@ -7473,62 +7549,62 @@ var init_square_check_big = __esm({
7473
7549
  ],
7474
7550
  aliases: ["check-square"]
7475
7551
  };
7476
- __iconData19.node;
7477
- SquareCheckBig = createLucideIcon(__iconData19);
7552
+ __iconData20.node;
7553
+ SquareCheckBig = createLucideIcon(__iconData20);
7478
7554
  }
7479
7555
  });
7480
7556
 
7481
7557
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs
7482
7558
  var chevron_left_exports = {};
7483
7559
  __export(chevron_left_exports, {
7484
- __iconData: () => __iconData20,
7560
+ __iconData: () => __iconData21,
7485
7561
  default: () => ChevronLeft
7486
7562
  });
7487
- var __iconData20, ChevronLeft;
7563
+ var __iconData21, ChevronLeft;
7488
7564
  var init_chevron_left = __esm({
7489
7565
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs"() {
7490
7566
  init_createLucideIcon();
7491
- __iconData20 = {
7567
+ __iconData21 = {
7492
7568
  name: "chevron-left",
7493
7569
  size: 24,
7494
7570
  node: [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]]
7495
7571
  };
7496
- __iconData20.node;
7497
- ChevronLeft = createLucideIcon(__iconData20);
7572
+ __iconData21.node;
7573
+ ChevronLeft = createLucideIcon(__iconData21);
7498
7574
  }
7499
7575
  });
7500
7576
 
7501
7577
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs
7502
7578
  var chevron_right_exports = {};
7503
7579
  __export(chevron_right_exports, {
7504
- __iconData: () => __iconData21,
7580
+ __iconData: () => __iconData22,
7505
7581
  default: () => ChevronRight
7506
7582
  });
7507
- var __iconData21, ChevronRight;
7583
+ var __iconData22, ChevronRight;
7508
7584
  var init_chevron_right = __esm({
7509
7585
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs"() {
7510
7586
  init_createLucideIcon();
7511
- __iconData21 = {
7587
+ __iconData22 = {
7512
7588
  name: "chevron-right",
7513
7589
  size: 24,
7514
7590
  node: [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]]
7515
7591
  };
7516
- __iconData21.node;
7517
- ChevronRight = createLucideIcon(__iconData21);
7592
+ __iconData22.node;
7593
+ ChevronRight = createLucideIcon(__iconData22);
7518
7594
  }
7519
7595
  });
7520
7596
 
7521
7597
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder.mjs
7522
7598
  var folder_exports = {};
7523
7599
  __export(folder_exports, {
7524
- __iconData: () => __iconData22,
7600
+ __iconData: () => __iconData23,
7525
7601
  default: () => Folder
7526
7602
  });
7527
- var __iconData22, Folder;
7603
+ var __iconData23, Folder;
7528
7604
  var init_folder = __esm({
7529
7605
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder.mjs"() {
7530
7606
  init_createLucideIcon();
7531
- __iconData22 = {
7607
+ __iconData23 = {
7532
7608
  name: "folder",
7533
7609
  size: 24,
7534
7610
  node: [
@@ -7541,22 +7617,22 @@ var init_folder = __esm({
7541
7617
  ]
7542
7618
  ]
7543
7619
  };
7544
- __iconData22.node;
7545
- Folder = createLucideIcon(__iconData22);
7620
+ __iconData23.node;
7621
+ Folder = createLucideIcon(__iconData23);
7546
7622
  }
7547
7623
  });
7548
7624
 
7549
7625
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder-open.mjs
7550
7626
  var folder_open_exports = {};
7551
7627
  __export(folder_open_exports, {
7552
- __iconData: () => __iconData23,
7628
+ __iconData: () => __iconData24,
7553
7629
  default: () => FolderOpen
7554
7630
  });
7555
- var __iconData23, FolderOpen;
7631
+ var __iconData24, FolderOpen;
7556
7632
  var init_folder_open = __esm({
7557
7633
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder-open.mjs"() {
7558
7634
  init_createLucideIcon();
7559
- __iconData23 = {
7635
+ __iconData24 = {
7560
7636
  name: "folder-open",
7561
7637
  size: 24,
7562
7638
  node: [
@@ -7569,22 +7645,22 @@ var init_folder_open = __esm({
7569
7645
  ]
7570
7646
  ]
7571
7647
  };
7572
- __iconData23.node;
7573
- FolderOpen = createLucideIcon(__iconData23);
7648
+ __iconData24.node;
7649
+ FolderOpen = createLucideIcon(__iconData24);
7574
7650
  }
7575
7651
  });
7576
7652
 
7577
7653
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/table-2.mjs
7578
7654
  var table_2_exports = {};
7579
7655
  __export(table_2_exports, {
7580
- __iconData: () => __iconData24,
7656
+ __iconData: () => __iconData25,
7581
7657
  default: () => Table2
7582
7658
  });
7583
- var __iconData24, Table2;
7659
+ var __iconData25, Table2;
7584
7660
  var init_table_2 = __esm({
7585
7661
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/table-2.mjs"() {
7586
7662
  init_createLucideIcon();
7587
- __iconData24 = {
7663
+ __iconData25 = {
7588
7664
  name: "table-2",
7589
7665
  size: 24,
7590
7666
  node: [
@@ -7593,22 +7669,22 @@ var init_table_2 = __esm({
7593
7669
  ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }]
7594
7670
  ]
7595
7671
  };
7596
- __iconData24.node;
7597
- Table2 = createLucideIcon(__iconData24);
7672
+ __iconData25.node;
7673
+ Table2 = createLucideIcon(__iconData25);
7598
7674
  }
7599
7675
  });
7600
7676
 
7601
7677
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/house.mjs
7602
7678
  var house_exports = {};
7603
7679
  __export(house_exports, {
7604
- __iconData: () => __iconData25,
7680
+ __iconData: () => __iconData26,
7605
7681
  default: () => House
7606
7682
  });
7607
- var __iconData25, House;
7683
+ var __iconData26, House;
7608
7684
  var init_house = __esm({
7609
7685
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/house.mjs"() {
7610
7686
  init_createLucideIcon();
7611
- __iconData25 = {
7687
+ __iconData26 = {
7612
7688
  name: "house",
7613
7689
  size: 24,
7614
7690
  node: [
@@ -7623,22 +7699,22 @@ var init_house = __esm({
7623
7699
  ],
7624
7700
  aliases: ["home"]
7625
7701
  };
7626
- __iconData25.node;
7627
- House = createLucideIcon(__iconData25);
7702
+ __iconData26.node;
7703
+ House = createLucideIcon(__iconData26);
7628
7704
  }
7629
7705
  });
7630
7706
 
7631
7707
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder-plus.mjs
7632
7708
  var folder_plus_exports = {};
7633
7709
  __export(folder_plus_exports, {
7634
- __iconData: () => __iconData26,
7710
+ __iconData: () => __iconData27,
7635
7711
  default: () => FolderPlus
7636
7712
  });
7637
- var __iconData26, FolderPlus;
7713
+ var __iconData27, FolderPlus;
7638
7714
  var init_folder_plus = __esm({
7639
7715
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder-plus.mjs"() {
7640
7716
  init_createLucideIcon();
7641
- __iconData26 = {
7717
+ __iconData27 = {
7642
7718
  name: "folder-plus",
7643
7719
  size: 24,
7644
7720
  node: [
@@ -7653,22 +7729,22 @@ var init_folder_plus = __esm({
7653
7729
  ]
7654
7730
  ]
7655
7731
  };
7656
- __iconData26.node;
7657
- FolderPlus = createLucideIcon(__iconData26);
7732
+ __iconData27.node;
7733
+ FolderPlus = createLucideIcon(__iconData27);
7658
7734
  }
7659
7735
  });
7660
7736
 
7661
7737
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/file-plus.mjs
7662
7738
  var file_plus_exports = {};
7663
7739
  __export(file_plus_exports, {
7664
- __iconData: () => __iconData27,
7740
+ __iconData: () => __iconData28,
7665
7741
  default: () => FilePlus
7666
7742
  });
7667
- var __iconData27, FilePlus;
7743
+ var __iconData28, FilePlus;
7668
7744
  var init_file_plus = __esm({
7669
7745
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/file-plus.mjs"() {
7670
7746
  init_createLucideIcon();
7671
- __iconData27 = {
7747
+ __iconData28 = {
7672
7748
  name: "file-plus",
7673
7749
  size: 24,
7674
7750
  node: [
@@ -7684,22 +7760,22 @@ var init_file_plus = __esm({
7684
7760
  ["path", { d: "M12 18v-6", key: "17g6i2" }]
7685
7761
  ]
7686
7762
  };
7687
- __iconData27.node;
7688
- FilePlus = createLucideIcon(__iconData27);
7763
+ __iconData28.node;
7764
+ FilePlus = createLucideIcon(__iconData28);
7689
7765
  }
7690
7766
  });
7691
7767
 
7692
7768
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/pencil.mjs
7693
7769
  var pencil_exports = {};
7694
7770
  __export(pencil_exports, {
7695
- __iconData: () => __iconData28,
7771
+ __iconData: () => __iconData29,
7696
7772
  default: () => Pencil
7697
7773
  });
7698
- var __iconData28, Pencil;
7774
+ var __iconData29, Pencil;
7699
7775
  var init_pencil = __esm({
7700
7776
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/pencil.mjs"() {
7701
7777
  init_createLucideIcon();
7702
- __iconData28 = {
7778
+ __iconData29 = {
7703
7779
  name: "pencil",
7704
7780
  size: 24,
7705
7781
  node: [
@@ -7713,17 +7789,17 @@ var init_pencil = __esm({
7713
7789
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
7714
7790
  ]
7715
7791
  };
7716
- __iconData28.node;
7717
- Pencil = createLucideIcon(__iconData28);
7792
+ __iconData29.node;
7793
+ Pencil = createLucideIcon(__iconData29);
7718
7794
  }
7719
7795
  });
7720
7796
 
7721
7797
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash.mjs
7722
- var __iconData29, Trash;
7798
+ var __iconData30, Trash;
7723
7799
  var init_trash = __esm({
7724
7800
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash.mjs"() {
7725
7801
  init_createLucideIcon();
7726
- __iconData29 = {
7802
+ __iconData30 = {
7727
7803
  name: "trash",
7728
7804
  size: 24,
7729
7805
  node: [
@@ -7735,8 +7811,8 @@ var init_trash = __esm({
7735
7811
  ],
7736
7812
  aliases: ["trash-2"]
7737
7813
  };
7738
- __iconData29.node;
7739
- Trash = createLucideIcon(__iconData29);
7814
+ __iconData30.node;
7815
+ Trash = createLucideIcon(__iconData30);
7740
7816
  }
7741
7817
  });
7742
7818
 
@@ -7754,14 +7830,14 @@ var init_trash_2 = __esm({
7754
7830
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/x.mjs
7755
7831
  var x_exports = {};
7756
7832
  __export(x_exports, {
7757
- __iconData: () => __iconData30,
7833
+ __iconData: () => __iconData31,
7758
7834
  default: () => X
7759
7835
  });
7760
- var __iconData30, X;
7836
+ var __iconData31, X;
7761
7837
  var init_x = __esm({
7762
7838
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/x.mjs"() {
7763
7839
  init_createLucideIcon();
7764
- __iconData30 = {
7840
+ __iconData31 = {
7765
7841
  name: "x",
7766
7842
  size: 24,
7767
7843
  node: [
@@ -7769,42 +7845,42 @@ var init_x = __esm({
7769
7845
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
7770
7846
  ]
7771
7847
  };
7772
- __iconData30.node;
7773
- X = createLucideIcon(__iconData30);
7848
+ __iconData31.node;
7849
+ X = createLucideIcon(__iconData31);
7774
7850
  }
7775
7851
  });
7776
7852
 
7777
7853
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-down.mjs
7778
7854
  var chevron_down_exports = {};
7779
7855
  __export(chevron_down_exports, {
7780
- __iconData: () => __iconData31,
7856
+ __iconData: () => __iconData32,
7781
7857
  default: () => ChevronDown
7782
7858
  });
7783
- var __iconData31, ChevronDown;
7859
+ var __iconData32, ChevronDown;
7784
7860
  var init_chevron_down = __esm({
7785
7861
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-down.mjs"() {
7786
7862
  init_createLucideIcon();
7787
- __iconData31 = {
7863
+ __iconData32 = {
7788
7864
  name: "chevron-down",
7789
7865
  size: 24,
7790
7866
  node: [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]]
7791
7867
  };
7792
- __iconData31.node;
7793
- ChevronDown = createLucideIcon(__iconData31);
7868
+ __iconData32.node;
7869
+ ChevronDown = createLucideIcon(__iconData32);
7794
7870
  }
7795
7871
  });
7796
7872
 
7797
7873
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/tag.mjs
7798
7874
  var tag_exports = {};
7799
7875
  __export(tag_exports, {
7800
- __iconData: () => __iconData32,
7876
+ __iconData: () => __iconData33,
7801
7877
  default: () => Tag
7802
7878
  });
7803
- var __iconData32, Tag;
7879
+ var __iconData33, Tag;
7804
7880
  var init_tag = __esm({
7805
7881
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/tag.mjs"() {
7806
7882
  init_createLucideIcon();
7807
- __iconData32 = {
7883
+ __iconData33 = {
7808
7884
  name: "tag",
7809
7885
  size: 24,
7810
7886
  node: [
@@ -7818,22 +7894,22 @@ var init_tag = __esm({
7818
7894
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
7819
7895
  ]
7820
7896
  };
7821
- __iconData32.node;
7822
- Tag = createLucideIcon(__iconData32);
7897
+ __iconData33.node;
7898
+ Tag = createLucideIcon(__iconData33);
7823
7899
  }
7824
7900
  });
7825
7901
 
7826
7902
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/clock.mjs
7827
7903
  var clock_exports = {};
7828
7904
  __export(clock_exports, {
7829
- __iconData: () => __iconData33,
7905
+ __iconData: () => __iconData34,
7830
7906
  default: () => Clock
7831
7907
  });
7832
- var __iconData33, Clock;
7908
+ var __iconData34, Clock;
7833
7909
  var init_clock = __esm({
7834
7910
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/clock.mjs"() {
7835
7911
  init_createLucideIcon();
7836
- __iconData33 = {
7912
+ __iconData34 = {
7837
7913
  name: "clock",
7838
7914
  size: 24,
7839
7915
  node: [
@@ -7841,22 +7917,22 @@ var init_clock = __esm({
7841
7917
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
7842
7918
  ]
7843
7919
  };
7844
- __iconData33.node;
7845
- Clock = createLucideIcon(__iconData33);
7920
+ __iconData34.node;
7921
+ Clock = createLucideIcon(__iconData34);
7846
7922
  }
7847
7923
  });
7848
7924
 
7849
7925
  // node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.mjs
7850
7926
  var refresh_cw_exports = {};
7851
7927
  __export(refresh_cw_exports, {
7852
- __iconData: () => __iconData34,
7928
+ __iconData: () => __iconData35,
7853
7929
  default: () => RefreshCw
7854
7930
  });
7855
- var __iconData34, RefreshCw;
7931
+ var __iconData35, RefreshCw;
7856
7932
  var init_refresh_cw = __esm({
7857
7933
  "node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.mjs"() {
7858
7934
  init_createLucideIcon();
7859
- __iconData34 = {
7935
+ __iconData35 = {
7860
7936
  name: "refresh-cw",
7861
7937
  size: 24,
7862
7938
  node: [
@@ -7866,8 +7942,8 @@ var init_refresh_cw = __esm({
7866
7942
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
7867
7943
  ]
7868
7944
  };
7869
- __iconData34.node;
7870
- RefreshCw = createLucideIcon(__iconData34);
7945
+ __iconData35.node;
7946
+ RefreshCw = createLucideIcon(__iconData35);
7871
7947
  }
7872
7948
  });
7873
7949
 
@@ -7895,6 +7971,7 @@ var require_icons2 = __commonJS({
7895
7971
  search: (init_search(), __toCommonJS(search_exports)).default,
7896
7972
  grid: (init_layout_grid(), __toCommonJS(layout_grid_exports)).default,
7897
7973
  list: (init_list(), __toCommonJS(list_exports)).default,
7974
+ "list-checks": (init_list_checks(), __toCommonJS(list_checks_exports)).default,
7898
7975
  select: (init_square_check_big(), __toCommonJS(square_check_big_exports)).default,
7899
7976
  left: (init_chevron_left(), __toCommonJS(chevron_left_exports)).default,
7900
7977
  right: (init_chevron_right(), __toCommonJS(chevron_right_exports)).default,
@@ -7950,8 +8027,9 @@ var require_overlay = __commonJS({
7950
8027
  var autoFocusDialog = opts.autoFocusDialog !== false;
7951
8028
  var focusableSelector = opts.focusableSelector || FOCUSABLE;
7952
8029
  function Modal(props) {
7953
- var ref = React.useRef(null);
7954
- React.useEffect(function() {
8030
+ var R = props.React || React;
8031
+ var ref = R.useRef(null);
8032
+ R.useEffect(function() {
7955
8033
  var previous = typeof document !== "undefined" ? document.activeElement : null;
7956
8034
  var focusIt = props.autoFocus !== void 0 ? props.autoFocus : autoFocusDialog;
7957
8035
  if (focusIt && ref.current) ref.current.focus();
@@ -9023,6 +9101,305 @@ var require_filter_checklist_styles = __commonJS({
9023
9101
  }
9024
9102
  });
9025
9103
 
9104
+ // packages/addons/lib/stepper.cjs
9105
+ var require_stepper = __commonJS({
9106
+ "packages/addons/lib/stepper.cjs"(exports2, module2) {
9107
+ "use strict";
9108
+ function stepState(index, current, maxVisited) {
9109
+ if (index === current) return "current";
9110
+ if (index < current) return "done";
9111
+ if (index <= maxVisited) return "visited";
9112
+ return "todo";
9113
+ }
9114
+ function Steps(props) {
9115
+ var h = props.h;
9116
+ var steps = props.steps || [];
9117
+ var current = props.current || 0;
9118
+ var maxVisited = props.maxVisited === void 0 ? current : props.maxVisited;
9119
+ var invalid = props.invalid || {};
9120
+ var disabled = !!props.disabled;
9121
+ var label = props.label || "\u6B65\u9AA4";
9122
+ return h(
9123
+ "nav",
9124
+ { className: "wbctl-steps" + (props.className ? " " + props.className : ""), "aria-label": label },
9125
+ h(
9126
+ "ol",
9127
+ { className: "wbctl-step-list" },
9128
+ steps.map(function(step, index) {
9129
+ var state = stepState(index, current, maxVisited);
9130
+ var canJump = !disabled && typeof props.onJump === "function" && state !== "current" && state !== "todo";
9131
+ var isInvalid = !!invalid[index] || !!invalid[step.key];
9132
+ return h(
9133
+ "li",
9134
+ { key: step.key || index, className: "wbctl-step-item" },
9135
+ h(
9136
+ "button",
9137
+ {
9138
+ type: "button",
9139
+ className: "wbctl-step",
9140
+ "data-state": state,
9141
+ "data-invalid": isInvalid ? "true" : null,
9142
+ "aria-current": state === "current" ? "step" : void 0,
9143
+ "aria-label": index + 1 + " \xB7 " + step.label + (state === "done" ? "\uFF08\u5DF2\u5B8C\u6210\uFF09" : ""),
9144
+ disabled: disabled || state === "todo",
9145
+ title: step.hint || "",
9146
+ onClick: function() {
9147
+ if (canJump) props.onJump(index);
9148
+ }
9149
+ },
9150
+ h("span", { className: "wbctl-step-index", "aria-hidden": "true" }, state === "done" ? "\u2713" : String(index + 1)),
9151
+ h("span", { className: "wbctl-step-label" }, step.label),
9152
+ step.hint ? h("span", { className: "wbctl-step-hint" }, step.hint) : null,
9153
+ step.optional ? h("span", { className: "wbctl-step-opt" }, "\u53EF\u9009") : null
9154
+ )
9155
+ );
9156
+ })
9157
+ )
9158
+ );
9159
+ }
9160
+ var STYLES = [
9161
+ ".wbctl-steps{display:block;min-width:0}",
9162
+ ".wbctl-step-list{display:flex;align-items:stretch;gap:6px;list-style:none;margin:0 0 14px;padding:0;min-width:0}",
9163
+ ".wbctl-step-item{display:flex;flex:1 1 0;min-width:0}",
9164
+ ".wbctl-step{display:flex;align-items:center;gap:7px;flex:1 1 auto;min-width:0;padding:7px 9px;border:1px solid var(--wb-line,var(--wb-border));border-radius:10px;background:transparent;color:var(--wb-muted,inherit);font:inherit;font-size:12px;line-height:1.35;text-align:left;cursor:default;transition:background .14s ease,border-color .14s ease,color .14s ease}",
9165
+ ".wbctl-step[data-state=done],.wbctl-step[data-state=visited]{color:inherit;cursor:pointer}",
9166
+ ".wbctl-step[data-state=done]{border-color:color-mix(in oklab,var(--wb-ok,var(--wb-accent,#2563eb)) 36%,var(--wb-border))}",
9167
+ ".wbctl-step[data-state=current]{border-color:color-mix(in oklab,var(--wb-accent,#2563eb) 58%,var(--wb-border));background:color-mix(in oklab,var(--wb-accent,#2563eb) 8%,transparent);color:inherit;font-weight:600}",
9168
+ ".wbctl-step[data-state=visited]:hover,.wbctl-step[data-state=done]:hover{background:color-mix(in oklab,currentColor 7%,transparent)}",
9169
+ ".wbctl-step[data-invalid=true]{border-color:var(--wb-danger,#d33)}",
9170
+ ".wbctl-step:focus-visible{outline:2px solid var(--wb-accent,#2563eb);outline-offset:2px}",
9171
+ ".wbctl-step:disabled{cursor:default;opacity:.72}",
9172
+ ".wbctl-step-index{display:inline-flex;align-items:center;justify-content:center;flex:none;width:20px;height:20px;border-radius:50%;font-size:11px;font-variant-numeric:tabular-nums;background:color-mix(in oklab,currentColor 15%,transparent)}",
9173
+ ".wbctl-step[data-state=current] .wbctl-step-index{background:var(--wb-accent,#2563eb);color:var(--wb-on-accent,#fff)}",
9174
+ ".wbctl-step[data-state=done] .wbctl-step-index{background:color-mix(in oklab,var(--wb-ok,var(--wb-accent,#2563eb)) 20%,transparent);color:var(--wb-ok,var(--wb-accent,#2563eb))}",
9175
+ ".wbctl-step-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
9176
+ ".wbctl-step-hint{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:400;opacity:.62}",
9177
+ ".wbctl-step-opt{flex:none;font-size:10px;font-weight:400;opacity:.55}",
9178
+ "@media (max-width:760px){.wbctl-step{padding:6px 7px;font-size:11.5px}.wbctl-step-hint,.wbctl-step-opt{display:none}.wbctl-step-index{width:18px;height:18px;font-size:10px}}",
9179
+ "@media (max-width:520px){.wbctl-step-list{gap:4px}.wbctl-step-label{white-space:normal}.wbctl-step{gap:5px}}",
9180
+ "@media (prefers-reduced-motion:reduce){.wbctl-step{transition:none}}"
9181
+ ];
9182
+ module2.exports = { Steps, stepState, styles: STYLES };
9183
+ }
9184
+ });
9185
+
9186
+ // packages/addons/lib/staged-dialog.cjs
9187
+ var require_staged_dialog = __commonJS({
9188
+ "packages/addons/lib/staged-dialog.cjs"(exports2, module2) {
9189
+ "use strict";
9190
+ var defaultReact = require("react");
9191
+ var overlayFactory = require_overlay();
9192
+ var stepper = require_stepper();
9193
+ function validateStep(step) {
9194
+ if (!step || typeof step.validate !== "function") return "";
9195
+ var message = step.validate();
9196
+ return message ? String(message) : "";
9197
+ }
9198
+ function firstFailing(steps) {
9199
+ var list = steps || [];
9200
+ for (var i = 0; i < list.length; i += 1) {
9201
+ var message = validateStep(list[i]);
9202
+ if (message) return { index: i, key: list[i] && list[i].key, message };
9203
+ }
9204
+ return null;
9205
+ }
9206
+ function createStagedDialog(options) {
9207
+ var opts = options || {};
9208
+ var React = opts.React || defaultReact;
9209
+ var h = React.createElement;
9210
+ var dialogClass = ((opts.dialogClass || "") + " wbctl-dialog").trim();
9211
+ var Overlay = overlayFactory(
9212
+ Object.assign({}, opts, {
9213
+ React,
9214
+ dialogClass,
9215
+ // 首焦点由外壳送进对话框,字段由 focusStep 负责,避免打开瞬间落进第一个输入框。
9216
+ autoFocusDialog: opts.autoFocusDialog !== false
9217
+ })
9218
+ );
9219
+ function StagedDialog(props) {
9220
+ var R = props.React || React;
9221
+ var steps = props.steps || [];
9222
+ var count = steps.length;
9223
+ var busy = !!props.submitting || !!props.busy;
9224
+ var indexState = R.useState(props.initialStep || 0);
9225
+ var rawIndex = indexState[0];
9226
+ var setIndex = indexState[1];
9227
+ var index = count === 0 ? 0 : Math.min(Math.max(rawIndex, 0), count - 1);
9228
+ var visitedState = R.useState(props.initialStep || 0);
9229
+ var maxVisited = count === 0 ? 0 : Math.min(Math.max(visitedState[0], index), count - 1);
9230
+ var setMaxVisited = visitedState[1];
9231
+ var errorState = R.useState("");
9232
+ var stepError = errorState[0];
9233
+ var setStepError = errorState[1];
9234
+ var invalidState = R.useState({});
9235
+ var invalid = invalidState[0];
9236
+ var setInvalid = invalidState[1];
9237
+ var bodyRef = R.useRef(null);
9238
+ var mounted = R.useRef(true);
9239
+ function runValidate(step) {
9240
+ return validateStep(step);
9241
+ }
9242
+ function markInvalid(i, bad) {
9243
+ setInvalid(function(prev) {
9244
+ var next2 = Object.assign({}, prev);
9245
+ if (bad) next2[i] = true;
9246
+ else delete next2[i];
9247
+ return next2;
9248
+ });
9249
+ }
9250
+ function focusBody() {
9251
+ var el = bodyRef.current;
9252
+ if (el && typeof el.focus === "function") el.focus();
9253
+ }
9254
+ R.useEffect(
9255
+ function() {
9256
+ if (!mounted.current) return;
9257
+ focusBody();
9258
+ },
9259
+ [index]
9260
+ );
9261
+ R.useEffect(function() {
9262
+ mounted.current = true;
9263
+ return function() {
9264
+ mounted.current = false;
9265
+ };
9266
+ }, []);
9267
+ function goTo(i) {
9268
+ if (busy || i < 0 || i >= count) return;
9269
+ setIndex(i);
9270
+ if (i > maxVisited) setMaxVisited(i);
9271
+ setStepError("");
9272
+ }
9273
+ function fail(i, message) {
9274
+ markInvalid(i, true);
9275
+ goTo(i);
9276
+ setStepError(message);
9277
+ focusBody();
9278
+ }
9279
+ function next() {
9280
+ if (busy) return;
9281
+ var message = runValidate(steps[index]);
9282
+ if (message) {
9283
+ fail(index, message);
9284
+ return;
9285
+ }
9286
+ markInvalid(index, false);
9287
+ goTo(Math.min(index + 1, count - 1));
9288
+ }
9289
+ function back() {
9290
+ if (busy || index === 0) return;
9291
+ goTo(index - 1);
9292
+ }
9293
+ function jump(i) {
9294
+ if (busy || i > maxVisited) return;
9295
+ goTo(i);
9296
+ }
9297
+ function submit() {
9298
+ if (busy) return;
9299
+ var bad = firstFailing(steps);
9300
+ if (bad) {
9301
+ fail(bad.index, bad.message);
9302
+ return;
9303
+ }
9304
+ for (var i = 0; i < count; i++) markInvalid(i, false);
9305
+ setStepError("");
9306
+ if (typeof props.onSubmit === "function") props.onSubmit();
9307
+ }
9308
+ function cancel() {
9309
+ if (busy) return;
9310
+ if (typeof props.onClose === "function") props.onClose();
9311
+ }
9312
+ var current = steps[index];
9313
+ var isLast = index >= count - 1;
9314
+ var saveText = props.submitText || "\u4FDD\u5B58";
9315
+ var shownError = stepError || props.error || "";
9316
+ return h(
9317
+ Overlay,
9318
+ props,
9319
+ count > 1 ? h(stepper.Steps, {
9320
+ h,
9321
+ steps: steps.map(function(step) {
9322
+ return { key: step.key, label: step.label, hint: step.hint, optional: step.optional };
9323
+ }),
9324
+ current: index,
9325
+ maxVisited,
9326
+ onJump: jump,
9327
+ invalid,
9328
+ disabled: busy,
9329
+ label: props.stepsLabel || "\u521B\u5EFA\u6B65\u9AA4"
9330
+ }) : null,
9331
+ h(
9332
+ "div",
9333
+ {
9334
+ className: "wbctl-dialog-body" + (props.bodyClassName ? " " + props.bodyClassName : ""),
9335
+ ref: bodyRef,
9336
+ tabIndex: -1
9337
+ },
9338
+ current ? current.render(h, props) : null
9339
+ ),
9340
+ props.footerExtra || null,
9341
+ shownError ? h("div", { className: "wbctl-dialog-err", role: "alert" }, shownError) : null,
9342
+ h(
9343
+ "div",
9344
+ { className: "wbctl-dialog-foot" },
9345
+ count > 1 ? h("span", { className: "wbctl-dialog-progress" }, index + 1 + " / " + count) : null,
9346
+ props.footerNote ? h("span", { className: "wbctl-dialog-note" }, props.footerNote) : null,
9347
+ h("span", { className: "wbctl-dialog-spacer" }),
9348
+ index > 0 ? h(
9349
+ "button",
9350
+ { type: "button", className: "wbctl-btn", onClick: back, disabled: busy },
9351
+ props.backText || "\u4E0A\u4E00\u6B65"
9352
+ ) : null,
9353
+ h("button", { type: "button", className: "wbctl-btn", onClick: cancel, disabled: busy }, props.cancelText || "\u53D6\u6D88"),
9354
+ h(
9355
+ "button",
9356
+ {
9357
+ type: "button",
9358
+ className: "wbctl-btn wbctl-btn-p",
9359
+ onClick: isLast ? submit : next,
9360
+ // submitDisabled 只作用于末步的保存:插件据此把「结构性不合法」(JSON 语法、无可选 action)
9361
+ // 提前反映成禁用态,避免用户点到保存才被弹回第一步。
9362
+ disabled: busy || isLast && !!props.submitDisabled
9363
+ },
9364
+ busy ? saveText + "\u4E2D\u2026" : isLast ? saveText : props.nextText || "\u4E0B\u4E00\u6B65"
9365
+ )
9366
+ )
9367
+ );
9368
+ }
9369
+ StagedDialog.displayName = opts.displayName || "StagedDialog";
9370
+ return StagedDialog;
9371
+ }
9372
+ var STYLES = [
9373
+ // 宽表单:内容多时给足横向空间,窄屏留 16px 边距后铺满。
9374
+ ".wbctl-dialog{width:min(880px,calc(100vw - 32px));max-height:min(92vh,760px);display:flex;flex-direction:column;overflow:hidden}",
9375
+ ".wbctl-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px 2px 10px;outline:none}",
9376
+ ".wbctl-dialog-body:focus-visible{outline:none}",
9377
+ ".wbctl-dialog-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:10px;margin-top:10px;border-top:1px solid var(--wb-line,var(--wb-border))}",
9378
+ ".wbctl-dialog-progress{font-size:11.5px;color:var(--wb-muted,#666);font-variant-numeric:tabular-nums}",
9379
+ ".wbctl-dialog-note{font-size:11.5px;color:var(--wb-muted,#666);min-width:0}",
9380
+ ".wbctl-dialog-spacer{flex:1 1 auto}",
9381
+ ".wbctl-dialog-err{margin-top:8px;padding:7px 10px;border-radius:8px;border:1px solid color-mix(in oklab,var(--wb-danger,#d33) 45%,transparent);background:color-mix(in oklab,var(--wb-danger,#d33) 8%,transparent);color:var(--wb-danger,#d33);font-size:12px}",
9382
+ ".wbctl-btn{padding:6px 14px;border:1px solid var(--wb-border,#d0d5dd);border-radius:8px;background:var(--wb-card,#fff);color:inherit;font:inherit;font-size:12.5px;cursor:pointer}",
9383
+ ".wbctl-btn:hover:not(:disabled){background:color-mix(in oklab,currentColor 7%,transparent)}",
9384
+ ".wbctl-btn:focus-visible{outline:2px solid var(--wb-accent,#2563eb);outline-offset:2px}",
9385
+ ".wbctl-btn:disabled{opacity:.55;cursor:default}",
9386
+ ".wbctl-btn.wbctl-btn-p{background:var(--wb-accent,#2563eb);border-color:transparent;color:var(--wb-on-accent,#fff)}",
9387
+ ".wbctl-btn.wbctl-btn-p:hover:not(:disabled){background:color-mix(in oklab,var(--wb-accent,#2563eb) 86%,#000)}",
9388
+ // 确认步:键值对清单,各插件共用,避免再各写一套只读摘要。\n ".wbctl-review{display:flex;flex-direction:column;border:1px solid var(--wb-line,var(--wb-border));border-radius:10px;overflow:hidden}",\n ".wbctl-review-row{display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;padding:8px 12px;font-size:12.5px;background:var(--wb-surface,transparent)}",\n ".wbctl-review-row+.wbctl-review-row{border-top:1px solid var(--wb-line,var(--wb-border))}",\n ".wbctl-review-k{color:var(--wb-muted,inherit);font-size:11.5px;line-height:1.6}",\n ".wbctl-review-v{min-width:0;word-break:break-word;line-height:1.6}",\n ".wbctl-note{margin:10px 0 0;font-size:11.5px;color:var(--wb-muted,inherit)}",\n // 两列字段布局:内容多的弹窗不再单列拉长,窄屏回落单列。
9389
+ ".wbctl-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}",
9390
+ ".wbctl-form>.full{grid-column:1/-1}",
9391
+ "@media (max-width:760px){.wbctl-dialog{width:calc(100vw - 16px);max-height:94vh}.wbctl-form{grid-template-columns:1fr}.wbctl-form>.full{grid-column:auto}}",
9392
+ "@media (prefers-reduced-motion:reduce){.wbctl-btn{transition:none}}"
9393
+ ];
9394
+ module2.exports = {
9395
+ createStagedDialog,
9396
+ validateStep,
9397
+ firstFailing,
9398
+ styles: STYLES
9399
+ };
9400
+ }
9401
+ });
9402
+
9026
9403
  // packages/addons/tasks/client/ui/styles.cjs
9027
9404
  var require_styles = __commonJS({
9028
9405
  "packages/addons/tasks/client/ui/styles.cjs"(exports2, module2) {
@@ -9231,6 +9608,15 @@ var require_styles = __commonJS({
9231
9608
  ".wbt-create-tl .wbt-timeline-picker{display:flex;flex-direction:column;gap:6px;min-width:0}",
9232
9609
  ".wbt-create-tl .wbt-picker-list{max-height:180px;scrollbar-gutter:stable}",
9233
9610
  ".wbt-create-tl .wbt-timeline-pager{margin-top:4px;font-size:11.5px}",
9611
+ // 标签步:已选 chip + 共享勾选清单 + 新标签输入,清单限高内部滚动。
9612
+ ".wbt-tagpick{display:flex;flex-direction:column;gap:8px;min-width:0}",
9613
+ ".wbt-tagchips{display:flex;flex-wrap:wrap;gap:6px}",
9614
+ ".wbt-tagchip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border:1px solid var(--wbt-line);border-radius:999px;background:color-mix(in oklab,var(--wbt-accent) 10%,transparent);color:inherit;font:inherit;font-size:12px;cursor:pointer}",
9615
+ ".wbt-tagchip:hover{border-color:var(--wbt-accent)}",
9616
+ ".wbt-tagchip-x{opacity:.55;font-size:12px}",
9617
+ ".wbt-tagpick .wbck-list{max-height:220px}",
9618
+ ".wbt-tagnew{display:flex;gap:8px;align-items:center}",
9619
+ ".wbt-tagnew .wbt-input{flex:1;min-width:0}",
9234
9620
  ".wbt-field>span{opacity:.62;font-size:11.5px}.wbt-field>span.wbctl-num{opacity:1;font-size:12px;align-self:stretch}.wbt-field .wbt-difficulty-num{width:110px}",
9235
9621
  ".wbt-modal-foot{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin-top:2px}",
9236
9622
  // 预览面板:只让内容区滚动,头部标题与右上角 × 固定不动(滚动壳限定在 .wbt-preview,不影响其它弹窗)。
@@ -9306,7 +9692,7 @@ var require_styles = __commonJS({
9306
9692
  ".wbtx-slot-note{color:var(--wbt-muted,var(--wb-muted))}",
9307
9693
  ".wbtx-slot-link{border:0;background:transparent;padding:0;font:inherit;font-size:12px;color:var(--wbt-accent,var(--wb-accent));cursor:pointer;text-decoration:underline}",
9308
9694
  ".wbt-mailback{font-size:11.5px;padding:2px 7px}"
9309
- ].concat(require_filter_checklist_styles(), require_date_picker_styles()("wbt"), require_switch().styles, require_number_field().styles).join("\n");
9695
+ ].concat(require_filter_checklist_styles(), require_date_picker_styles()("wbt"), require_switch().styles, require_number_field().styles, require_stepper().styles, require_staged_dialog().styles).join("\n");
9310
9696
  }
9311
9697
  });
9312
9698
 
@@ -9642,35 +10028,45 @@ var require_timeline_controls = __commonJS({
9642
10028
  });
9643
10029
  function Picker(p) {
9644
10030
  var tr = require_timeline_copy()(p.t);
10031
+ var PAGE_SIZE = 20;
9645
10032
  var ds = React.useState({ records: [], total: 0 }), data = ds[0], setData = ds[1];
9646
10033
  var ps = React.useState(1), page = ps[0], setPage = ps[1];
9647
10034
  var qs = React.useState(""), query = qs[0], setQuery = qs[1];
9648
10035
  var es = React.useState(""), error = es[0], setError = es[1];
9649
10036
  var bs = React.useState(false), busy = bs[0], setBusy = bs[1];
10037
+ var ms = React.useState(false), more = ms[0], setMore = ms[1];
9650
10038
  var rs = React.useState(0), retry = rs[0], setRetry = rs[1];
9651
10039
  var as = React.useState(-1), active = as[0], setActive = as[1];
9652
10040
  var list = React.useRef(null);
10041
+ var loading = React.useRef(false);
9653
10042
  React.useEffect(function() {
9654
- var cancelled = false;
9655
- setBusy(true);
10043
+ var cancelled = false, first = page <= 1;
10044
+ if (first) setBusy(true);
10045
+ else setMore(true);
9656
10046
  setError("");
9657
- p.api.call("tasks.timelines", { includeSingletons: true, titleKey: query, pageNumber: page, pageSize: 20 }).then(result).then(function(r) {
9658
- if (!cancelled) {
9659
- setData(r);
9660
- setActive(-1);
9661
- setBusy(false);
9662
- }
10047
+ loading.current = true;
10048
+ p.api.call("tasks.timelines", { includeSingletons: true, titleKey: query, pageNumber: page, pageSize: PAGE_SIZE }).then(result).then(function(r) {
10049
+ if (cancelled) return;
10050
+ loading.current = false;
10051
+ setData(function(prev) {
10052
+ if (first) return r;
10053
+ return { records: (prev.records || []).concat(r.records || []), total: r.total };
10054
+ });
10055
+ setActive(-1);
10056
+ setBusy(false);
10057
+ setMore(false);
9663
10058
  }).catch(function(e) {
9664
- if (!cancelled) {
9665
- setError(String(e.message || e));
9666
- setBusy(false);
9667
- }
10059
+ if (cancelled) return;
10060
+ loading.current = false;
10061
+ setError(String(e.message || e));
10062
+ setBusy(false);
10063
+ setMore(false);
9668
10064
  });
9669
10065
  return function() {
9670
10066
  cancelled = true;
9671
10067
  };
9672
10068
  }, [p.api, page, query, retry]);
9673
- var rows = data.records || [], pages = Math.max(1, Math.ceil(data.total / 20));
10069
+ var rows = data.records || [], pages = Math.max(1, Math.ceil(data.total / PAGE_SIZE));
9674
10070
  function choose(row) {
9675
10071
  if (row) p.onChange(row.timelineId || row.timelineKey, row.title || "");
9676
10072
  }
@@ -9689,11 +10085,21 @@ var require_timeline_controls = __commonJS({
9689
10085
  var nodes = list.current ? list.current.querySelectorAll('[role="option"]') : [];
9690
10086
  return Array.prototype.indexOf.call(nodes, document.activeElement);
9691
10087
  }
10088
+ function loadMore() {
10089
+ if (loading.current || busy || more || page >= pages) return;
10090
+ setPage(page + 1);
10091
+ }
10092
+ function onScroll(e) {
10093
+ var el = e.currentTarget;
10094
+ if (!el || !el.scrollHeight) return;
10095
+ if (el.scrollTop + el.clientHeight >= el.scrollHeight - 48) loadMore();
10096
+ }
9692
10097
  function onKeyDown(e) {
9693
10098
  var base = focusedIndex() >= 0 ? focusedIndex() : active;
9694
10099
  if (e.key === "ArrowDown") {
9695
10100
  e.preventDefault();
9696
10101
  move(base + 1);
10102
+ loadMore();
9697
10103
  } else if (e.key === "ArrowUp") {
9698
10104
  e.preventDefault();
9699
10105
  move(base <= 0 ? 0 : base - 1);
@@ -9703,6 +10109,7 @@ var require_timeline_controls = __commonJS({
9703
10109
  } else if (e.key === "End") {
9704
10110
  e.preventDefault();
9705
10111
  move(rows.length - 1);
10112
+ loadMore();
9706
10113
  } else if (e.key === "Enter") {
9707
10114
  if (document.activeElement && document.activeElement.getAttribute("role") === "option") return;
9708
10115
  e.preventDefault();
@@ -9716,15 +10123,20 @@ var require_timeline_controls = __commonJS({
9716
10123
  "label",
9717
10124
  { className: "wbt-field" },
9718
10125
  tr("\u641C\u7D22\u5DF2\u6709\u65F6\u95F4\u7EBF"),
9719
- h("input", { className: "wbt-input", "aria-label": tr("\u641C\u7D22\u5DF2\u6709\u65F6\u95F4\u7EBF"), value: query, onChange: function(e) {
9720
- setQuery(e.target.value);
9721
- setPage(1);
9722
- } })
10126
+ h("input", {
10127
+ className: "wbt-input",
10128
+ "aria-label": tr("\u641C\u7D22\u5DF2\u6709\u65F6\u95F4\u7EBF"),
10129
+ value: query,
10130
+ onChange: function(e) {
10131
+ setQuery(e.target.value);
10132
+ setPage(1);
10133
+ }
10134
+ })
9723
10135
  ),
9724
10136
  h("div", { className: "wbt-picker-selected", role: "status" }, p.value ? tr("\u5DF2\u9009\u65F6\u95F4\u7EBF") + "\uFF1A" + (p.title || p.value) : tr("\u5C1A\u672A\u9009\u62E9\u65F6\u95F4\u7EBF")),
9725
10137
  h(
9726
10138
  "div",
9727
- { ref: list, className: "wbt-picker-list", role: "listbox", "aria-label": tr("\u9009\u62E9\u5DF2\u6709\u65F6\u95F4\u7EBF"), "aria-busy": busy ? "true" : "false", onKeyDown },
10139
+ { ref: list, className: "wbt-picker-list", role: "listbox", "aria-label": tr("\u9009\u62E9\u5DF2\u6709\u65F6\u95F4\u7EBF"), "aria-busy": busy ? "true" : "false", onKeyDown, onScroll },
9728
10140
  busy ? h("p", { className: "wbt-picker-note" }, tr("\u52A0\u8F7D\u4E2D\u2026")) : null,
9729
10141
  error ? h("div", { className: "wbt-picker-note wbt-err", role: "alert" }, error, h("button", { type: "button", className: "wbt-btn", onClick: function() {
9730
10142
  setRetry(retry + 1);
@@ -9742,18 +10154,9 @@ var require_timeline_controls = __commonJS({
9742
10154
  h("span", { className: "wbt-picker-opt-title" }, row.title || tr("\u672A\u547D\u540D\u65F6\u95F4\u7EBF")),
9743
10155
  h("span", { className: "wbt-picker-opt-count" }, row.taskCount + tr(" \u4E2A\u4EFB\u52A1"))
9744
10156
  );
9745
- }) : null
9746
- ),
9747
- h(
9748
- "div",
9749
- { className: "wbt-timeline-pager" },
9750
- h("button", { type: "button", className: "wbt-btn", disabled: busy || page <= 1, onClick: function() {
9751
- setPage(page - 1);
9752
- } }, tr("\u4E0A\u4E00\u9875")),
9753
- h("span", null, page + " / " + pages),
9754
- h("button", { type: "button", className: "wbt-btn", disabled: busy || page >= pages, onClick: function() {
9755
- setPage(page + 1);
9756
- } }, tr("\u4E0B\u4E00\u9875"))
10157
+ }) : null,
10158
+ more ? h("p", { className: "wbt-picker-note" }, tr("\u52A0\u8F7D\u66F4\u591A\u2026")) : null,
10159
+ !busy && !error && rows.length && page >= pages ? h("p", { className: "wbt-picker-note" }, tr("\u5DF2\u5230\u6700\u540E\u4E00\u6761")) : null
9757
10160
  )
9758
10161
  );
9759
10162
  }
@@ -10247,44 +10650,28 @@ var require_ownership_fields = __commonJS({
10247
10650
  var h = React.createElement;
10248
10651
  var Picker = require_table_picker()(React);
10249
10652
  function Selection(props) {
10250
- var state = React.useState(false), open = state[0], setOpen = state[1], trigger = React.useRef(null);
10251
10653
  var chosen = ownership.tables(props.tree).find(function(x) {
10252
10654
  return x.id === props.form.tableId;
10253
10655
  });
10254
- function close() {
10255
- setOpen(false);
10256
- if (trigger.current) trigger.current.focus();
10257
- }
10258
10656
  return h(
10259
10657
  "div",
10260
10658
  null,
10261
10659
  h("div", { className: "wbt-picker-detail" }, props.edit ? "\u5F53\u524D\u5F52\u5C5E\uFF1A" + props.current : "\u76EE\u6807\u4EFB\u52A1\u8868 *"),
10262
- h("button", {
10263
- ref: trigger,
10264
- type: "button",
10265
- className: "wbt-btn",
10266
- disabled: !!props.form.newPath,
10267
- "aria-expanded": open,
10268
- onClick: function() {
10269
- setOpen(!open);
10270
- }
10271
- }, props.edit ? "\u66F4\u6362\u4EFB\u52A1\u8868" : "\u9009\u62E9\u76EE\u6807\u4EFB\u52A1\u8868"),
10272
- open && !props.form.newPath ? h(Picker, {
10660
+ props.form.newPath ? null : h(Picker, {
10273
10661
  tree: props.tree,
10274
10662
  value: props.form.tableId,
10275
10663
  recommended: props.recommended,
10664
+ onClose: null,
10276
10665
  onChange: function(id) {
10277
10666
  props.set("tableId", props.edit && id === String(props.currentId) ? "" : id);
10278
- },
10279
- onClose: close
10280
- }) : null,
10667
+ }
10668
+ }),
10281
10669
  chosen ? h(
10282
10670
  "div",
10283
10671
  { className: "wbt-picker-detail", role: "status" },
10284
10672
  (props.edit ? "\u5C06\u79FB\u52A8\u5230\uFF1A" : "\u5DF2\u9009\u62E9\uFF1A") + chosen.path,
10285
10673
  props.edit ? h("button", { type: "button", className: "wbt-btn ghost", onClick: function() {
10286
10674
  props.set("tableId", "");
10287
- close();
10288
10675
  } }, "\u64A4\u9500\uFF0C\u4FDD\u7559\u539F\u4F4D") : null
10289
10676
  ) : h("div", { className: "wbt-mhint" }, props.edit ? "\u672A\u66F4\u6362\uFF0C\u4FDD\u7559\u5F53\u524D\u5F52\u5C5E\u3002" : props.form.newPath ? "\u8BF7\u786E\u8BA4\u65B0\u5EFA\u8DEF\u5F84\u3002" : "\u8BF7\u5148\u9009\u62E9\u76EE\u6807\u4EFB\u52A1\u8868\uFF0C\u518D\u786E\u8BA4\u63D0\u4EA4\u3002")
10290
10677
  );
@@ -10356,6 +10743,8 @@ var require_ownership_fields = __commonJS({
10356
10743
  var require_create_modal = __commonJS({
10357
10744
  "packages/addons/tasks/client/modals/create-modal.cjs"(exports2, module2) {
10358
10745
  var NF = require_number_field();
10746
+ var staged = require_staged_dialog();
10747
+ var FilterChecklist = require_filter_checklist();
10359
10748
  function initialPriority(source, origin, fallback) {
10360
10749
  var original = Number(origin && origin.priority);
10361
10750
  if (source === "2" && Number.isInteger(original) && original >= 1 && original <= 10) return original;
@@ -10375,6 +10764,35 @@ var require_create_modal = __commonJS({
10375
10764
  var DP = require_date_picker();
10376
10765
  var allTables = deps.allTables, tagNames = deps.tagNames, splitTags = deps.splitTags;
10377
10766
  var today = deps.today, addDays = deps.addDays, hostHasAddon = deps.hostHasAddon;
10767
+ var StagedDialog = staged.createStagedDialog({
10768
+ React,
10769
+ tag: "div",
10770
+ displayName: "TaskCreateDialog",
10771
+ maskClass: "wbt-modal-mask",
10772
+ dialogClass: "wbt-modal",
10773
+ header: function(p) {
10774
+ return h(
10775
+ "div",
10776
+ { className: "wbt-modal-head" },
10777
+ h("h3", null, p.title),
10778
+ h("button", { type: "button", className: "wbt-icon", disabled: !!p.submitting, onClick: p.onClose, "aria-label": p.closeLabel }, "\xD7")
10779
+ );
10780
+ },
10781
+ closeOnEscape: function(p) {
10782
+ return !p.submitting;
10783
+ },
10784
+ closeOnMask: function(p) {
10785
+ return !p.submitting;
10786
+ },
10787
+ // 表选择器内部自己用 Esc 收面板,别把它一起关掉。
10788
+ onKeyDown: function(e) {
10789
+ if (e.key === "Escape" && e.target && e.target.closest && e.target.closest(".wbt-table-picker")) {
10790
+ e.stopPropagation();
10791
+ return true;
10792
+ }
10793
+ return false;
10794
+ }
10795
+ });
10378
10796
  function CreateModal(props) {
10379
10797
  var t = props.t, tr = require_timeline_copy()(props.t);
10380
10798
  var source = String(props.source || "0");
@@ -10414,12 +10832,6 @@ var require_create_modal = __commonJS({
10414
10832
  function requestClose() {
10415
10833
  if (!submission.pending) props.onClose();
10416
10834
  }
10417
- function onModalKey(e) {
10418
- if (e.key !== "Escape" || e.target && e.target.closest && e.target.closest(".wbt-table-picker")) return;
10419
- e.preventDefault();
10420
- e.stopPropagation();
10421
- requestClose();
10422
- }
10423
10835
  var active = source === "2" || form.status === "0";
10424
10836
  var priorityError = active ? validatePriority(form.priority, source, t) : "";
10425
10837
  var difficultyCheck = NF.validateNumber(form.difficulty, { min: 0, max: 5, step: 0.5, allowEmpty: true, lang: props.lang });
@@ -10526,7 +10938,7 @@ var require_create_modal = __commonJS({
10526
10938
  });
10527
10939
  }
10528
10940
  var title = source === "2" ? t.restartTitle : source === "1" ? tr("\u5411\u5DF2\u6709\u65F6\u95F4\u7EBF\u6DFB\u52A0\u4EFB\u52A1") : t.newTask;
10529
- var timelineSection = source !== "2" ? h(
10941
+ var timelineSection = h(
10530
10942
  "div",
10531
10943
  { className: "wbt-create-tl full" },
10532
10944
  h(
@@ -10538,94 +10950,341 @@ var require_create_modal = __commonJS({
10538
10950
  h(TimelinePicker, { api: props.api, t, value: form.timelineId, onChange: function(value) {
10539
10951
  set("timelineId", value);
10540
10952
  }, disabled: isBusy })
10541
- ) : null;
10542
- return h(
10543
- "div",
10544
- { className: "wbt-modal-mask", onKeyDownCapture: onModalKey, onMouseDown: function(e) {
10545
- if (e.target === e.currentTarget) requestClose();
10546
- } },
10547
- h(
10953
+ );
10954
+ function stepContent(h2) {
10955
+ return h2(
10548
10956
  "div",
10549
- { className: "wbt-modal" },
10550
- h("div", { className: "wbt-modal-head" }, h("h3", null, title), h("button", { className: "wbt-icon", disabled: isBusy, onClick: requestClose }, "\xD7")),
10551
- source === "2" ? h("div", { className: "wbt-mhint" }, t.restartPriorityHint) : null,
10552
- source !== "0" && origin ? h("div", { className: "wbt-mhint" }, "\u6765\u6E90\uFF1A" + (origin.title || origin.id) + (source === "2" ? tr(" \xB7 \u81EA\u52A8\u7EE7\u627F\u539F\u65F6\u95F4\u7EBF") : "")) : null,
10553
- source === "2" && !(origin && origin.timelineId) ? h("p", { className: "wbt-err", role: "alert" }, tr("\u8BF7\u5148\u624B\u52A8\u5EFA\u7ACB\u5E76\u5173\u8054\u65F6\u95F4\u7EBF\uFF0C\u518D\u91CD\u542F")) : null,
10554
- h(
10957
+ { className: "wbctl-form" },
10958
+ origin ? h2(
10555
10959
  "div",
10556
- { className: "wbt-form" },
10557
- h("label", { className: "wbt-field full" }, h("span", null, t.titleField + " *"), h("input", { className: "wbt-input", value: form.title, onChange: function(e) {
10960
+ { className: "wbt-mhint full" },
10961
+ "\u6765\u6E90\uFF1A" + (origin.title || origin.id) + (source === "2" ? tr(" \xB7 \u81EA\u52A8\u7EE7\u627F\u539F\u65F6\u95F4\u7EBF") : "")
10962
+ ) : null,
10963
+ h2(
10964
+ "label",
10965
+ { className: "wbt-field full" },
10966
+ h2("span", null, t.titleField + " *"),
10967
+ h2("input", { className: "wbt-input", value: form.title, onChange: function(e) {
10558
10968
  set("title", e.target.value);
10559
- }, autoFocus: true })),
10560
- h("label", { className: "wbt-field full" }, h("span", null, t.desc), h("textarea", { className: "wbt-textarea", rows: 2, value: form.description, onChange: function(e) {
10969
+ } })
10970
+ ),
10971
+ h2(
10972
+ "label",
10973
+ { className: "wbt-field full" },
10974
+ h2("span", null, t.desc),
10975
+ h2("textarea", { className: "wbt-textarea", rows: 3, value: form.description, onChange: function(e) {
10561
10976
  set("description", e.target.value);
10562
- } })),
10563
- hostHasAddon("wb-addon-tags") ? h("label", { className: "wbt-field full" }, h("span", null, t.tags), h("input", { className: "wbt-input", value: form.tags, placeholder: t.tagPlaceholder, onChange: function(e) {
10564
- set("tags", e.target.value);
10565
- } })) : null,
10566
- timelineSection,
10567
- h(WorkspaceSelect, { api: props.api, lang: props.lang, value: form.workspaceIds, onChange: function(ids) {
10568
- set("workspaceIds", ids);
10569
- } }),
10570
- h("label", { className: "wbt-field" }, h("span", null, t.status), h(
10977
+ } })
10978
+ ),
10979
+ source === "2" ? h2("div", { className: "wbt-mhint full" }, t.restartPriorityHint) : null,
10980
+ h2(
10981
+ "label",
10982
+ { className: "wbt-field" },
10983
+ h2("span", null, t.status),
10984
+ h2(
10571
10985
  "select",
10572
10986
  { className: "wbt-select", value: source === "2" ? "0" : form.status, disabled: source === "2", onChange: function(e) {
10573
10987
  set("status", e.target.value);
10574
10988
  } },
10575
- h("option", { value: "0" }, "\u5DF2\u5F00\u542F"),
10576
- h("option", { value: "2" }, "\u5DF2\u5B8C\u6210"),
10577
- h("option", { value: "1" }, "\u5DF2\u5173\u95ED")
10578
- )),
10579
- h(
10580
- "div",
10581
- { className: "wbt-field" },
10582
- h("span", { className: "wbt-field-label" }, t.priority + "\uFF081\u201310\uFF09"),
10583
- h(NF.NumberField, {
10584
- h,
10585
- lang: props.lang,
10586
- value: form.priority,
10587
- min: 1,
10588
- max: 10,
10589
- integer: true,
10590
- disabled: !active,
10591
- hint: false,
10592
- ariaLabel: t.priority,
10593
- // 键入即写入草稿;合法性由下面的 priorityError 实时判定,绝不回写夹取后的值。
10594
- onDraft: function(raw) {
10595
- set("priority", raw);
10596
- },
10597
- onCommit: function(next) {
10598
- set("priority", String(next));
10599
- }
10600
- })
10601
- ),
10602
- fields({ form, set, setMany, tree: props.tree, recommended: props.defaultTableId || origin && origin.tableId }),
10603
- h("label", { className: "wbt-field" }, h("span", null, t.publishDate), h(DP.DatePicker, { React, h, prefix: "wbt", lang: props.lang, label: t.publishDate, value: form.publishDate, onChange: function(next) {
10989
+ h2("option", { value: "0" }, "\u5DF2\u5F00\u542F"),
10990
+ h2("option", { value: "2" }, "\u5DF2\u5B8C\u6210"),
10991
+ h2("option", { value: "1" }, "\u5DF2\u5173\u95ED")
10992
+ )
10993
+ ),
10994
+ h2(
10995
+ "div",
10996
+ { className: "wbt-field" },
10997
+ h2("span", { className: "wbt-field-label" }, t.priority + "\uFF081\u201310\uFF09"),
10998
+ h2(NF.NumberField, {
10999
+ h: h2,
11000
+ lang: props.lang,
11001
+ value: form.priority,
11002
+ min: 1,
11003
+ max: 10,
11004
+ integer: true,
11005
+ disabled: !active,
11006
+ hint: false,
11007
+ ariaLabel: t.priority,
11008
+ // 键入即写入草稿;合法性由下面的 priorityError 实时判定,绝不回写夹取后的值。
11009
+ onDraft: function(raw) {
11010
+ set("priority", raw);
11011
+ },
11012
+ onCommit: function(next) {
11013
+ set("priority", String(next));
11014
+ }
11015
+ })
11016
+ ),
11017
+ priorityError ? h2("div", { className: "wbt-err full", role: "alert" }, priorityError) : null,
11018
+ difficultyField(t, form.difficulty, function(value) {
11019
+ set("difficulty", value);
11020
+ }, "wbt-create-difficulty", props.lang),
11021
+ h2(
11022
+ "label",
11023
+ { className: "wbt-field" },
11024
+ h2("span", null, t.publishDate),
11025
+ h2(DP.DatePicker, { React, h: h2, prefix: "wbt", lang: props.lang, label: t.publishDate, value: form.publishDate, onChange: function(next) {
10604
11026
  set("publishDate", next);
10605
- } })),
10606
- h("label", { className: "wbt-field" }, h("span", null, t.targetDate), h(DP.DatePicker, { React, h, prefix: "wbt", lang: props.lang, label: t.targetDate, value: form.targetDate, onChange: function(next) {
11027
+ } })
11028
+ ),
11029
+ h2(
11030
+ "label",
11031
+ { className: "wbt-field" },
11032
+ h2("span", null, t.targetDate),
11033
+ h2(DP.DatePicker, { React, h: h2, prefix: "wbt", lang: props.lang, label: t.targetDate, value: form.targetDate, onChange: function(next) {
10607
11034
  set("targetDate", next);
10608
- } })),
10609
- source !== "2" && form.status === "2" ? h("label", { className: "wbt-field" }, h("span", null, t.doneDate), h(DP.DatePicker, { React, h, prefix: "wbt", lang: props.lang, label: t.doneDate, value: form.doneDate, onChange: function(next) {
11035
+ } })
11036
+ ),
11037
+ source !== "2" && form.status === "2" ? h2(
11038
+ "label",
11039
+ { className: "wbt-field" },
11040
+ h2("span", null, t.doneDate),
11041
+ h2(DP.DatePicker, { React, h: h2, prefix: "wbt", lang: props.lang, label: t.doneDate, value: form.doneDate, onChange: function(next) {
10610
11042
  set("doneDate", next);
10611
- } })) : null,
10612
- difficultyField(t, form.difficulty, function(value) {
10613
- set("difficulty", value);
10614
- }, "wbt-create-difficulty", props.lang),
10615
- source !== "2" && form.status === "1" ? h("label", { className: "wbt-field" }, h("span", null, t.shutdownDate), h(DP.DatePicker, { React, h, prefix: "wbt", lang: props.lang, label: t.shutdownDate, value: form.shutdownDate, onChange: function(next) {
11043
+ } })
11044
+ ) : null,
11045
+ source !== "2" && form.status === "1" ? h2(
11046
+ "label",
11047
+ { className: "wbt-field" },
11048
+ h2("span", null, t.shutdownDate),
11049
+ h2(DP.DatePicker, { React, h: h2, prefix: "wbt", lang: props.lang, label: t.shutdownDate, value: form.shutdownDate, onChange: function(next) {
10616
11050
  set("shutdownDate", next);
10617
- } })) : null
10618
- ),
10619
- priorityError ? h("div", { id: "wbt-create-priority-error", className: "wbt-err", role: "alert" }, priorityError) : null,
10620
- error ? h("div", { className: "wbt-err" }, error) : null,
10621
- h(
11051
+ } })
11052
+ ) : null
11053
+ );
11054
+ }
11055
+ function TagPicker(p2) {
11056
+ var h2 = p2.h;
11057
+ var names = splitTags(p2.value);
11058
+ var qs = React.useState(""), query = qs[0], setQuery = qs[1];
11059
+ var rs = React.useState([]), rows = rs[0], setRows = rs[1];
11060
+ var ts = React.useState(0), total = ts[0], setTotal = ts[1];
11061
+ var ps = React.useState(1), page = ps[0], setPage = ps[1];
11062
+ var hs = React.useState(false), hasMore = hs[0], setHasMore = hs[1];
11063
+ var ls = React.useState(false), loading = ls[0], setLoading = ls[1];
11064
+ var ds = React.useState(""), draft = ds[0], setDraft = ds[1];
11065
+ var seq = React.useRef(0);
11066
+ React.useEffect(function() {
11067
+ var mine = ++seq.current;
11068
+ setLoading(true);
11069
+ var timer = setTimeout(function() {
11070
+ p2.api.call("tasks.tagOptions", { query, pageNumber: 1, pageSize: 30 }).then(function(r) {
11071
+ if (mine !== seq.current) return;
11072
+ var out = r && r.ok ? r.result : {};
11073
+ var list = out.tags || [];
11074
+ setRows(list);
11075
+ setTotal(out.total || list.length);
11076
+ setPage(1);
11077
+ setHasMore(!!out.hasMore);
11078
+ setLoading(false);
11079
+ }).catch(function() {
11080
+ if (mine !== seq.current) return;
11081
+ setRows([]);
11082
+ setTotal(0);
11083
+ setHasMore(false);
11084
+ setLoading(false);
11085
+ });
11086
+ }, 200);
11087
+ return function() {
11088
+ clearTimeout(timer);
11089
+ };
11090
+ }, [p2.api, query]);
11091
+ function loadMore() {
11092
+ if (loading || !hasMore) return;
11093
+ var mine = seq.current, next = page + 1;
11094
+ setLoading(true);
11095
+ p2.api.call("tasks.tagOptions", { query, pageNumber: next, pageSize: 30 }).then(function(r) {
11096
+ if (mine !== seq.current) return;
11097
+ var out = r && r.ok ? r.result : {};
11098
+ setRows(rows.concat(out.tags || []));
11099
+ setPage(next);
11100
+ setHasMore(!!out.hasMore);
11101
+ setLoading(false);
11102
+ }).catch(function() {
11103
+ if (mine === seq.current) setLoading(false);
11104
+ });
11105
+ }
11106
+ function emit(next) {
11107
+ p2.onChange(next.join(", "));
11108
+ }
11109
+ function toggle(name) {
11110
+ emit(names.indexOf(name) >= 0 ? names.filter(function(x) {
11111
+ return x !== name;
11112
+ }) : names.concat([name]));
11113
+ }
11114
+ function toggleId(id) {
11115
+ var row = rows.filter(function(x) {
11116
+ return String(x.id) === String(id);
11117
+ })[0];
11118
+ if (row) toggle(String(row.name));
11119
+ }
11120
+ function addDraft() {
11121
+ var parts = splitTags(draft);
11122
+ if (!parts.length) return;
11123
+ var next = names.slice();
11124
+ parts.forEach(function(name2) {
11125
+ if (next.indexOf(name2) < 0) next.push(name2);
11126
+ });
11127
+ emit(next);
11128
+ setDraft("");
11129
+ }
11130
+ var selectedIds = rows.filter(function(x) {
11131
+ return names.indexOf(String(x.name)) >= 0;
11132
+ }).map(function(x) {
11133
+ return String(x.id);
11134
+ });
11135
+ return h2(
11136
+ "div",
11137
+ { className: "wbt-tagpick" },
11138
+ names.length ? h2("div", { className: "wbt-tagchips", role: "group", "aria-label": t.tagSelected }, names.map(function(name2) {
11139
+ return h2(
11140
+ "button",
11141
+ { key: name2, type: "button", className: "wbt-tagchip", title: t.tagRemove, onClick: function() {
11142
+ toggle(name2);
11143
+ } },
11144
+ h2("span", null, name2),
11145
+ h2("span", { className: "wbt-tagchip-x", "aria-hidden": true }, "\xD7")
11146
+ );
11147
+ })) : h2("p", { className: "wbctl-note" }, t.tagNoPick),
11148
+ h2(FilterChecklist, {
11149
+ items: rows.map(function(x) {
11150
+ return { id: String(x.id), name: x.name, meta: x.total };
11151
+ }),
11152
+ selected: selectedIds,
11153
+ onToggle: toggleId,
11154
+ onClear: function() {
11155
+ emit([]);
11156
+ },
11157
+ query,
11158
+ onQuery: setQuery,
11159
+ loading,
11160
+ hasMore,
11161
+ onLoadMore: loadMore,
11162
+ total,
11163
+ title: t.allTags || "\u5168\u90E8\u6807\u7B7E",
11164
+ selectedText: t.tagSelected || "\u5DF2\u9009",
11165
+ clearText: t.clear || "\u6E05\u7A7A",
11166
+ searchPlaceholder: t.tagSearchExisting || "\u641C\u7D22\u5DF2\u6709\u6807\u7B7E",
11167
+ emptyText: t.noTags || "\u6682\u65E0\u6807\u7B7E",
11168
+ noMatchText: t.tagNoMatch || "\u6CA1\u6709\u5339\u914D\u7684\u6807\u7B7E",
11169
+ loadingText: t.loadingMore || "\u52A0\u8F7D\u4E2D\u2026",
11170
+ noMoreText: t.noMore || "\u6CA1\u6709\u66F4\u591A",
11171
+ autoFocus: false
11172
+ }),
11173
+ h2(
10622
11174
  "div",
10623
- { className: "wbt-modal-foot" },
10624
- h("button", { className: "wbt-btn ghost", disabled: isBusy, onClick: requestClose }, t.cancel),
10625
- h("button", { className: "wbt-btn primary", disabled: isBusy || !!priorityError || !difficultyCheck.ok || !targetValid || source === "2" && !(origin && origin.timelineId), onClick: submit }, isBusy ? "\u2026" : t.create)
11175
+ { className: "wbt-tagnew" },
11176
+ h2("input", {
11177
+ className: "wbt-input",
11178
+ value: draft,
11179
+ placeholder: t.tagNewPlaceholder,
11180
+ "aria-label": t.tagNewPlaceholder,
11181
+ onChange: function(e) {
11182
+ setDraft(e.target.value);
11183
+ },
11184
+ onKeyDown: function(e) {
11185
+ if (e.key === "Enter") {
11186
+ e.preventDefault();
11187
+ addDraft();
11188
+ }
11189
+ }
11190
+ }),
11191
+ h2("button", { type: "button", className: "wbt-btn", disabled: !splitTags(draft).length, onClick: addDraft }, t.tagAdd || "\u6DFB\u52A0")
10626
11192
  )
10627
- )
10628
- );
11193
+ );
11194
+ }
11195
+ function stepTags(h2) {
11196
+ return h2(
11197
+ "div",
11198
+ { className: "wbctl-form" },
11199
+ h2("div", { className: "full" }, h2(TagPicker, { h: h2, api: props.api, t, value: form.tags, onChange: function(next) {
11200
+ set("tags", next);
11201
+ } }))
11202
+ );
11203
+ }
11204
+ function stepTable(h2) {
11205
+ return h2(
11206
+ "div",
11207
+ { className: "wbctl-form" },
11208
+ h2(
11209
+ "div",
11210
+ { className: "full" },
11211
+ fields({ form, set, setMany, tree: props.tree, recommended: props.defaultTableId || origin && origin.tableId })
11212
+ )
11213
+ );
11214
+ }
11215
+ function stepTimeline(h2) {
11216
+ if (source === "2") {
11217
+ return h2(
11218
+ "div",
11219
+ { className: "wbctl-form" },
11220
+ h2("p", { className: "wbt-mhint full" }, tr("\u7EE7\u627F\u6765\u6E90\u4EFB\u52A1\u7684\u65F6\u95F4\u7EBF")),
11221
+ !(origin && origin.timelineId) ? h2("p", { className: "wbt-err full", role: "alert" }, tr("\u8BF7\u5148\u624B\u52A8\u5EFA\u7ACB\u5E76\u5173\u8054\u65F6\u95F4\u7EBF\uFF0C\u518D\u91CD\u542F")) : null
11222
+ );
11223
+ }
11224
+ return h2("div", { className: "wbctl-form" }, timelineSection);
11225
+ }
11226
+ function stepWorkspace(h2) {
11227
+ return h2(
11228
+ "div",
11229
+ { className: "wbctl-form" },
11230
+ h2(WorkspaceSelect, { api: props.api, lang: props.lang, value: form.workspaceIds, onChange: function(ids) {
11231
+ set("workspaceIds", ids);
11232
+ } })
11233
+ );
11234
+ }
11235
+ var steps = [
11236
+ {
11237
+ key: "content",
11238
+ label: t.stepContent,
11239
+ hint: t.stepContentHint,
11240
+ render: stepContent,
11241
+ validate: function() {
11242
+ if (!String(form.title).trim()) return t.needTitle;
11243
+ if (priorityError) return priorityError;
11244
+ if (!difficultyCheck.ok) return difficultyCheck.error;
11245
+ if (!form.publishDate || !form.targetDate) return t.needDate;
11246
+ return "";
11247
+ }
11248
+ }
11249
+ ];
11250
+ if (hostHasAddon("wb-addon-tags")) {
11251
+ steps.push({ key: "tags", label: t.stepTags, hint: t.stepTagsHint, render: stepTags });
11252
+ }
11253
+ steps.push({
11254
+ key: "table",
11255
+ label: t.stepTable,
11256
+ hint: t.stepTableHint,
11257
+ render: stepTable,
11258
+ validate: function() {
11259
+ return targetValid ? "" : form.newPath ? plan.error || "\u8BF7\u786E\u8BA4\u65B0\u5EFA\u8DEF\u5F84" : t.needTable;
11260
+ }
11261
+ });
11262
+ steps.push({
11263
+ key: "timeline",
11264
+ label: t.stepTimeline,
11265
+ hint: t.stepTimelineHint,
11266
+ render: stepTimeline,
11267
+ validate: function() {
11268
+ if (source === "2" && !(origin && origin.timelineId)) return tr("\u8BF7\u5148\u624B\u52A8\u5EFA\u7ACB\u5E76\u5173\u8054\u65F6\u95F4\u7EBF\uFF0C\u518D\u91CD\u542F");
11269
+ if (source === "1" && !form.timelineId) return tr("\u8BF7\u9009\u62E9\u5DF2\u6709\u65F6\u95F4\u7EBF");
11270
+ return "";
11271
+ }
11272
+ });
11273
+ steps.push({ key: "workspace", label: t.stepWorkspace, hint: t.stepWorkspaceHint, render: stepWorkspace });
11274
+ return h(StagedDialog, {
11275
+ title,
11276
+ closeLabel: t.cancel,
11277
+ steps,
11278
+ submitting: isBusy,
11279
+ error,
11280
+ onClose: requestClose,
11281
+ onSubmit: submit,
11282
+ submitText: t.create,
11283
+ cancelText: t.cancel,
11284
+ nextText: t.nextStep || "\u4E0B\u4E00\u6B65",
11285
+ backText: t.prevStep || "\u4E0A\u4E00\u6B65",
11286
+ stepsLabel: t.createSteps || "\u521B\u5EFA\u6B65\u9AA4"
11287
+ });
10629
11288
  }
10630
11289
  return CreateModal;
10631
11290
  };
@@ -14065,7 +14724,7 @@ var require_timeline_view = __commonJS({
14065
14724
  var TimelineView = require_timeline_view()({ React, COPY, injectCss, statusInfo, configView, CFG_FALLBACK, TaskItem, EditModal, DoneModal, TimelineModal, CreateModal });
14066
14725
  host.registerAddon({
14067
14726
  id: "wb-addon-tasks",
14068
- version: "5.2.35",
14727
+ version: "5.2.40",
14069
14728
  icon: ICONS["list-checks"],
14070
14729
  // 贡献声明写在 registerAddon 里:卸载任务插件时宿主按 addonId 一起撤销,
14071
14730
  // 不会在邮件里留一个渲染即报错的孤儿按钮。