@dovetail-v2/refine 0.3.0 → 0.3.2

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 (35) hide show
  1. package/dist/{MonacoYamlEditor-1ed09191.cjs → MonacoYamlEditor-bdd52136.cjs} +15 -7
  2. package/dist/{MonacoYamlEditor-74ecf0d5.js → MonacoYamlEditor-d09e7de9.js} +15 -7
  3. package/dist/components/Form/FormModal.d.ts +2 -0
  4. package/dist/components/Form/RefineFormContainer.d.ts +2 -1
  5. package/dist/components/Form/YamlForm.d.ts +2 -2
  6. package/dist/components/Form/YamlFormContainer.d.ts +3 -2
  7. package/dist/components/Form/type.d.ts +11 -1
  8. package/dist/components/KeyValueTableForm/index.d.ts +34 -0
  9. package/dist/components/ShowContent/ShowContent.d.ts +4 -16
  10. package/dist/components/ShowContent/ShowContentView.d.ts +21 -0
  11. package/dist/components/ShowContent/fields.d.ts +1 -0
  12. package/dist/components/ShowContent/index.d.ts +1 -0
  13. package/dist/components/YamlEditor/MonacoYamlEditor.d.ts +5 -5
  14. package/dist/components/YamlEditor/YamlEditorComponent.d.ts +9 -7
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/hooks/useEagleTable/columns.d.ts +1 -1
  17. package/dist/hooks/useOpenForm.d.ts +5 -2
  18. package/dist/i18n.d.ts +1 -0
  19. package/dist/{index-23ef5f69.js → index-3126e84d.js} +881 -586
  20. package/dist/{index-7c78ef6f.cjs → index-ec66ac8f.cjs} +770 -475
  21. package/dist/locales/zh-CN/index.d.ts +1 -0
  22. package/dist/models/deployment-model.d.ts +5 -1
  23. package/dist/models/index.d.ts +1 -1
  24. package/dist/models/replicaset-model.d.ts +17 -0
  25. package/dist/models/service-model.d.ts +4 -0
  26. package/dist/models/workload-model.d.ts +6 -0
  27. package/dist/refine.cjs +8 -1
  28. package/dist/refine.js +114 -107
  29. package/dist/style.css +171 -162
  30. package/dist/utils/file.d.ts +1 -0
  31. package/dist/utils/index.d.ts +1 -0
  32. package/dist/utils/match-selector.d.ts +2 -2
  33. package/dist/utils/validation.d.ts +5 -1
  34. package/package.json +1 -1
  35. package/dist/components/EditMetadataForm/KeyValueTableForm.d.ts +0 -16
package/dist/style.css CHANGED
@@ -1553,164 +1553,6 @@
1553
1553
  /* box shadow */
1554
1554
  /* fisheye */
1555
1555
  /* z-index */
