@aquera/nile-elements 0.0.44 → 0.0.46

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.
Files changed (78) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js +41 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.d.ts +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js +1 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.css.js +10 -2
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.d.ts +9 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js +114 -25
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.d.ts +4 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +25 -6
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popover/nile-popover.d.ts +6 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popover/nile-popover.js +21 -2
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popover/nile-popover.js.map +1 -1
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.d.ts +5 -5
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js +9 -5
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js.map +1 -1
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +17 -3
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  23. package/dist/index.iife.js +191 -111
  24. package/dist/nile-button/nile-button.cjs.js +1 -1
  25. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  26. package/dist/nile-button/nile-button.css.cjs.js +1 -1
  27. package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
  28. package/dist/nile-button/nile-button.css.esm.js +43 -2
  29. package/dist/nile-button/nile-button.esm.js +1 -1
  30. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  31. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  32. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  33. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  34. package/dist/nile-calendar/nile-calendar.css.esm.js +10 -2
  35. package/dist/nile-calendar/nile-calendar.esm.js +44 -28
  36. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  37. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  38. package/dist/nile-date-picker/nile-date-picker.esm.js +12 -8
  39. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  40. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  41. package/dist/nile-popover/nile-popover.esm.js +5 -4
  42. package/dist/nile-select/nile-select.cjs.js +1 -1
  43. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  44. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  45. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  46. package/dist/nile-select/nile-select.css.esm.js +4 -0
  47. package/dist/nile-select/nile-select.esm.js +18 -12
  48. package/dist/src/nile-button/nile-button.css.js +41 -0
  49. package/dist/src/nile-button/nile-button.css.js.map +1 -1
  50. package/dist/src/nile-button/nile-button.d.ts +1 -1
  51. package/dist/src/nile-button/nile-button.js +1 -0
  52. package/dist/src/nile-button/nile-button.js.map +1 -1
  53. package/dist/src/nile-calendar/nile-calendar.css.js +10 -2
  54. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  55. package/dist/src/nile-calendar/nile-calendar.d.ts +9 -1
  56. package/dist/src/nile-calendar/nile-calendar.js +114 -25
  57. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  58. package/dist/src/nile-date-picker/nile-date-picker.d.ts +4 -0
  59. package/dist/src/nile-date-picker/nile-date-picker.js +25 -6
  60. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  61. package/dist/src/nile-popover/nile-popover.d.ts +6 -0
  62. package/dist/src/nile-popover/nile-popover.js +21 -2
  63. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  64. package/dist/src/nile-select/nile-select.css.d.ts +5 -5
  65. package/dist/src/nile-select/nile-select.css.js +9 -5
  66. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  67. package/dist/src/nile-select/nile-select.js +17 -3
  68. package/dist/src/nile-select/nile-select.js.map +1 -1
  69. package/dist/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +2 -2
  71. package/src/nile-button/nile-button.css.ts +41 -0
  72. package/src/nile-button/nile-button.ts +2 -1
  73. package/src/nile-calendar/nile-calendar.css.ts +10 -2
  74. package/src/nile-calendar/nile-calendar.ts +206 -80
  75. package/src/nile-date-picker/nile-date-picker.ts +21 -7
  76. package/src/nile-popover/nile-popover.ts +20 -2
  77. package/src/nile-select/nile-select.css.ts +9 -5
  78. package/src/nile-select/nile-select.ts +19 -6
@@ -1,4 +1,4 @@
1
- import{i as o}from"../index-cd2f9c12.esm.js";const t=o`
1
+ import{i as t}from"../index-cd2f9c12.esm.js";const o=t`
2
2
  :host {
3
3
  display: inline-block;
4
4
  position: relative;
@@ -157,6 +157,35 @@ import{i as o}from"../index-cd2f9c12.esm.js";const t=o`
157
157
  box-shadow: none;
158
158
  }
159
159
 
160
+ /* ghost */
161
+ .button--standard.button--ghost{
162
+ background-color: var(--nile-colors-button-tertiary);
163
+ border-color: transparent;
164
+ color: var(--nile-colors-button-tertiary-text);
165
+ }
166
+
167
+ .button--standard.button--ghost:hover:not(.button--disabled) {
168
+ background-color: var(--nile-colors-button-tertiary-hover);
169
+ border-color: transparent;
170
+ color: var(--nile-colors-button-tertiary-text);
171
+ }
172
+
173
+ .button--standard.button--ghost:active:not(.button--disabled) {
174
+ background-color: var(--nile-colors-button-tertiary-pressed);
175
+ border-color:transparent;
176
+ color: var(--nile-colors-button-tertiary-text);
177
+ }
178
+
179
+ .button--standard.button--ghost.button--disabled,
180
+ .button--standard.button--ghost.button--disabled:hover,
181
+ .button--standard.button--ghost.button--disabled:active {
182
+ border-color:transparent;
183
+ background-color: var(--nile-colors-button-tertiary-disabled);
184
+ color: var(--nile-colors-button-tertiary-disabled-text);
185
+ cursor: not-allowed;
186
+ box-shadow: none;
187
+ }
188
+
160
189
  /* caution */
161
190
  .button--standard.button--caution {
162
191
  background-color: var(--nile-colors-button-caution);
@@ -221,6 +250,18 @@ import{i as o}from"../index-cd2f9c12.esm.js";const t=o`
221
250
  --nile-svg-fill: var(--nile-colors-button-tertiary-disabled-text) !important;
222
251
  }
223
252
 
253
+ /* Ghost Variant */
254
+ .button--standard.button--ghost ::slotted(nile-icon) {
255
+ --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
256
+ }
257
+ .button--standard.button--ghost:hover:not(.button--disabled) ::slotted(nile-icon),
258
+ .button--standard.button--ghost:active:not(.button--disabled) ::slotted(nile-icon) {
259
+ --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
260
+ }
261
+ .button--standard.button--ghost ::slotted(nile-icon) {
262
+ --nile-svg-fill: var(--nile-colors-button-tertiary-disabled-text) !important;
263
+ }
264
+
224
265
  /* Caution Variant */
