smoothly 1.76.0 → 1.77.0

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 (40) hide show
  1. package/dist/cjs/smoothly-app_103.cjs.entry.js +14 -5
  2. package/dist/cjs/smoothly-app_103.cjs.entry.js.map +1 -1
  3. package/dist/collection/components/input/date/range/index.js +15 -5
  4. package/dist/collection/components/input/date/range/index.js.map +1 -1
  5. package/dist/components/{p-90db5f7f.js → p-3aae71d8.js} +2 -2
  6. package/dist/components/{p-90db5f7f.js.map → p-3aae71d8.js.map} +1 -1
  7. package/dist/components/{p-c1f4b925.js → p-3eba0846.js} +2 -2
  8. package/dist/components/{p-c1f4b925.js.map → p-3eba0846.js.map} +1 -1
  9. package/dist/components/{p-7c5817bb.js → p-3fe7e5a5.js} +5 -5
  10. package/dist/components/{p-7c5817bb.js.map → p-3fe7e5a5.js.map} +1 -1
  11. package/dist/components/{p-992a6946.js → p-418493df.js} +2 -2
  12. package/dist/components/{p-992a6946.js.map → p-418493df.js.map} +1 -1
  13. package/dist/components/{p-6ac528cf.js → p-9fe4fd82.js} +2 -2
  14. package/dist/components/{p-6ac528cf.js.map → p-9fe4fd82.js.map} +1 -1
  15. package/dist/components/{p-0f3588fe.js → p-a7fa13af.js} +2 -2
  16. package/dist/components/{p-0f3588fe.js.map → p-a7fa13af.js.map} +1 -1
  17. package/dist/components/{p-9b3fd2ae.js → p-c2fc7519.js} +2 -2
  18. package/dist/components/{p-9b3fd2ae.js.map → p-c2fc7519.js.map} +1 -1
  19. package/dist/components/{p-7446e68b.js → p-c73e384a.js} +5 -5
  20. package/dist/components/{p-7446e68b.js.map → p-c73e384a.js.map} +1 -1
  21. package/dist/components/{p-6c6672ff.js → p-cf0066e4.js} +16 -6
  22. package/dist/components/p-cf0066e4.js.map +1 -0
  23. package/dist/components/smoothly-app-demo.js +9 -9
  24. package/dist/components/smoothly-form-demo-date-range.js +1 -1
  25. package/dist/components/smoothly-form-demo-pet.js +1 -1
  26. package/dist/components/smoothly-form-demo-transparent.js +1 -1
  27. package/dist/components/smoothly-form-demo.js +1 -1
  28. package/dist/components/smoothly-input-checkbox-demo.js +1 -1
  29. package/dist/components/smoothly-input-date-demo.js +1 -1
  30. package/dist/components/smoothly-input-date-range.js +1 -1
  31. package/dist/components/smoothly-input-demo-standard.js +1 -1
  32. package/dist/components/smoothly-input-demo-user-input.js +1 -1
  33. package/dist/components/smoothly-input-demo.js +1 -1
  34. package/dist/esm/smoothly-app_103.entry.js +14 -5
  35. package/dist/esm/smoothly-app_103.entry.js.map +1 -1
  36. package/dist/smoothly/{p-edc714b6.entry.js → p-3eeb5af5.entry.js} +2 -2
  37. package/dist/smoothly/{p-edc714b6.entry.js.map → p-3eeb5af5.entry.js.map} +1 -1
  38. package/dist/smoothly/smoothly.esm.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/components/p-6c6672ff.js.map +0 -1
@@ -10225,10 +10225,19 @@ const SmoothlyInputDateRange = class {
10225
10225
  this.open = !this.open || includesTextElement;
10226
10226
  }
