@webority/ui-react 0.171.3 → 0.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +143 -365
- package/dist/canvas-kit/manifest.json +332 -3
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppChart.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppConfirmDialog.js +1 -1
- package/dist/components/AppDataTable.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppDateTimePicker.js +1 -0
- package/dist/components/AppDescriptions.js +1 -1
- package/dist/components/AppFileTiles.js +1 -1
- package/dist/components/AppForm.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKpiTile.js +1 -1
- package/dist/components/AppMonthPicker.js +1 -1
- package/dist/components/AppNavigationMenu.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/AppTablePagination.js +1 -1
- package/dist/components/AppTabs.js +1 -1
- package/dist/components/AppTransferList.js +1 -1
- package/dist/components/useNodeLabels.js +1 -1
- package/dist/guidance.json +29 -2
- package/dist/hookForm/index.js +1 -1
- package/dist/types/components/AppChart.d.ts +9 -1
- package/dist/types/components/AppCommentThread.d.ts +2 -0
- package/dist/types/components/AppConfirmDialog.d.ts +9 -2
- package/dist/types/components/AppDataTable.d.ts +31 -0
- package/dist/types/components/AppDatePicker.d.ts +5 -0
- package/dist/types/components/AppDateTimePicker.d.ts +75 -0
- package/dist/types/components/AppDescriptions.d.ts +5 -0
- package/dist/types/components/AppForm.d.ts +5 -3
- package/dist/types/components/AppInput.d.ts +5 -0
- package/dist/types/components/AppKpiTile.d.ts +7 -0
- package/dist/types/components/AppMonthPicker.d.ts +5 -0
- package/dist/types/components/AppNavigationMenu.d.ts +2 -0
- package/dist/types/components/AppSelect.d.ts +10 -0
- package/dist/types/components/AppShell.d.ts +13 -1
- package/dist/types/components/AppTablePagination.d.ts +2 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/ui-react.js +1 -1
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"kind": "WeborityWeb",
|
|
3
3
|
"library": {
|
|
4
4
|
"name": "@webority/ui-react",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.172.0"
|
|
6
6
|
},
|
|
7
7
|
"rendererProtocolVersion": 14,
|
|
8
8
|
"platform": "Web",
|
|
@@ -3154,6 +3154,22 @@
|
|
|
3154
3154
|
"name": "series",
|
|
3155
3155
|
"type": "array",
|
|
3156
3156
|
"itemFields": [
|
|
3157
|
+
{
|
|
3158
|
+
"name": "colour",
|
|
3159
|
+
"type": "enum",
|
|
3160
|
+
"enum": [
|
|
3161
|
+
"chart-1",
|
|
3162
|
+
"chart-2",
|
|
3163
|
+
"chart-3",
|
|
3164
|
+
"chart-4",
|
|
3165
|
+
"chart-5",
|
|
3166
|
+
"chart-6",
|
|
3167
|
+
"chart-7",
|
|
3168
|
+
"chart-8"
|
|
3169
|
+
],
|
|
3170
|
+
"required": false,
|
|
3171
|
+
"description": "Which theme chart colour this series draws in (chart-1 to chart-8). Omit it to take the next colour in order."
|
|
3172
|
+
},
|
|
3157
3173
|
{
|
|
3158
3174
|
"name": "format",
|
|
3159
3175
|
"type": "object",
|
|
@@ -3316,6 +3332,13 @@
|
|
|
3316
3332
|
"required": false,
|
|
3317
3333
|
"description": "A bubble's area. Required for a bubble."
|
|
3318
3334
|
},
|
|
3335
|
+
{
|
|
3336
|
+
"name": "sliceValues",
|
|
3337
|
+
"type": "boolean",
|
|
3338
|
+
"required": false,
|
|
3339
|
+
"description": "Print each slice's value and share on the donut, at any width. Donut only.",
|
|
3340
|
+
"default": true
|
|
3341
|
+
},
|
|
3319
3342
|
{
|
|
3320
3343
|
"name": "stack",
|
|
3321
3344
|
"type": "enum",
|
|
@@ -3432,7 +3455,7 @@
|
|
|
3432
3455
|
"name": "valueLabels",
|
|
3433
3456
|
"type": "boolean",
|
|
3434
3457
|
"required": false,
|
|
3435
|
-
"description": "Print each
|
|
3458
|
+
"description": "Print each value on its bar or point. Line, column and bar only. A line shows them by default.",
|
|
3436
3459
|
"default": false
|
|
3437
3460
|
},
|
|
3438
3461
|
{
|
|
@@ -6245,6 +6268,20 @@
|
|
|
6245
6268
|
"description": "The post button's text.",
|
|
6246
6269
|
"default": "Comment"
|
|
6247
6270
|
},
|
|
6271
|
+
{
|
|
6272
|
+
"name": "postVariant",
|
|
6273
|
+
"type": "enum",
|
|
6274
|
+
"enum": [
|
|
6275
|
+
"ghost",
|
|
6276
|
+
"glass",
|
|
6277
|
+
"link",
|
|
6278
|
+
"outline",
|
|
6279
|
+
"soft",
|
|
6280
|
+
"solid"
|
|
6281
|
+
],
|
|
6282
|
+
"required": false,
|
|
6283
|
+
"description": "The post button's emphasis. Without it, soft, or outline when composer is inline."
|
|
6284
|
+
},
|
|
6248
6285
|
{
|
|
6249
6286
|
"name": "reactionChoices",
|
|
6250
6287
|
"type": "array",
|
|
@@ -6650,6 +6687,13 @@
|
|
|
6650
6687
|
"required": false,
|
|
6651
6688
|
"description": "Width and height of the illustration in px, for the tone artwork and a custom image alike. Unset, it is 120px with a message and 84px without."
|
|
6652
6689
|
},
|
|
6690
|
+
{
|
|
6691
|
+
"name": "idempotent",
|
|
6692
|
+
"type": "boolean",
|
|
6693
|
+
"required": false,
|
|
6694
|
+
"description": "Passes one Idempotency-Key to onConfirm for the action. A retry while the dialog stays open reuses it, and reopening the dialog makes a new one. Set it on a money action so the server applies a repeated send once.",
|
|
6695
|
+
"default": false
|
|
6696
|
+
},
|
|
6653
6697
|
{
|
|
6654
6698
|
"name": "image",
|
|
6655
6699
|
"type": "string",
|
|
@@ -7620,6 +7664,13 @@
|
|
|
7620
7664
|
"description": "Row height: cozy 48 px (the default), comfortable 72 px for reading-heavy pages, compact 40 px. Compact is one line per row and hides the identity subline.",
|
|
7621
7665
|
"default": "cozy"
|
|
7622
7666
|
},
|
|
7667
|
+
{
|
|
7668
|
+
"name": "densitySwitch",
|
|
7669
|
+
"type": "boolean",
|
|
7670
|
+
"required": false,
|
|
7671
|
+
"description": "Shows a Comfortable and Compact switch above the table that changes the row height on the spot.",
|
|
7672
|
+
"default": false
|
|
7673
|
+
},
|
|
7623
7674
|
{
|
|
7624
7675
|
"name": "empty",
|
|
7625
7676
|
"type": "node",
|
|
@@ -7655,6 +7706,20 @@
|
|
|
7655
7706
|
"nullable": true,
|
|
7656
7707
|
"description": "A failed fetch, with a message the error state shows. With no rows it replaces the empty state, with a retry button when onRetry is set. Rows present are replaced by it too. Ignored while loading. An ApiError from the web-core helpers fits."
|
|
7657
7708
|
},
|
|
7709
|
+
{
|
|
7710
|
+
"name": "exportName",
|
|
7711
|
+
"type": "string",
|
|
7712
|
+
"required": false,
|
|
7713
|
+
"description": "The file name, without its extension, for an export.",
|
|
7714
|
+
"default": "table"
|
|
7715
|
+
},
|
|
7716
|
+
{
|
|
7717
|
+
"name": "exportable",
|
|
7718
|
+
"type": "boolean",
|
|
7719
|
+
"required": false,
|
|
7720
|
+
"description": "Shows Download CSV and Download Excel above the table. React exports all rows; Razor exports the rows in the DOM at the click.",
|
|
7721
|
+
"default": false
|
|
7722
|
+
},
|
|
7658
7723
|
{
|
|
7659
7724
|
"name": "flush",
|
|
7660
7725
|
"type": "boolean",
|
|
@@ -7798,6 +7863,18 @@
|
|
|
7798
7863
|
"required": false,
|
|
7799
7864
|
"description": "The heading text of the trailing actions column."
|
|
7800
7865
|
},
|
|
7866
|
+
{
|
|
7867
|
+
"name": "rowActionsMode",
|
|
7868
|
+
"type": "enum",
|
|
7869
|
+
"enum": [
|
|
7870
|
+
"column",
|
|
7871
|
+
"hover",
|
|
7872
|
+
"hover-menu"
|
|
7873
|
+
],
|
|
7874
|
+
"required": false,
|
|
7875
|
+
"description": "Where the row actions show: hover fades them in on row hover and focus, and the menu shows on touch; hover-menu keeps the menu visible; column keeps the icons always visible.",
|
|
7876
|
+
"default": "hover"
|
|
7877
|
+
},
|
|
7801
7878
|
{
|
|
7802
7879
|
"name": "rowDrag",
|
|
7803
7880
|
"type": "boolean",
|
|
@@ -8222,6 +8299,13 @@
|
|
|
8222
8299
|
"required": false,
|
|
8223
8300
|
"description": "Control height tier, matching AppInput."
|
|
8224
8301
|
},
|
|
8302
|
+
{
|
|
8303
|
+
"name": "valid",
|
|
8304
|
+
"type": "boolean",
|
|
8305
|
+
"required": false,
|
|
8306
|
+
"description": "Shows a green tick on a filled field with no error. Default off.",
|
|
8307
|
+
"default": false
|
|
8308
|
+
},
|
|
8225
8309
|
{
|
|
8226
8310
|
"name": "value",
|
|
8227
8311
|
"type": "string",
|
|
@@ -8241,7 +8325,7 @@
|
|
|
8241
8325
|
"whenNot": [
|
|
8242
8326
|
{
|
|
8243
8327
|
"text": "You need a date and a time of day.",
|
|
8244
|
-
"instead": "
|
|
8328
|
+
"instead": "AppDateTimePicker"
|
|
8245
8329
|
},
|
|
8246
8330
|
{
|
|
8247
8331
|
"text": "You are capturing a start-and-end range.",
|
|
@@ -8556,6 +8640,162 @@
|
|
|
8556
8640
|
]
|
|
8557
8641
|
}
|
|
8558
8642
|
},
|
|
8643
|
+
{
|
|
8644
|
+
"name": "AppDateTimePicker",
|
|
8645
|
+
"marker": "AppDateTimePicker",
|
|
8646
|
+
"acceptsChildren": false,
|
|
8647
|
+
"props": [
|
|
8648
|
+
{
|
|
8649
|
+
"name": "className",
|
|
8650
|
+
"type": "string",
|
|
8651
|
+
"required": false,
|
|
8652
|
+
"description": "Classes for the wui-date-time control itself.",
|
|
8653
|
+
"default": ""
|
|
8654
|
+
},
|
|
8655
|
+
{
|
|
8656
|
+
"name": "defaultValue",
|
|
8657
|
+
"type": "string",
|
|
8658
|
+
"required": false,
|
|
8659
|
+
"description": "The starting instant of an uncontrolled field, as an ISO UTC string."
|
|
8660
|
+
},
|
|
8661
|
+
{
|
|
8662
|
+
"name": "disabled",
|
|
8663
|
+
"type": "boolean",
|
|
8664
|
+
"required": false,
|
|
8665
|
+
"description": "Disables both controls."
|
|
8666
|
+
},
|
|
8667
|
+
{
|
|
8668
|
+
"name": "error",
|
|
8669
|
+
"type": "string",
|
|
8670
|
+
"required": false,
|
|
8671
|
+
"description": "An error message shown under the controls."
|
|
8672
|
+
},
|
|
8673
|
+
{
|
|
8674
|
+
"name": "fieldClassName",
|
|
8675
|
+
"type": "string",
|
|
8676
|
+
"required": false,
|
|
8677
|
+
"description": "Classes for the field wrapper that holds the label, controls and messages.",
|
|
8678
|
+
"default": ""
|
|
8679
|
+
},
|
|
8680
|
+
{
|
|
8681
|
+
"name": "help",
|
|
8682
|
+
"type": "node",
|
|
8683
|
+
"required": false,
|
|
8684
|
+
"description": "The content of the info-tip beside the label."
|
|
8685
|
+
},
|
|
8686
|
+
{
|
|
8687
|
+
"name": "helpLabel",
|
|
8688
|
+
"type": "string",
|
|
8689
|
+
"required": false,
|
|
8690
|
+
"description": "The accessible name of the info-tip button.",
|
|
8691
|
+
"default": "More information"
|
|
8692
|
+
},
|
|
8693
|
+
{
|
|
8694
|
+
"name": "helperText",
|
|
8695
|
+
"type": "string",
|
|
8696
|
+
"required": false,
|
|
8697
|
+
"description": "Replaces the zone note shown under the controls."
|
|
8698
|
+
},
|
|
8699
|
+
{
|
|
8700
|
+
"name": "id",
|
|
8701
|
+
"type": "string",
|
|
8702
|
+
"required": false,
|
|
8703
|
+
"description": "The id of the date control; a unique one is made when left out."
|
|
8704
|
+
},
|
|
8705
|
+
{
|
|
8706
|
+
"name": "label",
|
|
8707
|
+
"type": "node",
|
|
8708
|
+
"required": false,
|
|
8709
|
+
"description": "The field label, shown above the controls."
|
|
8710
|
+
},
|
|
8711
|
+
{
|
|
8712
|
+
"name": "max",
|
|
8713
|
+
"type": "string",
|
|
8714
|
+
"required": false,
|
|
8715
|
+
"description": "The latest selectable date, as an ISO UTC string; its local calendar date is used."
|
|
8716
|
+
},
|
|
8717
|
+
{
|
|
8718
|
+
"name": "min",
|
|
8719
|
+
"type": "string",
|
|
8720
|
+
"required": false,
|
|
8721
|
+
"description": "The earliest selectable date, as an ISO UTC string; its local calendar date is used."
|
|
8722
|
+
},
|
|
8723
|
+
{
|
|
8724
|
+
"name": "name",
|
|
8725
|
+
"type": "string",
|
|
8726
|
+
"required": false,
|
|
8727
|
+
"description": "The form field name the UTC instant posts under."
|
|
8728
|
+
},
|
|
8729
|
+
{
|
|
8730
|
+
"name": "optional",
|
|
8731
|
+
"type": "boolean",
|
|
8732
|
+
"required": false,
|
|
8733
|
+
"description": "Ends the label with (optional) when the field is not required. Required wins when both are set.",
|
|
8734
|
+
"default": false
|
|
8735
|
+
},
|
|
8736
|
+
{
|
|
8737
|
+
"name": "optionalLabel",
|
|
8738
|
+
"type": "string",
|
|
8739
|
+
"required": false,
|
|
8740
|
+
"description": "Replaces the built-in English text, for other languages.",
|
|
8741
|
+
"default": "(optional)"
|
|
8742
|
+
},
|
|
8743
|
+
{
|
|
8744
|
+
"name": "readOnly",
|
|
8745
|
+
"type": "boolean",
|
|
8746
|
+
"required": false,
|
|
8747
|
+
"description": "Shows the value but blocks editing. The value still posts.",
|
|
8748
|
+
"default": false
|
|
8749
|
+
},
|
|
8750
|
+
{
|
|
8751
|
+
"name": "required",
|
|
8752
|
+
"type": "boolean",
|
|
8753
|
+
"required": false,
|
|
8754
|
+
"description": "Marks the field required, with the required mark on the label.",
|
|
8755
|
+
"default": false
|
|
8756
|
+
},
|
|
8757
|
+
{
|
|
8758
|
+
"name": "value",
|
|
8759
|
+
"type": "string",
|
|
8760
|
+
"required": false,
|
|
8761
|
+
"description": "The instant as an ISO UTC string, for example 2026-03-14T04:00:00.000Z; empty when unset."
|
|
8762
|
+
},
|
|
8763
|
+
{
|
|
8764
|
+
"name": "zone",
|
|
8765
|
+
"type": "string",
|
|
8766
|
+
"required": false,
|
|
8767
|
+
"description": "The IANA zone the date and time are read and entered in. Default IST.",
|
|
8768
|
+
"default": "Asia/Kolkata"
|
|
8769
|
+
}
|
|
8770
|
+
],
|
|
8771
|
+
"itemsTakeAction": [],
|
|
8772
|
+
"takesAction": [],
|
|
8773
|
+
"source": "@webority/ui-react",
|
|
8774
|
+
"usage": {
|
|
8775
|
+
"when": [
|
|
8776
|
+
"Capturing one instant a person sets by date and time: a meeting start, a deadline, a scheduled send.",
|
|
8777
|
+
"The value must be stored in UTC and shown in IST."
|
|
8778
|
+
],
|
|
8779
|
+
"whenNot": [
|
|
8780
|
+
{
|
|
8781
|
+
"text": "You need only a calendar date.",
|
|
8782
|
+
"instead": "AppDatePicker"
|
|
8783
|
+
},
|
|
8784
|
+
{
|
|
8785
|
+
"text": "You need only a time of day.",
|
|
8786
|
+
"instead": "AppTimePicker"
|
|
8787
|
+
}
|
|
8788
|
+
],
|
|
8789
|
+
"do": [],
|
|
8790
|
+
"dont": [],
|
|
8791
|
+
"a11y": [
|
|
8792
|
+
"The date control is named by the field label, and the time control carries its own name.",
|
|
8793
|
+
"An error sets aria-invalid and points aria-describedby at the error text, or at the helper text when there is no error.",
|
|
8794
|
+
"Both controls carry the required attribute as well as the visible required mark.",
|
|
8795
|
+
"The info tip beside the label is named by helpLabel."
|
|
8796
|
+
]
|
|
8797
|
+
}
|
|
8798
|
+
},
|
|
8559
8799
|
{
|
|
8560
8800
|
"name": "AppDescriptions",
|
|
8561
8801
|
"marker": "AppDescriptions",
|
|
@@ -8657,6 +8897,17 @@
|
|
|
8657
8897
|
"description": "The rows, each with a label and a value. A span of 2 or 3 makes the item span multiple columns, and emphasis marks the total row.",
|
|
8658
8898
|
"default": []
|
|
8659
8899
|
},
|
|
8900
|
+
{
|
|
8901
|
+
"name": "labels",
|
|
8902
|
+
"type": "enum",
|
|
8903
|
+
"enum": [
|
|
8904
|
+
"start",
|
|
8905
|
+
"top"
|
|
8906
|
+
],
|
|
8907
|
+
"required": false,
|
|
8908
|
+
"description": "\"start\": each label sits left of its value, in the grid's columns; grid layout only. Default \"top\".",
|
|
8909
|
+
"default": "top"
|
|
8910
|
+
},
|
|
8660
8911
|
{
|
|
8661
8912
|
"name": "layout",
|
|
8662
8913
|
"type": "enum",
|
|
@@ -13942,6 +14193,13 @@
|
|
|
13942
14193
|
"required": false,
|
|
13943
14194
|
"description": "A unit shown after the value, such as kg."
|
|
13944
14195
|
},
|
|
14196
|
+
{
|
|
14197
|
+
"name": "valid",
|
|
14198
|
+
"type": "boolean",
|
|
14199
|
+
"required": false,
|
|
14200
|
+
"description": "Shows a green tick on a filled field with no error. Default off.",
|
|
14201
|
+
"default": false
|
|
14202
|
+
},
|
|
13945
14203
|
{
|
|
13946
14204
|
"name": "value",
|
|
13947
14205
|
"type": "stringOrNumber",
|
|
@@ -14565,6 +14823,12 @@
|
|
|
14565
14823
|
"description": "Extra classes on the icon chip.",
|
|
14566
14824
|
"default": ""
|
|
14567
14825
|
},
|
|
14826
|
+
{
|
|
14827
|
+
"name": "iconSlot",
|
|
14828
|
+
"type": "number",
|
|
14829
|
+
"required": false,
|
|
14830
|
+
"description": "Chart palette slot 1 to 8 for the icon chip (--color-chart-1 to -8). Unset, the chip takes iconTone or the default colour."
|
|
14831
|
+
},
|
|
14568
14832
|
{
|
|
14569
14833
|
"name": "iconTone",
|
|
14570
14834
|
"type": "enum",
|
|
@@ -14639,6 +14903,13 @@
|
|
|
14639
14903
|
"description": "Extra classes on the sparkline.",
|
|
14640
14904
|
"default": ""
|
|
14641
14905
|
},
|
|
14906
|
+
{
|
|
14907
|
+
"name": "stacked",
|
|
14908
|
+
"type": "boolean",
|
|
14909
|
+
"required": false,
|
|
14910
|
+
"description": "Keeps the stacked layout (icon above the label) instead of the default picked layout, where the label and figure sit beside the icon and the delta and sparkline at the right. Ignored with inline.",
|
|
14911
|
+
"default": false
|
|
14912
|
+
},
|
|
14642
14913
|
{
|
|
14643
14914
|
"name": "value",
|
|
14644
14915
|
"type": "node",
|
|
@@ -16342,6 +16613,13 @@
|
|
|
16342
16613
|
"type": "string",
|
|
16343
16614
|
"required": false,
|
|
16344
16615
|
"description": "The chosen month as YYYY-MM."
|
|
16616
|
+
},
|
|
16617
|
+
{
|
|
16618
|
+
"name": "valueAsDate",
|
|
16619
|
+
"type": "boolean",
|
|
16620
|
+
"required": false,
|
|
16621
|
+
"description": "Stores the month as its first day, YYYY-MM-01, for a date column. value, defaultValue, min and max take YYYY-MM-01 or YYYY-MM, and onChange receives YYYY-MM-01.",
|
|
16622
|
+
"default": false
|
|
16345
16623
|
}
|
|
16346
16624
|
],
|
|
16347
16625
|
"itemsTakeAction": [],
|
|
@@ -16567,6 +16845,12 @@
|
|
|
16567
16845
|
"required": false,
|
|
16568
16846
|
"description": "Marks the page the visitor is on."
|
|
16569
16847
|
},
|
|
16848
|
+
{
|
|
16849
|
+
"name": "group",
|
|
16850
|
+
"type": "string",
|
|
16851
|
+
"required": false,
|
|
16852
|
+
"description": "The heading shown above the first entry of each run of entries with the same group."
|
|
16853
|
+
},
|
|
16570
16854
|
{
|
|
16571
16855
|
"name": "key",
|
|
16572
16856
|
"type": "string",
|
|
@@ -23125,6 +23409,13 @@
|
|
|
23125
23409
|
"required": false,
|
|
23126
23410
|
"description": "The visible field label."
|
|
23127
23411
|
},
|
|
23412
|
+
{
|
|
23413
|
+
"name": "lazyOptions",
|
|
23414
|
+
"type": "boolean",
|
|
23415
|
+
"required": false,
|
|
23416
|
+
"description": "Draw the option rows only while the list is open. Default off.",
|
|
23417
|
+
"default": false
|
|
23418
|
+
},
|
|
23128
23419
|
{
|
|
23129
23420
|
"name": "loading",
|
|
23130
23421
|
"type": "boolean",
|
|
@@ -23395,6 +23686,13 @@
|
|
|
23395
23686
|
"description": "Country mode: the group label for suggested countries.",
|
|
23396
23687
|
"default": "Suggested"
|
|
23397
23688
|
},
|
|
23689
|
+
{
|
|
23690
|
+
"name": "valid",
|
|
23691
|
+
"type": "boolean",
|
|
23692
|
+
"required": false,
|
|
23693
|
+
"description": "Shows a green tick on a filled field with no error. Default off.",
|
|
23694
|
+
"default": false
|
|
23695
|
+
},
|
|
23398
23696
|
{
|
|
23399
23697
|
"name": "value",
|
|
23400
23698
|
"type": "any",
|
|
@@ -23841,6 +24139,13 @@
|
|
|
23841
24139
|
"required": false,
|
|
23842
24140
|
"description": "The brand name, read by screen readers from the logo, or from the mark when there is no logo."
|
|
23843
24141
|
},
|
|
24142
|
+
{
|
|
24143
|
+
"name": "capBadges",
|
|
24144
|
+
"type": "boolean",
|
|
24145
|
+
"required": false,
|
|
24146
|
+
"description": "Shows a count over 99 as \"99+\" on the nav and tab badges, as the bell does.",
|
|
24147
|
+
"default": false
|
|
24148
|
+
},
|
|
23844
24149
|
{
|
|
23845
24150
|
"name": "className",
|
|
23846
24151
|
"type": "string",
|
|
@@ -23964,6 +24269,12 @@
|
|
|
23964
24269
|
"required": false,
|
|
23965
24270
|
"description": "Sub-items. The row becomes an expandable parent."
|
|
23966
24271
|
},
|
|
24272
|
+
{
|
|
24273
|
+
"name": "description",
|
|
24274
|
+
"type": "string",
|
|
24275
|
+
"required": false,
|
|
24276
|
+
"description": "The link's one-line description in the top bar panel."
|
|
24277
|
+
},
|
|
23967
24278
|
{
|
|
23968
24279
|
"name": "header",
|
|
23969
24280
|
"type": "string",
|
|
@@ -24566,6 +24877,13 @@
|
|
|
24566
24877
|
"description": "brand paints the sidebar and its parts with the --color-shell-* tokens.",
|
|
24567
24878
|
"default": "default"
|
|
24568
24879
|
},
|
|
24880
|
+
{
|
|
24881
|
+
"name": "topNavDetail",
|
|
24882
|
+
"type": "boolean",
|
|
24883
|
+
"required": false,
|
|
24884
|
+
"description": "With nav top, the panels show each group's label, each link's description and mark the open panel.",
|
|
24885
|
+
"default": false
|
|
24886
|
+
},
|
|
24569
24887
|
{
|
|
24570
24888
|
"name": "topbarEnd",
|
|
24571
24889
|
"type": "node",
|
|
@@ -27278,6 +27596,12 @@
|
|
|
27278
27596
|
"description": "Extra class names added to the pager.",
|
|
27279
27597
|
"default": ""
|
|
27280
27598
|
},
|
|
27599
|
+
{
|
|
27600
|
+
"name": "hasNext",
|
|
27601
|
+
"type": "boolean",
|
|
27602
|
+
"required": false,
|
|
27603
|
+
"description": "Set when the total is not known yet: draws Previous and Next only, Next disabled when false. Leave total and totalPages unset."
|
|
27604
|
+
},
|
|
27281
27605
|
{
|
|
27282
27606
|
"name": "mode",
|
|
27283
27607
|
"type": "enum",
|
|
@@ -34243,6 +34567,11 @@
|
|
|
34243
34567
|
"version": "0.167.0",
|
|
34244
34568
|
"components": [],
|
|
34245
34569
|
"values": {}
|
|
34570
|
+
},
|
|
34571
|
+
{
|
|
34572
|
+
"version": "0.172.0",
|
|
34573
|
+
"components": [],
|
|
34574
|
+
"values": {}
|
|
34246
34575
|
}
|
|
34247
34576
|
]
|
|
34248
34577
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webority-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.172.0",
|
|
4
4
|
"platform": "Web",
|
|
5
5
|
"kitModuleVersion": 2,
|
|
6
6
|
"rendererProtocolVersion": 14,
|
|
7
7
|
"library": {
|
|
8
8
|
"name": "@webority/ui-react",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.172.0"
|
|
10
10
|
},
|
|
11
11
|
"files": {
|
|
12
12
|
"manifest.json": {
|
|
13
|
-
"sha256": "
|
|
14
|
-
"bytes":
|
|
13
|
+
"sha256": "83f4ac3dcdaf10fff99bb3ce4f28983fcec75f2d3a1e5f0fcfd9b022fd7a835d",
|
|
14
|
+
"bytes": 1130050
|
|
15
15
|
},
|
|
16
16
|
"kit.js": {
|
|
17
|
-
"sha256": "
|
|
18
|
-
"bytes":
|
|
17
|
+
"sha256": "f552bdcecd0845786687bf2a9e89975ff6b59682d5116091ac221d2ac840233d",
|
|
18
|
+
"bytes": 10140955
|
|
19
19
|
},
|
|
20
20
|
"kit.css": {
|
|
21
21
|
"sha256": "13b14f71fb6ea024945f95cba617b4f1d49f44a65ba7c7ed05d2354805539ef6",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/useWuiText.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./assertValidValue.js";import ee from"./warnUnknownProps.js";import{forwardRef as i,useCallback as te,useEffect as a,useLayoutEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";import{CHART_TEXT as
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/useWuiText.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./assertValidValue.js";import ee from"./warnUnknownProps.js";import{forwardRef as i,useCallback as te,useEffect as a,useLayoutEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";import{CHART_TEXT as u}from"@webority/ui-elements/text";var d=(e,t)=>{if(!(e instanceof CustomEvent))throw Error(`${t} arrived without a CustomEvent`);return e.detail},f=`wui-chart:select`,p=`wui-chart:legend-change`,m=`wui-chart:ready`,h=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],ne=[`none`,`stacked`,`percent`],g=[`ready`,`loading`,`empty`,`error`],re=[`auto`,`svg`,`canvas`],ie=[`chart`,`table`],_=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},v=!1;function y(){!v&&_()&&(v=!0,e("[@webority/ui-react] <AppChart> has no `title`, which names the chart for assistive tech and its exported files."))}var b=e=>e===``?void 0:e,x=e=>Array.isArray(e)?e.map(x):e==null||Object.getPrototypeOf(e)!==Object.prototype?e:Object.fromEntries(Object.entries(e).filter(([,e])=>e!==``).map(([e,t])=>[e,x(t)])),S=e=>({type:b(e.type),title:b(e.title),description:b(e.description),data:e.data,x:x(e.x),series:x(e.series),group:x(e.group),to:x(e.to),size:x(e.size),trend:e.trend,zoom:e.zoom,bands:x(e.bands),stack:b(e.stack),y:x(e.y),target:x(e.target),centerLabel:b(e.centerLabel),sliceValues:e.sliceValues,valueLabels:b(e.valueLabels),height:e.height!==void 0&&e.height>0?e.height:void 0,state:b(e.state),emptyText:b(e.emptyText),errorText:b(e.errorText),loadingText:b(e.loadingText),renderer:b(e.renderer),timeZone:b(e.timeZone)}),ae=(e,t)=>t!=null&&Object.keys(e).every(n=>Object.is(e[n],t[n])),oe=e=>{try{return JSON.stringify(e)}catch{return null}},C=i(function(i,v){let{marker:b,props:x}=n(`AppChart`,i),C=t(`chart`,u),{type:w,title:T,description:se,data:ce,x:le,series:ue,group:de,to:E,size:D,trend:O,zoom:k,bands:A,stack:j,y:M,target:N,centerLabel:P,sliceValues:F,valueLabels:I,height:L,state:R,loading:z,error:B,emptyText:fe,errorText:V,loadingText:pe,renderer:H,timeZone:me,view:U,onSelect:W,onLegendChange:G,onReady:K,className:q=``,style:J,...Y}=x;ee(`AppChart`,Y),r(`AppChart`,`type`,w,h),r(`AppChart`,`stack`,j,ne),r(`AppChart`,`state`,R,g),r(`AppChart`,`renderer`,H,re),r(`AppChart`,`view`,U,ie),T||y();let X=!!B;_()&&z&&X&&e("[@webority/ui-react] <AppChart> takes `loading` or `error`, not both; `error` is shown.");let he=X?`error`:z?`loading`:R,ge=X?B:V,Z=s(null),Q=s({props:null,signature:null}),$=s({onSelect:W,onLegendChange:G,onReady:K}),[_e,ve]=c(!1),ye=te(e=>{Z.current=e,typeof v==`function`?v(e):v&&(v.current=e)},[v]);return a(()=>{$.current={onSelect:W,onLegendChange:G,onReady:K}}),o(()=>{let e=Z.current;if(!e)return;let t={type:w,title:T,description:se,data:ce,x:le,series:ue,group:de,to:E,size:D,trend:O,zoom:k,bands:A,stack:j,y:M,target:N,centerLabel:P,sliceValues:F,valueLabels:I,height:L,state:he,emptyText:fe,errorText:ge,loadingText:pe,renderer:H,timeZone:me};if(ae(t,Q.current.props))return;Q.current.props=t;let n=S(t),r=oe(n);(r===null||r!==Q.current.signature)&&(Q.current.signature=r,e.spec=n)}),a(()=>{let e=Z.current;if(!e)throw Error(`AppChart: the <wui-chart> element is not mounted`);let t=[[f,e=>$.current.onSelect?.(d(e,f))],[p,e=>$.current.onLegendChange?.(d(e,p))],[m,e=>$.current.onReady?.(d(e,m))]];for(let[n,r]of t)e.addEventListener(n,r);return()=>{for(let[n,r]of t)e.removeEventListener(n,r)}},[]),a(()=>{let t=!0;return import(`@webority/ui-elements/chart`).catch(n=>{e(`[AppChart] the chart failed to load:`,n?.message),t&&ve(!0)}),()=>{t=!1}},[]),_e?/* @__PURE__ */ l(`div`,{...b,className:q||void 0,style:J,role:`status`,children:/* @__PURE__ */ l(`p`,{className:`wui-chart-state-text`,children:V||C.errorText})}):/* @__PURE__ */ l(`wui-chart`,{ref:ye,view:U||void 0,className:q||void 0,style:J,...b,...Y})});export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import n from"../lib/useElementEntry.js";import r from"../lib/useWuiText.js";import{splitMarkerProps as i}from"../lib/wuiMarker.js";import a from"./AppAvatar.js";import o from"./AppBadge.js";import s from"./AppButton.js";import c from"./AppIcon.js";import l from"./AppMarkdown.js";import u from"./assertValidValue.js";import d from"./warnUnknownProps.js";import{COMMENT_REACTIONS as f,formatDateTime as p,formatFileSize as m,formatNumber as h,initialsOf as g,mentionTextFromValue as _,parseMentionValue as v,toInstant as y}from"@webority/ui-elements/helpers";import{Fragment as b,useEffect as x,useId as S,useRef as C}from"react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{COMMENT_THREAD_TEXT as E,fillText as D}from"@webority/ui-elements/text";var O=[`stacked`,`inline`],k=[`list`,`conversation`],A=()=>import(`@webority/ui-elements/elements/comment-thread`),j=()=>import(`@webority/ui-elements/elements/mention-input`),M=e=>v(e??``).map((e,t)=>({key:`segment-${t}`,seg:e})),N=e=>e.localName===`wui-mention-input`;function P(e){let{marker:t,props:o}=i(`AppCommentThread`,e),c=r(`commentThread`,E),{comments:l=[],onPost:p,onReply:m,onEdit:h,onDelete:g,onReact:_,people:v,loadPeople:y,reactionChoices:b,allowReplies:D=!0,allowReactions:M=!0,composerPlaceholder:P,variant:I=`list`,composer:L=`stacked`,author:R,postLabel:z=c.postLabel,composerRows:B,readOnly:V=!1,markdown:H=!1,linkComponent:U,label:W=c.label,internalLabel:G=c.internalLabel,attachmentsLabel:K=c.attachmentsLabel,composerLabel:ee=c.composerLabel,noCommentsText:te=c.noCommentsText,reactionsLabel:ne=c.reactionsLabel,repliesToLabel:re=c.repliesToLabel,editedLabel:ie=c.editedLabel,deletedText:ae=c.deletedText,replyLabel:oe=c.replyLabel,editLabel:se=c.editLabel,deleteLabel:ce=c.deleteLabel,deleteConfirmText:le=c.deleteConfirmText,cancelLabel:ue=c.cancelLabel,addReactionLabel:de=c.addReactionLabel,chooseReactionLabel:fe=c.chooseReactionLabel,peopleLabel:pe=c.peopleLabel,id:me,className:he=``,...q}=o;d(`AppCommentThread`,q),u(`AppCommentThread`,`variant`,I,k),u(`AppCommentThread`,`composer`,L,O);let J=n(`wui-comment-thread`,A);n(`wui-mention-input`,j);let ge=S(),Y=me||`comment-thread-${ge.replace(/[^a-zA-Z0-9_-]/g,``)}`,X=C(null),Z=typeof y==`function`,_e=b?.length?b:f,Q=L===`inline`,ve=B??(Q?1:3),ye={reactionsLabel:ne,repliesToLabel:re,editedLabel:ie,deletedText:ae,replyLabel:oe,editLabel:se,deleteLabel:ce,deleteConfirmText:le,cancelLabel:ue,addReactionLabel:de},$=C({onPost:p,onReply:m,onEdit:h,onDelete:g,onReact:_,loadPeople:y});return $.current={onPost:p,onReply:m,onEdit:h,onDelete:g,onReact:_,loadPeople:y},x(()=>{let e=X.current;if(e&&J)return e.submit=async e=>{let t=$.current;e.intent===`post`?await t.onPost?.(e.body):e.intent===`reply`?await t.onReply?.(e.parentId,e.body):e.intent===`edit`?await t.onEdit?.(e.commentId,e.body):e.intent===`delete`?await t.onDelete?.(e.commentId):e.intent===`react`&&await t.onReact?.(e.commentId,e.emoji)},()=>{e.submit=void 0}},[J]),x(()=>{let e=X.current;e&&J&&!Z&&(e.people=v||[])},[v,Z,J]),x(()=>{let e=X.current;if(!e||!Z)return;let t=/* @__PURE__ */ new WeakMap,n=async e=>{let n=e.target;if(!(e instanceof CustomEvent)||!(n instanceof HTMLElement)||!N(n))throw TypeError(`<wui-comment-thread> search came from something other than a mention box.`);let r=e.detail;if(typeof r!=`object`||!r||!(`query`in r)||typeof r.query!=`string`)throw TypeError(`<wui-comment-thread> search carried no query.`);let i=r.query,{loadPeople:a}=$.current;if(typeof a!=`function`)throw Error(`<AppCommentThread> is remote but has no loadPeople.`);let o=(t.get(n)??0)+1;t.set(n,o),n.loading=!0;try{let e=await a(i);t.get(n)===o&&(n.people=e||[])}catch(e){t.get(n)===o&&(n.people=[],n.searchFailed=!0,reportError(e))}finally{t.get(n)===o&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[Z]),/* @__PURE__ */ T(`wui-comment-thread`,{ref:X,id:Y,class:[`wui-comment-thread`,I===`conversation`&&`wui-comment-thread--conversation`,he].filter(Boolean).join(` `),controlled:``,"read-only":V?``:void 0,remote:Z?``:void 0,"reaction-choices":b?.length?b.join(` `):void 0,"no-replies":D?void 0:``,"no-reactions":M?void 0:``,"composer-placeholder":P,...t,...q,children:[/* @__PURE__ */ w(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:l.length?/* @__PURE__ */ w(`ol`,{className:`wui-comment-list`,"aria-label":W,children:l.map(e=>/* @__PURE__ */ w(F,{comment:e,topLevel:!0,readOnly:V,allowReplies:D,allowReactions:M,markdown:H,linkComponent:U,internalLabel:G,attachmentsLabel:K,text:ye},e.id))}):/* @__PURE__ */ w(`p`,{className:`wui-comment-empty`,children:te})}),!V&&M&&/* @__PURE__ */ w(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":fe,"data-wui-picker":``,popover:`auto`,children:_e.map(e=>/* @__PURE__ */ w(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!V&&/* @__PURE__ */ T(`div`,{className:Q?`wui-comment-composer wui-comment-composer-inline`:`wui-comment-composer`,"data-wui-composer":``,children:[Q&&R?/* @__PURE__ */ w(a,{name:R,size:`sm`,tone:`auto`,className:`wui-comment-composer-avatar`}):null,/* @__PURE__ */ w(`wui-mention-input`,{id:`${Y}-new`,class:`wui-mention-input`,label:ee,"people-label":pe,placeholder:P??c.composerPlaceholder,rows:String(ve),remote:Z?``:void 0}),/* @__PURE__ */ w(`div`,{className:`wui-comment-form-actions`,children:/* @__PURE__ */ w(s,{variant:Q?`outline`:`solid`,size:`sm`,"data-wui-action":`post`,children:z})}),/* @__PURE__ */ w(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),/* @__PURE__ */ w(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function F({comment:n,topLevel:r=!1,readOnly:i,allowReplies:a,allowReactions:u,markdown:d,linkComponent:f,internalLabel:v,attachmentsLabel:x,text:S}){let{id:C,author:E,at:O,value:k,edited:A,mine:j,internal:N,attachments:P=[],deleted:I,canEdit:L,canDelete:R,reactions:z=[],replies:B=[]}=n,V=E?.name||``,H=y(O),U=!i&&!I&&L,W=!i&&!I&&R,G=r&&a,K=[`wui-comment`,N&&`wui-comment--internal`,j&&`wui-comment--mine`].filter(Boolean).join(` `);return/* @__PURE__ */ T(`li`,{className:K,"data-wui-comment":C,"data-value":k??``,"data-wui-deleted":I?``:void 0,children:[/* @__PURE__ */ T(`div`,{className:`wui-comment-row`,children:[/* @__PURE__ */ T(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[/* @__PURE__ */ w(`span`,{className:`avatar-face`,children:g(V)||`?`}),E?.src&&/* @__PURE__ */ w(`img`,{className:`avatar-img`,src:E.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),/* @__PURE__ */ T(`div`,{className:`wui-comment-main`,children:[/* @__PURE__ */ T(`div`,{className:`wui-comment-head`,children:[/* @__PURE__ */ w(`span`,{className:`wui-comment-author`,children:V}),/* @__PURE__ */ w(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(H)?new Date(H).toISOString():void 0,children:p(O)}),A&&!I&&/* @__PURE__ */ w(`span`,{className:`wui-comment-edited`,children:S.editedLabel}),N&&/* @__PURE__ */ w(o,{className:`wui-comment-internal-badge`,children:v})]}),I?/* @__PURE__ */ w(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:S.deletedText}):/* @__PURE__ */ w(`div`,{className:d?`wui-comment-text wui-comment-text--markdown`:`wui-comment-text`,"data-wui-text":``,children:d?/* @__PURE__ */ w(l,{value:_(k??``).text,headings:`text`}):M(k).map(({key:e,seg:t})=>`text`in t?/* @__PURE__ */ w(b,{children:t.text},e):/* @__PURE__ */ T(`span`,{className:`wui-mention`,"data-mention-id":t.id,children:[`@`,t.label]},e))}),!I&&P.length>0&&/* @__PURE__ */ w(`ul`,{className:`wui-comment-attachments`,"aria-label":x,children:P.map(n=>{let r=e(f,{to:n.to,href:n.href,routeHref:!1});return/* @__PURE__ */ T(`li`,{children:[/* @__PURE__ */ T(t,{link:r,className:`wui-comment-attachment`,...n.to?{}:{download:!0},children:[/* @__PURE__ */ w(c,{name:`paperclip`,size:14}),n.name]}),typeof n.sizeBytes==`number`&&/* @__PURE__ */ w(`span`,{className:`wui-comment-attachment-size`,children:m(n.sizeBytes)})]},n.to??n.href)})}),U&&/* @__PURE__ */ w(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),u&&!I&&(z.length>0||!i)&&/* @__PURE__ */ T(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":S.reactionsLabel,children:[z.map(e=>i?/* @__PURE__ */ T(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[/* @__PURE__ */ w(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),/* @__PURE__ */ w(`span`,{className:`wui-reaction-count`,children:h(e.count,{decimals:0})})]},e.emoji):/* @__PURE__ */ T(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[/* @__PURE__ */ w(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),/* @__PURE__ */ w(`span`,{className:`wui-reaction-count`,children:h(e.count,{decimals:0})})]},e.emoji)),!i&&/* @__PURE__ */ w(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":S.addReactionLabel,"aria-haspopup":`true`,"aria-expanded":`false`,children:/* @__PURE__ */ w(c,{name:`emoji-smile`,size:16})})]}),!i&&!I&&(G||U||W)&&/* @__PURE__ */ T(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[G&&/* @__PURE__ */ w(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:S.replyLabel}),U&&/* @__PURE__ */ w(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:S.editLabel}),W&&/* @__PURE__ */ w(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:S.deleteLabel})]}),W&&/* @__PURE__ */ T(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[/* @__PURE__ */ w(`span`,{className:`wui-comment-confirm-text`,children:S.deleteConfirmText}),/* @__PURE__ */ w(s,{tone:`danger`,size:`sm`,"data-wui-action":`confirm-delete`,children:S.deleteLabel}),/* @__PURE__ */ w(s,{variant:`ghost`,size:`sm`,"data-wui-action":`cancel-delete`,children:S.cancelLabel})]}),!i&&/* @__PURE__ */ w(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),r&&B.length>0&&/* @__PURE__ */ w(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":D(S.repliesToLabel,{name:V}),children:B.map(e=>/* @__PURE__ */ w(F,{comment:e,readOnly:i,allowReactions:u,markdown:d,linkComponent:f,internalLabel:v,attachmentsLabel:x,text:S},e.id))}),G&&!i&&!I&&/* @__PURE__ */ w(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{P as default};
|
|
1
|
+
import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import n from"../lib/useElementEntry.js";import r from"../lib/useWuiText.js";import{FILL_VARIANTS as i}from"../lib/vocabulary.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./AppAvatar.js";import s from"./AppBadge.js";import c from"./AppButton.js";import l from"./AppIcon.js";import u from"./AppMarkdown.js";import d from"./assertValidValue.js";import f from"./warnUnknownProps.js";import{COMMENT_REACTIONS as p,formatDateTime as m,formatFileSize as h,formatNumber as g,initialsOf as _,mentionTextFromValue as v,parseMentionValue as y,toInstant as b}from"@webority/ui-elements/helpers";import{Fragment as x,useEffect as S,useId as C,useRef as w}from"react";import{jsx as T,jsxs as E}from"react/jsx-runtime";import{COMMENT_THREAD_TEXT as D,fillText as O}from"@webority/ui-elements/text";var k=[`stacked`,`inline`],A=[`list`,`conversation`],j=()=>import(`@webority/ui-elements/elements/comment-thread`),M=()=>import(`@webority/ui-elements/elements/mention-input`),N=e=>y(e??``).map((e,t)=>({key:`segment-${t}`,seg:e})),P=e=>e.localName===`wui-mention-input`;function F(e){let{marker:t,props:s}=a(`AppCommentThread`,e),l=r(`commentThread`,D),{comments:u=[],onPost:m,onReply:h,onEdit:g,onDelete:_,onReact:v,people:y,loadPeople:b,reactionChoices:x,allowReplies:O=!0,allowReactions:N=!0,composerPlaceholder:F,variant:L=`list`,composer:R=`stacked`,author:z,postLabel:B=l.postLabel,postVariant:V,composerRows:H,readOnly:U=!1,markdown:W=!1,linkComponent:G,label:K=l.label,internalLabel:ee=l.internalLabel,attachmentsLabel:te=l.attachmentsLabel,composerLabel:ne=l.composerLabel,noCommentsText:re=l.noCommentsText,reactionsLabel:ie=l.reactionsLabel,repliesToLabel:ae=l.repliesToLabel,editedLabel:oe=l.editedLabel,deletedText:se=l.deletedText,replyLabel:ce=l.replyLabel,editLabel:le=l.editLabel,deleteLabel:ue=l.deleteLabel,deleteConfirmText:de=l.deleteConfirmText,cancelLabel:fe=l.cancelLabel,addReactionLabel:pe=l.addReactionLabel,chooseReactionLabel:me=l.chooseReactionLabel,peopleLabel:he=l.peopleLabel,id:ge,className:_e=``,...q}=s;f(`AppCommentThread`,q),d(`AppCommentThread`,`variant`,L,A),d(`AppCommentThread`,`composer`,R,k),V!==void 0&&d(`AppCommentThread`,`postVariant`,V,i);let J=n(`wui-comment-thread`,j);n(`wui-mention-input`,M);let ve=C(),Y=ge||`comment-thread-${ve.replace(/[^a-zA-Z0-9_-]/g,``)}`,X=w(null),Z=typeof b==`function`,ye=x?.length?x:p,Q=R===`inline`,be=H??(Q?1:3),xe={reactionsLabel:ie,repliesToLabel:ae,editedLabel:oe,deletedText:se,replyLabel:ce,editLabel:le,deleteLabel:ue,deleteConfirmText:de,cancelLabel:fe,addReactionLabel:pe},$=w({onPost:m,onReply:h,onEdit:g,onDelete:_,onReact:v,loadPeople:b});return $.current={onPost:m,onReply:h,onEdit:g,onDelete:_,onReact:v,loadPeople:b},S(()=>{let e=X.current;if(e&&J)return e.submit=async e=>{let t=$.current;e.intent===`post`?await t.onPost?.(e.body):e.intent===`reply`?await t.onReply?.(e.parentId,e.body):e.intent===`edit`?await t.onEdit?.(e.commentId,e.body):e.intent===`delete`?await t.onDelete?.(e.commentId):e.intent===`react`&&await t.onReact?.(e.commentId,e.emoji)},()=>{e.submit=void 0}},[J]),S(()=>{let e=X.current;e&&J&&!Z&&(e.people=y||[])},[y,Z,J]),S(()=>{let e=X.current;if(!e||!Z)return;let t=/* @__PURE__ */ new WeakMap,n=async e=>{let n=e.target;if(!(e instanceof CustomEvent)||!(n instanceof HTMLElement)||!P(n))throw TypeError(`<wui-comment-thread> search came from something other than a mention box.`);let r=e.detail;if(typeof r!=`object`||!r||!(`query`in r)||typeof r.query!=`string`)throw TypeError(`<wui-comment-thread> search carried no query.`);let i=r.query,{loadPeople:a}=$.current;if(typeof a!=`function`)throw Error(`<AppCommentThread> is remote but has no loadPeople.`);let o=(t.get(n)??0)+1;t.set(n,o),n.loading=!0;try{let e=await a(i);t.get(n)===o&&(n.people=e||[])}catch(e){t.get(n)===o&&(n.people=[],n.searchFailed=!0,reportError(e))}finally{t.get(n)===o&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[Z]),/* @__PURE__ */ E(`wui-comment-thread`,{ref:X,id:Y,class:[`wui-comment-thread`,L===`conversation`&&`wui-comment-thread--conversation`,_e].filter(Boolean).join(` `),controlled:``,"read-only":U?``:void 0,remote:Z?``:void 0,"reaction-choices":x?.length?x.join(` `):void 0,"no-replies":O?void 0:``,"no-reactions":N?void 0:``,"composer-placeholder":F,...t,...q,children:[/* @__PURE__ */ T(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:u.length?/* @__PURE__ */ T(`ol`,{className:`wui-comment-list`,"aria-label":K,children:u.map(e=>/* @__PURE__ */ T(I,{comment:e,topLevel:!0,readOnly:U,allowReplies:O,allowReactions:N,markdown:W,linkComponent:G,internalLabel:ee,attachmentsLabel:te,text:xe},e.id))}):/* @__PURE__ */ T(`p`,{className:`wui-comment-empty`,children:re})}),!U&&N&&/* @__PURE__ */ T(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":me,"data-wui-picker":``,popover:`auto`,children:ye.map(e=>/* @__PURE__ */ T(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!U&&/* @__PURE__ */ E(`div`,{className:Q?`wui-comment-composer wui-comment-composer-inline`:`wui-comment-composer`,"data-wui-composer":``,children:[Q&&z?/* @__PURE__ */ T(o,{name:z,size:`sm`,tone:`auto`,className:`wui-comment-composer-avatar`}):null,/* @__PURE__ */ T(`wui-mention-input`,{id:`${Y}-new`,class:`wui-mention-input`,label:ne,"people-label":he,placeholder:F??l.composerPlaceholder,rows:String(be),remote:Z?``:void 0}),/* @__PURE__ */ T(`div`,{className:`wui-comment-form-actions`,children:/* @__PURE__ */ T(c,{variant:V??(Q?`outline`:`soft`),size:`sm`,"data-wui-action":`post`,children:B})}),/* @__PURE__ */ T(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),/* @__PURE__ */ T(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function I({comment:n,topLevel:r=!1,readOnly:i,allowReplies:a,allowReactions:o,markdown:d,linkComponent:f,internalLabel:p,attachmentsLabel:y,text:S}){let{id:C,author:w,at:D,value:k,edited:A,mine:j,internal:M,attachments:P=[],deleted:F,canEdit:L,canDelete:R,reactions:z=[],replies:B=[]}=n,V=w?.name||``,H=b(D),U=!i&&!F&&L,W=!i&&!F&&R,G=r&&a,K=[`wui-comment`,M&&`wui-comment--internal`,j&&`wui-comment--mine`].filter(Boolean).join(` `);return/* @__PURE__ */ E(`li`,{className:K,"data-wui-comment":C,"data-value":k??``,"data-wui-deleted":F?``:void 0,children:[/* @__PURE__ */ E(`div`,{className:`wui-comment-row`,children:[/* @__PURE__ */ E(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[/* @__PURE__ */ T(`span`,{className:`avatar-face`,children:_(V)||`?`}),w?.src&&/* @__PURE__ */ T(`img`,{className:`avatar-img`,src:w.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),/* @__PURE__ */ E(`div`,{className:`wui-comment-main`,children:[/* @__PURE__ */ E(`div`,{className:`wui-comment-head`,children:[/* @__PURE__ */ T(`span`,{className:`wui-comment-author`,children:V}),/* @__PURE__ */ T(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(H)?new Date(H).toISOString():void 0,children:m(D)}),A&&!F&&/* @__PURE__ */ T(`span`,{className:`wui-comment-edited`,children:S.editedLabel}),M&&/* @__PURE__ */ T(s,{className:`wui-comment-internal-badge`,children:p})]}),F?/* @__PURE__ */ T(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:S.deletedText}):/* @__PURE__ */ T(`div`,{className:d?`wui-comment-text wui-comment-text--markdown`:`wui-comment-text`,"data-wui-text":``,children:d?/* @__PURE__ */ T(u,{value:v(k??``).text,headings:`text`}):N(k).map(({key:e,seg:t})=>`text`in t?/* @__PURE__ */ T(x,{children:t.text},e):/* @__PURE__ */ E(`span`,{className:`wui-mention`,"data-mention-id":t.id,children:[`@`,t.label]},e))}),!F&&P.length>0&&/* @__PURE__ */ T(`ul`,{className:`wui-comment-attachments`,"aria-label":y,children:P.map(n=>{let r=e(f,{to:n.to,href:n.href,routeHref:!1});return/* @__PURE__ */ E(`li`,{children:[/* @__PURE__ */ E(t,{link:r,className:`wui-comment-attachment`,...n.to?{}:{download:!0},children:[/* @__PURE__ */ T(l,{name:`paperclip`,size:14}),n.name]}),typeof n.sizeBytes==`number`&&/* @__PURE__ */ T(`span`,{className:`wui-comment-attachment-size`,children:h(n.sizeBytes)})]},n.to??n.href)})}),U&&/* @__PURE__ */ T(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),o&&!F&&(z.length>0||!i)&&/* @__PURE__ */ E(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":S.reactionsLabel,children:[z.map(e=>i?/* @__PURE__ */ E(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[/* @__PURE__ */ T(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),/* @__PURE__ */ T(`span`,{className:`wui-reaction-count`,children:g(e.count,{decimals:0})})]},e.emoji):/* @__PURE__ */ E(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[/* @__PURE__ */ T(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),/* @__PURE__ */ T(`span`,{className:`wui-reaction-count`,children:g(e.count,{decimals:0})})]},e.emoji)),!i&&/* @__PURE__ */ T(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":S.addReactionLabel,"aria-haspopup":`true`,"aria-expanded":`false`,children:/* @__PURE__ */ T(l,{name:`emoji-smile`,size:16})})]}),!i&&!F&&(G||U||W)&&/* @__PURE__ */ E(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[G&&/* @__PURE__ */ T(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:S.replyLabel}),U&&/* @__PURE__ */ T(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:S.editLabel}),W&&/* @__PURE__ */ T(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:S.deleteLabel})]}),W&&/* @__PURE__ */ E(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[/* @__PURE__ */ T(`span`,{className:`wui-comment-confirm-text`,children:S.deleteConfirmText}),/* @__PURE__ */ T(c,{tone:`danger`,size:`sm`,"data-wui-action":`confirm-delete`,children:S.deleteLabel}),/* @__PURE__ */ T(c,{variant:`ghost`,size:`sm`,"data-wui-action":`cancel-delete`,children:S.cancelLabel})]}),!i&&/* @__PURE__ */ T(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),r&&B.length>0&&/* @__PURE__ */ T(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":O(S.repliesToLabel,{name:V}),children:B.map(e=>/* @__PURE__ */ T(I,{comment:e,readOnly:i,allowReactions:o,markdown:d,linkComponent:f,internalLabel:p,attachmentsLabel:y,text:S},e.id))}),G&&!i&&!F&&/* @__PURE__ */ T(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/useWuiText.js";import{splitMarkerProps as
|
|
1
|
+
import{newIdempotencyKey as e}from"../web-core/dist/api/idempotencyKey.js";import t from"../lib/useWuiText.js";import{splitMarkerProps as ee}from"../lib/wuiMarker.js";import n from"./AppButton.js";import r from"./AppIcon.js";import te from"./AppInput.js";import i from"./AppModal.js";import a from"./assertValidValue.js";import{MODAL_ICONS as ne}from"./ModalIcons.js";import o from"./warnUnknownProps.js";import{useEffect as s,useRef as c,useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{CONFIRM_DIALOG_TEXT as re,fillText as ie}from"@webority/ui-elements/text";var p=[`sm`,`md`,`lg`,`xl`],m=[`default`,`plain`],h=[`success`,`danger`,`warning`,`info`,`primary`];function g(g){let{marker:_,props:v}=ee(`AppConfirmDialog`,g),y=t(`confirmDialog`,re),{open:b,title:x,variant:S=`default`,description:C,confirmLabel:w=y.confirmLabel,cancelLabel:T=y.cancelLabel,typePhraseLabel:E=y.typePhraseLabel,tone:D,image:O,icon:k,iconSize:A,confirmPhrase:j,onConfirm:M,onClose:N,loading:P=!1,idempotent:F=!1,staticBackdrop:I=!0,placement:L=`center`,size:R=`md`,className:z=``,children:B,...V}=v;o(`AppConfirmDialog`,V),a(`AppConfirmDialog`,`tone`,D,h),a(`AppConfirmDialog`,`size`,typeof R==`string`?R:null,p),a(`AppConfirmDialog`,`variant`,S,m);let[H,U]=l(``),W=c(null);if(s(()=>{b||(U(``),W.current=null)},[b]),!b)return null;let G=!!j&&H.trim()!==j,[K,...q]=E.split(`{phrase}`),J=q.join(j??`,`),Y=S===`plain`,X=Y?`sm`:`md`,Z=Y||O||k?null:ne[D===`danger`?`delete`:D??`info`],Q=A!==void 0&&A>0?{"--wui-confirm-icon-size":`${A}px`}:void 0,$=()=>{P||N?.()},ae=()=>{if(!F)return M();let t=W.current;return t===null&&(t=e(),W.current=t),M({idempotencyKey:t})};return/* @__PURE__ */ d(i,{..._,...V,open:b,hideHeader:!0,title:x,onClose:$,staticBackdrop:I,closeOnEscape:!I,placement:L,size:R,className:[`wui-confirm`,Y&&`wui-confirm-plain`,z].filter(Boolean).join(` `),footer:/* @__PURE__ */ f(`div`,{className:`wui-confirm-actions`,children:[/* @__PURE__ */ d(n,{tone:`neutral`,...Y?{}:{variant:`soft`},size:X,disabled:P,onClick:$,children:T}),/* @__PURE__ */ d(n,{tone:D===`danger`?`danger`:void 0,size:X,disabled:G,loading:P,onClick:ae,children:w})]}),children:/* @__PURE__ */ f(`div`,{className:`wui-confirm-content`,children:[!Y&&O?/* @__PURE__ */ d(`span`,{className:`wui-confirm-icon`,style:Q,children:/* @__PURE__ */ d(`img`,{src:O,alt:``,"aria-hidden":`true`})}):!Y&&k?/* @__PURE__ */ d(`span`,{className:`wui-confirm-icon`,style:Q,children:typeof k==`string`?/* @__PURE__ */ d(r,{name:k,size:80}):k}):Z&&/* @__PURE__ */ d(`span`,{className:`wui-confirm-icon`,style:Q,children:/* @__PURE__ */ d(Z,{size:120})}),/* @__PURE__ */ d(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:x}),C&&/* @__PURE__ */ d(`p`,{className:`wui-confirm-msg`,children:C}),B!=null&&B!==!1&&/* @__PURE__ */ d(`div`,{className:`wui-confirm-body`,children:B}),j&&/* @__PURE__ */ d(te,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:/* @__PURE__ */ f(u,{children:[K,/* @__PURE__ */ d(`strong`,{children:j}),J]}),value:H,onChange:e=>U(e.target.value),"aria-label":ie(E,{phrase:j}),disabled:P})]})})}export{g as default};
|