1556
- .s9agep2 {
1557
- height: 100%;
1558
- display: flex;
1559
- flex-direction: column;
1560
- background: linear-gradient(180deg, #fff 0%, #edf0f7 100%);
1561
- }
1562
- .s9agep2 .ant-row {
1563
- margin-right: 0 !important;
1564
- }
1565
-
1566
- .bo89gfi {
1567
- color: rgba(0, 21, 64, 0.3);
1568
- line-height: 18px;
1569
- cursor: pointer;
1570
- display: inline-flex;
1571
- align-items: center;
1572
- align-self: flex-start;
1573
- }
1574
- .bo89gfi:hover {
1575
- color: #0080ff;
1576
- }
1577
-
1578
- .t1ohe42f {
1579
- display: flex;
1580
- flex-direction: column;
1581
- padding: 16px 24px 8px 24px;
1582
- background-color: #fff;
1583
- }
1584
-
1585
- .nqm4qz0 {
1586
- color: #00122e;
1587
- margin-right: 8px;
1588
- }
1589
-
1590
- .ticl0qc {
1591
- justify-content: space-between;
1592
- width: 100%;
1593
- }
1594
-
1595
- .so9uwk1 {
1596
- width: 100%;
1597
- }
1598
-
1599
- .ge26ou0 {
1600
- padding: 12px 16px;
1601
- padding-bottom: 4px;
1602
- border-radius: 8px;
1603
- border: 1px solid rgba(211, 218, 235, 0.6);
1604
- box-shadow: 0px 0px 2.003px 0px rgba(107, 125, 153, 0.15), 0px 0px 16px 0px rgba(107, 125, 153, 0.08);
1605
- background-color: #fff;
1606
- margin: 0 24px;
1607
- overflow: auto;
1608
- width: calc(100% - 48px);
1609
- max-width: 1592px;
1610
- margin-bottom: 24px;
1611
- }
1612
- .ge26ou0:first-of-type {
1613
- margin-top: 16px;
1614
- }
1615
- .ge26ou0 .pagination-wrapper {
1616
- padding-top: 12px;
1617
- padding-bottom: 0;
1618
- }
1619
-
1620
- .g17f8vl9 {
1621
- display: flex;
1622
- color: #1d326c;
1623
- margin-bottom: 10px;
1624
- justify-content: space-between;
1625
- align-items: center;
1626
- }
1627
-
1628
- .fykgn2i {
1629
- background-color: #fff;
1630
- height: 100%;
1631
- }
1632
-
1633
- .fngr745 {
1634
- display: flex;
1635
- flex-wrap: nowrap;
1636
- }
1637
-
1638
- .t11wg61l {
1639
- padding-bottom: 16px;
1640
- display: flex;
1641
- flex-direction: column;
1642
- align-items: center;
1643
- min-width: 904px;
1644
- }
1645
-
1646
- .v1x3rivf {
1647
- color: #00122e;
1648
- }
1649
-
1650
- .tf5s6s.ant-tabs {
1651
- flex: 1;
1652
- min-height: 0;
1653
- }
1654
- .tf5s6s.ant-tabs .ant-tabs-nav {
1655
- margin-bottom: 0;
1656
- margin-right: 24px;
1657
- }
1658
- .tf5s6s.ant-tabs .ant-tabs-nav-list {
1659
- margin-left: 24px;
1660
- }
1661
- .tf5s6s.ant-tabs .ant-tabs-content-holder {
1662
- overflow: auto;
1663
- }
1664
- .tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-content,
1665
- .tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active {
1666
- height: 100%;
1667
- }/* // basic */
1668
- /* FishEye Color Variables and Functions */
1669
- /*
1670
- --------------------------- Primary Color ---------------------------
1671
- */
1672
- /*
1673
- ---------------------------When necessary to add at any time---------------------------
1674
- */
1675
- /* computed */
1676
- /* blue */
1677
- /* green */
1678
- /* yellow */
1679
- /* red */
1680
- /* purple */
1681
- /* palette global token*/
1682
- /* color opaque */
1683
- /* color transparent */
1684
- /* blue transparent */
1685
- /* green transparent */
1686
- /* yellow transparent */
1687
- /* red transparent */
1688
- /* gray transparent */
1689
- /* white transparent */
1690
- /* gradient opaque */
1691
- /* blue radial gradient */
1692
- /* blue linear gradient */
1693
- /* green radial gradient */
1694
- /* yellow radial gradient */
1695
- /* red radial gradient */
1696
- /* gray radial gradient */
1697
- /* white to gray radial gradient */
1698
- /* white to gray linear gradient */
1699
- /* gradient transparent */
1700
- /* secondary palette */
1701
- /* purple radial gradient */
1702
- /* refine alias color */
1703
- /* text */
1704
- /* link */
1705
- /* fill */
1706
- /* fill element */
1707
- /* fill interaction */
1708
- /* stroke */
1709
- /* background */
1710
- /* dim */
1711
- /* box shadow */
1712
- /* fisheye */
1713
- /* z-index */
1714
1556
  .b11tbgf7.ant-btn-quiet.ant-btn {
1715
1557
  color: rgba(44, 56, 82, 0.75);
1716
1558
  }
@@ -1852,11 +1694,11 @@
1852
1694
  /* box shadow */
1853
1695
  /* fisheye */
1854
1696
  /* z-index */
1855
- .clsjtk2 {
1697
+ .c17gq8cd {
1856
1698
  min-height: 24px !important;
1857
1699
  }
1858
1700
 
1859
- .cq3mbby {
1701
+ .c1n7fiws {
1860
1702
  width: 100%;
1861
1703
  }/* // basic */
1862
1704
  /* FishEye Color Variables and Functions */
@@ -3513,6 +3355,168 @@
3513
3355
  /* box shadow */
3514
3356
  /* fisheye */
3515
3357
  /* z-index */
3358
+ .soapvs9 {
3359
+ height: 100%;
3360
+ display: flex;
3361
+ flex-direction: column;
3362
+ background: linear-gradient(180deg, #fff 0%, #edf0f7 100%);
3363
+ }
3364
+ .soapvs9 .ant-row {
3365
+ margin-right: 0 !important;
3366
+ }
3367
+
3368
+ .b13d603q {
3369
+ color: rgba(0, 21, 64, 0.3);
3370
+ line-height: 18px;
3371
+ cursor: pointer;
3372
+ display: inline-flex;
3373
+ align-items: center;
3374
+ align-self: flex-start;
3375
+ }
3376
+ .b13d603q:hover {
3377
+ color: #0080ff;
3378
+ }
3379
+
3380
+ .tm8eaia {
3381
+ display: flex;
3382
+ flex-direction: column;
3383
+ padding: 16px 24px 8px 24px;
3384
+ background-color: #fff;
3385
+ }
3386
+
3387
+ .nhnus27 {
3388
+ color: #00122e;
3389
+ margin-right: 8px;
3390
+ }
3391
+
3392
+ .t16t20f5 {
3393
+ justify-content: space-between;
3394
+ width: 100%;
3395
+ }
3396
+
3397
+ .s97y2wr {
3398
+ width: 100%;
3399
+ }
3400
+
3401
+ .g1rhnxqx {
3402
+ padding: 12px 16px;
3403
+ padding-bottom: 4px;
3404
+ border-radius: 8px;
3405
+ border: 1px solid rgba(211, 218, 235, 0.6);
3406
+ box-shadow: 0px 0px 2.003px 0px rgba(107, 125, 153, 0.15), 0px 0px 16px 0px rgba(107, 125, 153, 0.08);
3407
+ background-color: #fff;
3408
+ margin: 0 24px;
3409
+ overflow: auto;
3410
+ width: calc(100% - 48px);
3411
+ max-width: 1592px;
3412
+ margin-bottom: 24px;
3413
+ }
3414
+ .g1rhnxqx:first-of-type {
3415
+ margin-top: 16px;
3416
+ }
3417
+ .g1rhnxqx .pagination-wrapper {
3418
+ padding-top: 12px;
3419
+ padding-bottom: 0;
3420
+ }
3421
+
3422
+ .g1f1s2pc {
3423
+ display: flex;
3424
+ color: #1d326c;
3425
+ margin-bottom: 10px;
3426
+ justify-content: space-between;
3427
+ align-items: center;
3428
+ }
3429
+
3430
+ .f1qw3bxx {
3431
+ background-color: #fff;
3432
+ height: 100%;
3433
+ }
3434
+
3435
+ .flfewds {
3436
+ display: flex;
3437
+ flex-wrap: nowrap;
3438
+ }
3439
+
3440
+ .t1c7cta8 {
3441
+ padding-bottom: 16px;
3442
+ display: flex;
3443
+ flex-direction: column;
3444
+ align-items: center;
3445
+ min-width: 904px;
3446
+ }
3447
+
3448
+ .v1pt61xk {
3449
+ color: #00122e;
3450
+ }
3451
+
3452
+ .t1to6fie.ant-tabs {
3453
+ flex: 1;
3454
+ min-height: 0;
3455
+ }
3456
+ .t1to6fie.ant-tabs .ant-tabs-nav {
3457
+ margin-bottom: 0;
3458
+ margin-right: 24px;
3459
+ }
3460
+ .t1to6fie.ant-tabs .ant-tabs-nav-list {
3461
+ margin-left: 24px;
3462
+ }
3463
+ .t1to6fie.ant-tabs .ant-tabs-content-holder {
3464
+ overflow: auto;
3465
+ }
3466
+ .t1to6fie.ant-tabs .ant-tabs-content-holder .ant-tabs-content,
3467
+ .t1to6fie.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active {
3468
+ height: 100%;
3469
+ }
3470
+
3471
+ .cca5959 {
3472
+ padding: 4px 0;
3473
+ }/* // basic */
3474
+ /* FishEye Color Variables and Functions */
3475
+ /*
3476
+ --------------------------- Primary Color ---------------------------
3477
+ */
3478
+ /*
3479
+ ---------------------------When necessary to add at any time---------------------------
3480
+ */
3481
+ /* computed */
3482
+ /* blue */
3483
+ /* green */
3484
+ /* yellow */
3485
+ /* red */
3486
+ /* purple */
3487
+ /* palette global token*/
3488
+ /* color opaque */
3489
+ /* color transparent */
3490
+ /* blue transparent */
3491
+ /* green transparent */
3492
+ /* yellow transparent */
3493
+ /* red transparent */
3494
+ /* gray transparent */
3495
+ /* white transparent */
3496
+ /* gradient opaque */
3497
+ /* blue radial gradient */
3498
+ /* blue linear gradient */
3499
+ /* green radial gradient */
3500
+ /* yellow radial gradient */
3501
+ /* red radial gradient */
3502
+ /* gray radial gradient */
3503
+ /* white to gray radial gradient */
3504
+ /* white to gray linear gradient */
3505
+ /* gradient transparent */
3506
+ /* secondary palette */
3507
+ /* purple radial gradient */
3508
+ /* refine alias color */
3509
+ /* text */
3510
+ /* link */
3511
+ /* fill */
3512
+ /* fill element */
3513
+ /* fill interaction */
3514
+ /* stroke */
3515
+ /* background */
3516
+ /* dim */
3517
+ /* box shadow */
3518
+ /* fisheye */
3519
+ /* z-index */
3516
3520
  .w1akirqw {
3517
3521
  height: 100%;
3518
3522
  display: flex;
@@ -3826,11 +3830,16 @@
3826
3830
  /* box shadow */
3827
3831
  /* fisheye */
3828
3832
  /* z-index */
3829
- .c154n7ie {
3830
- max-width: 144px;
3833
+ .v154n7ie.ant-form-item {
3834
+ flex-direction: column !important;
3835
+ gap: 8px;
3831
3836
  }
3832
3837
 
3833
3838
  .c1c9j4da {
3839
+ max-width: 144px;
3840
+ }
3841
+
3842
+ .cjxv8cf {
3834
3843
  flex-basis: 58%;
3835
3844
  width: 100%;
3836
3845
  margin: 0 auto;
@@ -0,0 +1 @@
1
+ export declare function readFileAsBase64(file: File): Promise<unknown>;
@@ -2,3 +2,4 @@ export * from './schema';
2
2
  export * from './k8s';
3
3
  export * from './match-selector';
4
4
  export * from './getResourceNameByKind';
5
+ export * from './validation';
@@ -1,3 +1,3 @@
1
1
  import { LabelSelector } from 'kubernetes-types/meta/v1';
2
- import { PodModel } from '../models/pod-model';
3
- export declare function matchSelector(pod: PodModel, selector?: LabelSelector, namespace?: string): boolean;
2
+ import { ResourceModel } from '../models/resource-model';
3
+ export declare function matchSelector(pod: ResourceModel, selector?: LabelSelector, namespace?: string): boolean;
@@ -1,8 +1,12 @@
1
+ export declare function validateDnsSubdomain(subdomain: string): {
2
+ isValid: boolean;
3
+ errorMessage?: string;
4
+ };
1
5
  export declare function validateLabelKey(key: string): {
2
6
  isValid: boolean;
3
7
  errorMessage?: string;
4
8
  };
5
- export declare function validateLabelValue(value: string): {
9
+ export declare function validateLabelValue(value: string, isOptional?: boolean): {
6
10
  isValid: boolean;
7
11
  errorMessage?: string;
8
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -1,16 +0,0 @@
1
- import { TableFormColumn } from '@cloudtower/eagle';
2
- import React from 'react';
3
- import { EditFieldFormHandler } from '../EditField';
4
- export type KeyValuePair = {
5
- key: string;
6
- value?: string;
7
- };
8
- interface KeyValueTableFormFormProps<T extends KeyValuePair> {
9
- defaultValue: T[];
10
- onSubmit: (value: T[]) => Promise<unknown> | undefined;
11
- extraColumns?: TableFormColumn[];
12
- addButtonText?: string;
13
- noValueValidation?: boolean;
14
- }
15
- export declare const KeyValueTableFormForm: React.ForwardRefExoticComponent<KeyValueTableFormFormProps<KeyValuePair> & React.RefAttributes<EditFieldFormHandler>>;
16
- export {};