10227
10227
  async onSmoothlyDateTextChange(event, startOrEnd) {
10228
- var _a;
10228
+ var _a, _b, _c;
10229
10229
  event.stopPropagation();
10230
10230
  const newValue = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
10231
- if (this[startOrEnd] != newValue) {
10231
+ const start = startOrEnd == "start" ? newValue : this.start;
10232
+ const end = startOrEnd == "end" ? newValue : this.end;
10233
+ if (TimeZone.Date.is(start) && TimeZone.Date.is(end) && start > end) {
10234
+ this.start = end;
10235
+ this.end = start;
10236
+ (_b = this.startTextElement) === null || _b === void 0 ? void 0 : _b.setValue(this.start);
10237
+ (_c = this.endTextElement) === null || _c === void 0 ? void 0 : _c.setValue(this.end);
10238
+ this.smoothlyUserInput.emit({ name: this.name, value: await this.getValue() });
10239
+ }
10240
+ else if (this[startOrEnd] != newValue) {
10232
10241
  this[startOrEnd] = newValue;
10233
10242
  this.smoothlyUserInput.emit({ name: this.name, value: await this.getValue() });
10234
10243
  }
@@ -10270,15 +10279,15 @@ const SmoothlyInputDateRange = class {
10270
10279
  this.smoothlyInput.emit({ [this.name]: undefined });
10271
10280
  }
10272
10281
  render() {
10273
- return (index.h(index.Host, { key: '47b1f42eee61e5812a3f664ab5a7cbf0d5963302', tabindex: this.disabled ? undefined : 0, class: {
10282
+ return (index.h(index.Host, { key: 'e679040ae05b729f921a4ee33f0d8080e6dcff73', tabindex: this.disabled ? undefined : 0, class: {
10274
10283
  "has-value": !!(this.start || this.end),
10275
10284
  "has-text": !!(this.startHasText || this.endHasText),
10276
10285
  "floating-label": this.alwaysShowGuide,
10277
- } }, index.h("span", { key: '9b9f91859e50d68030a0b5c06c5e522f416810ad', class: "smoothly-date-range-input-part", onClick: (e) => this.onClick(e) }, index.h("slot", { key: '8dd08d22165176217c35c46a68911f71f720f151', name: "start" }), index.h("label", { key: '202786f137a4d1e63c53b83496060e9aa5d675c1', class: "label float-on-focus" }, index.h("slot", { key: '72dcc7c77080ffc24572344229fba7156985fc6b' })), this.placeholder && index.h("span", { key: 'a3d3e6f0a38bfb4eef494f70cb297a8a67528432', class: "smoothly-date-range-placeholder" }, this.placeholder), index.h("smoothly-date-text", { key: 'c3f27d77cb49ea451c97014ff7d787232c178ba8', ref: el => (this.startTextElement = el), class: "start-date-text", locale: this.locale, onSmoothlyDateTextHasText: e => (e.stopPropagation(), (this.startHasText = e.detail)), onSmoothlyDateTextFocusChange: e => (e.stopPropagation(), (this.hasFocus = e.detail)), onSmoothlyDateHasPartialDate: e => { var _a; return (e.stopPropagation(), (_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.jumpTo(e.detail)); }, onSmoothlyDateTextChange: e => (e.stopPropagation(), this.onSmoothlyDateTextChange(e, "start")), onSmoothlyDateTextNext: e => { var _a; return (e.stopPropagation(), (_a = this.endTextElement) === null || _a === void 0 ? void 0 : _a.select()); }, onSmoothlyDateTextDone: e => {
10286
+ } }, index.h("span", { key: '459c0e53a0f225c2a3c6f2b283e0af03a178e99f', class: "smoothly-date-range-input-part", onClick: (e) => this.onClick(e) }, index.h("slot", { key: '9919d8355ce88285435e525c1b697ddf4f6cec77', name: "start" }), index.h("label", { key: 'd84eb3506216d16187c3a61ea260941c17bfd22d', class: "label float-on-focus" }, index.h("slot", { key: '6d9728f0e13d1b3f18d66d19d7ff3adfa6b9557a' })), this.placeholder && index.h("span", { key: 'a46d828926e3e41dc4557acecd597655f0772f41', class: "smoothly-date-range-placeholder" }, this.placeholder), index.h("smoothly-date-text", { key: 'e4b593d68430c58ab9fe2f7778addc71018ca581', ref: el => (this.startTextElement = el), class: "start-date-text", locale: this.locale, onSmoothlyDateTextHasText: e => (e.stopPropagation(), (this.startHasText = e.detail)), onSmoothlyDateTextFocusChange: e => (e.stopPropagation(), (this.hasFocus = e.detail)), onSmoothlyDateHasPartialDate: e => { var _a; return (e.stopPropagation(), (_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.jumpTo(e.detail)); }, onSmoothlyDateTextChange: e => (e.stopPropagation(), this.onSmoothlyDateTextChange(e, "start")), onSmoothlyDateTextNext: e => { var _a; return (e.stopPropagation(), (_a = this.endTextElement) === null || _a === void 0 ? void 0 : _a.select()); }, onSmoothlyDateTextDone: e => {
10278
10287
  var _a, _b;
10279
10288
  return (e.stopPropagation(),
10280
10289
  this.end ? ((_a = this.startTextElement) === null || _a === void 0 ? void 0 : _a.deselect(), (this.open = false)) : (_b = this.endTextElement) === null || _b === void 0 ? void 0 : _b.select());
10281
- }, value: this.start, readonly: this.readonly, disabled: this.disabled, invalid: this.invalid, showLabel: this.showLabel }), index.h("span", { key: 'f7b237128af048f7b63cb07adfac2952ae6b56de', class: "smoothly-date-range-separator" }, " \u2013 "), index.h("smoothly-date-text", { key: 'ad17bb8a568e2ac5420211b7cd88ea739f7c83b1', ref: el => (this.endTextElement = el), class: "end-date-text", locale: this.locale, onSmoothlyDateTextHasText: e => (e.stopPropagation(), (this.endHasText = e.detail)), onSmoothlyDateTextFocusChange: e => (e.stopPropagation(), (this.hasFocus = e.detail)), onSmoothlyDateHasPartialDate: e => { var _a; return (e.stopPropagation(), (_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.jumpTo(e.detail)); }, onSmoothlyDateTextChange: e => (e.stopPropagation(), this.onSmoothlyDateTextChange(e, "end")), onSmoothlyDateTextPrevious: e => { var _a; return (e.stopPropagation(), (_a = this.startTextElement) === null || _a === void 0 ? void 0 : _a.select("end")); }, onSmoothlyDateTextNext: e => e.stopPropagation(), onSmoothlyDateTextDone: e => { var _a; return (e.stopPropagation(), (_a = this.endTextElement) === null || _a === void 0 ? void 0 : _a.deselect(), (this.open = false)); }, value: this.end, readonly: this.readonly, disabled: this.disabled, invalid: this.invalid, showLabel: this.showLabel })), index.h("span", { key: '5cc0127cd3291e2e3411af8dd9c52449c5faccf4', class: "icons" }, index.h("slot", { key: '22ebeaa9a2824143d5c2bfdf9a0fca422ab8a5bc', name: "end" })), this.open && (index.h("smoothly-calendar", { key: '9fc6f4717446811fe6b7bd8a23cb10aefcb094eb', ref: el => (this.calendarElement = el), doubleInput: true, onSmoothlyValueChange: e => e.stopPropagation(), onSmoothlyStartChange: e => (e.stopPropagation(), (this.start = e.detail)), onSmoothlyEndChange: e => (e.stopPropagation(), (this.end = e.detail)), onSmoothlyDateSet: e => e.stopPropagation(), onSmoothlyDateRangeSet: e => {
10290
+ }, value: this.start, readonly: this.readonly, disabled: this.disabled, invalid: this.invalid, showLabel: this.showLabel }), index.h("span", { key: '8202a1af32cb67caf4cabddbaf80f2775f34277a', class: "smoothly-date-range-separator" }, " \u2013 "), index.h("smoothly-date-text", { key: 'eb43cd46ca12848bea21af6ae1fe65a5e84d457b', ref: el => (this.endTextElement = el), class: "end-date-text", locale: this.locale, onSmoothlyDateTextHasText: e => (e.stopPropagation(), (this.endHasText = e.detail)), onSmoothlyDateTextFocusChange: e => (e.stopPropagation(), (this.hasFocus = e.detail)), onSmoothlyDateHasPartialDate: e => { var _a; return (e.stopPropagation(), (_a = this.calendarElement) === null || _a === void 0 ? void 0 : _a.jumpTo(e.detail)); }, onSmoothlyDateTextChange: e => (e.stopPropagation(), this.onSmoothlyDateTextChange(e, "end")), onSmoothlyDateTextPrevious: e => { var _a; return (e.stopPropagation(), (_a = this.startTextElement) === null || _a === void 0 ? void 0 : _a.select("end")); }, onSmoothlyDateTextNext: e => e.stopPropagation(), onSmoothlyDateTextDone: e => { var _a; return (e.stopPropagation(), (_a = this.endTextElement) === null || _a === void 0 ? void 0 : _a.deselect(), (this.open = false)); }, value: this.end, readonly: this.readonly, disabled: this.disabled, invalid: this.invalid, showLabel: this.showLabel })), index.h("span", { key: '422516b5f919cf0c9cd0b5480e2b4a506894d01b', class: "icons" }, index.h("slot", { key: '6083b435efed3bbc24239ef4a67a8a7398544a76', name: "end" })), this.open && (index.h("smoothly-calendar", { key: '4890cb45bdda6451a186f5bc0de8cb84dbe2425e', ref: el => (this.calendarElement = el), doubleInput: true, onSmoothlyValueChange: e => e.stopPropagation(), onSmoothlyStartChange: e => (e.stopPropagation(), (this.start = e.detail)), onSmoothlyEndChange: e => (e.stopPropagation(), (this.end = e.detail)), onSmoothlyDateSet: e => e.stopPropagation(), onSmoothlyDateRangeSet: e => {
10282
10291
  e.stopPropagation();
10283
10292
  this.open = false;
10284
10293
  this.smoothlyInput.emit({ [this.name]: e.detail });