@commmerce/ui 1.9.1 → 1.9.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.
@@ -140,6 +140,1175 @@
140
140
  }
141
141
  ]
142
142
  },
143
+ {
144
+ "kind": "javascript-module",
145
+ "path": "src/components/account-menu.ts",
146
+ "declarations": [
147
+ {
148
+ "kind": "class",
149
+ "description": "The signed-in person's menu at the end of a Commmerce product's header bar (since 1.9.2): a round avatar button that\nopens a panel with who is signed in (avatar, name, role and place), the business or store they're working in (its\nlogo, name, kind and plan), then the choices: `cm-menu-item`s such as Settings, Lock screen and Log out. The panel\nis the action menu's: keyboard, outside click and Escape behave the same, and it opens in the top layer, aligned\nto the avatar's end edge. Put it in `cm-header-bar`'s `account` slot, so it is always last in the bar.\nFor Commmerce products only, not for apps.",
150
+ "name": "CmAccountMenu",
151
+ "cssParts": [
152
+ {
153
+ "description": "The avatar button.",
154
+ "name": "trigger",
155
+ "inheritedFrom": {
156
+ "name": "CmActionMenu",
157
+ "module": "src/components/action-menu.ts"
158
+ }
159
+ },
160
+ {
161
+ "description": "The signed-in person's row.",
162
+ "name": "profile"
163
+ },
164
+ {
165
+ "description": "The business row.",
166
+ "name": "org"
167
+ },
168
+ {
169
+ "description": "The floating panel.",
170
+ "name": "menu",
171
+ "inheritedFrom": {
172
+ "name": "CmActionMenu",
173
+ "module": "src/components/action-menu.ts"
174
+ }
175
+ },
176
+ {
177
+ "description": "Each choice.",
178
+ "name": "item",
179
+ "inheritedFrom": {
180
+ "name": "CmActionMenu",
181
+ "module": "src/components/action-menu.ts"
182
+ }
183
+ },
184
+ {
185
+ "description": "A choice's shortcut hint.",
186
+ "name": "shortcut",
187
+ "inheritedFrom": {
188
+ "name": "CmActionMenu",
189
+ "module": "src/components/action-menu.ts"
190
+ }
191
+ },
192
+ {
193
+ "description": "A section heading.",
194
+ "name": "section",
195
+ "inheritedFrom": {
196
+ "name": "CmActionMenu",
197
+ "module": "src/components/action-menu.ts"
198
+ }
199
+ }
200
+ ],
201
+ "slots": [
202
+ {
203
+ "description": "`cm-menu-item` elements (and `cm-menu-item divider`).",
204
+ "name": "",
205
+ "inheritedFrom": {
206
+ "name": "CmActionMenu",
207
+ "module": "src/components/action-menu.ts"
208
+ }
209
+ },
210
+ {
211
+ "description": "The business's logo (an `<img>`, 40px round). Without it, a store icon on the brand tone is shown.",
212
+ "name": "org-logo"
213
+ },
214
+ {
215
+ "description": "Your own trigger button (optional). The menu sets its ARIA state.",
216
+ "name": "trigger",
217
+ "inheritedFrom": {
218
+ "name": "CmActionMenu",
219
+ "module": "src/components/action-menu.ts"
220
+ }
221
+ }
222
+ ],
223
+ "members": [
224
+ {
225
+ "kind": "field",
226
+ "name": "name",
227
+ "privacy": "public",
228
+ "type": {
229
+ "text": "string"
230
+ },
231
+ "default": "''",
232
+ "description": "The signed-in person's name. Their initials show when there is no `avatar-src`.",
233
+ "attribute": "name"
234
+ },
235
+ {
236
+ "kind": "field",
237
+ "name": "avatarSrc",
238
+ "privacy": "public",
239
+ "type": {
240
+ "text": "string"
241
+ },
242
+ "default": "''",
243
+ "description": "Their photo.",
244
+ "attribute": "avatar-src"
245
+ },
246
+ {
247
+ "kind": "field",
248
+ "name": "meta",
249
+ "privacy": "public",
250
+ "type": {
251
+ "text": "string"
252
+ },
253
+ "default": "''",
254
+ "description": "One line under the name: role and place (\"Owner · Bangalore\").",
255
+ "attribute": "meta"
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "profileHref",
260
+ "privacy": "public",
261
+ "type": {
262
+ "text": "string"
263
+ },
264
+ "default": "''",
265
+ "description": "Their profile page; makes the row a link with a chevron.",
266
+ "attribute": "profile-href"
267
+ },
268
+ {
269
+ "kind": "field",
270
+ "name": "orgName",
271
+ "privacy": "public",
272
+ "type": {
273
+ "text": "string"
274
+ },
275
+ "default": "''",
276
+ "description": "The business or store they're working in (\"Bangalore\"). Empty hides the business row.",
277
+ "attribute": "org-name"
278
+ },
279
+ {
280
+ "kind": "field",
281
+ "name": "orgMeta",
282
+ "privacy": "public",
283
+ "type": {
284
+ "text": "string"
285
+ },
286
+ "default": "''",
287
+ "description": "One line under it (\"POS store\").",
288
+ "attribute": "org-meta"
289
+ },
290
+ {
291
+ "kind": "field",
292
+ "name": "orgHref",
293
+ "privacy": "public",
294
+ "type": {
295
+ "text": "string"
296
+ },
297
+ "default": "''",
298
+ "description": "The business's page or switcher; makes the row a link with a chevron.",
299
+ "attribute": "org-href"
300
+ },
301
+ {
302
+ "kind": "field",
303
+ "name": "plan",
304
+ "privacy": "public",
305
+ "type": {
306
+ "text": "string"
307
+ },
308
+ "default": "''",
309
+ "description": "The plan, shown under the business with a check (\"POS Standard\").",
310
+ "attribute": "plan"
311
+ },
312
+ {
313
+ "kind": "method",
314
+ "name": "triggerTemplate",
315
+ "privacy": "protected",
316
+ "parameters": [
317
+ {
318
+ "name": "click",
319
+ "type": {
320
+ "text": "(e: Event) => void"
321
+ }
322
+ },
323
+ {
324
+ "name": "key",
325
+ "type": {
326
+ "text": "(e: KeyboardEvent) => void"
327
+ }
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ "kind": "method",
333
+ "name": "headTemplate",
334
+ "privacy": "protected"
335
+ },
336
+ {
337
+ "kind": "field",
338
+ "name": "align",
339
+ "privacy": "public",
340
+ "type": {
341
+ "text": "'start' | 'end'"
342
+ },
343
+ "default": "'end'",
344
+ "description": "Which trigger edge the menu lines up with: `start` (default) or `end` (for triggers at the right edge).",
345
+ "attribute": "align",
346
+ "reflects": true,
347
+ "inheritedFrom": {
348
+ "name": "CmActionMenu",
349
+ "module": "src/components/action-menu.ts"
350
+ }
351
+ },
352
+ {
353
+ "kind": "field",
354
+ "name": "items",
355
+ "privacy": "public",
356
+ "type": {
357
+ "text": "MenuItem[]"
358
+ },
359
+ "default": "[]",
360
+ "description": "Choices as data, used instead of children when set: `[{ label: 'Add product', value: 'product' }, { divider: true }, …]`.",
361
+ "attribute": "items",
362
+ "inheritedFrom": {
363
+ "name": "CmActionMenu",
364
+ "module": "src/components/action-menu.ts"
365
+ }
366
+ },
367
+ {
368
+ "kind": "field",
369
+ "name": "open",
370
+ "privacy": "public",
371
+ "type": {
372
+ "text": "boolean"
373
+ },
374
+ "default": "false",
375
+ "description": "Shows the menu.",
376
+ "attribute": "open",
377
+ "reflects": true,
378
+ "inheritedFrom": {
379
+ "name": "CmActionMenu",
380
+ "module": "src/components/action-menu.ts"
381
+ }
382
+ },
383
+ {
384
+ "kind": "field",
385
+ "name": "label",
386
+ "privacy": "public",
387
+ "type": {
388
+ "text": "string"
389
+ },
390
+ "description": "Accessible name of the menu. Also the trigger's name when it is icon-only. Default: the built-in string `label` (\"Actions\").",
391
+ "attribute": "label",
392
+ "inheritedFrom": {
393
+ "name": "CmActionMenu",
394
+ "module": "src/components/action-menu.ts"
395
+ }
396
+ },
397
+ {
398
+ "kind": "field",
399
+ "name": "triggerLabel",
400
+ "privacy": "public",
401
+ "type": {
402
+ "text": "string"
403
+ },
404
+ "default": "''",
405
+ "description": "Text of the built-in trigger. Empty uses `label`.",
406
+ "attribute": "trigger-label",
407
+ "inheritedFrom": {
408
+ "name": "CmActionMenu",
409
+ "module": "src/components/action-menu.ts"
410
+ }
411
+ },
412
+ {
413
+ "kind": "field",
414
+ "name": "iconOnly",
415
+ "privacy": "public",
416
+ "type": {
417
+ "text": "boolean"
418
+ },
419
+ "default": "false",
420
+ "description": "The built-in trigger is a \"more\" (⋮) icon button, e.g. for table rows.",
421
+ "attribute": "icon-only",
422
+ "inheritedFrom": {
423
+ "name": "CmActionMenu",
424
+ "module": "src/components/action-menu.ts"
425
+ }
426
+ },
427
+ {
428
+ "kind": "field",
429
+ "name": "icon",
430
+ "privacy": "public",
431
+ "type": {
432
+ "text": "string"
433
+ },
434
+ "default": "'more'",
435
+ "description": "Icon of the icon-only trigger. Default `more` (⋮); `chevron-down` for a menu attached to another control.",
436
+ "attribute": "icon",
437
+ "inheritedFrom": {
438
+ "name": "CmActionMenu",
439
+ "module": "src/components/action-menu.ts"
440
+ }
441
+ },
442
+ {
443
+ "kind": "field",
444
+ "name": "heading",
445
+ "privacy": "public",
446
+ "type": {
447
+ "text": "string"
448
+ },
449
+ "default": "''",
450
+ "description": "Bold line above the choices, e.g. the merchant's name in the account menu.",
451
+ "attribute": "heading",
452
+ "inheritedFrom": {
453
+ "name": "CmActionMenu",
454
+ "module": "src/components/action-menu.ts"
455
+ }
456
+ },
457
+ {
458
+ "kind": "field",
459
+ "name": "subheading",
460
+ "privacy": "public",
461
+ "type": {
462
+ "text": "string"
463
+ },
464
+ "default": "''",
465
+ "description": "Smaller line under the heading, e.g. the email.",
466
+ "attribute": "subheading",
467
+ "inheritedFrom": {
468
+ "name": "CmActionMenu",
469
+ "module": "src/components/action-menu.ts"
470
+ }
471
+ },
472
+ {
473
+ "kind": "field",
474
+ "name": "density",
475
+ "privacy": "public",
476
+ "type": {
477
+ "text": "'comfortable' | 'compact' | undefined"
478
+ },
479
+ "description": "Row height: `comfortable` 36px rows (the default) or `compact` 32px rows for dense tables and toolbars. Since 1.6.",
480
+ "attribute": "density",
481
+ "reflects": true,
482
+ "inheritedFrom": {
483
+ "name": "CmActionMenu",
484
+ "module": "src/components/action-menu.ts"
485
+ }
486
+ },
487
+ {
488
+ "kind": "field",
489
+ "name": "loading",
490
+ "privacy": "public",
491
+ "type": {
492
+ "text": "boolean"
493
+ },
494
+ "default": "false",
495
+ "description": "Shows a spinner row instead of the choices while you load them (the menu is `aria-busy`). Since 1.6.",
496
+ "attribute": "loading",
497
+ "reflects": true,
498
+ "inheritedFrom": {
499
+ "name": "CmActionMenu",
500
+ "module": "src/components/action-menu.ts"
501
+ }
502
+ },
503
+ {
504
+ "kind": "field",
505
+ "name": "disabled",
506
+ "privacy": "public",
507
+ "type": {
508
+ "text": "boolean"
509
+ },
510
+ "default": "false",
511
+ "description": "The built-in trigger can't be used (it is a disabled button); a slotted trigger is yours to disable. Since 1.6.",
512
+ "attribute": "disabled",
513
+ "reflects": true,
514
+ "inheritedFrom": {
515
+ "name": "CmActionMenu",
516
+ "module": "src/components/action-menu.ts"
517
+ }
518
+ },
519
+ {
520
+ "kind": "field",
521
+ "name": "_slotted",
522
+ "privacy": "public",
523
+ "type": {
524
+ "text": "MenuItem[]"
525
+ },
526
+ "default": "[]",
527
+ "attribute": "_slotted",
528
+ "inheritedFrom": {
529
+ "name": "CmActionMenu",
530
+ "module": "src/components/action-menu.ts"
531
+ }
532
+ },
533
+ {
534
+ "kind": "field",
535
+ "name": "_active",
536
+ "privacy": "public",
537
+ "type": {
538
+ "text": "number"
539
+ },
540
+ "default": "-1",
541
+ "attribute": "_active",
542
+ "inheritedFrom": {
543
+ "name": "CmActionMenu",
544
+ "module": "src/components/action-menu.ts"
545
+ }
546
+ },
547
+ {
548
+ "kind": "field",
549
+ "name": "_custom",
550
+ "privacy": "public",
551
+ "type": {
552
+ "text": "boolean"
553
+ },
554
+ "default": "false",
555
+ "attribute": "_custom",
556
+ "inheritedFrom": {
557
+ "name": "CmActionMenu",
558
+ "module": "src/components/action-menu.ts"
559
+ }
560
+ },
561
+ {
562
+ "kind": "field",
563
+ "name": "#observer",
564
+ "privacy": "private",
565
+ "type": {
566
+ "text": "MutationObserver | undefined"
567
+ },
568
+ "inheritedFrom": {
569
+ "name": "CmActionMenu",
570
+ "module": "src/components/action-menu.ts"
571
+ }
572
+ },
573
+ {
574
+ "kind": "field",
575
+ "name": "#id",
576
+ "privacy": "private",
577
+ "inheritedFrom": {
578
+ "name": "CmActionMenu",
579
+ "module": "src/components/action-menu.ts"
580
+ }
581
+ },
582
+ {
583
+ "kind": "field",
584
+ "name": "#typed",
585
+ "privacy": "private",
586
+ "type": {
587
+ "text": "string"
588
+ },
589
+ "default": "''",
590
+ "inheritedFrom": {
591
+ "name": "CmActionMenu",
592
+ "module": "src/components/action-menu.ts"
593
+ }
594
+ },
595
+ {
596
+ "kind": "field",
597
+ "name": "#typedAt",
598
+ "privacy": "private",
599
+ "type": {
600
+ "text": "number"
601
+ },
602
+ "default": "0",
603
+ "inheritedFrom": {
604
+ "name": "CmActionMenu",
605
+ "module": "src/components/action-menu.ts"
606
+ }
607
+ },
608
+ {
609
+ "kind": "method",
610
+ "name": "#read",
611
+ "privacy": "private",
612
+ "inheritedFrom": {
613
+ "name": "CmActionMenu",
614
+ "module": "src/components/action-menu.ts"
615
+ }
616
+ },
617
+ {
618
+ "kind": "field",
619
+ "name": "menuItems",
620
+ "type": {
621
+ "text": "MenuItem[]"
622
+ },
623
+ "description": "The choices in use.",
624
+ "readonly": true,
625
+ "inheritedFrom": {
626
+ "name": "CmActionMenu",
627
+ "module": "src/components/action-menu.ts"
628
+ }
629
+ },
630
+ {
631
+ "kind": "field",
632
+ "name": "#outside",
633
+ "privacy": "private",
634
+ "inheritedFrom": {
635
+ "name": "CmActionMenu",
636
+ "module": "src/components/action-menu.ts"
637
+ }
638
+ },
639
+ {
640
+ "kind": "method",
641
+ "name": "#trigger",
642
+ "privacy": "private",
643
+ "return": {
644
+ "type": {
645
+ "text": "HTMLElement | null"
646
+ }
647
+ },
648
+ "inheritedFrom": {
649
+ "name": "CmActionMenu",
650
+ "module": "src/components/action-menu.ts"
651
+ }
652
+ },
653
+ {
654
+ "kind": "method",
655
+ "name": "#enabled",
656
+ "privacy": "private",
657
+ "inheritedFrom": {
658
+ "name": "CmActionMenu",
659
+ "module": "src/components/action-menu.ts"
660
+ }
661
+ },
662
+ {
663
+ "kind": "method",
664
+ "name": "show",
665
+ "parameters": [
666
+ {
667
+ "name": "focus",
668
+ "default": "'first'",
669
+ "type": {
670
+ "text": "'first' | 'last'"
671
+ }
672
+ }
673
+ ],
674
+ "description": "Opens the menu and highlights the first (or last) choice.",
675
+ "inheritedFrom": {
676
+ "name": "CmActionMenu",
677
+ "module": "src/components/action-menu.ts"
678
+ }
679
+ },
680
+ {
681
+ "kind": "method",
682
+ "name": "hide",
683
+ "parameters": [
684
+ {
685
+ "name": "returnFocus",
686
+ "default": "false"
687
+ }
688
+ ],
689
+ "description": "Closes the menu. With `returnFocus`, focus goes back to the trigger.",
690
+ "inheritedFrom": {
691
+ "name": "CmActionMenu",
692
+ "module": "src/components/action-menu.ts"
693
+ }
694
+ },
695
+ {
696
+ "kind": "method",
697
+ "name": "#setOpen",
698
+ "privacy": "private",
699
+ "parameters": [
700
+ {
701
+ "name": "v",
702
+ "type": {
703
+ "text": "boolean"
704
+ }
705
+ }
706
+ ],
707
+ "inheritedFrom": {
708
+ "name": "CmActionMenu",
709
+ "module": "src/components/action-menu.ts"
710
+ }
711
+ },
712
+ {
713
+ "kind": "method",
714
+ "name": "#focusActive",
715
+ "privacy": "private",
716
+ "inheritedFrom": {
717
+ "name": "CmActionMenu",
718
+ "module": "src/components/action-menu.ts"
719
+ }
720
+ },
721
+ {
722
+ "kind": "method",
723
+ "name": "#fit",
724
+ "privacy": "private",
725
+ "description": "Opens toward the other side when the menu would run off the screen (1.8.1: a More menu at the end of a page header).",
726
+ "inheritedFrom": {
727
+ "name": "CmActionMenu",
728
+ "module": "src/components/action-menu.ts"
729
+ }
730
+ },
731
+ {
732
+ "kind": "method",
733
+ "name": "#place",
734
+ "privacy": "private",
735
+ "parameters": [
736
+ {
737
+ "name": "pop",
738
+ "type": {
739
+ "text": "HTMLElement"
740
+ }
741
+ }
742
+ ],
743
+ "description": "Puts the top-layer menu under the trigger (above it when there's no room below), aligned to its start or end edge.",
744
+ "inheritedFrom": {
745
+ "name": "CmActionMenu",
746
+ "module": "src/components/action-menu.ts"
747
+ }
748
+ },
749
+ {
750
+ "kind": "field",
751
+ "name": "#onMove",
752
+ "privacy": "private",
753
+ "inheritedFrom": {
754
+ "name": "CmActionMenu",
755
+ "module": "src/components/action-menu.ts"
756
+ }
757
+ },
758
+ {
759
+ "kind": "field",
760
+ "name": "#following",
761
+ "privacy": "private",
762
+ "type": {
763
+ "text": "boolean"
764
+ },
765
+ "default": "false",
766
+ "inheritedFrom": {
767
+ "name": "CmActionMenu",
768
+ "module": "src/components/action-menu.ts"
769
+ }
770
+ },
771
+ {
772
+ "kind": "method",
773
+ "name": "#follow",
774
+ "privacy": "private",
775
+ "parameters": [
776
+ {
777
+ "name": "on",
778
+ "type": {
779
+ "text": "boolean"
780
+ }
781
+ }
782
+ ],
783
+ "inheritedFrom": {
784
+ "name": "CmActionMenu",
785
+ "module": "src/components/action-menu.ts"
786
+ }
787
+ },
788
+ {
789
+ "kind": "field",
790
+ "name": "#triggerKey",
791
+ "privacy": "private",
792
+ "inheritedFrom": {
793
+ "name": "CmActionMenu",
794
+ "module": "src/components/action-menu.ts"
795
+ }
796
+ },
797
+ {
798
+ "kind": "field",
799
+ "name": "#triggerClick",
800
+ "privacy": "private",
801
+ "inheritedFrom": {
802
+ "name": "CmActionMenu",
803
+ "module": "src/components/action-menu.ts"
804
+ }
805
+ },
806
+ {
807
+ "kind": "method",
808
+ "name": "#move",
809
+ "privacy": "private",
810
+ "parameters": [
811
+ {
812
+ "name": "to",
813
+ "type": {
814
+ "text": "number"
815
+ }
816
+ }
817
+ ],
818
+ "inheritedFrom": {
819
+ "name": "CmActionMenu",
820
+ "module": "src/components/action-menu.ts"
821
+ }
822
+ },
823
+ {
824
+ "kind": "field",
825
+ "name": "#menuKey",
826
+ "privacy": "private",
827
+ "inheritedFrom": {
828
+ "name": "CmActionMenu",
829
+ "module": "src/components/action-menu.ts"
830
+ }
831
+ },
832
+ {
833
+ "kind": "method",
834
+ "name": "#choose",
835
+ "privacy": "private",
836
+ "parameters": [
837
+ {
838
+ "name": "e",
839
+ "type": {
840
+ "text": "Event"
841
+ }
842
+ },
843
+ {
844
+ "name": "it",
845
+ "type": {
846
+ "text": "MenuItem"
847
+ }
848
+ }
849
+ ],
850
+ "inheritedFrom": {
851
+ "name": "CmActionMenu",
852
+ "module": "src/components/action-menu.ts"
853
+ }
854
+ },
855
+ {
856
+ "kind": "method",
857
+ "name": "#item",
858
+ "privacy": "private",
859
+ "parameters": [
860
+ {
861
+ "name": "it",
862
+ "type": {
863
+ "text": "MenuItem"
864
+ }
865
+ },
866
+ {
867
+ "name": "i",
868
+ "type": {
869
+ "text": "number"
870
+ }
871
+ }
872
+ ],
873
+ "inheritedFrom": {
874
+ "name": "CmActionMenu",
875
+ "module": "src/components/action-menu.ts"
876
+ }
877
+ },
878
+ {
879
+ "kind": "method",
880
+ "name": "#rows",
881
+ "privacy": "private",
882
+ "parameters": [
883
+ {
884
+ "name": "items",
885
+ "type": {
886
+ "text": "MenuItem[]"
887
+ }
888
+ }
889
+ ],
890
+ "description": "Rows: choices and separators, with each heading and the choices after it (up to a divider or heading) in a group.",
891
+ "inheritedFrom": {
892
+ "name": "CmActionMenu",
893
+ "module": "src/components/action-menu.ts"
894
+ }
895
+ },
896
+ {
897
+ "kind": "method",
898
+ "name": "finalize",
899
+ "static": true,
900
+ "description": "A property declared with `string: 'key'` (e.g. `saveLabel: { attribute: 'save-label', string: 'save' }`) reads\nas that built-in string until it is set, so `el.saveLabel` is \"Save\" in English and the translation elsewhere.\nSetting it overrides the string for this element; setting `undefined` goes back to the built-in one.",
901
+ "inheritedFrom": {
902
+ "name": "CmLocalizedElement",
903
+ "module": "src/localize.ts"
904
+ }
905
+ },
906
+ {
907
+ "kind": "field",
908
+ "name": "strings",
909
+ "privacy": "public",
910
+ "type": {
911
+ "text": "Record<string, Message> | null | undefined"
912
+ },
913
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
914
+ "attribute": "strings",
915
+ "inheritedFrom": {
916
+ "name": "CmLocalizedElement",
917
+ "module": "src/localize.ts"
918
+ }
919
+ },
920
+ {
921
+ "kind": "field",
922
+ "name": "stringsNamespace",
923
+ "privacy": "protected",
924
+ "description": "The string namespace: the tag name without `cm-`, in camelCase.",
925
+ "readonly": true,
926
+ "inheritedFrom": {
927
+ "name": "CmLocalizedElement",
928
+ "module": "src/localize.ts"
929
+ }
930
+ },
931
+ {
932
+ "kind": "method",
933
+ "name": "t",
934
+ "privacy": "protected",
935
+ "parameters": [
936
+ {
937
+ "name": "key",
938
+ "type": {
939
+ "text": "string"
940
+ }
941
+ },
942
+ {
943
+ "name": "vars",
944
+ "optional": true,
945
+ "type": {
946
+ "text": "MessageVars"
947
+ }
948
+ }
949
+ ],
950
+ "description": "The component's text for `key`, in its language, with `{placeholders}` filled from `vars`.",
951
+ "inheritedFrom": {
952
+ "name": "CmLocalizedElement",
953
+ "module": "src/localize.ts"
954
+ }
955
+ },
956
+ {
957
+ "kind": "field",
958
+ "name": "locale",
959
+ "privacy": "protected",
960
+ "description": "The locale used for numbers, dates and plurals.",
961
+ "readonly": true,
962
+ "inheritedFrom": {
963
+ "name": "CmLocalizedElement",
964
+ "module": "src/localize.ts"
965
+ }
966
+ },
967
+ {
968
+ "kind": "method",
969
+ "name": "formatNumber",
970
+ "privacy": "protected",
971
+ "parameters": [
972
+ {
973
+ "name": "n",
974
+ "type": {
975
+ "text": "number"
976
+ }
977
+ },
978
+ {
979
+ "name": "options",
980
+ "optional": true,
981
+ "type": {
982
+ "text": "Intl.NumberFormatOptions"
983
+ }
984
+ }
985
+ ],
986
+ "description": "A number formatted for the component's locale.",
987
+ "inheritedFrom": {
988
+ "name": "CmLocalizedElement",
989
+ "module": "src/localize.ts"
990
+ }
991
+ }
992
+ ],
993
+ "events": [
994
+ {
995
+ "name": "cm-select",
996
+ "type": {
997
+ "text": "CustomEvent"
998
+ },
999
+ "description": "When a choice is picked (as on `cm-action-menu`).",
1000
+ "inheritedFrom": {
1001
+ "name": "CmActionMenu",
1002
+ "module": "src/components/action-menu.ts"
1003
+ }
1004
+ },
1005
+ {
1006
+ "name": "cm-toggle",
1007
+ "type": {
1008
+ "text": "CustomEvent"
1009
+ },
1010
+ "description": "When the menu opens or closes. `detail: { open }`.",
1011
+ "inheritedFrom": {
1012
+ "name": "CmActionMenu",
1013
+ "module": "src/components/action-menu.ts"
1014
+ }
1015
+ }
1016
+ ],
1017
+ "attributes": [
1018
+ {
1019
+ "name": "name",
1020
+ "type": {
1021
+ "text": "string"
1022
+ },
1023
+ "default": "''",
1024
+ "description": "The signed-in person's name. Their initials show when there is no `avatar-src`.",
1025
+ "fieldName": "name"
1026
+ },
1027
+ {
1028
+ "name": "avatar-src",
1029
+ "type": {
1030
+ "text": "string"
1031
+ },
1032
+ "default": "''",
1033
+ "description": "Their photo.",
1034
+ "fieldName": "avatarSrc"
1035
+ },
1036
+ {
1037
+ "name": "meta",
1038
+ "type": {
1039
+ "text": "string"
1040
+ },
1041
+ "default": "''",
1042
+ "description": "One line under the name: role and place (\"Owner · Bangalore\").",
1043
+ "fieldName": "meta"
1044
+ },
1045
+ {
1046
+ "name": "profile-href",
1047
+ "type": {
1048
+ "text": "string"
1049
+ },
1050
+ "default": "''",
1051
+ "description": "Their profile page; makes the row a link with a chevron.",
1052
+ "fieldName": "profileHref"
1053
+ },
1054
+ {
1055
+ "name": "org-name",
1056
+ "type": {
1057
+ "text": "string"
1058
+ },
1059
+ "default": "''",
1060
+ "description": "The business or store they're working in (\"Bangalore\"). Empty hides the business row.",
1061
+ "fieldName": "orgName"
1062
+ },
1063
+ {
1064
+ "name": "org-meta",
1065
+ "type": {
1066
+ "text": "string"
1067
+ },
1068
+ "default": "''",
1069
+ "description": "One line under it (\"POS store\").",
1070
+ "fieldName": "orgMeta"
1071
+ },
1072
+ {
1073
+ "name": "org-href",
1074
+ "type": {
1075
+ "text": "string"
1076
+ },
1077
+ "default": "''",
1078
+ "description": "The business's page or switcher; makes the row a link with a chevron.",
1079
+ "fieldName": "orgHref"
1080
+ },
1081
+ {
1082
+ "name": "plan",
1083
+ "type": {
1084
+ "text": "string"
1085
+ },
1086
+ "default": "''",
1087
+ "description": "The plan, shown under the business with a check (\"POS Standard\").",
1088
+ "fieldName": "plan"
1089
+ },
1090
+ {
1091
+ "name": "items",
1092
+ "type": {
1093
+ "text": "MenuItem[]"
1094
+ },
1095
+ "default": "[]",
1096
+ "description": "Choices as data, used instead of children when set: `[{ label: 'Add product', value: 'product' }, { divider: true }, …]`.",
1097
+ "fieldName": "items",
1098
+ "inheritedFrom": {
1099
+ "name": "CmActionMenu",
1100
+ "module": "src/components/action-menu.ts"
1101
+ }
1102
+ },
1103
+ {
1104
+ "name": "open",
1105
+ "type": {
1106
+ "text": "boolean"
1107
+ },
1108
+ "default": "false",
1109
+ "description": "Shows the menu.",
1110
+ "fieldName": "open",
1111
+ "inheritedFrom": {
1112
+ "name": "CmActionMenu",
1113
+ "module": "src/components/action-menu.ts"
1114
+ }
1115
+ },
1116
+ {
1117
+ "name": "label",
1118
+ "type": {
1119
+ "text": "string"
1120
+ },
1121
+ "description": "Accessible name of the menu. Also the trigger's name when it is icon-only. Default: the built-in string `label` (\"Actions\").",
1122
+ "fieldName": "label",
1123
+ "inheritedFrom": {
1124
+ "name": "CmActionMenu",
1125
+ "module": "src/components/action-menu.ts"
1126
+ }
1127
+ },
1128
+ {
1129
+ "name": "trigger-label",
1130
+ "type": {
1131
+ "text": "string"
1132
+ },
1133
+ "default": "''",
1134
+ "description": "Text of the built-in trigger. Empty uses `label`.",
1135
+ "fieldName": "triggerLabel",
1136
+ "inheritedFrom": {
1137
+ "name": "CmActionMenu",
1138
+ "module": "src/components/action-menu.ts"
1139
+ }
1140
+ },
1141
+ {
1142
+ "name": "icon-only",
1143
+ "type": {
1144
+ "text": "boolean"
1145
+ },
1146
+ "default": "false",
1147
+ "description": "The built-in trigger is a \"more\" (⋮) icon button, e.g. for table rows.",
1148
+ "fieldName": "iconOnly",
1149
+ "inheritedFrom": {
1150
+ "name": "CmActionMenu",
1151
+ "module": "src/components/action-menu.ts"
1152
+ }
1153
+ },
1154
+ {
1155
+ "name": "icon",
1156
+ "type": {
1157
+ "text": "string"
1158
+ },
1159
+ "default": "'more'",
1160
+ "description": "Icon of the icon-only trigger. Default `more` (⋮); `chevron-down` for a menu attached to another control.",
1161
+ "fieldName": "icon",
1162
+ "inheritedFrom": {
1163
+ "name": "CmActionMenu",
1164
+ "module": "src/components/action-menu.ts"
1165
+ }
1166
+ },
1167
+ {
1168
+ "name": "align",
1169
+ "type": {
1170
+ "text": "'start' | 'end'"
1171
+ },
1172
+ "default": "'start'",
1173
+ "description": "Which trigger edge the menu lines up with: `start` (default) or `end` (for triggers at the right edge).",
1174
+ "fieldName": "align",
1175
+ "inheritedFrom": {
1176
+ "name": "CmActionMenu",
1177
+ "module": "src/components/action-menu.ts"
1178
+ }
1179
+ },
1180
+ {
1181
+ "name": "heading",
1182
+ "type": {
1183
+ "text": "string"
1184
+ },
1185
+ "default": "''",
1186
+ "description": "Bold line above the choices, e.g. the merchant's name in the account menu.",
1187
+ "fieldName": "heading",
1188
+ "inheritedFrom": {
1189
+ "name": "CmActionMenu",
1190
+ "module": "src/components/action-menu.ts"
1191
+ }
1192
+ },
1193
+ {
1194
+ "name": "subheading",
1195
+ "type": {
1196
+ "text": "string"
1197
+ },
1198
+ "default": "''",
1199
+ "description": "Smaller line under the heading, e.g. the email.",
1200
+ "fieldName": "subheading",
1201
+ "inheritedFrom": {
1202
+ "name": "CmActionMenu",
1203
+ "module": "src/components/action-menu.ts"
1204
+ }
1205
+ },
1206
+ {
1207
+ "name": "density",
1208
+ "type": {
1209
+ "text": "'comfortable' | 'compact' | undefined"
1210
+ },
1211
+ "description": "Row height: `comfortable` 36px rows (the default) or `compact` 32px rows for dense tables and toolbars. Since 1.6.",
1212
+ "fieldName": "density",
1213
+ "inheritedFrom": {
1214
+ "name": "CmActionMenu",
1215
+ "module": "src/components/action-menu.ts"
1216
+ }
1217
+ },
1218
+ {
1219
+ "name": "loading",
1220
+ "type": {
1221
+ "text": "boolean"
1222
+ },
1223
+ "default": "false",
1224
+ "description": "Shows a spinner row instead of the choices while you load them (the menu is `aria-busy`). Since 1.6.",
1225
+ "fieldName": "loading",
1226
+ "inheritedFrom": {
1227
+ "name": "CmActionMenu",
1228
+ "module": "src/components/action-menu.ts"
1229
+ }
1230
+ },
1231
+ {
1232
+ "name": "disabled",
1233
+ "type": {
1234
+ "text": "boolean"
1235
+ },
1236
+ "default": "false",
1237
+ "description": "The built-in trigger can't be used (it is a disabled button); a slotted trigger is yours to disable. Since 1.6.",
1238
+ "fieldName": "disabled",
1239
+ "inheritedFrom": {
1240
+ "name": "CmActionMenu",
1241
+ "module": "src/components/action-menu.ts"
1242
+ }
1243
+ },
1244
+ {
1245
+ "name": "_slotted",
1246
+ "type": {
1247
+ "text": "MenuItem[]"
1248
+ },
1249
+ "default": "[]",
1250
+ "fieldName": "_slotted",
1251
+ "inheritedFrom": {
1252
+ "name": "CmActionMenu",
1253
+ "module": "src/components/action-menu.ts"
1254
+ }
1255
+ },
1256
+ {
1257
+ "name": "_active",
1258
+ "type": {
1259
+ "text": "number"
1260
+ },
1261
+ "default": "-1",
1262
+ "fieldName": "_active",
1263
+ "inheritedFrom": {
1264
+ "name": "CmActionMenu",
1265
+ "module": "src/components/action-menu.ts"
1266
+ }
1267
+ },
1268
+ {
1269
+ "name": "_custom",
1270
+ "type": {
1271
+ "text": "boolean"
1272
+ },
1273
+ "default": "false",
1274
+ "fieldName": "_custom",
1275
+ "inheritedFrom": {
1276
+ "name": "CmActionMenu",
1277
+ "module": "src/components/action-menu.ts"
1278
+ }
1279
+ },
1280
+ {
1281
+ "name": "strings",
1282
+ "type": {
1283
+ "text": "Record<string, Message> | null | undefined"
1284
+ },
1285
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
1286
+ "fieldName": "strings",
1287
+ "inheritedFrom": {
1288
+ "name": "CmLocalizedElement",
1289
+ "module": "src/localize.ts"
1290
+ }
1291
+ }
1292
+ ],
1293
+ "superclass": {
1294
+ "name": "CmActionMenu",
1295
+ "module": "/src/components/action-menu.js"
1296
+ },
1297
+ "tagName": "cm-account-menu",
1298
+ "customElement": true
1299
+ }
1300
+ ],
1301
+ "exports": [
1302
+ {
1303
+ "kind": "js",
1304
+ "name": "CmAccountMenu",
1305
+ "declaration": {
1306
+ "name": "CmAccountMenu",
1307
+ "module": "src/components/account-menu.ts"
1308
+ }
1309
+ }
1310
+ ]
1311
+ },
143
1312
  {
144
1313
  "kind": "javascript-module",
145
1314
  "path": "src/components/action-bar.ts",
@@ -715,6 +1884,47 @@
715
1884
  "privacy": "private",
716
1885
  "description": "Opens toward the other side when the menu would run off the screen (1.8.1: a More menu at the end of a page header)."
717
1886
  },
1887
+ {
1888
+ "kind": "method",
1889
+ "name": "#place",
1890
+ "privacy": "private",
1891
+ "parameters": [
1892
+ {
1893
+ "name": "pop",
1894
+ "type": {
1895
+ "text": "HTMLElement"
1896
+ }
1897
+ }
1898
+ ],
1899
+ "description": "Puts the top-layer menu under the trigger (above it when there's no room below), aligned to its start or end edge."
1900
+ },
1901
+ {
1902
+ "kind": "field",
1903
+ "name": "#onMove",
1904
+ "privacy": "private"
1905
+ },
1906
+ {
1907
+ "kind": "field",
1908
+ "name": "#following",
1909
+ "privacy": "private",
1910
+ "type": {
1911
+ "text": "boolean"
1912
+ },
1913
+ "default": "false"
1914
+ },
1915
+ {
1916
+ "kind": "method",
1917
+ "name": "#follow",
1918
+ "privacy": "private",
1919
+ "parameters": [
1920
+ {
1921
+ "name": "on",
1922
+ "type": {
1923
+ "text": "boolean"
1924
+ }
1925
+ }
1926
+ ]
1927
+ },
718
1928
  {
719
1929
  "kind": "field",
720
1930
  "name": "#triggerKey",
@@ -17657,9 +18867,13 @@
17657
18867
  "name": "actions"
17658
18868
  },
17659
18869
  {
17660
- "description": "Anything after the user pill, e.g. a notifications button.",
18870
+ "description": "Controls before the signed-in person, in this order: refresh, then notifications (1.9.2: the user comes last).",
17661
18871
  "name": "end"
17662
18872
  },
18873
+ {
18874
+ "description": "The signed-in person's menu, last in the bar: a `cm-account-menu` (since 1.9.2). Use it instead of `user-name`.",
18875
+ "name": "account"
18876
+ },
17663
18877
  {
17664
18878
  "description": "One search box for the whole product, usually `cm-global-search`. Inline on wide bars; behind a search button that opens a full-screen layer at 900px or narrower.",
17665
18879
  "name": "search"