225
266
  .button--standard.button--caution ::slotted(nile-icon) {
226
267
  --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
@@ -433,4 +474,4 @@ import{i as o}from"../index-cd2f9c12.esm.js";const t=o`
433
474
  pointer-events: none;
434
475
  }
435
476
 
436
- `;export{t as s};
477
+ `;export{o as s};
@@ -1,7 +1,7 @@
1
1
  import{__decorate as i}from"tslib";import"../nile-icon/index.esm.js";import{classMap as s}from"lit/directives/class-map.js";import{query as o,state as n,property as e,customElement as c}from"lit/decorators.js";import{F as t,v as m}from"../internal/form.esm.js";import{H as r}from"../internal/slot.esm.js";import{literal as l,html as p}from"lit/static-html.js";import{ifDefined as g}from"lit/directives/if-defined.js";import{w as v}from"../internal/watch.esm.js";import{s as a}from"./nile-button.css.esm.js";import{N as j}from"../internal/nile-element.esm.js";import"lit";import"lit/directives/unsafe-svg.js";import"../nile-icon/icons/svg/index.esm.js";import"../nile-icon/icons/svg/accessreview.esm.js";import"../nile-icon/icons/svg/action.esm.js";import"../nile-icon/icons/svg/actionworkflow.esm.js";import"../nile-icon/icons/svg/address.esm.js";import"../nile-icon/icons/svg/agent.esm.js";import"../nile-icon/icons/svg/agents.esm.js";import"../nile-icon/icons/svg/aggregation.esm.js";import"../nile-icon/icons/svg/allapplication.esm.js";import"../nile-icon/icons/svg/allsearch.esm.js";import"../nile-icon/icons/svg/anomaly.esm.js";import"../nile-icon/icons/svg/api.esm.js";import"../nile-icon/icons/svg/application.esm.js";import"../nile-icon/icons/svg/applications.esm.js";import"../nile-icon/icons/svg/apply-filter.esm.js";import"../nile-icon/icons/svg/approve.esm.js";import"../nile-icon/icons/svg/aquera.esm.js";import"../nile-icon/icons/svg/aquerasupport.esm.js";import"../nile-icon/icons/svg/array-loop.esm.js";import"../nile-icon/icons/svg/array.esm.js";import"../nile-icon/icons/svg/arrayofobject.esm.js";import"../nile-icon/icons/svg/arrow.esm.js";import"../nile-icon/icons/svg/arrowdown.esm.js";import"../nile-icon/icons/svg/arrowdropdown.esm.js";import"../nile-icon/icons/svg/arrowdropup.esm.js";import"../nile-icon/icons/svg/arrowleft.esm.js";import"../nile-icon/icons/svg/arrowright.esm.js";import"../nile-icon/icons/svg/arrowup.esm.js";import"../nile-icon/icons/svg/attribute-map-analysis-icon.esm.js";import"../nile-icon/icons/svg/attributemap.esm.js";import"../nile-icon/icons/svg/back.esm.js";import"../nile-icon/icons/svg/bar-chart-square-02.esm.js";import"../nile-icon/icons/svg/bargraph.esm.js";import"../nile-icon/icons/svg/basic.esm.js";import"../nile-icon/icons/svg/bell-icon.esm.js";import"../nile-icon/icons/svg/bell.esm.js";import"../nile-icon/icons/svg/block.esm.js";import"../nile-icon/icons/svg/bluedot.esm.js";import"../nile-icon/icons/svg/boolean.esm.js";import"../nile-icon/icons/svg/border_all.esm.js";import"../nile-icon/icons/svg/bulk-sync.esm.js";import"../nile-icon/icons/svg/button-loading-black.esm.js";import"../nile-icon/icons/svg/button-loading-blue-animated.esm.js";import"../nile-icon/icons/svg/button-loading-blue.esm.js";import"../nile-icon/icons/svg/button-loading-white.esm.js";import"../nile-icon/icons/svg/calendar.esm.js";import"../nile-icon/icons/svg/cancel.esm.js";import"../nile-icon/icons/svg/cases.esm.js";import"../nile-icon/icons/svg/caution.esm.js";import"../nile-icon/icons/svg/cell-loader.esm.js";import"../nile-icon/icons/svg/certification.esm.js";import"../nile-icon/icons/svg/check-done-01.esm.js";import"../nile-icon/icons/svg/check-done-02.esm.js";import"../nile-icon/icons/svg/chevron-down.esm.js";import"../nile-icon/icons/svg/chevron-up.esm.js";import"../nile-icon/icons/svg/close.esm.js";import"../nile-icon/icons/svg/collapse-1.esm.js";import"../nile-icon/icons/svg/collapse.esm.js";import"../nile-icon/icons/svg/color.esm.js";import"../nile-icon/icons/svg/columns-03.esm.js";import"../nile-icon/icons/svg/combo1.esm.js";import"../nile-icon/icons/svg/compact.esm.js";import"../nile-icon/icons/svg/compare-tiles.esm.js";import"../nile-icon/icons/svg/component-menu.esm.js";import"../nile-icon/icons/svg/component.esm.js";import"../nile-icon/icons/svg/componentblock.esm.js";import"../nile-icon/icons/svg/components-icon.esm.js";import"../nile-icon/icons/svg/componenttext.esm.js";import"../nile-icon/icons/svg/condition.esm.js";import"../nile-icon/icons/svg/conditions.esm.js";import"../nile-icon/icons/svg/connect.esm.js";import"../nile-icon/icons/svg/connectivitymap.esm.js";import"../nile-icon/icons/svg/connectorrightarrow.esm.js";import"../nile-icon/icons/svg/continuous.esm.js";import"../nile-icon/icons/svg/copy.esm.js";import"../nile-icon/icons/svg/cor-analysis.esm.js";import"../nile-icon/icons/svg/correlation.esm.js";import"../nile-icon/icons/svg/create.esm.js";import"../nile-icon/icons/svg/createuser.esm.js";import"../nile-icon/icons/svg/custom.esm.js";import"../nile-icon/icons/svg/dashboard.esm.js";import"../nile-icon/icons/svg/data-type-array.esm.js";import"../nile-icon/icons/svg/data-type-boolean.esm.js";import"../nile-icon/icons/svg/data-type-expression.esm.js";import"../nile-icon/icons/svg/data-type-json.esm.js";import"../nile-icon/icons/svg/data-type-null.esm.js";import"../nile-icon/icons/svg/data-type-number.esm.js";import"../nile-icon/icons/svg/data-type-persistent-variable.esm.js";import"../nile-icon/icons/svg/data-type-string.esm.js";import"../nile-icon/icons/svg/data-type-unknown.esm.js";import"../nile-icon/icons/svg/data-type-variable.esm.js";import"../nile-icon/icons/svg/database-1.esm.js";import"../nile-icon/icons/svg/database.esm.js";import"../nile-icon/icons/svg/databaseview.esm.js";import"../nile-icon/icons/svg/default-1.esm.js";import"../nile-icon/icons/svg/default-cursor.esm.js";import"../nile-icon/icons/svg/default.esm.js";import"../nile-icon/icons/svg/delegate.esm.js";import"../nile-icon/icons/svg/delete.esm.js";import"../nile-icon/icons/svg/deleteuser.esm.js";import"../nile-icon/icons/svg/deligateduser.esm.js";import"../nile-icon/icons/svg/directory.esm.js";import"../nile-icon/icons/svg/disabled.esm.js";import"../nile-icon/icons/svg/document.esm.js";import"../nile-icon/icons/svg/done.esm.js";import"../nile-icon/icons/svg/dontmap.esm.js";import"../nile-icon/icons/svg/donut.esm.js";import"../nile-icon/icons/svg/dots-grid.esm.js";import"../nile-icon/icons/svg/doublearrowleft.esm.js";import"../nile-icon/icons/svg/doublearrowright.esm.js";import"../nile-icon/icons/svg/dowhileloop.esm.js";import"../nile-icon/icons/svg/downarrow.esm.js";import"../nile-icon/icons/svg/downgrade.esm.js";import"../nile-icon/icons/svg/download.esm.js";import"../nile-icon/icons/svg/drag.esm.js";import"../nile-icon/icons/svg/draglist.esm.js";import"../nile-icon/icons/svg/droparrow.esm.js";import"../nile-icon/icons/svg/dropdown.esm.js";import"../nile-icon/icons/svg/edit-pencil.esm.js";import"../nile-icon/icons/svg/edit-write.esm.js";import"../nile-icon/icons/svg/else.esm.js";import"../nile-icon/icons/svg/email.esm.js";import"../nile-icon/icons/svg/enable.esm.js";import"../nile-icon/icons/svg/enabled.esm.js";import"../nile-icon/icons/svg/entities.esm.js";import"../nile-icon/icons/svg/entitlement.esm.js";import"../nile-icon/icons/svg/error.esm.js";import"../nile-icon/icons/svg/escalate.esm.js";import"../nile-icon/icons/svg/event.esm.js";import"../nile-icon/icons/svg/every.esm.js";import"../nile-icon/icons/svg/exactmatch.esm.js";import"../nile-icon/icons/svg/execute.esm.js";import"../nile-icon/icons/svg/expand-1.esm.js";import"../nile-icon/icons/svg/expand-2.esm.js";import"../nile-icon/icons/svg/expand.esm.js";import"../nile-icon/icons/svg/eye.esm.js";import"../nile-icon/icons/svg/eyeclosed.esm.js";import"../nile-icon/icons/svg/featured-icon.esm.js";import"../nile-icon/icons/svg/file-shield-02.esm.js";import"../nile-icon/icons/svg/file-type-icon.esm.js";import"../nile-icon/icons/svg/file.esm.js";import"../nile-icon/icons/svg/filter-1.esm.js";import"../nile-icon/icons/svg/filter.esm.js";import"../nile-icon/icons/svg/fingerprint-03.esm.js";import"../nile-icon/icons/svg/firewall.esm.js";import"../nile-icon/icons/svg/firewallagent.esm.js";import"../nile-icon/icons/svg/flow-h.esm.js";import"../nile-icon/icons/svg/flow.esm.js";import"../nile-icon/icons/svg/flowmap-agent.esm.js";import"../nile-icon/icons/svg/flowmap-application.esm.js";import"../nile-icon/icons/svg/flowmap-aquera.esm.js";import"../nile-icon/icons/svg/flowmap-block.esm.js";import"../nile-icon/icons/svg/flowmap-cancel.esm.js";import"../nile-icon/icons/svg/flowmap-colorpalatte.esm.js";import"../nile-icon/icons/svg/flowmap-drag.esm.js";import"../nile-icon/icons/svg/flowmap-ellipsis.esm.js";import"../nile-icon/icons/svg/flowmap-firewall-agent.esm.js";import"../nile-icon/icons/svg/flowmap-firewall.esm.js";import"../nile-icon/icons/svg/flowmap-gateway.esm.js";import"../nile-icon/icons/svg/flowmap-hand.esm.js";import"../nile-icon/icons/svg/flowmap-orchestration.esm.js";import"../nile-icon/icons/svg/flowmap-redo.esm.js";import"../nile-icon/icons/svg/flowmap-section.esm.js";import"../nile-icon/icons/svg/flowmap-text.esm.js";import"../nile-icon/icons/svg/flowmap-undo.esm.js";import"../nile-icon/icons/svg/flowmap-workflow.esm.js";import"../nile-icon/icons/svg/flowmap.esm.js";import"../nile-icon/icons/svg/folder.esm.js";import"../nile-icon/icons/svg/foreach.esm.js";import"../nile-icon/icons/svg/form.esm.js";import"../nile-icon/icons/svg/frequency.esm.js";import"../nile-icon/icons/svg/fullscreen.esm.js";import"../nile-icon/icons/svg/fullscreenexit.esm.js";import"../nile-icon/icons/svg/fullscreenshrink.esm.js";import"../nile-icon/icons/svg/funnel.esm.js";import"../nile-icon/icons/svg/gateway.esm.js";import"../nile-icon/icons/svg/general.esm.js";import"../nile-icon/icons/svg/generationphase.esm.js";import"../nile-icon/icons/svg/global-search.esm.js";import"../nile-icon/icons/svg/globe.esm.js";import"../nile-icon/icons/svg/goto.esm.js";import"../nile-icon/icons/svg/graph.esm.js";import"../nile-icon/icons/svg/graphedit.esm.js";import"../nile-icon/icons/svg/greendot.esm.js";import"../nile-icon/icons/svg/greydot.esm.js";import"../nile-icon/icons/svg/greylightdot.esm.js";import"../nile-icon/icons/svg/group-analysis-icon.esm.js";import"../nile-icon/icons/svg/group.esm.js";import"../nile-icon/icons/svg/groupby.esm.js";import"../nile-icon/icons/svg/groups.esm.js";import"../nile-icon/icons/svg/guide.esm.js";import"../nile-icon/icons/svg/handtool.esm.js";import"../nile-icon/icons/svg/header-actions.esm.js";import"../nile-icon/icons/svg/header-child-workflow.esm.js";import"../nile-icon/icons/svg/header-flows.esm.js";import"../nile-icon/icons/svg/header-functions.esm.js";import"../nile-icon/icons/svg/header-tasks.esm.js";import"../nile-icon/icons/svg/header-variable.esm.js";import"../nile-icon/icons/svg/help-1.esm.js";import"../nile-icon/icons/svg/help.esm.js";import"../nile-icon/icons/svg/helpandsupport.esm.js";import"../nile-icon/icons/svg/helpers.esm.js";import"../nile-icon/icons/svg/helpsupport.esm.js";import"../nile-icon/icons/svg/history.esm.js";import"../nile-icon/icons/svg/identitygraph.esm.js";import"../nile-icon/icons/svg/identityledger.esm.js";import"../nile-icon/icons/svg/if.esm.js";import"../nile-icon/icons/svg/ifelse.esm.js";import"../nile-icon/icons/svg/image.esm.js";import"../nile-icon/icons/svg/immutable.esm.js";import"../nile-icon/icons/svg/info-icon.esm.js";import"../nile-icon/icons/svg/info-icon1.esm.js";import"../nile-icon/icons/svg/info.esm.js";import"../nile-icon/icons/svg/info2.esm.js";import"../nile-icon/icons/svg/inprogress.esm.js";import"../nile-icon/icons/svg/integer.esm.js";import"../nile-icon/icons/svg/itemplaceholder.esm.js";import"../nile-icon/icons/svg/js.esm.js";import"../nile-icon/icons/svg/kill.esm.js";import"../nile-icon/icons/svg/laptop-01.esm.js";import"../nile-icon/icons/svg/layers-three-01.esm.js";import"../nile-icon/icons/svg/leftarrow.esm.js";import"../nile-icon/icons/svg/leftpointarrow.esm.js";import"../nile-icon/icons/svg/life-buoy-01.esm.js";import"../nile-icon/icons/svg/line.esm.js";import"../nile-icon/icons/svg/link.esm.js";import"../nile-icon/icons/svg/list-attribute.esm.js";import"../nile-icon/icons/svg/list.esm.js";import"../nile-icon/icons/svg/loader.esm.js";import"../nile-icon/icons/svg/loading.esm.js";import"../nile-icon/icons/svg/loading2.esm.js";import"../nile-icon/icons/svg/lock.esm.js";import"../nile-icon/icons/svg/log-info.esm.js";import"../nile-icon/icons/svg/log.esm.js";import"../nile-icon/icons/svg/logo-white.esm.js";import"../nile-icon/icons/svg/logout.esm.js";import"../nile-icon/icons/svg/logs.esm.js";import"../nile-icon/icons/svg/loop.esm.js";import"../nile-icon/icons/svg/manage.esm.js";import"../nile-icon/icons/svg/manageduser.esm.js";import"../nile-icon/icons/svg/map.esm.js";import"../nile-icon/icons/svg/mapcreate.esm.js";import"../nile-icon/icons/svg/mapdont.esm.js";import"../nile-icon/icons/svg/maponcreate.esm.js";import"../nile-icon/icons/svg/maponupdate.esm.js";import"../nile-icon/icons/svg/mapupdate.esm.js";import"../nile-icon/icons/svg/maximize.esm.js";import"../nile-icon/icons/svg/menu.esm.js";import"../nile-icon/icons/svg/message-notification-square.esm.js";import"../nile-icon/icons/svg/minus.esm.js";import"../nile-icon/icons/svg/moveleft.esm.js";import"../nile-icon/icons/svg/moveright.esm.js";import"../nile-icon/icons/svg/multiple-user.esm.js";import"../nile-icon/icons/svg/mute.esm.js";import"../nile-icon/icons/svg/next-down.esm.js";import"../nile-icon/icons/svg/next.esm.js";import"../nile-icon/icons/svg/no-anomaly.esm.js";import"../nile-icon/icons/svg/nomatch.esm.js";import"../nile-icon/icons/svg/not.esm.js";import"../nile-icon/icons/svg/note.esm.js";import"../nile-icon/icons/svg/notification.esm.js";import"../nile-icon/icons/svg/notificationadd.esm.js";import"../nile-icon/icons/svg/notificationadded.esm.js";import"../nile-icon/icons/svg/notscheduled.esm.js";import"../nile-icon/icons/svg/null.esm.js";import"../nile-icon/icons/svg/number.esm.js";import"../nile-icon/icons/svg/numberinput.esm.js";import"../nile-icon/icons/svg/numbers.esm.js";import"../nile-icon/icons/svg/object.esm.js";import"../nile-icon/icons/svg/operators.esm.js";import"../nile-icon/icons/svg/options.esm.js";import"../nile-icon/icons/svg/orchestration-solid.esm.js";import"../nile-icon/icons/svg/orchestration.esm.js";import"../nile-icon/icons/svg/organization.esm.js";import"../nile-icon/icons/svg/other.esm.js";import"../nile-icon/icons/svg/otherdetails.esm.js";import"../nile-icon/icons/svg/ou-analysis-icon.esm.js";import"../nile-icon/icons/svg/override.esm.js";import"../nile-icon/icons/svg/palletemenu.esm.js";import"../nile-icon/icons/svg/partner.esm.js";import"../nile-icon/icons/svg/partners.esm.js";import"../nile-icon/icons/svg/pause.esm.js";import"../nile-icon/icons/svg/pen.esm.js";import"../nile-icon/icons/svg/pencil.esm.js";import"../nile-icon/icons/svg/peopletask.esm.js";import"../nile-icon/icons/svg/persistent-variable.esm.js";import"../nile-icon/icons/svg/persistentdata.esm.js";import"../nile-icon/icons/svg/personaldetails.esm.js";import"../nile-icon/icons/svg/phone.esm.js";import"../nile-icon/icons/svg/pie.esm.js";import"../nile-icon/icons/svg/pin.esm.js";import"../nile-icon/icons/svg/placeholder-wf.esm.js";import"../nile-icon/icons/svg/play.esm.js";import"../nile-icon/icons/svg/plus-icon.esm.js";import"../nile-icon/icons/svg/plus.esm.js";import"../nile-icon/icons/svg/pluscircle.esm.js";import"../nile-icon/icons/svg/plussquare.esm.js";import"../nile-icon/icons/svg/policy.esm.js";import"../nile-icon/icons/svg/potentialmatch.esm.js";import"../nile-icon/icons/svg/poweron.esm.js";import"../nile-icon/icons/svg/predefined.esm.js";import"../nile-icon/icons/svg/prev-up.esm.js";import"../nile-icon/icons/svg/prev.esm.js";import"../nile-icon/icons/svg/preview.esm.js";import"../nile-icon/icons/svg/privilage.esm.js";import"../nile-icon/icons/svg/privilege.esm.js";import"../nile-icon/icons/svg/privilegeobject.esm.js";import"../nile-icon/icons/svg/process.esm.js";import"../nile-icon/icons/svg/professionaldetails.esm.js";import"../nile-icon/icons/svg/question.esm.js";import"../nile-icon/icons/svg/radio.esm.js";import"../nile-icon/icons/svg/radioactive.esm.js";import"../nile-icon/icons/svg/radiodone.esm.js";import"../nile-icon/icons/svg/read.esm.js";import"../nile-icon/icons/svg/readexpression.esm.js";import"../nile-icon/icons/svg/readonly.esm.js";import"../nile-icon/icons/svg/readonlyuser.esm.js";import"../nile-icon/icons/svg/readuser.esm.js";import"../nile-icon/icons/svg/reddot.esm.js";import"../nile-icon/icons/svg/redo.esm.js";import"../nile-icon/icons/svg/refresh.esm.js";import"../nile-icon/icons/svg/reminder.esm.js";import"../nile-icon/icons/svg/resize.esm.js";import"../nile-icon/icons/svg/resource.esm.js";import"../nile-icon/icons/svg/returnvalue.esm.js";import"../nile-icon/icons/svg/revocationcycle.esm.js";import"../nile-icon/icons/svg/revokation-cycle.esm.js";import"../nile-icon/icons/svg/rightarrow.esm.js";import"../nile-icon/icons/svg/role.esm.js";import"../nile-icon/icons/svg/rolemanager.esm.js";import"../nile-icon/icons/svg/run.esm.js";import"../nile-icon/icons/svg/save.esm.js";import"../nile-icon/icons/svg/schedule.esm.js";import"../nile-icon/icons/svg/schema.esm.js";import"../nile-icon/icons/svg/script.esm.js";import"../nile-icon/icons/svg/search-steps-icon.esm.js";import"../nile-icon/icons/svg/search.esm.js";import"../nile-icon/icons/svg/section.esm.js";import"../nile-icon/icons/svg/select.esm.js";import"../nile-icon/icons/svg/selectapplication.esm.js";import"../nile-icon/icons/svg/selectattributes.esm.js";import"../nile-icon/icons/svg/selectuser.esm.js";import"../nile-icon/icons/svg/send.esm.js";import"../nile-icon/icons/svg/sendemail.esm.js";import"../nile-icon/icons/svg/sendescalation.esm.js";import"../nile-icon/icons/svg/sendprompt.esm.js";import"../nile-icon/icons/svg/sendreminder.esm.js";import"../nile-icon/icons/svg/setting.esm.js";import"../nile-icon/icons/svg/settings-1.esm.js";import"../nile-icon/icons/svg/settings.esm.js";import"../nile-icon/icons/svg/shape.esm.js";import"../nile-icon/icons/svg/share.esm.js";import"../nile-icon/icons/svg/shield-01.esm.js";import"../nile-icon/icons/svg/smalltick.esm.js";import"../nile-icon/icons/svg/smartcode.esm.js";import"../nile-icon/icons/svg/sort.esm.js";import"../nile-icon/icons/svg/sortascending.esm.js";import"../nile-icon/icons/svg/sortdescending.esm.js";import"../nile-icon/icons/svg/sortdown.esm.js";import"../nile-icon/icons/svg/sortup.esm.js";import"../nile-icon/icons/svg/stop.esm.js";import"../nile-icon/icons/svg/storybook.esm.js";import"../nile-icon/icons/svg/string.esm.js";import"../nile-icon/icons/svg/stringinput.esm.js";import"../nile-icon/icons/svg/stringletters.esm.js";import"../nile-icon/icons/svg/support.esm.js";import"../nile-icon/icons/svg/swap.esm.js";import"../nile-icon/icons/svg/switch.esm.js";import"../nile-icon/icons/svg/sync.esm.js";import"../nile-icon/icons/svg/table-1.esm.js";import"../nile-icon/icons/svg/table.esm.js";import"../nile-icon/icons/svg/tag.esm.js";import"../nile-icon/icons/svg/test.esm.js";import"../nile-icon/icons/svg/text.esm.js";import"../nile-icon/icons/svg/textarea-expander.esm.js";import"../nile-icon/icons/svg/themes.esm.js";import"../nile-icon/icons/svg/thumbsdown.esm.js";import"../nile-icon/icons/svg/thumbsup.esm.js";import"../nile-icon/icons/svg/thumsup.esm.js";import"../nile-icon/icons/svg/tick.esm.js";import"../nile-icon/icons/svg/timeupdate.esm.js";import"../nile-icon/icons/svg/timezone.esm.js";import"../nile-icon/icons/svg/trash-no-fill.esm.js";import"../nile-icon/icons/svg/trash.esm.js";import"../nile-icon/icons/svg/trigger.esm.js";import"../nile-icon/icons/svg/undo-1.esm.js";import"../nile-icon/icons/svg/undo.esm.js";import"../nile-icon/icons/svg/unmute.esm.js";import"../nile-icon/icons/svg/uparrow.esm.js";import"../nile-icon/icons/svg/update.esm.js";import"../nile-icon/icons/svg/updateuser.esm.js";import"../nile-icon/icons/svg/updown.esm.js";import"../nile-icon/icons/svg/upgrade.esm.js";import"../nile-icon/icons/svg/upload.esm.js";import"../nile-icon/icons/svg/user-03.esm.js";import"../nile-icon/icons/svg/user-analysis-icon.esm.js";import"../nile-icon/icons/svg/user-group.esm.js";import"../nile-icon/icons/svg/user-inactive.esm.js";import"../nile-icon/icons/svg/user-selection.esm.js";import"../nile-icon/icons/svg/user-square.esm.js";import"../nile-icon/icons/svg/user.esm.js";import"../nile-icon/icons/svg/useractive.esm.js";import"../nile-icon/icons/svg/useradd.esm.js";import"../nile-icon/icons/svg/useraddgroup.esm.js";import"../nile-icon/icons/svg/userfind.esm.js";import"../nile-icon/icons/svg/userimport.esm.js";import"../nile-icon/icons/svg/userimportgroup.esm.js";import"../nile-icon/icons/svg/usermixed.esm.js";import"../nile-icon/icons/svg/userremove-1.esm.js";import"../nile-icon/icons/svg/userremove-2.esm.js";import"../nile-icon/icons/svg/userremove.esm.js";import"../nile-icon/icons/svg/userremovegroup.esm.js";import"../nile-icon/icons/svg/users-01.esm.js";import"../nile-icon/icons/svg/users-02.esm.js";import"../nile-icon/icons/svg/users-plus.esm.js";import"../nile-icon/icons/svg/users.esm.js";import"../nile-icon/icons/svg/userupdate.esm.js";import"../nile-icon/icons/svg/validationexpression.esm.js";import"../nile-icon/icons/svg/variable-global.esm.js";import"../nile-icon/icons/svg/variable-local-1.esm.js";import"../nile-icon/icons/svg/variable-local.esm.js";import"../nile-icon/icons/svg/variable-new-1.esm.js";import"../nile-icon/icons/svg/variable-new.esm.js";import"../nile-icon/icons/svg/variable.esm.js";import"../nile-icon/icons/svg/video.esm.js";import"../nile-icon/icons/svg/view.esm.js";import"../nile-icon/icons/svg/virtualserver.esm.js";import"../nile-icon/icons/svg/virtualservergroup.esm.js";import"../nile-icon/icons/svg/visibility.esm.js";import"../nile-icon/icons/svg/visibilityoff.esm.js";import"../nile-icon/icons/svg/wait.esm.js";import"../nile-icon/icons/svg/warning.esm.js";import"../nile-icon/icons/svg/while.esm.js";import"../nile-icon/icons/svg/whileloop.esm.js";import"../nile-icon/icons/svg/workflow-application.esm.js";import"../nile-icon/icons/svg/workflow-orchestration.esm.js";import"../nile-icon/icons/svg/workflow-section.esm.js";import"../nile-icon/icons/svg/workflow-solid.esm.js";import"../nile-icon/icons/svg/workflow-text.esm.js";import"../nile-icon/icons/svg/workflow.esm.js";import"../nile-icon/icons/svg/writeexpression.esm.js";import"../index-cd2f9c12.esm.js";let d=class extends j{constructor(){super(...arguments),this.formControlController=new t(this,{form:i=>{if(i.hasAttribute("form")){const s=i.getRootNode(),o=i.getAttribute("form");return s.getElementById(o)}return i.closest("form")},assumeInteractionOn:["click"]}),this.hasSlotController=new r(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="primary",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:m}get validationMessage(){return this.isButton()?this.button.validationMessage:""}connectedCallback(){super.connectedCallback(),this.handleHostClick=this.handleHostClick.bind(this),this.addEventListener("click",this.handleHostClick),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.emit("nile-destroy")}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleHostClick(i){(this.disabled||this.loading)&&(i.preventDefault(),i.stopImmediatePropagation())}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(i){this.button.focus(i)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(i){this.isButton()&&(this.button.setCustomValidity(i),this.formControlController.updateValidity())}render(){const i=this.isLink(),o=i?l`a`:l`button`;return p`
2
2
  <${o}
3
3
  part="base"
4
- class=${s({button:!0,"button--primary":"primary"===this.variant,"button--secondary":"secondary"===this.variant,"button--tertiary":"tertiary"===this.variant,"button--caution":"caution"===this.variant,"button--medium":"medium"===this.size,"button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
4
+ class=${s({button:!0,"button--primary":"primary"===this.variant,"button--secondary":"secondary"===this.variant,"button--tertiary":"tertiary"===this.variant,"button--caution":"caution"===this.variant,"button--ghost":"ghost"===this.variant,"button--medium":"medium"===this.size,"button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
5
5
  ?disabled=${g(i?void 0:this.disabled)}
6
6
  type=${g(i?void 0:this.type)}
7
7
  title=${this.title}
@@ -1,2 +1,2 @@
1
- System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-calendar.css.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-0f6a51ec.cjs.js","lit","lit/directives/class-map.js","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,n,a,l,h,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,r;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){n=_nileCalendarCssCjsJs.s;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){h=_property002CjsJs.n;},function(_lit){},function(_litDirectivesClassMapJs){},function(_nilePopupNilePopupCssCjsJs){}],execute:function(){_export("N",r=/*#__PURE__*/function(_l){_inherits(r,_l);var _super=_createSuper(r);function r(){var _this;_classCallCheck(this,r);_this=_super.apply(this,arguments),_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.dropDownOpened=!1,_this.valueAttribute=null,_this.formattedDate=null,_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.range=!1,_this.type="absolute",_this.selectedTimeZone="local";return _this;}_createClass(r,[{key:"valueChanged",value:function valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){var _t=this.value.getTimezoneOffset(),_i=new Date(this.value.getTime()-60*_t*1e3);isNaN(_i.getTime())||(this.valueAttribute=_i.toISOString().split("T")[0],this.formattedDate="".concat(String(_i.getDate()).padStart(2,"0"),"/").concat(String(_i.getMonth()+1).padStart(2,"0"),"/").concat(_i.getFullYear()));}}},{key:"updated",value:function updated(t){if(_get(_getPrototypeOf(r.prototype),"updated",this).call(this,t),t.has("valueAttribute")){var _t2=new Date(this.valueAttribute||"");if(!isNaN(_t2.getTime())){var _i2=_t2.getTimezoneOffset();this.value=new Date(_t2.getTime()-60*_i2*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(t,i,s){"value"===t?(this.valueAttribute=s,this.initializeValue()):"range"===t&&(this.range=null!==s);}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null;}catch(t){}else if(this.valueAttribute){var _t4;_t4=new Date(this.valueAttribute),_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null);}this.requestUpdate();}},{key:"connectedCallback",value:function connectedCallback(){if(_get(_getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this.initializeValue(),this.valueAttribute){var _t5=new Date(this.valueAttribute);isNaN(_t5.getTime())||(this.value=_t5,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(r.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"getDaysArray",value:function getDaysArray(t,i){var s=new Date(t,i+1,0).getDate();return Array.from({length:s},function(t,i){return i+1;});}},{key:"nextMonth",value:function nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate();}},{key:"prevMonth",value:function prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate();}},{key:"selectDate",value:function selectDate(t,i,s){var e=new Date(s,i,t);if(this.range){if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=e,this.endDate&&e>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&e<this.startDate)this.startDate=e,this.endDate=null,this.isSelectingStart=!1;else{var _t6=e;_t6.setHours(23,59,59,999),this.endDate=_t6;}}else this.value=e,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate();}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate});}},{key:"convertTZ",value:function convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}));}},{key:"isCurrentDate",value:function isCurrentDate(t,i,s){var e=new Date();return t===e.getDate()&&i+1===e.getMonth()+1&&s===e.getFullYear();}},{key:"renderMonth",value:function renderMonth(t,s,e){var _this2=this;var n=new Date(t,s,1).getDay(),a=new Date(t,s+1,0).getDay(),l=this.getDaysArray(0===s?t-1:t,0===s?11:s-1),h=this.getDaysArray(11===s?t+1:t,11===s?0:s+1),_r=l.slice(l.length-n),d=h.slice(0,6-a),u=[].concat(_toConsumableArray(_r),_toConsumableArray(e),_toConsumableArray(d)),o=function o(t,i,s,e){if(!e)return"";if(!_this2.range&&_this2.value){if(t===_this2.value.getDate()&&i===_this2.value.getMonth()&&s===_this2.value.getFullYear())return"selected-date";}var n=_this2.startDate&&t===_this2.startDate.getDate()&&i===_this2.startDate.getMonth()&&s===_this2.startDate.getFullYear(),a=_this2.endDate&&t===_this2.endDate.getDate()&&i===_this2.endDate.getMonth()&&s===_this2.endDate.getFullYear();return n?"range-start":a?"range-end":"";},c=function c(t,i,s,e){if(!e)return!1;if(_this2.startDate&&_this2.endDate){var _e=new Date(s,i,t);return _e>=_this2.startDate&&_e<=_this2.endDate;}return!1;};return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\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=\"","\"\n >\n </nile-icon>\n <span\n >","\n ","</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"","\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ","\n </div>\n </div>\n "])),this.prevMonth,new Date(t,s).toLocaleString("default",{month:"long"}),t,this.nextMonth,u.map(function(n,a){var l=a>=_r.length&&a<_r.length+e.length;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div\n class=\"day "," "," ","\n ","\n \"\n @click=\"","\"\n >\n ","\n </div>"])),o(n,s,t,l),c(n,s,t,l)?"in-range":"",l?"":"filler",_this2.isCurrentDate(n,s,t)&&l?"current-date":"",function(){l&&_this2.selectDate(n,s,t);},n);}));}},{key:"formatDate",value:function formatDate(t){if(!t)return"";return"".concat(String(t.getDate()).padStart(2,"0"),"/").concat(String(t.getMonth()+1).padStart(2,"0"),"/").concat(t.getFullYear());}},{key:"formatDateRange",value:function formatDateRange(t){return t?t.startDate&&t.endDate?"".concat(this.formatDate(t.startDate)," - ").concat(this.formatDate(t.endDate)):"":t;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate();}},{key:"handleEndDateInput",value:function handleEndDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate();}},{key:"parseDate",value:function parseDate(t){var _t$split$map=t.split("/").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),i=_t$split$map2[0],s=_t$split$map2[1],e=_t$split$map2[2],n=new Date(e,s-1,i);return isNaN(n.getTime())?null:n;}},{key:"isValidDateInput",value:function isValidDateInput(t){return /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map3=t.split(":").map(Number),_t$split$map4=_slicedToArray(_t$split$map3,3),s=_t$split$map4[0],e=_t$split$map4[1],n=_t$split$map4[2],a=new Date(i.getTime());return a.setHours(s,e,n),a;}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"setType",value:function setType(t){this.type=t;}},{key:"createRelativePeriod",value:function createRelativePeriod(t,i){var s=new Date(),e=new Date();switch(t){case"minutes":e.setMinutes(e.getMinutes()-i);break;case"hours":e.setHours(e.getHours()-i);break;case"days":e.setDate(e.getDate()-i);break;case"weeks":e.setDate(e.getDate()-7*i);break;case"months":e.setMonth(e.getMonth()-i);}return this.startDate=new Date(e.getTime()),this.endDate=new Date(s.getTime()),this.requestUpdate(),{startDate:this.startDate,endDate:this.endDate};}},{key:"handleTimeValueClick",value:function handleTimeValueClick(t,i,s){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i,this.requestUpdate();}},{key:"renderTimeValues",value:function renderTimeValues(t,s){var _this3=this;return s.map(function(s){return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n class=\"time-value ","\"\n @click=","\n >\n ","\n </div>\n "])),_this3.selectedUnit===t&&_this3.selectedValue===s?"time-value--selected":"",function(i){return _this3.handleTimeValueClick(t,s,i);},s);});}},{key:"handleDurationChange",value:function handleDurationChange(t){this.selectedValue=Number(t.detail.value),this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleUnitChange",value:function handleUnitChange(t){this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleTimeZoneChange",value:function handleTimeZoneChange(t){this.selectedTimeZone=t.detail.value,this.requestUpdate();}},{key:"onTypeChange",value:function onTypeChange(t){this.type=t.detail.value;}},{key:"render",value:function render(){this.getDaysArray(this.currentYear,this.currentMonth);var t=(this.currentMonth+1)%12,s=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(s,t),i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n class=\"base "," ","\"\n >\n <div class=\"calendar-config ","\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"","\">\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 <div class=\"calendar-timezone ","\">\n <nile-select\n hoist\n value=","\n @nile-change=","\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ","\"\n >\n <div class=\"calendar-container ","\">\n ","\n </div>\n </div>\n\n <div class=\"unit-container ","\">\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ","\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ","\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ","\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ","\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ","\n </div>\n </div>\n </div>\n\n ","\n ","\n </div>\n "])),this.range?"base__range":"","relative"===this.type?"base__relative":"",this.range?"":"hidden",this.onTypeChange,this.range?"":"hidden",this.selectedTimeZone,this.handleTimeZoneChange,"absolute"!==this.type?"hidden":"",this.range?"with-margin":"",this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),"relative"!==this.type?"hidden":"",this.renderTimeValues("minutes",[1,5,15,30,45]),this.renderTimeValues("hours",[1,2,3,6,8,12]),this.renderTimeValues("days",[1,2,3,4,5,6]),this.renderTimeValues("weeks",[1,2,4,6]),this.renderTimeValues("months",[3,6,12,15]),this.range&&"relative"===this.type?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"","\"\n @nile-input=\"","\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"","\"\n @nile-change=\"","\"\n >\n <nile-option value=\"minutes\"> Minutes </nile-option>\n <nile-option value=\"hours\"> Hours </nile-option>\n <nile-option value=\"days\"> Days </nile-option>\n <nile-option value=\"weeks\"> Weeks </nile-option>\n <nile-option value=\"months\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n "])),this.selectedValue,this.handleDurationChange,this.selectedUnit,this.handleUnitChange,!this.startDate||!this.endDate,this.confimRange):"",this.range&&"absolute"===this.type?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div class=\"calender-input\">\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n\n </div>\n<br>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n </div>\n "])),this.formatDate(this.startDate),this.handleStartDateInput,this.formatTime(this.startDate),this.handleStartTimeInput,this.formatDate(this.endDate),this.handleEndDateInput,this.formatTime(this.endDate),this.handleEndTimeInput,!this.startDate||!this.endDate,this.confimRange):"");}}],[{key:"styles",get:function get(){return[n];}},{key:"observedAttributes",get:function get(){return["value","range"];}}]);return r;}(l));t([s("nile-dropdown")],r.prototype,"dropdown",void 0),t([h({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([h({type:Object})],r.prototype,"value",void 0),t([h({type:Object})],r.prototype,"rangeValue",void 0),t([h({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([h({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([h({type:Object})],r.prototype,"startDate",void 0),t([h({type:Object})],r.prototype,"endDate",void 0),t([h({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([h({type:Boolean})],r.prototype,"range",void 0),t([h({type:String})],r.prototype,"type",void 0),t([h({type:String})],r.prototype,"selectedUnit",void 0),t([h({type:Number})],r.prototype,"selectedValue",void 0),t([h({type:String})],r.prototype,"selectedTimeZone",void 0),t([a("value")],r.prototype,"valueChanged",null),_export("N",r=t([e("nile-calendar")],r));}};});
1
+ System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-calendar.css.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-0f6a51ec.cjs.js","lit","lit/directives/class-map.js","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,a,h,l,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,r;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){e=_litDecoratorsJs.query;s=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){a=_nileCalendarCssCjsJs.s;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){d=_property002CjsJs.n;},function(_lit){},function(_litDirectivesClassMapJs){},function(_nilePopupNilePopupCssCjsJs){}],execute:function(){_export("N",r=/*#__PURE__*/function(_l){_inherits(r,_l);var _super=_createSuper(r);function r(){var _this;_classCallCheck(this,r);_this=_super.apply(this,arguments),_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.dropDownOpened=!1,_this.allowedDates={},_this.valueAttribute=null,_this.formattedDate=null,_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.range=!1,_this.type="absolute",_this.selectedTimeZone="local",_this.validAllowedDates=!0,_this.hideTimeInput=!1,_this.hideDurationFields=[],_this.hideTimeZone=!1;return _this;}_createClass(r,[{key:"firstUpdated",value:function firstUpdated(){var t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t);}catch(t){console.error("Error parsing allowed-dates attribute:",t);}else this.validAllowedDates=!1;}},{key:"checkValidAllowedDate",value:function checkValidAllowedDate(){var _this$allowedDates,_this$allowedDates2,_this$allowedDates3,_this$allowedDates4,_this$allowedDates5,_this$allowedDates6;if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);new Date(Date.UTC((_this$allowedDates=this.allowedDates)===null||_this$allowedDates===void 0||(_this$allowedDates=_this$allowedDates.startDate)===null||_this$allowedDates===void 0?void 0:_this$allowedDates.slice(0,4),((_this$allowedDates2=this.allowedDates)===null||_this$allowedDates2===void 0||(_this$allowedDates2=_this$allowedDates2.startDate)===null||_this$allowedDates2===void 0?void 0:_this$allowedDates2.slice(5,7))-1,(_this$allowedDates3=this.allowedDates)===null||_this$allowedDates3===void 0||(_this$allowedDates3=_this$allowedDates3.startDate)===null||_this$allowedDates3===void 0?void 0:_this$allowedDates3.slice(8,10)))>new Date(Date.UTC((_this$allowedDates4=this.allowedDates)===null||_this$allowedDates4===void 0||(_this$allowedDates4=_this$allowedDates4.endDate)===null||_this$allowedDates4===void 0?void 0:_this$allowedDates4.slice(0,4),((_this$allowedDates5=this.allowedDates)===null||_this$allowedDates5===void 0||(_this$allowedDates5=_this$allowedDates5.endDate)===null||_this$allowedDates5===void 0?void 0:_this$allowedDates5.slice(5,7))-1,(_this$allowedDates6=this.allowedDates)===null||_this$allowedDates6===void 0||(_this$allowedDates6=_this$allowedDates6.endDate)===null||_this$allowedDates6===void 0?void 0:_this$allowedDates6.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0;}},{key:"valueChanged",value:function valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){var _t=this.value.getTimezoneOffset(),_i=new Date(this.value.getTime()-60*_t*1e3);isNaN(_i.getTime())||(this.valueAttribute=_i.toISOString().split("T")[0],this.formattedDate="".concat(String(_i.getDate()).padStart(2,"0"),"/").concat(String(_i.getMonth()+1).padStart(2,"0"),"/").concat(_i.getFullYear()));}}},{key:"updated",value:function updated(t){if(_get(_getPrototypeOf(r.prototype),"updated",this).call(this,t),t.has("valueAttribute")){var _t2=new Date(this.valueAttribute||"");if(!isNaN(_t2.getTime())){var _i2=_t2.getTimezoneOffset();this.value=new Date(_t2.getTime()-60*_i2*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e);}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null;}catch(t){}else if(this.valueAttribute){var _t4;_t4=new Date(this.valueAttribute),_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null);}this.requestUpdate();}},{key:"connectedCallback",value:function connectedCallback(){if(_get(_getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this.initializeValue(),this.valueAttribute){var _t5=new Date(this.valueAttribute);isNaN(_t5.getTime())||(this.value=_t5,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(r.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"getDaysArray",value:function getDaysArray(t,i){var e=new Date(t,i+1,0).getDate();return Array.from({length:e},function(t,i){return i+1;});}},{key:"nextMonth",value:function nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate();}},{key:"prevMonth",value:function prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate();}},{key:"selectDate",value:function selectDate(t,i,e){var s=new Date(e,i,t);if(this.range){if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{var _t6=s;_t6.setHours(23,59,59,999),this.endDate=_t6;}}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate();}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate});}},{key:"convertTZ",value:function convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}));}},{key:"isCurrentDate",value:function isCurrentDate(t,i,e){var s=new Date();return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear();}},{key:"isAllowedDate",value:function isAllowedDate(t,i,e){var _this$allowedDates7,_this$allowedDates8,_this$allowedDates9,_this$allowedDates10,_this$allowedDates11,_this$allowedDates12;if(!this.validAllowedDates)return!0;var s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC((_this$allowedDates7=this.allowedDates)===null||_this$allowedDates7===void 0||(_this$allowedDates7=_this$allowedDates7.startDate)===null||_this$allowedDates7===void 0?void 0:_this$allowedDates7.slice(0,4),((_this$allowedDates8=this.allowedDates)===null||_this$allowedDates8===void 0||(_this$allowedDates8=_this$allowedDates8.startDate)===null||_this$allowedDates8===void 0?void 0:_this$allowedDates8.slice(5,7))-1,(_this$allowedDates9=this.allowedDates)===null||_this$allowedDates9===void 0||(_this$allowedDates9=_this$allowedDates9.startDate)===null||_this$allowedDates9===void 0?void 0:_this$allowedDates9.slice(8,10))),a=new Date(Date.UTC((_this$allowedDates10=this.allowedDates)===null||_this$allowedDates10===void 0||(_this$allowedDates10=_this$allowedDates10.endDate)===null||_this$allowedDates10===void 0?void 0:_this$allowedDates10.slice(0,4),((_this$allowedDates11=this.allowedDates)===null||_this$allowedDates11===void 0||(_this$allowedDates11=_this$allowedDates11.endDate)===null||_this$allowedDates11===void 0?void 0:_this$allowedDates11.slice(5,7))-1,(_this$allowedDates12=this.allowedDates)===null||_this$allowedDates12===void 0||(_this$allowedDates12=_this$allowedDates12.endDate)===null||_this$allowedDates12===void 0?void 0:_this$allowedDates12.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a;}},{key:"renderMonth",value:function renderMonth(t,e,s){var _this2=this;var n=new Date(t,e,1).getDay(),a=new Date(t,e+1,0).getDay(),h=this.getDaysArray(0===e?t-1:t,0===e?11:e-1),l=this.getDaysArray(11===e?t+1:t,11===e?0:e+1),d=h.slice(h.length-n),_r=l.slice(0,6-a),o=[].concat(_toConsumableArray(d),_toConsumableArray(s),_toConsumableArray(_r)),u=function u(t,i,e,s){if(!s)return"";if(!_this2.range&&_this2.value){if(t===_this2.value.getDate()&&i===_this2.value.getMonth()&&e===_this2.value.getFullYear())return"selected-date";}var n=_this2.startDate&&t===_this2.startDate.getDate()&&i===_this2.startDate.getMonth()&&e===_this2.startDate.getFullYear(),a=_this2.endDate&&t===_this2.endDate.getDate()&&i===_this2.endDate.getMonth()&&e===_this2.endDate.getFullYear();return n?"range-start":a?"range-end":"";},c=function c(t,i,e,s){if(!s)return!1;if(_this2.startDate&&_this2.endDate){var _s=new Date(e,i,t);return _s>=_this2.startDate&&_s<=_this2.endDate;}return!1;};return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\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=\"","\"\n >\n </nile-icon>\n <span\n >","\n ","</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"","\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ","\n </div>\n </div>\n "])),this.prevMonth,new Date(t,e).toLocaleString("default",{month:"long"}),t,this.nextMonth,o.map(function(n,a){var h=a>=d.length&&a<d.length+s.length;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div\n class=\"day\n ","\n "," "," "," ","\n ","\n \"\n @click=\"","\"\n >\n ","\n </div>"])),_this2.isAllowedDate(n,e,t)?"":"not-allowed",u(n,e,t,h),c(n,e,t,h),c(n,e,t,h)?"in-range":"",h?"":"filler",_this2.isCurrentDate(n,e,t)&&h?"current-date":"",function(){h&&_this2.selectDate(n,e,t);},n);}));}},{key:"formatDate",value:function formatDate(t){if(!t)return"";return"".concat(String(t.getDate()).padStart(2,"0"),"/").concat(String(t.getMonth()+1).padStart(2,"0"),"/").concat(t.getFullYear());}},{key:"formatDateRange",value:function formatDateRange(t){return t?t.startDate&&t.endDate?"".concat(this.formatDate(t.startDate)," - ").concat(this.formatDate(t.endDate)):"":t;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate();}},{key:"handleEndDateInput",value:function handleEndDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate();}},{key:"parseDate",value:function parseDate(t){var _t$split$map=t.split("/").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),i=_t$split$map2[0],e=_t$split$map2[1],s=_t$split$map2[2],n=new Date(s,e-1,i);return isNaN(n.getTime())?null:n;}},{key:"isValidDateInput",value:function isValidDateInput(t){return /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map3=t.split(":").map(Number),_t$split$map4=_slicedToArray(_t$split$map3,3),e=_t$split$map4[0],s=_t$split$map4[1],n=_t$split$map4[2],a=new Date(i.getTime());return a.setHours(e,s,n),a;}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"setType",value:function setType(t){this.type=t;}},{key:"createRelativePeriod",value:function createRelativePeriod(t,i){var e=new Date(),s=new Date();switch(t){case"minutes":s.setMinutes(s.getMinutes()-i);break;case"hours":s.setHours(s.getHours()-i);break;case"days":s.setDate(s.getDate()-i);break;case"weeks":s.setDate(s.getDate()-7*i);break;case"months":s.setMonth(s.getMonth()-i);}return this.startDate=new Date(s.getTime()),this.endDate=new Date(e.getTime()),this.requestUpdate(),{startDate:this.startDate,endDate:this.endDate};}},{key:"handleTimeValueClick",value:function handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i,this.requestUpdate();}},{key:"renderTimeValues",value:function renderTimeValues(t,e){var _this3=this;return e.map(function(e){return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n class=\"time-value ","\"\n @click=","\n >\n ","\n </div>\n "])),_this3.selectedUnit===t&&_this3.selectedValue===e?"time-value--selected":"",function(i){return _this3.handleTimeValueClick(t,e,i);},e);});}},{key:"handleDurationChange",value:function handleDurationChange(t){this.selectedValue=Number(t.detail.value),this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleUnitChange",value:function handleUnitChange(t){this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleTimeZoneChange",value:function handleTimeZoneChange(t){this.selectedTimeZone=t.detail.value,this.requestUpdate();}},{key:"onTypeChange",value:function onTypeChange(t){this.type=t.detail.value;}},{key:"render",value:function render(){var _this$hideDurationFie,_this$hideDurationFie2,_this$hideDurationFie3,_this$hideDurationFie4,_this$hideDurationFie5,_this$hideDurationFie6,_this$hideDurationFie7,_this$hideDurationFie8,_this$hideDurationFie9,_this$hideDurationFie10;this.getDaysArray(this.currentYear,this.currentMonth);var t=(this.currentMonth+1)%12,e=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(e,t),i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n class=\"base "," ","\"\n >\n <div class=\"calendar-config ","\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"","\">\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 <div class=\"calendar-timezone ","\">\n <nile-select\n hoist\n value=","\n @nile-change=","\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ","\"\n >\n <div class=\"calendar-container ","\">\n ","\n </div>\n </div>\n\n <div class=\"unit-container ","\">\n <div\n class=\"time-unit-group "," \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ","\n </div>\n </div>\n </div>\n\n ","\n ","\n </div>\n "])),this.range?"base__range":"","relative"===this.type?"base__relative":"",this.range?"":"hidden",this.onTypeChange,!this.range||this.hideTimeZone?"hidden":"",this.selectedTimeZone,this.handleTimeZoneChange,"absolute"!==this.type?"hidden":"",this.range?"with-margin":"",this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),"relative"!==this.type?"hidden":"",(_this$hideDurationFie=this.hideDurationFields)!==null&&_this$hideDurationFie!==void 0&&_this$hideDurationFie.includes("minutes")?"hidden":"",this.renderTimeValues("minutes",[1,5,15,30,45]),(_this$hideDurationFie2=this.hideDurationFields)!==null&&_this$hideDurationFie2!==void 0&&_this$hideDurationFie2.includes("hours")?"hidden":"",this.renderTimeValues("hours",[1,2,3,6,8,12]),(_this$hideDurationFie3=this.hideDurationFields)!==null&&_this$hideDurationFie3!==void 0&&_this$hideDurationFie3.includes("days")?"hidden":"",this.renderTimeValues("days",[1,2,3,4,5,6]),(_this$hideDurationFie4=this.hideDurationFields)!==null&&_this$hideDurationFie4!==void 0&&_this$hideDurationFie4.includes("weeks")?"hidden":"",this.renderTimeValues("weeks",[1,2,4,6]),(_this$hideDurationFie5=this.hideDurationFields)!==null&&_this$hideDurationFie5!==void 0&&_this$hideDurationFie5.includes("months")?"hidden":"",this.renderTimeValues("months",[3,6,12,15]),this.range&&"relative"===this.type?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"","\"\n @nile-input=\"","\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"","\"\n @nile-change=\"","\"\n >\n <nile-option value=\"minutes\" class=\"","\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"","\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"","\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"","\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"","\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n "])),this.selectedValue,this.handleDurationChange,this.selectedUnit,this.handleUnitChange,(_this$hideDurationFie6=this.hideDurationFields)!==null&&_this$hideDurationFie6!==void 0&&_this$hideDurationFie6.includes("minutes")?"hidden":"",(_this$hideDurationFie7=this.hideDurationFields)!==null&&_this$hideDurationFie7!==void 0&&_this$hideDurationFie7.includes("hours")?"hidden":"",(_this$hideDurationFie8=this.hideDurationFields)!==null&&_this$hideDurationFie8!==void 0&&_this$hideDurationFie8.includes("days")?"hidden":"",(_this$hideDurationFie9=this.hideDurationFields)!==null&&_this$hideDurationFie9!==void 0&&_this$hideDurationFie9.includes("weeks")?"hidden":"",(_this$hideDurationFie10=this.hideDurationFields)!==null&&_this$hideDurationFie10!==void 0&&_this$hideDurationFie10.includes("months")?"hidden":"",!this.startDate||!this.endDate,this.confimRange):"",this.range&&"absolute"===this.type?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input ","\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n \n <div> \n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input "," \" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n \n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n </div>\n "])),this.formatDate(this.startDate),this.handleStartDateInput,this.hideTimeInput?"hidden":"",this.formatTime(this.startDate),this.handleStartTimeInput,this.formatDate(this.endDate),this.handleEndDateInput,this.hideTimeInput?"hidden":"",this.formatTime(this.endDate),this.handleEndTimeInput,!this.startDate||!this.endDate,this.confimRange):"");}}],[{key:"styles",get:function get(){return[a];}},{key:"observedAttributes",get:function get(){return["value","range"];}}]);return r;}(l));t([e("nile-dropdown")],r.prototype,"dropdown",void 0),t([d({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([d({type:Object})],r.prototype,"value",void 0),t([d({type:Object,attribute:"allowed-dates"})],r.prototype,"allowedDates",void 0),t([d({type:Object})],r.prototype,"rangeValue",void 0),t([d({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([d({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([d({type:Object})],r.prototype,"startDate",void 0),t([d({type:Object})],r.prototype,"endDate",void 0),t([d({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([d({type:Boolean})],r.prototype,"range",void 0),t([d({type:String})],r.prototype,"type",void 0),t([d({type:String})],r.prototype,"selectedUnit",void 0),t([d({type:Number})],r.prototype,"selectedValue",void 0),t([d({type:String})],r.prototype,"selectedTimeZone",void 0),t([s()],r.prototype,"validAllowedDates",void 0),t([h("allowedDates")],r.prototype,"checkValidAllowedDate",null),t([d({type:Boolean,attribute:"hide-time-input"})],r.prototype,"hideTimeInput",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],r.prototype,"hideDurationFields",void 0),t([d({type:Boolean,attribute:"hide-time-zone"})],r.prototype,"hideTimeZone",void 0),t([h("value")],r.prototype,"valueChanged",null),_export("N",r=t([n("nile-calendar")],r));}};});
2
2
  //# sourceMappingURL=nile-calendar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"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-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\nimport { TIMEZONES } from './timezones';\n\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 private currentMonth: number = new Date().getMonth();\n\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value: any;\n\n @property({ type: Object }) rangeValue: any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n\n @property({ type: Object }) endDate: Date | null = null;\n\n @property({ type: Boolean }) isSelectingStart = true;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: String }) type = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: String }) selectedTimeZone: string = 'local';\n\n @watch('value')\n valueChanged() {\n if (this.range && this.value) {\n this.rangeValue = 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 this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n updated(changedProperties: PropertyValues) {\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 static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\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.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\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;\n\n 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 this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\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 private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\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 this.requestUpdate();\n }\n\n private 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.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n if (this.selectedTimeZone !== 'local') {\n this.startDate = this.convertTZ(this.startDate, this.selectedTimeZone);\n this.endDate = this.convertTZ(this.endDate, this.selectedTimeZone);\n }\n\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\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 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 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 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=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day ${isSelectedDate(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\n ${this.isCurrentDate(day, month, year) && isCurrentMonth\n ? 'current-date'\n : ''}\n \"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\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 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 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 this.requestUpdate();\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 this.requestUpdate();\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 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 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 // 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 // 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 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 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 setType(newType: string) {\n this.type = newType;\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 this.requestUpdate();\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n const timestamps = this.createRelativePeriod(unit, value);\n\n this.selectedUnit = unit;\n this.selectedValue = value;\n\n this.requestUpdate();\n }\n\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"time-value ${this.selectedUnit === unit &&\n this.selectedValue === value\n ? 'time-value--selected'\n : ''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >\n ${value}\n </div>\n `\n );\n }\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 handleTimeZoneChange(event: any) {\n this.selectedTimeZone = event.detail.value;\n this.requestUpdate();\n }\n\n onTypeChange(event: any) {\n this.type = event.detail.value;\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n const timeZones: string[] = TIMEZONES;\n\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n\n return html`\n <div\n class=\"base ${this.range ? 'base__range' : ''} ${this.type ===\n 'relative'\n ? 'base__relative'\n : ''}\"\n >\n <div class=\"calendar-config ${!this.range ? 'hidden' : ''}\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\">\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 <div class=\"calendar-timezone ${!this.range ? 'hidden' : ''}\">\n <nile-select\n hoist\n value=${this.selectedTimeZone}\n @nile-change=${this.handleTimeZoneChange}\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ${this.type !== 'absolute' ? 'hidden' : ''}\"\n >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n\n <div class=\"unit-container ${this.type !== 'relative' ? 'hidden' : ''}\">\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n </div>\n\n <div class=\"time-unit-group\">\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n </div>\n </div>\n\n ${this.range && this.type === 'relative'\n ? html`\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"${this.selectedValue\n }\"\n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"${this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\"> Minutes </nile-option>\n <nile-option value=\"hours\"> Hours </nile-option>\n <nile-option value=\"days\"> Days </nile-option>\n <nile-option value=\"weeks\"> Weeks </nile-option>\n <nile-option value=\"months\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"${!this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n ${this.range && this.type === 'absolute'\n ? html`\n <div class=\"calender-input\">\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.startDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${this.handleStartDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput\n }\"> </nile-input>\n\n </div>\n<br>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.endDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${this.handleEndDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${!this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_l","_inherits","r","_super","_createSuper","constructor","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","type","selectedTimeZone","_this","_createClass","key","value","valueChanged","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","concat","String","getDate","padStart","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","JSON","parse","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","length","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","setHours","dropdown","hide","confimRange","convertTZ","tzString","toLocaleString","timeZone","isCurrentDate","today","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","slice","fillerDaysAfter","allDays","isSelectedDate","o","isCurrentMonth","isStartDate","isEndDate","isInRange","html","_templateObject","_taggedTemplateLiteral","map","index","_templateObject2","formatDate","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","hour","minute","second","newDate","handleStartTimeInput","time","handleEndTimeInput","setType","newType","createRelativePeriod","unit","endTime","startTime","setMinutes","setDate","setMonth","handleTimeValueClick","selectedUnit","selectedValue","renderTimeValues","values","_templateObject3","handleDurationChange","handleUnitChange","handleTimeZoneChange","onTypeChange","render","nextYear","_templateObject4","_templateObject5","_templateObject6","get","styles","NileElement","__decorate","query","prototype","property","Boolean","reflect","Object","attribute","watch","customElement"],"mappings":"skNA2CaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAA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AA,CAAAA,CAAAA,CAAyBlK,EAAAgK,SAAA,CAAA,OAAA,CAAA,IAAA,EAEfF,CAAAA,CAAAA,CAAAA,CAAA,CAA3BG,CAAS,CAAA,CAAE7I,IAAMgB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA4BpC,EAAAgK,SAAA,CAAA,MAAA,CAAA,IAAA,EAElBF,CAAAA,CAAAA,CAAAA,CAAA,CAA3BG,CAAS,CAAA,CAAE7I,IAAMgB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA+BpC,EAAAgK,SAAA,CAAA,cAAA,CAAA,IAAA,EAErBF,CAAAA,CAAAA,CAAAA,CAAA,CAA3BG,CAAS,CAAA,CAAE7I,IAAM8F,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAgClH,EAAAgK,SAAA,CAAA,eAAA,CAAA,IAAA,EAEtBF,CAAAA,CAAAA,CAAAA,CAAA,CAA3BG,CAAS,CAAA,CAAE7I,IAAMgB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA6CpC,EAAAgK,SAAA,CAAA,kBAAA,CAAA,IAAA,EAG/DF,CAAAA,CAAAA,CAAAA,CAAA,CADCQ,CAAM,CAAA,OAAA,CAAA,CAAA,CAsBNtK,CAAAgK,CAAAA,SAAAA,CAAA,eAAA,IAlEUhK,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAY8J,EAAA,CADxBS,CAAAA,CAAc,kBACFvK"}
1
+ {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"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, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\nimport { TIMEZONES } from './timezones';\n\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 private currentMonth: number = new Date().getMonth();\n\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value: any;\n\n @property({ type: Object, attribute: 'allowed-dates' })\n allowedDates: any = {};\n\n @property({ type: Object }) rangeValue: any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n\n @property({ type: Object }) endDate: Date | null = null;\n\n @property({ type: Boolean }) isSelectingStart = true;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: String }) type = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: String }) selectedTimeZone: string = 'local';\n\n @state() validAllowedDates = true;\n\n firstUpdated() {\n const allowedDatesAttribute = this.getAttribute('allowed-dates');\n \n if (allowedDatesAttribute !== null ) {\n try {\n this.allowedDates = JSON.parse(allowedDatesAttribute);\n } catch (error) {\n console.error('Error parsing allowed-dates attribute:', error);\n }\n }\n else\n {\n this.validAllowedDates=false;\n }\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() {\n if (Object.keys(this.allowedDates).length ==0) {\n this.validAllowedDates = false;\n return;\n }\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n this.validAllowedDates=false;\n }\n else\n {\n this.validAllowedDates=true;\n }\n }\n\n @property({ type: Boolean,attribute:'hide-time-input' }) hideTimeInput: Boolean = false;\n\n\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: String[] = [];\n @property({ type: Boolean , attribute: 'hide-time-zone' }) hideTimeZone: Boolean = false;\n\n @watch('value')\n valueChanged() {\n if (this.range && this.value) {\n this.rangeValue = 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 this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n updated(changedProperties: PropertyValues) {\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 static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\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.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\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;\n\n 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 this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\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 private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\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 this.requestUpdate();\n }\n\n private 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.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n if (this.selectedTimeZone !== 'local') {\n this.startDate = this.convertTZ(this.startDate, this.selectedTimeZone);\n this.endDate = this.convertTZ(this.endDate, this.selectedTimeZone);\n }\n\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\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 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 isAllowedDate(day: number, month: number, year: number) {\n if (!this.validAllowedDates) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\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 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=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day\n ${this.isAllowedDate(day, month, year) ? '' : 'not-allowed'}\n ${isSelectedDate(day, month, year, isCurrentMonth)} ${isInRange(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\n ${this.isCurrentDate(day, month, year) && isCurrentMonth\n ? 'current-date'\n : ''}\n \"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\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 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 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 this.requestUpdate();\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 this.requestUpdate();\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 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 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 // 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 // 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 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 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 setType(newType: string) {\n this.type = newType;\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 this.requestUpdate();\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n const timestamps = this.createRelativePeriod(unit, value);\n\n this.selectedUnit = unit;\n this.selectedValue = value;\n\n this.requestUpdate();\n }\n\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"time-value ${this.selectedUnit === unit &&\n this.selectedValue === value\n ? 'time-value--selected'\n : ''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >\n ${value}\n </div>\n `\n );\n }\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 handleTimeZoneChange(event: any) {\n this.selectedTimeZone = event.detail.value;\n this.requestUpdate();\n }\n\n onTypeChange(event: any) {\n this.type = event.detail.value;\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n const timeZones: string[] = TIMEZONES;\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n\n return html`\n <div\n class=\"base ${this.range ? 'base__range' : ''} ${this.type ===\n 'relative'\n ? 'base__relative'\n : ''}\"\n >\n <div class=\"calendar-config ${!this.range ? 'hidden' : ''}\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\">\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 <div class=\"calendar-timezone ${!this.range || this.hideTimeZone ? 'hidden' : ''}\">\n <nile-select\n hoist\n value=${this.selectedTimeZone}\n @nile-change=${this.handleTimeZoneChange}\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ${this.type !== 'absolute' ? 'hidden' : ''}\"\n >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n\n <div class=\"unit-container ${this.type !== 'relative' ? 'hidden' : ''}\">\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('minutes')\n ? 'hidden'\n : ''} \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('hours')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('days')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('weeks')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('months')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n </div>\n </div>\n\n ${this.range && this.type === 'relative'\n ? html`\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"${\n this.selectedValue\n }\"\n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"${\n this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${\n this.hideDurationFields?.includes('minutes') ? 'hidden' : ''\n }\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"${\n this.hideDurationFields?.includes('hours') ? 'hidden' : ''\n }\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${\n this.hideDurationFields?.includes('days') ? 'hidden' : ''\n }\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"${\n this.hideDurationFields?.includes('weeks') ? 'hidden' : ''\n }\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"${\n this.hideDurationFields?.includes('months') ? 'hidden' : ''\n }\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n ${this.range && this.type === 'absolute'\n ? html`\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.startDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleStartDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''}\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleStartTimeInput\n }\"> </nile-input>\n </div>\n </div>\n \n <div> \n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.endDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleEndDateInput\n }\"></nile-input>\n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''} \" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n \n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}"],"names":["NileCalendar","r","constructor","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","allowedDates","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","type","selectedTimeZone","validAllowedDates","hideTimeInput","hideDurationFields","hideTimeZone","_this","_createClass","key","value","firstUpdated","allowedDatesAttribute","getAttribute","JSON","parse","error","console","checkValidAllowedDate","Object","keys","length","UTC","slice","_this$allowedDates3","valueChanged","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","concat","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","setHours","dropdown","hide","confimRange","convertTZ","tzString","toLocaleString","timeZone","isCurrentDate","today","isAllowedDate","_this$allowedDates7","_this$allowedDates8","_this$allowedDates9","_this$allowedDates10","_this$allowedDates11","_this$allowedDates12","dateToCheck","setUTCHours","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","fillerDaysAfter","allDays","isSelectedDate","u","isCurrentMonth","isStartDate","isEndDate","isInRange","html","_templateObject","_taggedTemplateLiteral","map","index","_templateObject2","formatDate","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","hour","minute","second","newDate","handleStartTimeInput","time","handleEndTimeInput","setType","newType","createRelativePeriod","unit","endTime","startTime","setMinutes","setDate","setMonth","handleTimeValueClick","selectedUnit","selectedValue","renderTimeValues","values","_templateObject3","handleDurationChange","handleUnitChange","handleTimeZoneChange","onTypeChange","render","nextYear","_templateObject4","includes","_templateObject5","_templateObject6","__decorate","get","styles","observedAttributes","NileElement","query","prototype","property","Boolean","reflect","attribute","state","watch","_export","customElement"],"mappings":"imNA2CaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCASGC,KAAAA,CAAAC,YAAuB,CAAA,GAAIC,CAAAA,IAAOC,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA,CAElCH,KAAAA,CAAAI,WAAAA,CAA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