@momentum-ui/web-components 2.23.7 → 2.23.9

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.
@@ -5,15 +5,13 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import "@/components/avatar/Presence";
9
8
  import "@/components/icon/Icon";
10
9
  import "@/components/loading/Loading";
10
+ import "@/components/presence/Presence";
11
11
  import { LitElement, PropertyValues } from "lit-element";
12
+ import { PresenceState } from "../presence/Presence.utils";
12
13
  import { AvatarChannelType, AvatarSize, AvatarState, AvatarStyle, AvatarType } from "./Avatar.constants";
13
- import { PresenceType } from "./Presence.utils";
14
- import { TaskItem } from "../taskitem/TaskItem";
15
14
  export declare namespace Avatar {
16
- type PresenceState = (typeof PresenceType)[number] | TaskItem.TaskItemStatus;
17
15
  type ChannelType = (typeof AvatarChannelType)[number];
18
16
  type Type = (typeof AvatarType)[number] | PresenceState | ChannelType;
19
17
  type Size = (typeof AvatarSize)[number];
@@ -74,6 +72,7 @@ export declare namespace Avatar {
74
72
  private readonly iconNameMap;
75
73
  private getIconName;
76
74
  private get chatIconSize();
75
+ private get presenceSize();
77
76
  private get iconSize();
78
77
  get renderIsTyping(): {};
79
78
  private get avatarLetter();
@@ -46,6 +46,7 @@ export declare namespace DatePicker {
46
46
  compactInput?: boolean;
47
47
  controlButtons?: DatePickerControlButtons;
48
48
  positioningStrategy?: StrategyType;
49
+ showDefaultNowDate: boolean;
49
50
  selectedDate: DateTime;
50
51
  focusedDate: DateTime;
51
52
  filterDate: Function | undefined;
@@ -74,6 +75,7 @@ export declare namespace DatePicker {
74
75
  protected onApplyClick(): void;
75
76
  private renderControlButtons;
76
77
  protected getPlaceHolderString(): string;
78
+ protected getFormattedDate(date: DateTime): string | null;
77
79
  render(): TemplateResult;
78
80
  }
79
81
  }
@@ -1,5 +1,6 @@
1
1
  import "@/components/button/Button";
2
2
  import "@/components/icon/Icon";
3
+ import "@/components/tooltip/Tooltip";
3
4
  import { LitElement } from "lit-element";
4
5
  import { TemplateResult } from "lit-html";
5
6
  export type FloatingButtonActionGroup = {
@@ -1,6 +1,7 @@
1
1
  import "@/components/icon/Icon";
2
2
  import { LitElement } from "lit-element";
3
- import { AvatarSize } from "./Avatar.constants";
3
+ import { AvatarSize } from "../avatar/Avatar.constants";
4
+ import { PresenceState } from "./Presence.utils";
4
5
  export declare namespace Presence {
5
6
  type Size = (typeof AvatarSize)[number];
6
7
  class ELEMENT extends LitElement {
@@ -8,7 +9,12 @@ export declare namespace Presence {
8
9
  size: Size;
9
10
  title: string;
10
11
  color: string;
12
+ presenceType: PresenceState;
13
+ newMomentum: boolean;
14
+ failurePresence: boolean;
15
+ avatarLinked: boolean;
11
16
  static get styles(): import("lit-element").CSSResult[];
17
+ private get presenceClassMap();
12
18
  render(): import("lit-element").TemplateResult;
13
19
  }
14
20
  }
@@ -1,9 +1,9 @@
1
1
  import { TaskItem } from "../taskitem/TaskItem";
2
+ export type PresenceState = (typeof PresenceType)[number] | TaskItem.TaskItemStatus;
2
3
  type ReturnType = {
3
4
  presenceIcon: string | undefined;
4
5
  presenceColor: string | undefined;
5
6
  };
6
7
  export declare const PresenceType: readonly ["active", "meeting", "schedule", "call", "dnd", "presenting", "quiet-hours", "away", "idle", "inactive", "away-calling", "ooo", "busy", "on-mobile", "on-device", "on-hold", "engaged", "rona", ""];
7
- export declare const getPresenceIconColor: (presenceType: (typeof PresenceType)[number] | TaskItem.TaskItemStatus, failureBadge: boolean, isMomentumDesign?: boolean) => ReturnType;
8
- export declare function getPresenceSize(size: number): number;
8
+ export declare const getPresenceIconColor: (presenceType: PresenceState, failureBadge: boolean, isMomentumDesign?: boolean) => ReturnType;
9
9
  export {};
@@ -65,6 +65,8 @@ export { Modal } from "./components/modal/Modal";
65
65
  export { Pagination } from "./components/pagination/Pagination";
66
66
  export { PhoneInput } from "./components/phone-input/PhoneInput";
67
67
  export { Popover, PopoverController } from "./components/popover/Popover";
68
+ export { Presence } from "./components/presence/Presence";
69
+ export type { PresenceState } from "./components/presence/Presence.utils";
68
70
  export { ProgressBar } from "./components/progress-bar/ProgressBar";
69
71
  export { Radio } from "./components/radio/Radio";
70
72
  export { RadioGroup } from "./components/radio/RadioGroup";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.23.7",
3
+ "version": "2.23.9",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",
package/dist/528.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[528],{22887:(e,a,r)=>{r.d(a,{D8:()=>s,E0:()=>c,eO:()=>n});var t=r(31465);const n=["active","meeting","schedule","call","dnd","presenting","quiet-hours","away","idle","inactive","away-calling","ooo","busy","on-mobile","on-device","on-hold","engaged","rona",""],c=(e,a,r=!1)=>{let n="",c="";if(a)n="warning-badge-filled",c="var(--mds-color-theme-indicator-attention)";else{if(!e)return{presenceIcon:void 0,presenceColor:void 0};switch(e){case"active":n="active-presence-small-filled",c="var(--avatar-presence-active)";break;case"meeting":n=r?"camera-presence-filled":"camera-presence_14",c="var(--avatar-presence-unstable)";break;case"schedule":n=r?"meetings-presence-badge-filled":"meetings-presence_14",c="var(--avatar-presence-unstable)";break;case"call":n=r?"handset-filled":"handset-active_16",c="var(--avatar-presence-unstable)";break;case"dnd":n=r?"dnd-presence-badge-filled":"dnd-presence_14",c="var(--avatar-presence-dnd)";break;case"presenting":n=r?"share-screen-badge-filled":"content-share_14",c="var(--avatar-presence-dnd)";break;case"quiet-hours":n="quiet-hours-presence-filled",c="var(--avatar-presence-inactive)";break;case"away":case"idle":case"inactive":n=r?"recents-presence-badge-filled":"recents-presence_14",c="var(--avatar-presence-inactive)";break;case"away-calling":n="away-calling-presence-filled",c="var(--avatar-presence-inactive)";break;case"ooo":n="pto-presence-filled",c="var(--avatar-presence-inactive)";break;case"busy":n="busy-presence-bold",c="var(--avatar-presence-unstable)";break;case"on-mobile":n="phone-filled",c="var(--avatar-presence-inactive)";break;case"on-device":n=r?"generic-device-video-filled":"generic-device-video_16",c="var(--avatar-presence-inactive)";break;case"on-hold":case t.j.HOLD:n="pause-badge-filled",c="var(--avatar-presence-inactive)";break;case"engaged":n="busy-presence-bold",c="var(--avatar-presence-engaged)";break;case"rona":n="dnd-presence-badge-filled",c="var(--avatar-presence-rona)";break;case t.j.CONSULTING:n="headset-bold",c="var(--avatar-presence-inactive)";break;case t.j.PLAY:n="play-bold",c="var(--avatar-presence-inactive)";break;case t.j.CONFERENCE:n="meet-bold",c="var(--avatar-presence-inactive)";break;case t.j.TRANSFERED:n="assign-privilege-bold",c="var(--avatar-presence-inactive)";break;case t.j.COURTESY_CALLBACK:n="callrate-bold",c="var(--avatar-presence-inactive)";break;case t.j.CAMPAIGN:n="announcement-bold",c="var(--avatar-presence-inactive)"}}return{presenceColor:c,presenceIcon:n}};function s(e){return e<=24?10.5:e<=32?14:e<=48?13.94:e<=64?18.58:e<=72?20.9:e<=88?25.55:36}},80528:(e,a,r)=>{r(61200);var t,n=r(31890),c=r(26272),s=r(41488),i=r(22887),o=r(3553),l=function(e,a,r,t){var n,c=arguments.length,s=c<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,a,r,t);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(s=(c<3?n(s):c>3?n(a,r,s):n(a,r))||s);return c>3&&s&&Object.defineProperty(a,r,s),s};!function(e){let a=class extends s.LitElement{constructor(){super(...arguments),this.name="",this.size=48,this.title="",this.color=""}static get styles(){return[c.A,o.A]}render(){const e=(0,i.D8)(this.size);return s.html`
2
- <div class="avatar-presence-wrapper" data-size=${this.size} data-icon-size=${e}>
3
- <md-icon
4
- name="${this.name}"
5
- color="${this.color}"
6
- size=${e}
7
- title="${this.title}"
8
- .iconSet=${"momentumDesign"}
9
- >
10
- </md-icon>
11
- </div>
12
- `}};l([(0,s.property)({type:String})],a.prototype,"name",void 0),l([(0,s.property)({type:Number})],a.prototype,"size",void 0),l([(0,s.property)({type:String})],a.prototype,"title",void 0),l([(0,s.property)({type:String})],a.prototype,"color",void 0),a=l([(0,n.w)("md-presence")],a),e.ELEMENT=a}(t||(t={}))}}]);
package/dist/9788.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[9788],{69788:(t,s,n)=>{var i,a=n(31890),e=n(26272),o=n(41488),l=n(17518),r=n(76700),c=function(t,s,n,i){var a,e=arguments.length,o=e<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,n,i);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(o=(e<3?a(o):e>3?a(s,n,o):a(s,n))||o);return e>3&&o&&Object.defineProperty(s,n,o),o};!function(t){let s=class extends o.LitElement{constructor(){super(...arguments),this.size="",this.isAnimating=!1,this.animationFrameId=null}static get styles(){return[e.A,r.A]}firstUpdated(t){super.firstUpdated(t),this.isAnimating=!0,this.startAnimation()}disconnectedCallback(){super.disconnectedCallback(),this.isAnimating=!1,this.stopAnimation()}startAnimation(){var t;const s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".md-loading__icon");if(!s)return;let n=null;const i=1400,a=t=>{if(!this.isAnimating)return;n||(n=t);const e=(t-n)%i;s.forEach(((t,s)=>{const n=(e-200*s+i)%i;let a=0,o=.1;if(n<280){const t=.1+n/280*.9;a=t,o=t}else if(n<1400){const t=Math.min((n-280)/1120*2,1);a=Math.max(1-.9*t,.9),o=Math.max(1-.9*t,.2)}t.style.transform=`scale(${a})`,t.style.opacity=`${o}`})),this.animationFrameId=requestAnimationFrame(a)};this.animationFrameId=requestAnimationFrame(a)}stopAnimation(){var t;null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null);const s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".md-loading__icon");s&&s.forEach((t=>{t.style.transform="scale(0, 0)",t.style.opacity="0.1"}))}get loadingClassMap(){return{[`md-loading--${this.size}`]:!!this.size}}get loadingIconClassMap(){return{"md-loading__icon":!0}}render(){return o.html`
2
- <div class="md-loading ${(0,l.classMap)(this.loadingClassMap)}">
3
- <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
4
- <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
5
- <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
6
- </div>
7
- `}};c([(0,o.property)({type:String})],s.prototype,"size",void 0),s=c([(0,a.w)("md-loading")],s),t.ELEMENT=s}(i||(i={}))}}]);