@ncino/web-components 4.0.0-preview.21 → 4.0.0-preview.22

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.
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as i}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as b}from"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import y from"../../../../packages/web-components/src/components/date-picker/base/gator/datepicker.gator.scss.js";import f from"../../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import m from"../../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import D from"../../../../packages/web-components/src/components/button/gator/button.gator.scss.js";import{customElement as _}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{state as S}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import"../../../icon-button/gator/icon-button.gator.js";import"../../../button/gator/button.gator.js";import"../../../selector/gator/selector.gator.js";import{SELECTOR_TYPE as d}from"../../year-month-selector/year-month-selector.gator.js";import{NjcDatepicker as w}from"../datepicker.js";import{KEY_CONSTANTS as n}from"../../../../consts/key-constants.js";import{msg as c}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as k}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var M=Object.defineProperty,x=Object.getOwnPropertyDescriptor,g=(e,t,a,r)=>{for(var o=r>1?void 0:r?x(t,a):t,s=e.length-1,l;s>=0;s--)(l=e[s])&&(o=(r?l(t,a,o):l(o))||o);return r&&o&&M(t,a,o),o},Y=(e=>(e.CALENDAR="calendar",e.MONTHS="months",e.YEARS="years",e))(Y||{});let h=class extends w{constructor(){super(...arguments),this._currentView="calendar",this.previousScrollTop=0}render(){return i`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as i}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as b}from"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import y from"../../../../packages/web-components/src/components/date-picker/base/gator/datepicker.gator.scss.js";import f from"../../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import m from"../../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import D from"../../../../packages/web-components/src/components/button/gator/button.gator.scss.js";import{customElement as _}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{state as S}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import"../../../icon-button/gator/icon-button.gator.js";import"../../../button/gator/button.gator.js";import"../../../selector/gator/selector.gator.js";import{SELECTOR_TYPE as d}from"../../year-month-selector/year-month-selector.gator.js";import{NjcDatepicker as w}from"../datepicker.js";import{KEY_CONSTANTS as n}from"../../../../consts/key-constants.js";import{msg as c}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as k}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var M=Object.defineProperty,x=Object.getOwnPropertyDescriptor,p=(e,t,a,r)=>{for(var o=r>1?void 0:r?x(t,a):t,s=e.length-1,l;s>=0;s--)(l=e[s])&&(o=(r?l(t,a,o):l(o))||o);return r&&o&&M(t,a,o),o},Y=(e=>(e.CALENDAR="calendar",e.MONTHS="months",e.YEARS="years",e))(Y||{});let h=class extends w{constructor(){super(...arguments),this._currentView="calendar",this.previousScrollTop=0}render(){return i`
2
2
  <div class="gator-datepicker"
3
3
  role="dialog"
4
4
  aria-modal="true"
@@ -111,7 +111,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
111
111
  ?current=${this.isYearMonthSelectorCurrent(e,s)}
112
112
  ?selected=${this.isYearMonthSelectorSelected(e,s)}
113
113
  @select=${()=>this.handleYearMonthSelectorClick(s,e)}
114
- @keydown=${p=>this.handleYearMonthSelectorKeyDown(p,s)}
114
+ @keydown=${g=>this.handleYearMonthSelectorKeyDown(g,s)}
115
115
  >
116
116
  ${l}
117
117
  </ngc-year-month-selector>
@@ -128,4 +128,4 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
128
128
  <ngc-button id="today-button" variant='base' @click=${this.handleTodayClick} ?disabled=${this.isTodayDisabled()}>${c("Today")}</ngc-button>
129
129
  <ngc-button id="done-button" variant='base' @click=${this.handleDoneClick}>${c("Done")}</ngc-button>
130
130
  </div>
131
- `}handleClearClick(){this.clearSelection(),this._contextDate=this._todaysDate,this._currentView="calendar",this.dispatchChangeEvent()}handleTodayClick(){this._contextDate=this._todaysDate,this.range?(this.setRangeStart(this._todaysDate),this.setRangeEnd(this._todaysDate)):this.setSelectedDate(this._todaysDate),this._currentView="calendar",this.dispatchChangeEvent()}handleDoneClick(){this.dispatchEvent(new CustomEvent("done"))}handleClose(){this.range&&this._startDate&&(this._contextDate=this._startDate),!this.range&&this._selectedDate&&(this._contextDate=this._selectedDate)}};h.shadowRootOptions={...b.shadowRootOptions,delegatesFocus:!0};h.styles=[u(y),u(f),u(m),u(D)];g([S()],h.prototype,"_currentView",2);h=g([_("ngc-datepicker"),k()],h);export{Y as DATE_PICKER_VIEW,h as NgcDatepicker};
131
+ `}handleClearClick(){this.clearSelection(),this._contextDate=this._todaysDate,this._currentView="calendar",this.dispatchChangeEvent(),this.dispatchEvent(new CustomEvent("done"))}handleTodayClick(){this._contextDate=this._todaysDate,this.range?(this.setRangeStart(this._todaysDate),this.setRangeEnd(this._todaysDate)):this.setSelectedDate(this._todaysDate),this._currentView="calendar",this.dispatchChangeEvent()}handleDoneClick(){this.dispatchEvent(new CustomEvent("done"))}handleClose(){this.range&&this._startDate&&(this._contextDate=this._startDate),!this.range&&this._selectedDate&&(this._contextDate=this._selectedDate)}};h.shadowRootOptions={...b.shadowRootOptions,delegatesFocus:!0};h.styles=[u(y),u(f),u(m),u(D)];p([S()],h.prototype,"_currentView",2);h=p([_("ngc-datepicker"),k()],h);export{Y as DATE_PICKER_VIEW,h as NgcDatepicker};
@@ -29,7 +29,7 @@ import"../../../icon-button/gator/icon-button.gator.js";import"../../../date-pic
29
29
  @done=${this.closeDatepicker}
30
30
  @keydown=${t=>{t.key==="Escape"&&this.closeDatepicker()}}
31
31
  ></ngc-datepicker>
32
- `}handleDatepickerFocusOut(t){t.relatedTarget!==this.datepickerTriggerRef.value&&(this._datePickerVisible=!1)}closeDatepicker(){var t,a,e;(t=this.datepickerRef.value)==null||t.handleClose(),this._datePickerVisible=!1,this.range?(a=this.startInputRef.value)==null||a.focus():(e=this.inputRef.value)==null||e.focus()}get datepickerSelectedDate(){return this.dateValue instanceof Date&&!isNaN(this.dateValue.getTime())?this.dateValue:null}handleChange(t){t.preventDefault(),t.stopPropagation();const a=t.target;this._value=a.value,this.validateDate((e,i)=>this.setDateValue(e,i),a.value),this.dispatchEvent(new CustomEvent("change",this.dateEventData))}handleInputEvent(t){t.preventDefault(),t.stopPropagation();const a=t.target;this._value=a.value,this.validateDate((e,i)=>this.setDateValue(e,i),a.value),this.dispatchEvent(new CustomEvent("input",this.dateEventData))}setDateValue(t,a){a?this._internalValidationError=a:this._internalValidationError="",this.dateValue=t}handleDatepickerChange(t){t.detail.date?this._value=new Intl.DateTimeFormat(this.locale).format(t.detail.date):(this._value="",this.closeDatepicker()),this.dateValue=t.detail.date,this._internalValidationError="",this.dispatchEvent(new CustomEvent("change",this.dateEventData))}get dateEventData(){return{bubbles:!0,composed:!0,detail:{value:this._value,valueAsDate:this.dateValue}}}get rangeMarkup(){return requestAnimationFrame(()=>{var e,i;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("ngc-input-label"),a=(i=this.shadowRoot)==null?void 0:i.querySelectorAll("ngc-help-text");t&&this.groupRef.value&&(this.groupRef.value.ariaLabelledByElements=[t]),a&&this.groupRef.value&&(this.groupRef.value.ariaDescribedByElements=Array.from(a))}),f`
32
+ `}handleDatepickerFocusOut(t){t.relatedTarget!==this.datepickerTriggerRef.value&&(this._datePickerVisible=!1)}closeDatepicker(){var t,a,e;(t=this.datepickerRef.value)==null||t.handleClose(),this._datePickerVisible=!1,this.range?(a=this.startInputRef.value)==null||a.focus():(e=this.inputRef.value)==null||e.focus()}get datepickerSelectedDate(){return this.dateValue instanceof Date&&!isNaN(this.dateValue.getTime())?this.dateValue:null}handleChange(t){t.preventDefault(),t.stopPropagation();const a=t.target;this._value=a.value,this.validateDate((e,i)=>this.setDateValue(e,i),a.value),this.dispatchEvent(new CustomEvent("change",this.dateEventData))}handleInputEvent(t){t.preventDefault(),t.stopPropagation();const a=t.target;this._value=a.value,this.validateDate((e,i)=>this.setDateValue(e,i),a.value),this.dispatchEvent(new CustomEvent("input",this.dateEventData))}setDateValue(t,a){a?this._internalValidationError=a:this._internalValidationError="",this.dateValue=t}handleDatepickerChange(t){t.detail.date?this._value=new Intl.DateTimeFormat(this.locale).format(t.detail.date):this._value="",this.dateValue=t.detail.date,this._internalValidationError="",this.dispatchEvent(new CustomEvent("change",this.dateEventData))}get dateEventData(){return{bubbles:!0,composed:!0,detail:{value:this._value,valueAsDate:this.dateValue}}}get rangeMarkup(){return requestAnimationFrame(()=>{var e,i;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("ngc-input-label"),a=(i=this.shadowRoot)==null?void 0:i.querySelectorAll("ngc-help-text");t&&this.groupRef.value&&(this.groupRef.value.ariaLabelledByElements=[t]),a&&this.groupRef.value&&(this.groupRef.value.ariaDescribedByElements=Array.from(a))}),f`
33
33
  <div ${m(this.groupRef)} role="group">
34
34
  ${this.labelMarkup}
35
35
  <div class="gator-input-date-range">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "4.0.0-preview.21",
4
+ "version": "4.0.0-preview.22",
5
5
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@ncino/web-components",
4
- "version": "4.0.0-preview.20",
4
+ "version": "4.0.0-preview.21",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {