@yoobic/yobi 8.2.0-12 → 8.2.0-15
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/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/{grid-renderers-0c9a0d03.js → grid-renderers-faeb4762.js} +1 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-ag-grid.cjs.entry.js +1 -1
- package/dist/cjs/yoo-campaign-editor-recap.cjs.entry.js +1 -1
- package/dist/cjs/yoo-card-course-row.cjs.entry.js +7 -3
- package/dist/cjs/yoo-card-inbox.cjs.entry.js +2 -2
- package/dist/cjs/yoo-chat.cjs.entry.js +1 -1
- package/dist/cjs/yoo-course-summary.cjs.entry.js +3 -3
- package/dist/cjs/yoo-entity.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-autocomplete.cjs.entry.js +2 -0
- package/dist/cjs/yoo-form-capture.cjs.entry.js +2 -2
- package/dist/cjs/yoo-form-catalog.cjs.entry.js +4 -2
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +6 -2
- package/dist/cjs/yoo-form-footer.cjs.entry.js +2 -2
- package/dist/cjs/yoo-form-input.cjs.entry.js +1 -1
- package/dist/cjs/yoo-grid.cjs.entry.js +3 -3
- package/dist/cjs/yoo-lesson-detail-card.cjs.entry.js +2 -2
- package/dist/cjs/yoo-mission-heading.cjs.entry.js +2 -2
- package/dist/cjs/yoo-pivot-table.cjs.entry.js +1 -1
- package/dist/cjs/yoo-profile-summary.cjs.entry.js +1 -1
- package/dist/cjs/yoo-progress-bar.cjs.entry.js +23 -36
- package/dist/cjs/yoo-progress-recap.cjs.entry.js +2 -2
- package/dist/cjs/yoo-tooltip.cjs.entry.js +4 -0
- package/dist/cjs/yoo-truncated-line.cjs.entry.js +9 -5
- package/dist/collection/components/1.atoms/progress-bar/progress-bar.css +5 -5
- package/dist/collection/components/1.atoms/progress-bar/progress-bar.js +23 -73
- package/dist/collection/components/1.atoms/tooltip/tooltip.js +23 -0
- package/dist/collection/components/1.atoms/truncated-line/truncated-line.js +10 -9
- package/dist/collection/components/2.molecules/profile-summary/profile-summary.css +3 -0
- package/dist/collection/components/2.molecules/progress-recap/progress-recap.js +2 -2
- package/dist/collection/components/entities/entity/entity.js +1 -1
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +2 -0
- package/dist/collection/components/form/form-capture/form-capture.css +3 -0
- package/dist/collection/components/form/form-capture/form-capture.js +1 -1
- package/dist/collection/components/form/form-catalog/form-catalog.js +4 -2
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +6 -2
- package/dist/collection/components/form/form-footer/form-footer.css +1 -0
- package/dist/collection/components/form/form-footer/form-footer.js +1 -1
- package/dist/collection/components/grid/ag-grid/grid-renderers.js +2 -3
- package/dist/collection/components/grid/grid/grid.css +3 -0
- package/dist/collection/components/grid/grid/grid.js +1 -1
- package/dist/collection/feature-communicate/chat/chat/chat.js +1 -1
- package/dist/collection/feature-learn/learning/card-course/row/card-course-row.js +7 -3
- package/dist/collection/feature-learn/learning/course-summary/course-summary.css +1 -0
- package/dist/collection/feature-learn/learning/course-summary/course-summary.js +2 -2
- package/dist/collection/feature-learn/learning/lesson-detail-card/lesson-detail-card.css +1 -0
- package/dist/collection/feature-learn/learning/lesson-detail-card/lesson-detail-card.js +1 -1
- package/dist/collection/feature-operate/campaign/campaign-editor-recap/campaign-editor-recap.js +1 -1
- package/dist/collection/feature-operate/mission/card-inbox/card-inbox.css +1 -0
- package/dist/collection/feature-operate/mission/card-inbox/card-inbox.js +1 -1
- package/dist/collection/feature-operate/mission/mission-heading/mission-heading.css +3 -0
- package/dist/collection/feature-operate/mission/mission-heading/mission-heading.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{grid-renderers-f4f5634b.js → grid-renderers-bc677205.js} +2 -3
- package/dist/design-system/yoo-ag-grid.entry.js +1 -1
- package/dist/design-system/yoo-campaign-editor-recap.entry.js +1 -1
- package/dist/design-system/yoo-card-course-row.entry.js +7 -3
- package/dist/design-system/yoo-card-inbox.entry.js +2 -2
- package/dist/design-system/yoo-chat.entry.js +1 -1
- package/dist/design-system/yoo-course-summary.entry.js +3 -3
- package/dist/design-system/yoo-entity.entry.js +1 -1
- package/dist/design-system/yoo-form-autocomplete.entry.js +2 -0
- package/dist/design-system/yoo-form-capture.entry.js +2 -2
- package/dist/design-system/yoo-form-catalog.entry.js +4 -2
- package/dist/design-system/yoo-form-dynamic.entry.js +6 -2
- package/dist/design-system/yoo-form-footer.entry.js +2 -2
- package/dist/design-system/yoo-form-input.entry.js +1 -1
- package/dist/design-system/yoo-grid.entry.js +3 -3
- package/dist/design-system/yoo-lesson-detail-card.entry.js +2 -2
- package/dist/design-system/yoo-mission-heading.entry.js +2 -2
- package/dist/design-system/yoo-pivot-table.entry.js +1 -1
- package/dist/design-system/yoo-profile-summary.entry.js +1 -1
- package/dist/design-system/yoo-progress-bar.entry.js +24 -37
- package/dist/design-system/yoo-progress-recap.entry.js +2 -2
- package/dist/design-system/yoo-tooltip.entry.js +4 -0
- package/dist/design-system/yoo-truncated-line.entry.js +10 -6
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/{grid-renderers-f4f5634b.js → grid-renderers-bc677205.js} +2 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-ag-grid.entry.js +1 -1
- package/dist/esm/yoo-campaign-editor-recap.entry.js +1 -1
- package/dist/esm/yoo-card-course-row.entry.js +7 -3
- package/dist/esm/yoo-card-inbox.entry.js +2 -2
- package/dist/esm/yoo-chat.entry.js +1 -1
- package/dist/esm/yoo-course-summary.entry.js +3 -3
- package/dist/esm/yoo-entity.entry.js +1 -1
- package/dist/esm/yoo-form-autocomplete.entry.js +2 -0
- package/dist/esm/yoo-form-capture.entry.js +2 -2
- package/dist/esm/yoo-form-catalog.entry.js +4 -2
- package/dist/esm/yoo-form-dynamic.entry.js +6 -2
- package/dist/esm/yoo-form-footer.entry.js +2 -2
- package/dist/esm/yoo-form-input.entry.js +1 -1
- package/dist/esm/yoo-grid.entry.js +3 -3
- package/dist/esm/yoo-lesson-detail-card.entry.js +2 -2
- package/dist/esm/yoo-mission-heading.entry.js +2 -2
- package/dist/esm/yoo-pivot-table.entry.js +1 -1
- package/dist/esm/yoo-profile-summary.entry.js +1 -1
- package/dist/esm/yoo-progress-bar.entry.js +24 -37
- package/dist/esm/yoo-progress-recap.entry.js +2 -2
- package/dist/esm/yoo-tooltip.entry.js +4 -0
- package/dist/esm/yoo-truncated-line.entry.js +10 -6
- package/dist/types/components/1.atoms/progress-bar/progress-bar.d.ts +13 -27
- package/dist/types/components/1.atoms/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +1 -16
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/form-field/form-field.interface.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/components/1.atoms/flip-card/flip-card.d.ts +0 -16
- package/dist/types/components/1.atoms/truncated-line/truncated-line.d.ts +0 -14
- package/dist/types/components/form/image-cropper-dialog/pintura/pintura.d.ts +0 -1070
|
@@ -8,7 +8,7 @@ require('./lodash-597bda6d.js');
|
|
|
8
8
|
require('./_commonjsHelpers-94df2ea7.js');
|
|
9
9
|
require('./index-3c14640e.js');
|
|
10
10
|
|
|
11
|
-
const lessonDetailCardCss = ":host .card-container .top-bar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:var(--spacing-56, 3.5rem);padding:0 var(--spacing-16, 1rem)}:host .card-container .top-bar .header .heading{margin:0}:host .card-container .top-bar .header .subheader{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;color:var(--stable);font-size:var(--font-size-12)}:host .card-container .top-bar .header .subheader yoo-icon{margin-right:var(--spacing-04, 0.25rem)}:host .card-container .top-bar .right-column{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}:host .card-container .top-bar .right-column .header-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;margin:0 var(--spacing-08, 0.5rem)}:host .card-container .top-bar .right-column .header-info yoo-icon{margin-right:var(--spacing-08, 0.5rem)}:host .card-container .top-bar .right-column .header-info p{font-size:var(--font-size-16)}:host .card-container .top-bar .right-column .tag-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:0 var(--spacing-08, 0.5rem)}:host .card-container .top-bar .right-column .toggle-icon:hover{cursor:pointer}:host .card-container .content-container{max-height:18.75rem;overflow:hidden;-webkit-transition:max-height 200ms;transition:max-height 200ms}:host .card-container .content-container yoo-banner{--main-color:var(--warning-10, rgba(237, 110, 51, 0.1));width:95%;margin:var(--spacing-08, 0.5rem) auto;padding:var(--spacing-08, 0.5rem)}:host .card-container .content-container yoo-banner p{color:var(--dark, #000000)}:host .card-container .content-container .text{margin:var(--spacing-08, 0.5rem) var(--spacing-16, 1rem);font-size:var(--font-size-14, 0.875rem)}:host .card-container .content-container .footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:var(--spacing-56, 3.5rem);padding:0 var(--spacing-16, 1rem);border-top:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1)}:host .card-container .content-container .footer yoo-button{min-width:6rem}:host .card-container .content-container .footer .time-indicator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start}:host .card-container .content-container .footer .time-indicator yoo-progress-bar{--svg-width:1.8rem;--svg-height:1.8rem;padding:0 var(--spacing-08, 0.5rem)}:host .card-container .content-container .footer .time-indicator .time-text{font-size:var(--font-size-14, 0.875rem)}:host .card-container .content-container.hidden{max-height:0}:host([expanded]) .card-container{padding:var(--spacing-08, 0.5rem) 0}";
|
|
11
|
+
const lessonDetailCardCss = ":host .card-container .top-bar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:var(--spacing-56, 3.5rem);padding:0 var(--spacing-16, 1rem)}:host .card-container .top-bar .header .heading{margin:0}:host .card-container .top-bar .header .subheader{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;color:var(--stable);font-size:var(--font-size-12)}:host .card-container .top-bar .header .subheader yoo-icon{margin-right:var(--spacing-04, 0.25rem)}:host .card-container .top-bar .right-column{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}:host .card-container .top-bar .right-column .header-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;margin:0 var(--spacing-08, 0.5rem)}:host .card-container .top-bar .right-column .header-info yoo-icon{margin-right:var(--spacing-08, 0.5rem)}:host .card-container .top-bar .right-column .header-info p{font-size:var(--font-size-16)}:host .card-container .top-bar .right-column .tag-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:0 var(--spacing-08, 0.5rem)}:host .card-container .top-bar .right-column .toggle-icon:hover{cursor:pointer}:host .card-container .content-container{max-height:18.75rem;overflow:hidden;-webkit-transition:max-height 200ms;transition:max-height 200ms}:host .card-container .content-container yoo-banner{--main-color:var(--warning-10, rgba(237, 110, 51, 0.1));width:95%;margin:var(--spacing-08, 0.5rem) auto;padding:var(--spacing-08, 0.5rem)}:host .card-container .content-container yoo-banner p{color:var(--dark, #000000)}:host .card-container .content-container .text{margin:var(--spacing-08, 0.5rem) var(--spacing-16, 1rem);font-size:var(--font-size-14, 0.875rem)}:host .card-container .content-container .footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:var(--spacing-56, 3.5rem);padding:0 var(--spacing-16, 1rem);border-top:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1)}:host .card-container .content-container .footer yoo-button{min-width:6rem}:host .card-container .content-container .footer .time-indicator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start}:host .card-container .content-container .footer .time-indicator yoo-progress-bar{--svg-width:1.8rem;--svg-height:1.8rem;--progress-bar-color:var(--app-color, #5a30f4);padding:0 var(--spacing-08, 0.5rem)}:host .card-container .content-container .footer .time-indicator .time-text{font-size:var(--font-size-14, 0.875rem)}:host .card-container .content-container.hidden{max-height:0}:host([expanded]) .card-container{padding:var(--spacing-08, 0.5rem) 0}";
|
|
12
12
|
|
|
13
13
|
const YooLessonDetailCard = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -72,7 +72,7 @@ const YooLessonDetailCard = class {
|
|
|
72
72
|
this.footerButtonClick.emit();
|
|
73
73
|
}
|
|
74
74
|
renderTimeIndicator() {
|
|
75
|
-
return (index.h("div", { class: "time-indicator" }, index.h("yoo-progress-bar", { shape: "circle",
|
|
75
|
+
return (index.h("div", { class: "time-indicator" }, index.h("yoo-progress-bar", { shape: "circle", animated: this.animated, hideProgressValue: true, value: 75 }), index.h("div", { class: "time-text" }, this.footer.timeIndicator)));
|
|
76
76
|
}
|
|
77
77
|
renderFooter() {
|
|
78
78
|
return (index.h("div", { class: "footer-container" }, index.h("div", { class: "footer" }, this.footer.timeIndicator ? this.renderTimeIndicator() : index.h("div", null), index.h("yoo-button", { onClick: () => this.onFooterButtonClick(), color: "app-color", size: "medium", fill: "solid", disabled: !this.footer.buttonClickable }, index$1.translate(this.footer.buttonLabel)))));
|
|
@@ -11,7 +11,7 @@ require('./lodash-597bda6d.js');
|
|
|
11
11
|
require('./_commonjsHelpers-94df2ea7.js');
|
|
12
12
|
require('./index-3c14640e.js');
|
|
13
13
|
|
|
14
|
-
const missionHeadingCss = ":host .background-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:0 -1rem 0;border-bottom:solid 1px var(--stable-light, #f1f1f1)}:host yoo-banner{--main-color:var(--warning-10, rgba(237, 110, 51, 0.1));margin-top:var(--spacing-08, 0.5rem)}:host .content-container{-ms-flex:1;flex:1;padding:var(--spacing-16, 1rem) var(--spacing-08, 0.5rem)}:host .mission-title{margin-top:var(--spacing-08, 0.5rem);font-weight:var(--font-weight-700, 700);font-size:var(--font-size-24, 1.5rem);line-height:var(--spacing-32, 2rem)}:host .sub-heading{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap;grid-gap:var(--spacing-08, 0.5rem);-ms-flex-align:center;align-items:center;margin-top:var(--spacing-08, 0.5rem)}:host .sub-heading .mission-progress{max-width:10rem;margin-right:var(--spacing-08, 0.5rem)}:host div:last-child{margin-bottom:0}:host(.mission-results) .background-container{margin:-1rem -1rem 0}";
|
|
14
|
+
const missionHeadingCss = ":host .background-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:0 -1rem 0;border-bottom:solid 1px var(--stable-light, #f1f1f1)}:host yoo-progress-bar{--progress-bar-color:var(--app-color, #5a30f4)}:host yoo-banner{--main-color:var(--warning-10, rgba(237, 110, 51, 0.1));margin-top:var(--spacing-08, 0.5rem)}:host .content-container{-ms-flex:1;flex:1;padding:var(--spacing-16, 1rem) var(--spacing-08, 0.5rem)}:host .mission-title{margin-top:var(--spacing-08, 0.5rem);font-weight:var(--font-weight-700, 700);font-size:var(--font-size-24, 1.5rem);line-height:var(--spacing-32, 2rem)}:host .sub-heading{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap;grid-gap:var(--spacing-08, 0.5rem);-ms-flex-align:center;align-items:center;margin-top:var(--spacing-08, 0.5rem)}:host .sub-heading .mission-progress{max-width:10rem;margin-right:var(--spacing-08, 0.5rem)}:host div:last-child{margin-bottom:0}:host(.mission-results) .background-container{margin:-1rem -1rem 0}";
|
|
15
15
|
|
|
16
16
|
const YooMissionHeadingComponent = class {
|
|
17
17
|
constructor(hostRef) {
|
|
@@ -27,7 +27,7 @@ const YooMissionHeadingComponent = class {
|
|
|
27
27
|
return (index.h(index.Host, { class: commonHelpers.getAppContext(this.host) }, index.h("div", { class: { 'background-container': true, pdf: this.isPdf } }, index.h("div", { class: "content-container" }, index.h(missionLockedBanner.MissionLockedBanner, { mission: this.mission }), [
|
|
28
28
|
!this.isPdf && this.mission.title && index.h("div", { class: "mission-title" }, index$1.translateMulti(this.mission.title)),
|
|
29
29
|
!this.mission.title && this.mission.type === 'visit' && index.h("div", { class: "mission-title" }, index$1.translate('VISIT')),
|
|
30
|
-
index.h("div", { class: "sub-heading" }, this.progress >= 0 && (index.h("div", { class: { 'mission-progress': true, 'mission-progress-web': !this.isMobile } }, index.h("yoo-progress-bar", {
|
|
30
|
+
index.h("div", { class: "sub-heading" }, this.progress >= 0 && (index.h("div", { class: { 'mission-progress': true, 'mission-progress-web': !this.isMobile } }, index.h("yoo-progress-bar", { animated: this.animated, value: this.progress }))), tags === null || tags === void 0 ? void 0 :
|
|
31
31
|
tags.map((tag) => {
|
|
32
32
|
const tagDefaultColor = tag.customColor ? null : 'stable';
|
|
33
33
|
return (index.h("yoo-tag", { color: tag.color || tagDefaultColor, customColor: tag.customColor }, !!tag.icon && index.h("yoo-icon", { class: { custom: !!tag.customColor }, size: "small", name: tag.icon, slot: "start" }), tag.title));
|
|
@@ -6,7 +6,7 @@ const index = require('./index-c8609d4f.js');
|
|
|
6
6
|
const index$1 = require('./index-6690429f.js');
|
|
7
7
|
const _commonjsHelpers = require('./_commonjsHelpers-94df2ea7.js');
|
|
8
8
|
const lodash = require('./lodash-597bda6d.js');
|
|
9
|
-
const gridRenderers = require('./grid-renderers-
|
|
9
|
+
const gridRenderers = require('./grid-renderers-faeb4762.js');
|
|
10
10
|
require('./index-3c14640e.js');
|
|
11
11
|
require('./missions-helpers-c6a72b48.js');
|
|
12
12
|
require('./common-helpers-f4a06bb8.js');
|
|
@@ -9,7 +9,7 @@ const commonHelpers = require('./common-helpers-f4a06bb8.js');
|
|
|
9
9
|
require('./_commonjsHelpers-94df2ea7.js');
|
|
10
10
|
require('./index-3c14640e.js');
|
|
11
11
|
|
|
12
|
-
const profileSummaryCss = ":host .profile-user{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;padding-bottom:var(--spacing-24, 1.5rem)}:host .profile-user yoo-tag{margin-top:var(--spacing-08, 0.5rem)}:host .profile-user .profile-details{text-align:center}:host .profile-user .profile-details .profile-user-name,:host .profile-user .profile-details yoo-avatar{margin:0 auto}:host .profile-user .profile-details.impersonating{opacity:0.5}:host .profile-user .profile-details .profile-user-name{padding:var(--spacing-08, 0.5rem) 0;text-align:center}:host .profile-user .profile-details .profile-user-role{color:var(--stable, #adadad);font-weight:var(--font-weight-400, 400);font-size:var(--font-size-14, 0.875rem);line-height:1rem}:host .actions-container{width:100%}:host .actions-container .user-actions{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr));margin:var(--spacing-24, 1.5rem) var(--spacing-16, 1rem);-webkit-column-gap:var(--spacing-08, 0.5rem);-moz-column-gap:var(--spacing-08, 0.5rem);column-gap:var(--spacing-08, 0.5rem)}:host(.web) .profile-user{padding:0}:host(.web) .actions-container{width:21.875rem}:host(.web.personal-view) .profile-user{-ms-flex-direction:row;flex-direction:row}:host(.web.personal-view) .profile-user .profile-details{text-align:left}:host(.web.personal-view) .profile-user .profile-details .profile-user-name{font-weight:var(--font-weight-700, 700)}:host(.web.personal-view) .profile-user .profile-details .profile-user-role{font-size:var(--font-size-16, 1rem)}:host(.web.personal-view) .profile-user yoo-avatar{margin:var(--spacing-24, 1.5rem)}";
|
|
12
|
+
const profileSummaryCss = ":host .profile-user{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;padding-bottom:var(--spacing-24, 1.5rem)}:host .profile-user yoo-tag{margin-top:var(--spacing-08, 0.5rem)}:host .profile-user>yoo-avatar{z-index:11}:host .profile-user .profile-details{text-align:center}:host .profile-user .profile-details .profile-user-name,:host .profile-user .profile-details yoo-avatar{margin:0 auto}:host .profile-user .profile-details.impersonating{opacity:0.5}:host .profile-user .profile-details .profile-user-name{padding:var(--spacing-08, 0.5rem) 0;text-align:center}:host .profile-user .profile-details .profile-user-role{color:var(--stable, #adadad);font-weight:var(--font-weight-400, 400);font-size:var(--font-size-14, 0.875rem);line-height:1rem}:host .actions-container{width:100%}:host .actions-container .user-actions{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr));margin:var(--spacing-24, 1.5rem) var(--spacing-16, 1rem);-webkit-column-gap:var(--spacing-08, 0.5rem);-moz-column-gap:var(--spacing-08, 0.5rem);column-gap:var(--spacing-08, 0.5rem)}:host(.web) .profile-user{padding:0}:host(.web) .actions-container{width:21.875rem}:host(.web.personal-view) .profile-user{-ms-flex-direction:row;flex-direction:row}:host(.web.personal-view) .profile-user .profile-details{text-align:left}:host(.web.personal-view) .profile-user .profile-details .profile-user-name{font-weight:var(--font-weight-700, 700)}:host(.web.personal-view) .profile-user .profile-details .profile-user-role{font-size:var(--font-size-16, 1rem)}:host(.web.personal-view) .profile-user yoo-avatar{margin:var(--spacing-24, 1.5rem)}";
|
|
13
13
|
|
|
14
14
|
const YooProfileSummaryComponent = class {
|
|
15
15
|
constructor(hostRef) {
|
|
@@ -18,7 +18,7 @@ const DEFAULT_SHAPES = {
|
|
|
18
18
|
'semi-circle': 'M 0, y a r,r 0 1,1 d,0'
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const progressBarCss = ":host{position:relative;display:block;--svg-width:100%;--svg-fill:var(--transparent, transparent);--stroke-width-line:3;--stroke-width-circle:3;--progress-value-font-size:var(--font-size-16, 1rem);--progress-value-font-weight:var(--font-weight-400, 400);--progress-value-color:var(--dark, #000000);--progress-bar-color:unset;--progress-bar-display:block;--trail-bar-color:var(--stable-light, #f1f1f1);--trail-bar-display:block}:host svg{width:var(--svg-width)}:host svg #trail{stroke-linecap:round;display:var(--trail-bar-display);stroke:var(--trail-bar-color)}:host svg #progress{display:var(--progress-bar-display);stroke:var(--progress-bar-color)}:host svg #progress:not([x2=\"0%\"]){stroke-linecap:round}:host #value{color:var(--progress-value-color);font-weight:var(--progress-value-font-weight);font-size:var(--progress-value-font-size);fill:var(--progress-value-color)}:host([shape=line]){display:inline-grid;grid-gap:var(--spacing-08, 0.5rem);grid-template-columns:1fr auto;place-items:center;width:100%}:host([shape=line]) svg{overflow:unset}:host([shape=line]) svg:not(.has-markers){height:0.25rem}:host([shape=line]) svg:not(.has-markers) line{stroke-width:var(--stroke-width-line)}:host([shape=line]) svg.has-markers{max-height:10vh}:host([shape=line]) svg.has-markers .marker{font-size:0.25rem;-webkit-transform:translateX(-0.5rem);transform:translateX(-0.5rem)}:host([shape=line]) span{width:100%;text-align:center}:host([shape=line][x=right]) span{text-align:right}:host([shape=line][x=left]) span{text-align:left}:host([shape=line][y=bottom]),:host([shape=line][y=top]),:host([shape=line].no-value){grid-template-columns:initial;line-height:1}:host([shape=line][y=top]) svg{-ms-flex-order:1;order:1}:host([shape=line][y=top]) span{-ms-flex-order:0;order:0}:host([shape=circle]),:host([shape=semi-circle]){--progress-value-tsx:-50%;--progress-value-tsy:-50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0 auto}:host([shape=circle]) svg,:host([shape=semi-circle]) svg{overflow:initial;fill:var(--svg-fill)}:host([shape=circle]) svg path,:host([shape=semi-circle]) svg path{stroke-width:var(--stroke-width-circle)}:host([shape=circle]) #value,:host([shape=semi-circle]) #value{position:absolute;top:50%;left:50%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translate(var(--progress-value-tsx), var(--progress-value-tsy));transform:translate(var(--progress-value-tsx), var(--progress-value-tsy))}:host([shape=semi-circle]){--progress-value-tsy:calc(-50% + .5rem)}:host([metric=points]){--progress-bar-display:none;--trail-bar-display:none}:host(
|
|
21
|
+
const progressBarCss = ":host{position:relative;display:block;--svg-width:100%;--svg-fill:var(--transparent, transparent);--stroke-width-line:3;--stroke-width-circle:3;--progress-value-font-size:var(--font-size-16, 1rem);--progress-value-font-weight:var(--font-weight-400, 400);--progress-value-color:var(--dark, #000000);--progress-bar-color:unset;--progress-bar-display:block;--trail-bar-color:var(--stable-light, #f1f1f1);--trail-bar-display:block}:host svg{width:var(--svg-width)}:host svg #trail{stroke-linecap:round;display:var(--trail-bar-display);stroke:var(--trail-bar-color)}:host svg #progress{display:var(--progress-bar-display);stroke:var(--progress-bar-color)}:host svg #progress:not([x2=\"0%\"]){stroke-linecap:round}:host #value{color:var(--progress-value-color);font-weight:var(--progress-value-font-weight);font-size:var(--progress-value-font-size);fill:var(--progress-value-color)}:host([shape=line]){display:inline-grid;grid-gap:var(--spacing-08, 0.5rem);grid-template-columns:1fr auto;place-items:center;width:100%}:host([shape=line]) svg{overflow:unset}:host([shape=line]) svg:not(.has-markers){height:var(--spacing-04, 0.25rem)}:host([shape=line]) svg:not(.has-markers) line{stroke-width:var(--stroke-width-line)}:host([shape=line]) svg.has-markers{max-height:10vh}:host([shape=line]) svg.has-markers .marker{font-size:var(--spacing-04, 0.25rem);-webkit-transform:translateX(calc(var(--spacing-08, 0.5rem) * -1));transform:translateX(calc(var(--spacing-08, 0.5rem) * -1))}:host([shape=line]) span{width:100%;text-align:center}:host([shape=line][x=right]) span{text-align:right}:host([shape=line][x=left]) span{text-align:left}:host([shape=line][y=bottom]),:host([shape=line][y=top]),:host([shape=line].no-value){grid-template-columns:initial;line-height:1}:host([shape=line][y=top]) svg{-ms-flex-order:1;order:1}:host([shape=line][y=top]) span{-ms-flex-order:0;order:0}:host([shape=circle]),:host([shape=semi-circle]){--progress-value-tsx:-50%;--progress-value-tsy:-50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0 auto}:host([shape=circle]) svg,:host([shape=semi-circle]) svg{overflow:initial;fill:var(--svg-fill)}:host([shape=circle]) svg path,:host([shape=semi-circle]) svg path{stroke-width:var(--stroke-width-circle)}:host([shape=circle]) #value,:host([shape=semi-circle]) #value{position:absolute;top:50%;left:50%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translate(var(--progress-value-tsx), var(--progress-value-tsy));transform:translate(var(--progress-value-tsx), var(--progress-value-tsy))}:host([shape=semi-circle]){--progress-value-tsy:calc(-50% + var(--spacing-08, 0.5rem))}:host([metric=points]){--progress-bar-display:none;--trail-bar-display:none}:host([metric=step]){--progress-bar-color:var(--app-color, #5a30f4)}";
|
|
22
22
|
|
|
23
23
|
const YooProgressBarComponent = class {
|
|
24
24
|
constructor(hostRef) {
|
|
@@ -94,10 +94,6 @@ const YooProgressBarComponent = class {
|
|
|
94
94
|
* This property allow to display a number of decimal after the coma in the progress value display
|
|
95
95
|
*/
|
|
96
96
|
this.numberDecimalAfterComaProgressValue = 0;
|
|
97
|
-
/**
|
|
98
|
-
* Used to modify the speed of the progress animation (in ms)
|
|
99
|
-
*/
|
|
100
|
-
this.progressAnimationDuration = !this.isAnimated ? 0 : 1.25;
|
|
101
97
|
}
|
|
102
98
|
onProgressAnimationDurationChanged() {
|
|
103
99
|
this.setProgress();
|
|
@@ -105,16 +101,6 @@ const YooProgressBarComponent = class {
|
|
|
105
101
|
onProgressValueChanged(_, currentValue) {
|
|
106
102
|
this.setProgress(currentValue);
|
|
107
103
|
}
|
|
108
|
-
onCurrentStepChanged(_, currentStep) {
|
|
109
|
-
this.setProgress(currentStep);
|
|
110
|
-
}
|
|
111
|
-
componentDidLoad() {
|
|
112
|
-
if (this.progressSVGElement) {
|
|
113
|
-
this.resizeListener = lodash.debounce(this.initProgressBar, 750).bind(this);
|
|
114
|
-
window.addEventListener('resize', this.resizeListener);
|
|
115
|
-
this.initProgressBar();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
104
|
get isAnimated() {
|
|
119
105
|
return this.animated && !index$1.isAnimationsDisabled();
|
|
120
106
|
}
|
|
@@ -137,6 +123,16 @@ const YooProgressBarComponent = class {
|
|
|
137
123
|
var _a;
|
|
138
124
|
return this.isShape.line && !!((_a = this.markers) === null || _a === void 0 ? void 0 : _a.length);
|
|
139
125
|
}
|
|
126
|
+
componentWillLoad() {
|
|
127
|
+
this.progressAnimationDuration = !this.isAnimated ? 0 : 1.25;
|
|
128
|
+
}
|
|
129
|
+
componentDidLoad() {
|
|
130
|
+
if (this.progressSVGElement) {
|
|
131
|
+
this.resizeListener = lodash.debounce(this.initProgressBar, 750).bind(this);
|
|
132
|
+
window.addEventListener('resize', this.resizeListener);
|
|
133
|
+
this.initProgressBar();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
140
136
|
initProgressBar() {
|
|
141
137
|
if (this.progressSVGElement) {
|
|
142
138
|
this.initSVGPaths();
|
|
@@ -164,13 +160,18 @@ const YooProgressBarComponent = class {
|
|
|
164
160
|
}
|
|
165
161
|
setProgress(currentProgress = 0) {
|
|
166
162
|
if (this.progressSVGElement) {
|
|
167
|
-
const
|
|
163
|
+
const getProgress = (progress = this.value) => {
|
|
164
|
+
const currentProgress = progress || 0;
|
|
165
|
+
const newProgress = this.maxValue ? (currentProgress / this.maxValue) * 100 : currentProgress;
|
|
166
|
+
return lodash.clamp(newProgress, 0, 100);
|
|
167
|
+
};
|
|
168
|
+
const getProgressPathLength = (progress = 0) => Math.round(progressBarElement.getTotalLength() * (1 - progress / 100)).toString();
|
|
169
|
+
const toProgress = getProgress();
|
|
168
170
|
const progressBarElement = this.host.shadowRoot.querySelector('#progress');
|
|
169
171
|
const valueElement = this.host.shadowRoot.querySelector('#value');
|
|
170
|
-
const fromProgress =
|
|
172
|
+
const fromProgress = this.disableBackProgressAnimation ? toProgress : getProgress(currentProgress);
|
|
171
173
|
const decimalCoeff = Math.pow(10, this.numberDecimalAfterComaProgressValue);
|
|
172
|
-
|
|
173
|
-
!this.isShape.line && (progressBarElement.style.strokeDasharray = getProgressPathLength(0));
|
|
174
|
+
!this.isShape.line && (progressBarElement.style.strokeDasharray = getProgressPathLength());
|
|
174
175
|
const animateProgressValue = (progress) => {
|
|
175
176
|
progress = Math.round(progress * 100) / 100;
|
|
176
177
|
let timelineProgressValue = Math.round((((this.isMetric.percentage ? toProgress : this.value) - fromProgress) * progress + fromProgress) * decimalCoeff) / decimalCoeff || 0;
|
|
@@ -195,7 +196,7 @@ const YooProgressBarComponent = class {
|
|
|
195
196
|
const fromAnimation = {
|
|
196
197
|
attr: { x2: `${fromProgress}%` },
|
|
197
198
|
...(!this.isShape.line && {
|
|
198
|
-
strokeDashoffset: this.disableBackProgressAnimation ? getProgressPathLength(
|
|
199
|
+
strokeDashoffset: this.disableBackProgressAnimation ? getProgressPathLength() : getProgressPathLength(fromProgress)
|
|
199
200
|
}),
|
|
200
201
|
...(this.disableBackProgressAnimation && {
|
|
201
202
|
stroke: this.getProgressColor(0)
|
|
@@ -222,24 +223,11 @@ const YooProgressBarComponent = class {
|
|
|
222
223
|
progressBarElement && lodash.isFinite(toProgress) && lodash.isFinite(fromProgress) && index$1.gsapFromTo(progressBarElement, this.isAnimated ? this.progressAnimationDuration : 0, fromAnimation, toAnimation);
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
|
-
getValue(progress) {
|
|
226
|
-
let currentProgress = progress >= 0 && !lodash.isNull(progress) ? progress : this.value || 0;
|
|
227
|
-
if (this.isMetric.step && !!this.maxStep) {
|
|
228
|
-
currentProgress = progress >= 0 ? progress : this.currentStep;
|
|
229
|
-
return (currentProgress / this.maxStep) * 100;
|
|
230
|
-
}
|
|
231
|
-
else if (lodash.isFinite(this.maxValue) && !!this.maxValue) {
|
|
232
|
-
return (currentProgress / this.maxValue) * 100;
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
return currentProgress;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
226
|
getLabelledValue(progress) {
|
|
239
227
|
progress = progress !== null && progress !== void 0 ? progress : ((lodash.isFinite(this.maxValue) && this.maxValue) ? (this.value / this.maxValue) * 100 : this.value || 0);
|
|
240
228
|
if (!this.hideProgressValue) {
|
|
241
229
|
if (this.isMetric.step) {
|
|
242
|
-
return `${this.
|
|
230
|
+
return `${this.value}/${this.maxValue}`;
|
|
243
231
|
}
|
|
244
232
|
else {
|
|
245
233
|
return this.allowNonAvailableValue && !lodash.isFinite(progress) ? '-' : [progress, this.getUnit(progress)].join('');
|
|
@@ -303,8 +291,7 @@ const YooProgressBarComponent = class {
|
|
|
303
291
|
get host() { return index.getElement(this); }
|
|
304
292
|
static get watchers() { return {
|
|
305
293
|
"progressAnimationDuration": ["onProgressAnimationDurationChanged"],
|
|
306
|
-
"value": ["onProgressValueChanged"]
|
|
307
|
-
"currentStep": ["onCurrentStepChanged"]
|
|
294
|
+
"value": ["onProgressValueChanged"]
|
|
308
295
|
}; }
|
|
309
296
|
};
|
|
310
297
|
YooProgressBarComponent.style = progressBarCss;
|
|
@@ -18,7 +18,7 @@ const YooProgressRecap = class {
|
|
|
18
18
|
return (index.h("yoo-tooltip", { placement: "top", content: index$1.translateMulti(this.tooltip) }, index.h("yoo-icon", { name: "help", size: "small", color: "stable" })));
|
|
19
19
|
}
|
|
20
20
|
renderProgressbar() {
|
|
21
|
-
return (index.h("yoo-progress-bar", { metric: "step", class: {
|
|
21
|
+
return (index.h("yoo-progress-bar", { metric: "step", maxValue: this.max, value: this.progress, class: {
|
|
22
22
|
success: !lodash.isNil(this.min) || (!lodash.isNil(this.min) && this.progress >= this.min),
|
|
23
23
|
danger: !lodash.isNil(this.min) && this.progress < this.min
|
|
24
24
|
}, ...this.min && {
|
|
@@ -26,7 +26,7 @@ const YooProgressRecap = class {
|
|
|
26
26
|
text: `${index$1.translateMulti('YOOBICMIN')}: ${this.min}`,
|
|
27
27
|
xPercent: (this.min / this.max) * 100
|
|
28
28
|
}]
|
|
29
|
-
}
|
|
29
|
+
} }));
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
32
|
return (index.h(index.Host, null, index.h("div", { class: "card" }, index.h("div", { class: "top-container" }, index.h("div", { class: "heading" }, index$1.translateMulti(this.heading)), this.tooltip && this.renderTooltip()), this.renderProgressbar())));
|
|
@@ -90,6 +90,10 @@ const YooTooltipComponent = class {
|
|
|
90
90
|
this.saveTooltip.emit({ value: (_a = this.contentEditableElement) === null || _a === void 0 ? void 0 : _a.innerHTML, refTooltip: reference });
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
async toggleHoverable(isEnable = !this.hoverable) {
|
|
94
|
+
this.hoverable = isEnable;
|
|
95
|
+
this.reconfigureTooltip();
|
|
96
|
+
}
|
|
93
97
|
onEditableChanged(newState, oldState) {
|
|
94
98
|
this.hasModeChanged = newState !== oldState;
|
|
95
99
|
}
|
|
@@ -20,20 +20,24 @@ const YooTruncatedLineComponent = class {
|
|
|
20
20
|
// Full text content to be truncated / tooltip
|
|
21
21
|
this.content = '';
|
|
22
22
|
this.renderContentWithTooltip = () => {
|
|
23
|
-
return (index.h("yoo-tooltip", { content: this.content, placement: this.tooltipPlacement }, this.renderContent()));
|
|
23
|
+
return (index.h("yoo-tooltip", { ref: (el) => this.tooltipElement = el, content: this.content, placement: this.tooltipPlacement }, this.renderContent()));
|
|
24
24
|
};
|
|
25
25
|
this.renderContent = () => {
|
|
26
26
|
return (index.h("div", { class: "content", ref: (el) => this.contentElement = el }, this.content, index.h("slot", null)));
|
|
27
27
|
};
|
|
28
|
+
this.toggleTooltip = (isEnabled) => {
|
|
29
|
+
if (this.tooltipElement) {
|
|
30
|
+
this.tooltipElement.toggleHoverable(isEnabled);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
28
33
|
}
|
|
29
34
|
componentDidLoad() {
|
|
30
|
-
|
|
31
|
-
this.truncated = index$1.isTruncated(this.contentElement);
|
|
32
|
-
}
|
|
35
|
+
this.contentElement && this.toggleTooltip(index$1.isTruncated(this.contentElement));
|
|
33
36
|
}
|
|
34
37
|
render() {
|
|
35
|
-
return (index.h(index.Host, null, this.
|
|
38
|
+
return (index.h(index.Host, null, !this.withTooltip ? this.renderContent() : this.renderContentWithTooltip()));
|
|
36
39
|
}
|
|
40
|
+
get host() { return index.getElement(this); }
|
|
37
41
|
};
|
|
38
42
|
YooTruncatedLineComponent.style = truncatedLineCss;
|
|
39
43
|
|
|
@@ -253,7 +253,7 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
253
253
|
overflow: unset;
|
|
254
254
|
}
|
|
255
255
|
:host([shape=line]) svg:not(.has-markers) {
|
|
256
|
-
height: 0.25rem;
|
|
256
|
+
height: var(--spacing-04, 0.25rem);
|
|
257
257
|
}
|
|
258
258
|
:host([shape=line]) svg:not(.has-markers) line {
|
|
259
259
|
stroke-width: var(--stroke-width-line);
|
|
@@ -262,8 +262,8 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
262
262
|
max-height: 10vh;
|
|
263
263
|
}
|
|
264
264
|
:host([shape=line]) svg.has-markers .marker {
|
|
265
|
-
font-size: 0.25rem;
|
|
266
|
-
transform: translateX(-0.5rem);
|
|
265
|
+
font-size: var(--spacing-04, 0.25rem);
|
|
266
|
+
transform: translateX(calc(var(--spacing-08, 0.5rem) * -1));
|
|
267
267
|
}
|
|
268
268
|
:host([shape=line]) span {
|
|
269
269
|
width: 100%;
|
|
@@ -320,7 +320,7 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
:host([shape=semi-circle]) {
|
|
323
|
-
--progress-value-tsy: calc(-50% + .5rem);
|
|
323
|
+
--progress-value-tsy: calc(-50% + var(--spacing-08, 0.5rem));
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
:host([metric=points]) {
|
|
@@ -328,6 +328,6 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
328
328
|
--trail-bar-display: none;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
:host(
|
|
331
|
+
:host([metric=step]) {
|
|
332
332
|
--progress-bar-color: var(--app-color, #5a30f4);
|
|
333
333
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { gsapFromTo, isAnimationsDisabled, Linear } from '@shared/utils';
|
|
2
2
|
import { Component, Element, Event, h, Host, Prop, Watch } from '@stencil/core';
|
|
3
|
-
import { clamp, debounce, isFinite
|
|
3
|
+
import { clamp, debounce, isFinite } from 'lodash-es';
|
|
4
4
|
import { DEFAULT_COLOR_THRESHOLDS, DEFAULT_SHAPES } from './progress-bar.constants';
|
|
5
5
|
export class YooProgressBarComponent {
|
|
6
6
|
constructor() {
|
|
@@ -73,10 +73,6 @@ export class YooProgressBarComponent {
|
|
|
73
73
|
* This property allow to display a number of decimal after the coma in the progress value display
|
|
74
74
|
*/
|
|
75
75
|
this.numberDecimalAfterComaProgressValue = 0;
|
|
76
|
-
/**
|
|
77
|
-
* Used to modify the speed of the progress animation (in ms)
|
|
78
|
-
*/
|
|
79
|
-
this.progressAnimationDuration = !this.isAnimated ? 0 : 1.25;
|
|
80
76
|
}
|
|
81
77
|
onProgressAnimationDurationChanged() {
|
|
82
78
|
this.setProgress();
|
|
@@ -84,16 +80,6 @@ export class YooProgressBarComponent {
|
|
|
84
80
|
onProgressValueChanged(_, currentValue) {
|
|
85
81
|
this.setProgress(currentValue);
|
|
86
82
|
}
|
|
87
|
-
onCurrentStepChanged(_, currentStep) {
|
|
88
|
-
this.setProgress(currentStep);
|
|
89
|
-
}
|
|
90
|
-
componentDidLoad() {
|
|
91
|
-
if (this.progressSVGElement) {
|
|
92
|
-
this.resizeListener = debounce(this.initProgressBar, 750).bind(this);
|
|
93
|
-
window.addEventListener('resize', this.resizeListener);
|
|
94
|
-
this.initProgressBar();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
83
|
get isAnimated() {
|
|
98
84
|
return this.animated && !isAnimationsDisabled();
|
|
99
85
|
}
|
|
@@ -116,6 +102,16 @@ export class YooProgressBarComponent {
|
|
|
116
102
|
var _a;
|
|
117
103
|
return this.isShape.line && !!((_a = this.markers) === null || _a === void 0 ? void 0 : _a.length);
|
|
118
104
|
}
|
|
105
|
+
componentWillLoad() {
|
|
106
|
+
this.progressAnimationDuration = !this.isAnimated ? 0 : 1.25;
|
|
107
|
+
}
|
|
108
|
+
componentDidLoad() {
|
|
109
|
+
if (this.progressSVGElement) {
|
|
110
|
+
this.resizeListener = debounce(this.initProgressBar, 750).bind(this);
|
|
111
|
+
window.addEventListener('resize', this.resizeListener);
|
|
112
|
+
this.initProgressBar();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
119
115
|
initProgressBar() {
|
|
120
116
|
if (this.progressSVGElement) {
|
|
121
117
|
this.initSVGPaths();
|
|
@@ -143,13 +139,18 @@ export class YooProgressBarComponent {
|
|
|
143
139
|
}
|
|
144
140
|
setProgress(currentProgress = 0) {
|
|
145
141
|
if (this.progressSVGElement) {
|
|
146
|
-
const
|
|
142
|
+
const getProgress = (progress = this.value) => {
|
|
143
|
+
const currentProgress = progress || 0;
|
|
144
|
+
const newProgress = this.maxValue ? (currentProgress / this.maxValue) * 100 : currentProgress;
|
|
145
|
+
return clamp(newProgress, 0, 100);
|
|
146
|
+
};
|
|
147
|
+
const getProgressPathLength = (progress = 0) => Math.round(progressBarElement.getTotalLength() * (1 - progress / 100)).toString();
|
|
148
|
+
const toProgress = getProgress();
|
|
147
149
|
const progressBarElement = this.host.shadowRoot.querySelector('#progress');
|
|
148
150
|
const valueElement = this.host.shadowRoot.querySelector('#value');
|
|
149
|
-
const fromProgress =
|
|
151
|
+
const fromProgress = this.disableBackProgressAnimation ? toProgress : getProgress(currentProgress);
|
|
150
152
|
const decimalCoeff = Math.pow(10, this.numberDecimalAfterComaProgressValue);
|
|
151
|
-
|
|
152
|
-
!this.isShape.line && (progressBarElement.style.strokeDasharray = getProgressPathLength(0));
|
|
153
|
+
!this.isShape.line && (progressBarElement.style.strokeDasharray = getProgressPathLength());
|
|
153
154
|
const animateProgressValue = (progress) => {
|
|
154
155
|
progress = Math.round(progress * 100) / 100;
|
|
155
156
|
let timelineProgressValue = Math.round((((this.isMetric.percentage ? toProgress : this.value) - fromProgress) * progress + fromProgress) * decimalCoeff) / decimalCoeff || 0;
|
|
@@ -174,7 +175,7 @@ export class YooProgressBarComponent {
|
|
|
174
175
|
const fromAnimation = {
|
|
175
176
|
attr: { x2: `${fromProgress}%` },
|
|
176
177
|
...(!this.isShape.line && {
|
|
177
|
-
strokeDashoffset: this.disableBackProgressAnimation ? getProgressPathLength(
|
|
178
|
+
strokeDashoffset: this.disableBackProgressAnimation ? getProgressPathLength() : getProgressPathLength(fromProgress)
|
|
178
179
|
}),
|
|
179
180
|
...(this.disableBackProgressAnimation && {
|
|
180
181
|
stroke: this.getProgressColor(0)
|
|
@@ -201,24 +202,11 @@ export class YooProgressBarComponent {
|
|
|
201
202
|
progressBarElement && isFinite(toProgress) && isFinite(fromProgress) && gsapFromTo(progressBarElement, this.isAnimated ? this.progressAnimationDuration : 0, fromAnimation, toAnimation);
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
|
-
getValue(progress) {
|
|
205
|
-
let currentProgress = progress >= 0 && !isNull(progress) ? progress : this.value || 0;
|
|
206
|
-
if (this.isMetric.step && !!this.maxStep) {
|
|
207
|
-
currentProgress = progress >= 0 ? progress : this.currentStep;
|
|
208
|
-
return (currentProgress / this.maxStep) * 100;
|
|
209
|
-
}
|
|
210
|
-
else if (isFinite(this.maxValue) && !!this.maxValue) {
|
|
211
|
-
return (currentProgress / this.maxValue) * 100;
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
return currentProgress;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
205
|
getLabelledValue(progress) {
|
|
218
206
|
progress = progress !== null && progress !== void 0 ? progress : ((isFinite(this.maxValue) && this.maxValue) ? (this.value / this.maxValue) * 100 : this.value || 0);
|
|
219
207
|
if (!this.hideProgressValue) {
|
|
220
208
|
if (this.isMetric.step) {
|
|
221
|
-
return `${this.
|
|
209
|
+
return `${this.value}/${this.maxValue}`;
|
|
222
210
|
}
|
|
223
211
|
else {
|
|
224
212
|
return this.allowNonAvailableValue && !isFinite(progress) ? '-' : [progress, this.getUnit(progress)].join('');
|
|
@@ -516,23 +504,6 @@ export class YooProgressBarComponent {
|
|
|
516
504
|
"attribute": "max-value",
|
|
517
505
|
"reflect": false
|
|
518
506
|
},
|
|
519
|
-
"maxStep": {
|
|
520
|
-
"type": "number",
|
|
521
|
-
"mutable": false,
|
|
522
|
-
"complexType": {
|
|
523
|
-
"original": "number",
|
|
524
|
-
"resolved": "number",
|
|
525
|
-
"references": {}
|
|
526
|
-
},
|
|
527
|
-
"required": false,
|
|
528
|
-
"optional": true,
|
|
529
|
-
"docs": {
|
|
530
|
-
"tags": [],
|
|
531
|
-
"text": "Before setting this property, ensure that the metric is set to 'step'\nDefine the total number of step to display X/Y (Y)"
|
|
532
|
-
},
|
|
533
|
-
"attribute": "max-step",
|
|
534
|
-
"reflect": false
|
|
535
|
-
},
|
|
536
507
|
"hideProgressValue": {
|
|
537
508
|
"type": "boolean",
|
|
538
509
|
"mutable": false,
|
|
@@ -638,8 +609,7 @@ export class YooProgressBarComponent {
|
|
|
638
609
|
"text": "Used to modify the speed of the progress animation (in ms)"
|
|
639
610
|
},
|
|
640
611
|
"attribute": "progress-animation-duration",
|
|
641
|
-
"reflect": false
|
|
642
|
-
"defaultValue": "!this.isAnimated ? 0 : 1.25"
|
|
612
|
+
"reflect": false
|
|
643
613
|
},
|
|
644
614
|
"value": {
|
|
645
615
|
"type": "number",
|
|
@@ -657,23 +627,6 @@ export class YooProgressBarComponent {
|
|
|
657
627
|
},
|
|
658
628
|
"attribute": "value",
|
|
659
629
|
"reflect": false
|
|
660
|
-
},
|
|
661
|
-
"currentStep": {
|
|
662
|
-
"type": "number",
|
|
663
|
-
"mutable": false,
|
|
664
|
-
"complexType": {
|
|
665
|
-
"original": "number",
|
|
666
|
-
"resolved": "number",
|
|
667
|
-
"references": {}
|
|
668
|
-
},
|
|
669
|
-
"required": false,
|
|
670
|
-
"optional": true,
|
|
671
|
-
"docs": {
|
|
672
|
-
"tags": [],
|
|
673
|
-
"text": "Before setting this property, ensure that the metric is set to 'step'\nDefine the current step to display X/Y (X)"
|
|
674
|
-
},
|
|
675
|
-
"attribute": "current-step",
|
|
676
|
-
"reflect": false
|
|
677
630
|
}
|
|
678
631
|
}; }
|
|
679
632
|
static get events() { return [{
|
|
@@ -714,8 +667,5 @@ export class YooProgressBarComponent {
|
|
|
714
667
|
}, {
|
|
715
668
|
"propName": "value",
|
|
716
669
|
"methodName": "onProgressValueChanged"
|
|
717
|
-
}, {
|
|
718
|
-
"propName": "currentStep",
|
|
719
|
-
"methodName": "onCurrentStepChanged"
|
|
720
670
|
}]; }
|
|
721
671
|
}
|
|
@@ -81,6 +81,10 @@ export class YooTooltipComponent {
|
|
|
81
81
|
this.saveTooltip.emit({ value: (_a = this.contentEditableElement) === null || _a === void 0 ? void 0 : _a.innerHTML, refTooltip: reference });
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
async toggleHoverable(isEnable = !this.hoverable) {
|
|
85
|
+
this.hoverable = isEnable;
|
|
86
|
+
this.reconfigureTooltip();
|
|
87
|
+
}
|
|
84
88
|
onEditableChanged(newState, oldState) {
|
|
85
89
|
this.hasModeChanged = newState !== oldState;
|
|
86
90
|
}
|
|
@@ -797,6 +801,25 @@ export class YooTooltipComponent {
|
|
|
797
801
|
"text": "",
|
|
798
802
|
"tags": []
|
|
799
803
|
}
|
|
804
|
+
},
|
|
805
|
+
"toggleHoverable": {
|
|
806
|
+
"complexType": {
|
|
807
|
+
"signature": "(isEnable?: boolean) => Promise<void>",
|
|
808
|
+
"parameters": [{
|
|
809
|
+
"tags": [],
|
|
810
|
+
"text": ""
|
|
811
|
+
}],
|
|
812
|
+
"references": {
|
|
813
|
+
"Promise": {
|
|
814
|
+
"location": "global"
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
"return": "Promise<void>"
|
|
818
|
+
},
|
|
819
|
+
"docs": {
|
|
820
|
+
"text": "",
|
|
821
|
+
"tags": []
|
|
822
|
+
}
|
|
800
823
|
}
|
|
801
824
|
}; }
|
|
802
825
|
static get elementRef() { return "host"; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isTruncated } from '@shared/utils';
|
|
2
|
-
import { Component, h, Host, Prop
|
|
2
|
+
import { Component, Element, h, Host, Prop } from '@stencil/core';
|
|
3
3
|
//! Things to note:
|
|
4
4
|
//* - This component is for single line ONLY
|
|
5
5
|
//* - Width of the parent must be set for the css truncation to work, flex/flex-grow is not enough
|
|
@@ -14,21 +14,24 @@ export class YooTruncatedLineComponent {
|
|
|
14
14
|
// Full text content to be truncated / tooltip
|
|
15
15
|
this.content = '';
|
|
16
16
|
this.renderContentWithTooltip = () => {
|
|
17
|
-
return (h("yoo-tooltip", { content: this.content, placement: this.tooltipPlacement }, this.renderContent()));
|
|
17
|
+
return (h("yoo-tooltip", { ref: (el) => this.tooltipElement = el, content: this.content, placement: this.tooltipPlacement }, this.renderContent()));
|
|
18
18
|
};
|
|
19
19
|
this.renderContent = () => {
|
|
20
20
|
return (h("div", { class: "content", ref: (el) => this.contentElement = el },
|
|
21
21
|
this.content,
|
|
22
22
|
h("slot", null)));
|
|
23
23
|
};
|
|
24
|
+
this.toggleTooltip = (isEnabled) => {
|
|
25
|
+
if (this.tooltipElement) {
|
|
26
|
+
this.tooltipElement.toggleHoverable(isEnabled);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
24
29
|
}
|
|
25
30
|
componentDidLoad() {
|
|
26
|
-
|
|
27
|
-
this.truncated = isTruncated(this.contentElement);
|
|
28
|
-
}
|
|
31
|
+
this.contentElement && this.toggleTooltip(isTruncated(this.contentElement));
|
|
29
32
|
}
|
|
30
33
|
render() {
|
|
31
|
-
return (h(Host, null, this.
|
|
34
|
+
return (h(Host, null, !this.withTooltip ? this.renderContent() : this.renderContentWithTooltip()));
|
|
32
35
|
}
|
|
33
36
|
static get is() { return "yoo-truncated-line"; }
|
|
34
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -99,7 +102,5 @@ export class YooTruncatedLineComponent {
|
|
|
99
102
|
"defaultValue": "''"
|
|
100
103
|
}
|
|
101
104
|
}; }
|
|
102
|
-
static get
|
|
103
|
-
"truncated": {}
|
|
104
|
-
}; }
|
|
105
|
+
static get elementRef() { return "host"; }
|
|
105
106
|
}
|
|
@@ -210,6 +210,9 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
210
210
|
:host .profile-user yoo-tag {
|
|
211
211
|
margin-top: var(--spacing-08, 0.5rem);
|
|
212
212
|
}
|
|
213
|
+
:host .profile-user > yoo-avatar {
|
|
214
|
+
z-index: 11;
|
|
215
|
+
}
|
|
213
216
|
:host .profile-user .profile-details {
|
|
214
217
|
text-align: center;
|
|
215
218
|
}
|
|
@@ -7,7 +7,7 @@ export class YooProgressRecap {
|
|
|
7
7
|
h("yoo-icon", { name: "help", size: "small", color: "stable" })));
|
|
8
8
|
}
|
|
9
9
|
renderProgressbar() {
|
|
10
|
-
return (h("yoo-progress-bar", { metric: "step", class: {
|
|
10
|
+
return (h("yoo-progress-bar", { metric: "step", maxValue: this.max, value: this.progress, class: {
|
|
11
11
|
success: !isNil(this.min) || (!isNil(this.min) && this.progress >= this.min),
|
|
12
12
|
danger: !isNil(this.min) && this.progress < this.min
|
|
13
13
|
}, ...this.min && {
|
|
@@ -15,7 +15,7 @@ export class YooProgressRecap {
|
|
|
15
15
|
text: `${translateMulti('YOOBICMIN')}: ${this.min}`,
|
|
16
16
|
xPercent: (this.min / this.max) * 100
|
|
17
17
|
}]
|
|
18
|
-
}
|
|
18
|
+
} }));
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
return (h(Host, null,
|
|
@@ -526,7 +526,7 @@ export class YooEntityComponent {
|
|
|
526
526
|
const [feedBottomActions, eventBottomActions] = partition(bottomActions, (action) => { var _a; return !((_a = action.cssClass) === null || _a === void 0 ? void 0 : _a.includes('event')); });
|
|
527
527
|
entry.bottomActions = feedBottomActions;
|
|
528
528
|
entry.middleActions = middleActions;
|
|
529
|
-
entry.actions =
|
|
529
|
+
entry.actions = (_f = this.secondaryActions) === null || _f === void 0 ? void 0 : _f.filter((a) => (a.isVisible ? a.isVisible(this.item) : true)).map((a) => toButton(a, this.item));
|
|
530
530
|
if (this.item.event) {
|
|
531
531
|
const event = this.item.event;
|
|
532
532
|
const eventHandler = () => {
|
|
@@ -648,6 +648,7 @@ export class YooFormAutocompleteComponent {
|
|
|
648
648
|
this.host.classList.remove('focused');
|
|
649
649
|
this.arrowIcon = 'arrow-down';
|
|
650
650
|
this.webAutocompleteClosed.emit(this.selection);
|
|
651
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
651
652
|
});
|
|
652
653
|
this.dialog.addEventListener('filterRadioToggled', (ev) => {
|
|
653
654
|
ev.stopPropagation();
|
|
@@ -672,6 +673,7 @@ export class YooFormAutocompleteComponent {
|
|
|
672
673
|
this.host.classList.remove('focused');
|
|
673
674
|
this.arrowIcon = 'arrow-down';
|
|
674
675
|
this.webAutocompleteClosed.emit(this.selection);
|
|
676
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
675
677
|
}
|
|
676
678
|
async onItemSelect(ev) {
|
|
677
679
|
ev.stopPropagation();
|
|
@@ -260,6 +260,9 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
260
260
|
:host .outer-container .progressbar-wrapper .main-wrapper {
|
|
261
261
|
height: var(--spacing-32, 2rem);
|
|
262
262
|
}
|
|
263
|
+
:host .outer-container .progressbar-wrapper .main-wrapper yoo-progress-bar {
|
|
264
|
+
--progress-bar-color: var(--app-color, #5a30f4);
|
|
265
|
+
}
|
|
263
266
|
:host .outer-container .camera-container {
|
|
264
267
|
position: relative;
|
|
265
268
|
width: var(--camera-container-height, 6.125rem);
|