@aquera/nile-elements 0.0.118 → 0.0.119
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/README.md +7 -0
- package/demo/variables.css +2 -2
- package/demo/variables_v2.css +2 -2
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +7 -11
- package/dist/nile-calendar/nile-calendar.esm.js +4 -3
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +4 -3
- package/dist/nile-link/index.cjs.js +1 -1
- package/dist/nile-link/index.esm.js +1 -1
- package/dist/nile-link/nile-link.cjs.js +1 -1
- package/dist/nile-link/nile-link.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.cjs.js +1 -1
- package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.esm.js +1 -0
- package/dist/nile-link/nile-link.esm.js +6 -5
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +2 -2
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +26 -5
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +8 -6
- package/dist/src/nile-calendar/nile-calendar.css.js +5 -9
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +1 -1
- package/dist/src/nile-calendar/nile-calendar.js +10 -3
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-input/nile-input.js +4 -3
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-link/nile-link.css.js +1 -0
- package/dist/src/nile-link/nile-link.css.js.map +1 -1
- package/dist/src/nile-link/nile-link.d.ts +1 -0
- package/dist/src/nile-link/nile-link.js +7 -2
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +2 -2
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +26 -5
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +2 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +17 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +5 -9
- package/src/nile-calendar/nile-calendar.ts +10 -4
- package/src/nile-input/nile-input.ts +5 -4
- package/src/nile-link/nile-link.css.ts +1 -0
- package/src/nile-link/nile-link.ts +5 -2
- package/src/nile-select/nile-select.css.ts +2 -2
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +26 -5
- package/src/nile-slide-toggle/nile-slide-toggle.ts +15 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-calendar.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,IAAI,EACJ,QAAQ,EAGR,OAAO,EACR,MAAM,aAAa,CAAC;AAC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,YAAY;AAgvBzB,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n property,\n CSSResultArray,\n TemplateResult,\n nothing\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { PropertyValueMap } from 'lit';\ntype NileCalendarDateRange={ startDate: string, endDate: string }\ntype TimeUnits= 'minutes'|'hours'|'days'|'weeks'|'months';\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n * The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n\n\n @property({ type: String, attribute: 'value' }) valueAttribute: | string | null = null;\n\n @property({ type: String, attribute:true, reflect:true }) allowedDates: string = JSON.stringify({});\n\n @property({ type: Boolean, reflect: true }) range = false;\n\n @property({ type: Boolean, attribute: true, reflect:true }) hideTypes = false;\n\n @property({ type: String, reflect: true }) type :'absolute' | 'relative' = 'absolute';\n\n @property({ type: String }) selectedUnit: TimeUnits;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: Array, attribute: 'hide-duration-fields' }) hideDurationFields: String[] = [];\n \n @property({ type: Boolean}) showManualInputs :boolean=false;\n\n @state() startDate: Date | null = null;\n\n @state() endDate: Date | null = null;\n\n @state() isSelectingStart = true;\n\n @state() hideInput: Boolean = false;\n\n @state() value: Date | null;\n\n @state() currentMonth: number = new Date().getMonth();\n\n @state() currentYear: number = new Date().getFullYear();\n\n @state() allowedDatesLocal: NileCalendarDateRange | any = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n attributeChangedCallback(name: string, _old: string | null, newValue: string | null): void {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } \n super.attributeChangedCallback(name, _old, newValue);\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() {\n let newDateRange: NileCalendarDateRange | null;\n try {\n newDateRange=JSON.parse(this.allowedDates);\n } catch (error) {\n newDateRange=null;\n }\n if (!newDateRange || Object.keys(newDateRange).length == 0) {\n this.allowedDatesLocal=null;\n return;\n }\n this.hideInput=true;\n const startDate = this.getUTCDate(newDateRange.startDate)\n const endDate = this.getUTCDate(newDateRange.endDate)\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n }\n else\n {\n this.allowedDatesLocal=newDateRange;\n }\n }\n \n @watch('value')\n valueChanged() {\n if (this.range && this.value) {\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n }\n }\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n return html`\n <div\n class=${classMap({\n base:true,\n base__range:this.range,\n })}\n >\n <div class=${classMap({\n \"calendar-config\":true,\n \"hidden\": !this.range || (this.range && this.hideTypes)\n })}>\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\" value=\"${this.type}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n ${this.type == 'relative' ? this.renderRelativeCalendar():''}\n ${this.type == 'absolute' ? this.renderAbsoluteCalendar():''}\n\n ${!this.range?'':html`\n <div class=\"button-container\">\n <nile-button \n class=\"apply-button\" \n ?disabled=\"${ !this.startDate || !this.endDate }\" \n @click=\"${this.confimRange}\"\n > Apply</nile-button>\n </div>\n `}\n </div>\n `;\n }\n\n /**\n * @returns HTML content for absolute calendar\n */\n renderAbsoluteCalendar(){\n return html`\n <div class=\"calendar-wrapper\">\n <div class=\"calendar-container\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n ${this.range ? html`\n <div class=\"calender-input ${this.showManualInputs ? '' : 'hidden'}\" >\n <div class=\"from\">\n <nile-input \n label=\"From\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.startDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput}\"\n > </nile-input>\n </div>\n\n <div class=\"from\">\n <nile-input \n label=\"To\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.endDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput}\"\n > </nile-input>\n </div>\n </div>\n `:''}\n `\n }\n\n /**\n * @returns HTML content for relative calendar\n */\n renderRelativeCalendar(){\n return html`\n <div class=\"units-wrapper\">\n <div class=\"unit-container\">\n ${this.hideDurationFields?.includes('minutes')?'':html`\n <div class=\"duration-name\">Minutes</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n `}\n\n ${this.hideDurationFields?.includes('hours')?'':html`\n <div class=\"duration-name\">Hours</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('days')?'':html`\n <div class=\"duration-name\">Days</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('weeks')?'':html`\n <div class=\"duration-name\">Weeks</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('months')?'':html`\n <div class=\"duration-name\">Months</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n `}\n </div>\n </div>\n \n ${this.range ? html`\n <div>\n <div class=\"unit-input-container\">\n <nile-input \n class=\"manual-input duration-input\" \n label=\"Duration\" \n value=\"${this.selectedValue}\" \n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\"\n ></nile-input>\n\n <nile-select class=\"manual-input time-input\" \n label=\"Unit of time\" \n style=\"margin-top:3px\" \n value=\"${ this.selectedUnit }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${this.hideDurationFields?.includes('minutes')?'hidden':''}\">Minutes</nile-option>\n <nile-option value=\"hours\" class=\"${this.hideDurationFields?.includes('hours')?'hidden':''}\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${this.hideDurationFields?.includes('days')?'hidden':''}\">Days</nile-option>\n <nile-option value=\"weeks\" class=\"${this.hideDurationFields?.includes('weeks')?'hidden':''}\">Weeks</nile-option>\n <nile-option value=\"months\" class=\"${this.hideDurationFields?.includes('months')?'hidden':''}\"> Months </nile-option>\n </nile-select>\n </div>\n </div>\n `:''}\n `\n }\n \n /**\n * \n * @param unit \n * @param values \n * @returns html for the option\n */\n renderTimeValues(unit: TimeUnits, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"duration__value ${this.selectedUnit === unit && this.selectedValue === value ? 'duration__value--selected':''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >${value}\n </div>`\n );\n }\n\n /**\n * \n * @param year \n * @param month \n * @param daysArray \n * @returns HTML for rendered month\n */\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n const isCurrentDate = (day: number, month: number, year: number) => {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"days_container\">\n <div class=\"day_name\">Su</div>\n <div class=\"day_name\">Mo</div>\n <div class=\"day_name\">Tu</div>\n <div class=\"day_name\">We</div>\n <div class=\"day_name\">Th</div>\n <div class=\"day_name\">Fr</div>\n <div class=\"day_name\">Sa</div>\n\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n const datePlacement:''|'selected-date'|'range-start'|'range-end' = isSelectedDate(day, month, year, isCurrentMonth)\n const classMapObj:any={\n 'day_date' : true,\n 'not-allowed' : !this.isAllowedDate(day, month, year),\n 'in-range' : isInRange(day, month, year, isCurrentMonth) ,\n 'filler' : !isCurrentMonth,\n }\n if(datePlacement) classMapObj[datePlacement]=true\n \n return html` \n <div\n class=${classMap(classMapObj)}\n @click=\"${() => { if (isCurrentMonth) this.selectDate(day, month, year)}}\"\n >\n <span style=\"position:relative;\">\n ${day}\n ${isCurrentDate(day, month, year) && isCurrentMonth?html`<div class=\"current__date__dot\"></div>`:nothing}\n </span>\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n /**\n * Function to validate if date is not in allowedDates range\n * @param day \n * @param month \n * @param year \n * @returns \n */\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.allowedDatesLocal) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = this.getUTCDate(this.allowedDatesLocal.startDate)\n const endDate = this.getUTCDate(this.allowedDatesLocal.endDate)\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n /**\n * @function handle_date-click/select\n * @param day \n * @param month \n * @param year \n */\n selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emitChangedData({ value: this.value });\n }\n }\n\n /**\n * Function to be called on initialization to set all other properties\n */\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n }\n\n /**\n * Function to handle relative date selection\n */\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeValueClick(unit: TimeUnits, value: number, event: any) {\n this.createRelativePeriod(unit, value)\n this.selectedUnit = unit;\n this.selectedValue = value;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n \n /**\n * Function to handle start time selecion\n */\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n \n /**\n * Function to handle end time selecion\n */\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n }\n \n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n }\n\n private confimRange() {\n if (!(this.startDate && this.endDate)) return;\n this.emitChangedData( {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n onTypeChange(event: CustomEvent) {\n this.type = event.detail.value;\n this.emit('nile-type-change', { value: this.type })\n }\n getUTCDate(dateStr:any){\n return new Date(\n Date.UTC(\n dateStr.slice(0, 4),\n dateStr.slice(5, 7) - 1,\n dateStr.slice(8, 10)\n )\n )\n }\n\n emitChangedData(data:{startDate:Date,endDate:Date}|{value:any}){\n this.emit('nile-changed',data);\n this.emit('nile-change',data)\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}"]}
|
1
|
+
{"version":3,"file":"nile-calendar.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,IAAI,EACJ,QAAQ,EAGR,OAAO,EACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAInD;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAAtC;;QAW2C,mBAAc,GAAoB,IAAI,CAAC;QAE7B,iBAAY,GAAW,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAExD,UAAK,GAAG,KAAK,CAAC;QAEE,cAAS,GAAG,KAAK,CAAC;QAEnC,SAAI,GAA4B,UAAU,CAAC;QAMxB,uBAAkB,GAAa,EAAE,CAAC;QAEpE,qBAAgB,GAAU,KAAK,CAAC;QAEnD,cAAS,GAAgB,IAAI,CAAC;QAE9B,YAAO,GAAgB,IAAI,CAAC;QAE5B,qBAAgB,GA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AE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAA4C;AAE1D;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAyB;AAExB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuB;AAEY;IAA7D,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;wDAAmC;AAEpE;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;sDAAiC;AAEnD;IAAR,KAAK,EAAE;+CAA+B;AAE9B;IAAR,KAAK,EAAE;6CAA6B;AAE5B;IAAR,KAAK,EAAE;sDAAyB;AAExB;IAAR,KAAK,EAAE;+CAA4B;AAE3B;IAAR,KAAK,EAAE;2CAAoB;AAEnB;IAAR,KAAK,EAAE;kDAA8C;AAE7C;IAAR,KAAK,EAAE;iDAAgD;AAE/C;IAAR,KAAK,EAAE;uDAAuD;AAoC/D;IADC,KAAK,CAAC,cAAc,CAAC;yDAuBrB;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;gDAcd;AArHU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAovBxB;SApvBY,YAAY;AAsvBzB,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n property,\n CSSResultArray,\n TemplateResult,\n nothing\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { PropertyValueMap } from 'lit';\ntype NileCalendarDateRange={ startDate: string, endDate: string }\ntype TimeUnits= 'minutes'|'hours'|'days'|'weeks'|'months';\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n * The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n\n\n @property({ type: String, attribute: 'value' }) valueAttribute: | string | null = null;\n\n @property({ type: String, attribute:true, reflect:true }) allowedDates: string = JSON.stringify({});\n\n @property({ type: Boolean, reflect: true }) range = false;\n\n @property({ type: Boolean, attribute: true, reflect:true }) hideTypes = false;\n\n @property({ type: String, reflect: true }) type :'absolute' | 'relative' = 'absolute';\n\n @property({ type: String }) selectedUnit: TimeUnits;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: Array, attribute: 'hide-duration-fields' }) hideDurationFields: String[] = [];\n \n @property({ type: Boolean}) showManualInputs :boolean=false;\n\n @state() startDate: Date | null = null;\n\n @state() endDate: Date | null = null;\n\n @state() isSelectingStart = true;\n\n @state() hideInput: Boolean = false;\n\n @state() value: Date | null;\n\n @state() currentMonth: number = new Date().getMonth();\n\n @state() currentYear: number = new Date().getFullYear();\n\n @state() allowedDatesLocal: NileCalendarDateRange | any = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n attributeChangedCallback(name: string, _old: string | null, newValue: string | null): void {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } \n super.attributeChangedCallback(name, _old, newValue);\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() {\n let newDateRange: NileCalendarDateRange | null;\n try {\n newDateRange=JSON.parse(this.allowedDates);\n } catch (error) {\n newDateRange=null;\n }\n if (!newDateRange || Object.keys(newDateRange).length == 0) {\n this.allowedDatesLocal=null;\n return;\n }\n this.hideInput=true;\n const startDate = this.getUTCDate(newDateRange.startDate)\n const endDate = this.getUTCDate(newDateRange.endDate)\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n }\n else\n {\n this.allowedDatesLocal=newDateRange;\n }\n }\n \n @watch('value')\n valueChanged() {\n if (this.range && this.value) {\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n }\n }\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n return html`\n <div\n class=${classMap({\n base:true,\n base__range:this.range,\n })}\n >\n <div class=${classMap({\n \"calendar-config\":true,\n \"hidden\": !this.range || (this.range && this.hideTypes)\n })}>\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\" value=\"${this.type}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n ${this.type == 'relative' ? this.renderRelativeCalendar():''}\n ${this.type == 'absolute' ? this.renderAbsoluteCalendar():''}\n\n ${!this.range?'':html`\n <div class=\"button-container\">\n <nile-button \n class=\"apply-button\" \n ?disabled=\"${ !this.startDate || !this.endDate }\" \n @click=\"${this.confimRange}\"\n > Apply</nile-button>\n </div>\n `}\n </div>\n `;\n }\n\n /**\n * @returns HTML content for absolute calendar\n */\n renderAbsoluteCalendar(){\n return html`\n <div class=\"calendar-wrapper\">\n <div class=\"calendar-container\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n ${this.range ? html`\n <div class=\"calender-input ${this.showManualInputs ? '' : 'hidden'}\" >\n <div class=\"from\">\n <nile-input \n label=\"From\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.startDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput}\"\n > </nile-input>\n </div>\n\n <div class=\"from\">\n <nile-input \n label=\"To\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.endDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput}\"\n > </nile-input>\n </div>\n </div>\n `:''}\n `\n }\n\n /**\n * @returns HTML content for relative calendar\n */\n renderRelativeCalendar(){\n return html`\n <div class=\"units-wrapper\">\n <div class=\"unit-container\">\n ${this.hideDurationFields?.includes('minutes')?'':html`\n <div class=\"duration-name\">Minutes</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n `}\n\n ${this.hideDurationFields?.includes('hours')?'':html`\n <div class=\"duration-name\">Hours</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('days')?'':html`\n <div class=\"duration-name\">Days</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('weeks')?'':html`\n <div class=\"duration-name\">Weeks</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('months')?'':html`\n <div class=\"duration-name\">Months</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n `}\n </div>\n </div>\n \n ${this.range ? html`\n <div>\n <div class=\"unit-input-container\">\n <nile-input \n class=\"manual-input duration-input\" \n label=\"Duration\"\n inputmode=\"numeric\"\n type=\"number\"\n value=\"${this.selectedValue}\" \n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\"\n ></nile-input>\n\n <nile-select class=\"manual-input time-input\" \n label=\"Unit of time\" \n value=\"${ this.selectedUnit }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${this.hideDurationFields?.includes('minutes')?'hidden':''}\">Minutes</nile-option>\n <nile-option value=\"hours\" class=\"${this.hideDurationFields?.includes('hours')?'hidden':''}\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${this.hideDurationFields?.includes('days')?'hidden':''}\">Days</nile-option>\n <nile-option value=\"weeks\" class=\"${this.hideDurationFields?.includes('weeks')?'hidden':''}\">Weeks</nile-option>\n <nile-option value=\"months\" class=\"${this.hideDurationFields?.includes('months')?'hidden':''}\"> Months </nile-option>\n </nile-select>\n </div>\n </div>\n `:''}\n `\n }\n \n /**\n * \n * @param unit \n * @param values \n * @returns html for the option\n */\n renderTimeValues(unit: TimeUnits, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"duration__value ${this.selectedUnit === unit && this.selectedValue === value ? 'duration__value--selected':''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >${value}\n </div>`\n );\n }\n\n /**\n * \n * @param year \n * @param month \n * @param daysArray \n * @returns HTML for rendered month\n */\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n const isCurrentDate = (day: number, month: number, year: number) => {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"days_container\">\n <div class=\"day_name\">Su</div>\n <div class=\"day_name\">Mo</div>\n <div class=\"day_name\">Tu</div>\n <div class=\"day_name\">We</div>\n <div class=\"day_name\">Th</div>\n <div class=\"day_name\">Fr</div>\n <div class=\"day_name\">Sa</div>\n\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n const datePlacement:''|'selected-date'|'range-start'|'range-end' = isSelectedDate(day, month, year, isCurrentMonth)\n const classMapObj:any={\n 'day_date' : true,\n 'not-allowed' : !this.isAllowedDate(day, month, year),\n 'in-range' : isInRange(day, month, year, isCurrentMonth) ,\n 'filler' : !isCurrentMonth,\n }\n if(datePlacement) classMapObj[datePlacement]=true\n \n return html` \n <div\n class=${classMap(classMapObj)}\n @click=\"${() => { if (isCurrentMonth) this.selectDate(day, month, year)}}\"\n >\n <span style=\"position:relative;\">\n ${day}\n ${isCurrentDate(day, month, year) && isCurrentMonth?html`<div class=\"current__date__dot\"></div>`:nothing}\n </span>\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n /**\n * Function to validate if date is not in allowedDates range\n * @param day \n * @param month \n * @param year \n * @returns \n */\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.allowedDatesLocal) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = this.getUTCDate(this.allowedDatesLocal.startDate)\n const endDate = this.getUTCDate(this.allowedDatesLocal.endDate)\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n /**\n * @function handle_date-click/select\n * @param day \n * @param month \n * @param year \n */\n selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emitChangedData({ value: this.value });\n }\n }\n\n /**\n * Function to be called on initialization to set all other properties\n */\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n }\n\n /**\n * Function to handle relative date selection\n */\n handleDurationChange(event: CustomEvent) {\n event.detail.value = event.detail.value.replace(/e/gi, \"\");\n const duration=Number(event.detail.value);\n if(!duration) {\n return\n };\n this.selectedValue = duration\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeValueClick(unit: TimeUnits, value: number, event: any) {\n this.createRelativePeriod(unit, value)\n this.selectedUnit = unit;\n this.selectedValue = value;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n \n /**\n * Function to handle start time selecion\n */\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n \n /**\n * Function to handle end time selecion\n */\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n }\n \n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n }\n\n private confimRange() {\n if (!(this.startDate && this.endDate)) return;\n this.emitChangedData( {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n onTypeChange(event: CustomEvent) {\n this.type = event.detail.value;\n this.emit('nile-type-change', { value: this.type })\n }\n getUTCDate(dateStr:any){\n return new Date(\n Date.UTC(\n dateStr.slice(0, 4),\n dateStr.slice(5, 7) - 1,\n dateStr.slice(8, 10)\n )\n )\n }\n\n emitChangedData(data:{startDate:Date,endDate:Date}|{value:any}){\n this.emit('nile-changed',data);\n this.emit('nile-change',data)\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}"]}
|
@@ -347,9 +347,10 @@ let NileInput = class NileInput extends NileElement {
|
|
347
347
|
|
348
348
|
<div part="form-control-input" class="form-control-input">
|
349
349
|
<nile-popup ?active=${this.hasPrintableCharacters}
|
350
|
-
|
351
|
-
|
352
|
-
|
350
|
+
placement="bottom-start"
|
351
|
+
distance="5"
|
352
|
+
exportparts="input"
|
353
|
+
strategy="fixed"
|
353
354
|
>
|
354
355
|
<div
|
355
356
|
slot="anchor"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-input.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,WAAgC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;GAKG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAGY,0BAAqB,GAAG,IAAI,qBAAqB,CAAC,IAAI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code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-input.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { FormControlController } from '../internal/form';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-input\n *\n */\n@customElement('nile-input')\nexport class NileInput extends NileElement implements NileFormControl {\n static styles: CSSResultGroup = styles;\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['nile-blur', 'nile-input'],\n });\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n @property({ type: Boolean }) checkNonPrintableChar: boolean = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a filled input. */\n @property({ type: Boolean, reflect: true }) filled = false;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Sets the input to a Destructive state, changing its visual appearance. */\n @property({ type: Boolean }) destructive = false;\n\n /** Draws a pill-style input with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =\n false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible =\n false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =\n false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string = 'off';\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint:\n | 'enter'\n | 'done'\n | 'go'\n | 'next'\n | 'previous'\n | 'search'\n | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false'),\n },\n })\n spellcheck = true;\n\n @property({ type: Boolean, reflect: true }) canSavePassword = false;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n @state() hasPrintableCharacters: boolean = false;\n\n @state() markedValue: string;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */\n get valueAsDate() {\n const input = document.createElement('input');\n input.type = 'date';\n input.value = this.value;\n return input.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n const input = document.createElement('input');\n input.type = 'date';\n input.valueAsDate = newValue;\n this.value = input.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n const input = document.createElement('input');\n input.type = 'number';\n input.value = this.value;\n return input.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n const input = document.createElement('input');\n input.type = 'number';\n input.valueAsNumber = newValue;\n this.value = input.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.emit('nile-after-init');\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('nile-change', { value: this.value });\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('nile-clear', { value: this.value });\n this.emit('nile-input', { value: this.value });\n this.emit('nile-change', { value: this.value });\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('nile-input', { value: this.value });\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier =\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n /** checks non printable characters in the value. */\n markNonPrintableCharacters() {\n let markedValue = '';\n this.hasPrintableCharacters = false;\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n if (charCode > 127) {\n markedValue += `<span class=\"input__srtiked-text\">${this.value.charAt(\n i\n )}</span>`;\n this.hasPrintableCharacters = true;\n } else {\n markedValue += this.value.charAt(i);\n }\n }\n }\n\n this.markedValue = markedValue;\n this.emit('nile-value-marked', {\n value: this.markedValue,\n hasNonPrintableCharacters: this.hasPrintableCharacters,\n });\n }\n\n /** Removes all non printable characters from the value. */\n removeAllNonPrintableCharacters() {\n let cleanedValue = '';\n\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n // Consider a character printable if it's not in the specified non-printable ranges\n if (charCode < 128) {\n cleanedValue += this.value.charAt(i);\n }\n }\n }\n\n this.value = cleanedValue;\n this.emit('nile-npchar-removed', { value: this.value });\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(\n selectionStart,\n selectionEnd,\n selectionDirection\n );\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n // /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n // showPicker() {\n // if ('showPicker' in HTMLInputElement.prototype) {\n // this.input.showPicker();\n // }\n // }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n const hasClearIcon =\n this.clearable &&\n !this.disabled &&\n !this.readonly &&\n (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n ${hasLabelSuffixSlot ? html` <slot name=\"label-suffix\"></slot> ` : ``}\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <nile-popup ?active=${this.hasPrintableCharacters}\n placement=\"bottom-start\"\n distance=\"5\"\n strategy=\"fixed\"\n >\n <div\n slot=\"anchor\"\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--destructive': this.destructive,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control ${\n this.type === 'password' && !this.passwordVisible\n ? 'input__password'\n : ''\n }\"\n type=${this.type === 'password' && !this.canSavePassword ? 'text' : this.type}\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon name=\"error\" library=\"system\"></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge variant=\"error\" @click=${\n this.removeAllNonPrintableCharacters\n } class=\"input__remove-non-printable\" >\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\"> ${unsafeHTML(\n this.markedValue\n )} </div>\n\n </div>\n </nile-popup>\n </div>\n\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n </div>\n `;\n }\n}\n\nexport default NileInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-input': NileInput;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"nile-input.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,WAAgC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;GAKG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAGY,0BAAqB,GAAG,IAAI,qBAAqB,CAAC,IAAI,EAAE;YACvE,mBAAmB,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;SACjD,CAAC,CAAC;QACc,sB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;AAGrB;IAAX,QAAQ,EAAE;iDAMM;AAGL;IAAX,QAAQ,EAAE;8CAA2B;AAM1B;IAAX,QAAQ,EAAE;+CAA8B;AAGZ;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAAoB;AAGpC;IAAX,QAAQ,EAAE;+CAOA;AAWX;IARC,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,oEAAoE;YACpE,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;YACpE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACjD;KACF,CAAC;6CACgB;AAE0B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAyB;AAMxD;IAAX,QAAQ,EAAE;4CAQD;AAOD;IAAR,KAAK,EAAE;yDAAyC;AAExC;IAAR,KAAK,EAAE;8CAAqB;AA2H7B;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAIjD;AAGD;IADC,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;iDAK7C;AAGK;IADL,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kDAO9C;AA9UU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA+pBrB;SA/pBY,SAAS;AAiqBtB,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-input.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { FormControlController } from '../internal/form';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-input\n *\n */\n@customElement('nile-input')\nexport class NileInput extends NileElement implements NileFormControl {\n static styles: CSSResultGroup = styles;\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['nile-blur', 'nile-input'],\n });\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n @property({ type: Boolean }) checkNonPrintableChar: boolean = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a filled input. */\n @property({ type: Boolean, reflect: true }) filled = false;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Sets the input to a Destructive state, changing its visual appearance. */\n @property({ type: Boolean }) destructive = false;\n\n /** Draws a pill-style input with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =\n false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible =\n false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =\n false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string = 'off';\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint:\n | 'enter'\n | 'done'\n | 'go'\n | 'next'\n | 'previous'\n | 'search'\n | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false'),\n },\n })\n spellcheck = true;\n\n @property({ type: Boolean, reflect: true }) canSavePassword = false;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n @state() hasPrintableCharacters: boolean = false;\n\n @state() markedValue: string;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */\n get valueAsDate() {\n const input = document.createElement('input');\n input.type = 'date';\n input.value = this.value;\n return input.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n const input = document.createElement('input');\n input.type = 'date';\n input.valueAsDate = newValue;\n this.value = input.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n const input = document.createElement('input');\n input.type = 'number';\n input.value = this.value;\n return input.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n const input = document.createElement('input');\n input.type = 'number';\n input.valueAsNumber = newValue;\n this.value = input.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.emit('nile-after-init');\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('nile-change', { value: this.value });\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('nile-clear', { value: this.value });\n this.emit('nile-input', { value: this.value });\n this.emit('nile-change', { value: this.value });\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('nile-input', { value: this.value });\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier =\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n /** checks non printable characters in the value. */\n markNonPrintableCharacters() {\n let markedValue = '';\n this.hasPrintableCharacters = false;\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n if (charCode > 127) {\n markedValue += `<span class=\"input__srtiked-text\">${this.value.charAt(\n i\n )}</span>`;\n this.hasPrintableCharacters = true;\n } else {\n markedValue += this.value.charAt(i);\n }\n }\n }\n\n this.markedValue = markedValue;\n this.emit('nile-value-marked', {\n value: this.markedValue,\n hasNonPrintableCharacters: this.hasPrintableCharacters,\n });\n }\n\n /** Removes all non printable characters from the value. */\n removeAllNonPrintableCharacters() {\n let cleanedValue = '';\n\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n // Consider a character printable if it's not in the specified non-printable ranges\n if (charCode < 128) {\n cleanedValue += this.value.charAt(i);\n }\n }\n }\n\n this.value = cleanedValue;\n this.emit('nile-npchar-removed', { value: this.value });\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(\n selectionStart,\n selectionEnd,\n selectionDirection\n );\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n // /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n // showPicker() {\n // if ('showPicker' in HTMLInputElement.prototype) {\n // this.input.showPicker();\n // }\n // }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n const hasClearIcon =\n this.clearable &&\n !this.disabled &&\n !this.readonly &&\n (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n ${hasLabelSuffixSlot ? html` <slot name=\"label-suffix\"></slot> ` : ``}\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <nile-popup ?active=${this.hasPrintableCharacters}\n placement=\"bottom-start\"\n distance=\"5\"\n exportparts=\"input\"\n strategy=\"fixed\"\n >\n <div\n slot=\"anchor\"\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--destructive': this.destructive,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control ${\n this.type === 'password' && !this.passwordVisible\n ? 'input__password'\n : ''\n }\"\n type=${this.type === 'password' && !this.canSavePassword ? 'text' : this.type}\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon name=\"error\" library=\"system\"></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge variant=\"error\" @click=${\n this.removeAllNonPrintableCharacters\n } class=\"input__remove-non-printable\" >\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\"> ${unsafeHTML(\n this.markedValue\n )} </div>\n\n </div>\n </nile-popup>\n </div>\n\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n </div>\n `;\n }\n}\n\nexport default NileInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-input': NileInput;\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-link.css.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
1
|
+
{"version":3,"file":"nile-link.css.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Link CSS\n */\nexport const styles = css`\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer;\n text-decoration:none;\n }\n\n .link__label {\n color: var(--nile-colors-primary-600);\n text-align: center;\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n\n .link:not(.link--disabled):not(.link__button):hover ,\n .link:not(.link--disabled):not(.link__button):hover .link__label {\n color: var(--nile-colors-primary-700);\n }\n\n .link:not(.link--disabled):not(.link__button):active,\n .link:not(.link--disabled):not(.link__button):active .link__label {\n color: #002f53;\n }\n\n .link__button:hover {\n color: var(--nile-colors-primary-700);\n border-radius: var(--nile-radius-radius-xs);\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #005EA61A;\n border-radius: var(--nile-radius-radius-xs);\n background: rgba(0, 94, 166, 0.1);\n }\n\n`;\n\nexport default [styles];\n"]}
|
@@ -9,6 +9,7 @@ import { html, property } from 'lit-element';
|
|
9
9
|
import { customElement, state } from 'lit/decorators.js';
|
10
10
|
import { styles } from './nile-link.css';
|
11
11
|
import { HasSlotController } from '../slot';
|
12
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
12
13
|
import { classMap } from 'lit/directives/class-map.js';
|
13
14
|
import NileElement from '../internal/nile-element';
|
14
15
|
/**
|
@@ -73,8 +74,9 @@ let NileLink = class NileLink extends NileElement {
|
|
73
74
|
*/
|
74
75
|
render() {
|
75
76
|
return html `
|
76
|
-
<
|
77
|
+
<a
|
77
78
|
part="base"
|
79
|
+
href="${ifDefined(this.href)}"
|
78
80
|
class=${classMap({
|
79
81
|
'link': true,
|
80
82
|
'link--disabled': this.disabled,
|
@@ -92,7 +94,7 @@ let NileLink = class NileLink extends NileElement {
|
|
92
94
|
<slot name="prefix" part="prefix" class="link__prefix"></slot>
|
93
95
|
<slot part="label" class="link__label"></slot>
|
94
96
|
<slot name="suffix" part="suffix" class="link__suffix"></slot>
|
95
|
-
</
|
97
|
+
</a>
|
96
98
|
`;
|
97
99
|
}
|
98
100
|
};
|
@@ -105,6 +107,9 @@ __decorate([
|
|
105
107
|
__decorate([
|
106
108
|
property({ type: Boolean })
|
107
109
|
], NileLink.prototype, "button", void 0);
|
110
|
+
__decorate([
|
111
|
+
property({ type: String })
|
112
|
+
], NileLink.prototype, "href", void 0);
|
108
113
|
NileLink = __decorate([
|
109
114
|
customElement('nile-link')
|
110
115
|
], NileLink);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-link.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"nile-link.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QASY,sBAAiB,GAAG,IAAI,iBAAiB,CACxD,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAQ,CACT,CAAC;QAEe,aAAQ,GAAG,KAAK,CAAC;QAElC,2BAA2B;QACiB,aAAQ,GAAG,KAAK,CAAC;QAEhC,WAAM,GAAG,KAAK,CAAC;QA2E5C,gBAAgB;IAClB,CAAC;IAhGC;;;OAGG;IACI,MAAM,KAAK,MAAM;QAC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AAC,QAAQ;YAC/B,cAAc,EAAE,IAAI,CAAC,MAAM;SAC5B,CAAC;oBACU,IAAI,CAAC,QAAQ;gBAEvB,IAAI;aACD,KAAK,CAAC,iFACX;wBACgB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACrC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG;gBAC7B,IAAI,CAAC,UAAU;iBACd,IAAI,CAAC,WAAW;iBAChB,IAAI,CAAC,WAAW;;;;;;KAM5B,CAAC;IACJ,CAAC;CAGF,CAAA;AAjFU;IAAR,KAAK,EAAE;0CAA0B;AAGU;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAkB;AAEhC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAgB;AAEhB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAa;AAvB7B,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAiGpB;SAjGY,QAAQ;AAmGrB,eAAe,QAAQ,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport {styles} from './nile-link.css';\nimport { HasSlotController } from '../slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-link\n *\n */\n@customElement('nile-link')\nexport class NileLink extends NileElement {\n /**\n * The styles for Link\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n '[default]',\n 'prefix',\n 'suffix'\n );\n\n @state() private hasFocus = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: Boolean }) button = false;\n\n @property({ type: String }) href:string;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleHostClick = this.handleHostClick.bind(this);\n this.addEventListener('click', this.handleHostClick);\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('click', this.handleHostClick);\n this.emit('nile-destroy');\n }\n\n private handleHostClick(event: MouseEvent) {\n // Prevent the click event from being emitted when the button is disabled\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.stopPropagation();\n return;\n }\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n <a\n part=\"base\"\n href=\"${ifDefined(this.href)}\"\n class=${classMap({\n 'link': true,\n 'link--disabled': this.disabled,\n 'link__button': this.button,\n })}\n .disabled=${this.disabled}\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"link__prefix\"></slot>\n <slot part=\"label\" class=\"link__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"link__suffix\"></slot>\n </a>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileLink;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-link': NileLink;\n }\n }\n"]}
|
@@ -34,13 +34,13 @@ export const styles = css `
|
|
34
34
|
/* Label */
|
35
35
|
.form-control--has-label .form-control__label {
|
36
36
|
display: block;
|
37
|
-
margin-bottom:
|
37
|
+
margin-bottom: 6px;
|
38
38
|
color: var(--nile-colors-dark-900);
|
39
39
|
font-family: Colfax-regular;
|
40
40
|
font-size: 14px;
|
41
41
|
font-style: normal;
|
42
42
|
font-weight: 400;
|
43
|
-
line-height:
|
43
|
+
line-height: 20px;
|
44
44
|
letter-spacing: 0.2px;
|
45
45
|
}
|
46
46
|
|