ember-power-calendar 0.16.5 → 0.17.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.
@@ -73,7 +73,7 @@ export default @layout(templateLayout) @tagName('') class extends Component {
73
73
  return weekdaysNames.slice(localeStartOfWeek).concat(weekdaysNames.slice(0, localeStartOfWeek));
74
74
  }
75
75
 
76
- @computed('calendar', 'focusedId', 'localeStartOfWeek', 'minDate', 'maxDate', 'disabledDates.[]', 'maxLength')
76
+ @computed('calendar', 'focusedId', 'localeStartOfWeek', 'minDate', 'maxDate', 'disabledDates.[]', 'maxLength', 'currentCenter')
77
77
  get days() {
78
78
  let today = this.powerCalendarService.getDate();
79
79
  let lastDay = this.lastDay();
@@ -1,5 +1,4 @@
1
1
  import { computed, action, getProperties } from '@ember/object';
2
- import { assign } from '@ember/polyfills';
3
2
  import CalendarComponent from './power-calendar';
4
3
  import fallbackIfUndefined from '../utils/computed-fallback-if-undefined';
5
4
  import {
@@ -65,7 +64,7 @@ export default class extends CalendarComponent {
65
64
  @computed('_publicAPI', 'minRange', 'maxRange')
66
65
  get publicAPI() {
67
66
  let rangeOnlyAPI = this.getProperties('minRange', 'maxRange');
68
- return assign(rangeOnlyAPI, this._publicAPI);
67
+ return Object.assign(rangeOnlyAPI, this._publicAPI);
69
68
  }
70
69
 
71
70
  // Actions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-power-calendar",
3
- "version": "0.16.5",
3
+ "version": "0.17.0",
4
4
  "description": "Powerful and customizable calendar component for Ember",
5
5
  "scripts": {
6
6
  "build": "ember build --environment=production",
@@ -28,8 +28,8 @@
28
28
  "@glimmer/tracking": "^1.0.0",
29
29
  "babel-eslint": "^10.1.0",
30
30
  "broccoli-asset-rev": "^3.0.0",
31
- "ember-auto-import": "^1.5.3",
32
- "ember-basic-dropdown": "^3.0.2",
31
+ "ember-auto-import": "^2.4.0",
32
+ "ember-basic-dropdown": "^4.0.3",
33
33
  "ember-cli": "~3.17.0",
34
34
  "ember-cli-app-version": "^3.2.0",
35
35
  "ember-cli-custom-assertions": "^0.1.1",
@@ -46,8 +46,8 @@
46
46
  "ember-export-application-global": "^2.0.1",
47
47
  "ember-load-initializers": "^2.1.1",
48
48
  "ember-maybe-import-regenerator": "^0.1.6",
49
- "ember-power-calendar-moment": "^0.1.7",
50
- "ember-power-select": "^4.0.6",
49
+ "ember-power-calendar-moment": "^0.2.0",
50
+ "ember-power-select": "^5.0.3",
51
51
  "ember-resolver": "^7.0.0",
52
52
  "ember-source": "~3.17.0",
53
53
  "ember-source-channel-url": "^2.0.1",
@@ -58,9 +58,11 @@
58
58
  "eslint-plugin-node": "^11.0.0",
59
59
  "loader.js": "^4.7.0",
60
60
  "memory-scroll": "^1.0.0",
61
+ "moment": "^2.29.1",
61
62
  "npm-run-all": "^4.1.5",
62
63
  "qunit-dom": "^1.1.0",
63
- "sass": "^1.15.2"
64
+ "sass": "^1.15.2",
65
+ "webpack": "^5.68.0"
64
66
  },
65
67
  "keywords": [
66
68
  "ember-addon",
@@ -79,13 +81,13 @@
79
81
  "test": "tests"
80
82
  },
81
83
  "dependencies": {
82
- "ember-assign-helper": "^0.3.0",
84
+ "ember-assign-helper": "^0.3.0 || ^0.4.0",
83
85
  "ember-cli-babel": "^7.18.0",
84
86
  "ember-cli-element-closest-polyfill": "^0.0.2",
85
- "ember-cli-htmlbars": "^4.2.3",
87
+ "ember-cli-htmlbars": "^4.2.3 || ^5.0.0 || ^6.0.0",
86
88
  "ember-concurrency": "^0.8.27 || ^0.9.0 || ^0.10.0 || ^1.0.0 || ^2.0.0-rc.1",
87
89
  "ember-decorators": "^6.1.1",
88
- "ember-element-helper": "^0.5.0",
90
+ "ember-element-helper": "^0.5.0 || ^0.6.0",
89
91
  "ember-truth-helpers": "^2.1.0 || ^3.0.0"
90
92
  },
91
93
  "ember": {
package/CHANGELOG.md DELETED
@@ -1,232 +0,0 @@
1
- ## Master
2
-
3
- # 0.16.5
4
- - Fix `hasBlock` deprecation.
5
- - Dependencies updates.
6
- # 0.16.4
7
- - [BUGFIX] Update version of ember-element-helper for better embroider compatibility
8
- # 0.16.2
9
- - [ENHANCEMENT] Relax dependency on ember-truth-helpers.
10
-
11
- # 0.16.1
12
- - [ENHANCEMENT] Bump version of `element-closest-polyfill` to 0.0.2
13
-
14
- # 0.16.0
15
-
16
- ## 0.14.5
17
- - [BUGFIX] Don't set `center` to undefined in days component. Users may subclass it and define center
18
- as readonly.
19
-
20
- ## 0.14.4
21
- - [ENHANCEMENT] Added support for optional `@tag` argument to `<PowerCalendar />`
22
-
23
- ## 0.14.3
24
- - [BUGFIX] Remove deprecation by adding a setter for the locale to power-calendar service.
25
-
26
-
27
- ## 0.14.2
28
- - [BUGFIX] Both `minDate` and `maxDate` should form part of the range and therefore be selectables.
29
-
30
- ## 0.14.1
31
- - [ENHANCEMENT] The `<calendar.Nav>` component will display in the `data-power-calendar-id` the value of `calendar.calendarUniqueId`
32
- if present (it not present, it will display `calendar.uniqueId` as before)
33
-
34
- ## 0.14.0
35
- - [BREAKING] Update addon to angle-bracket syntax. It requires Ember 3.11 now. The yielded components are
36
- now capitalized (e.g. `<calendar.Nav>`).
37
-
38
- ## 0.13.3
39
- - [CHORE] Allow ember-concurrency 1.0
40
-
41
- ## 0.13.2
42
- - [BUGFIX] Make use of `$nav-button-color--focus`, which before wasn't really being used as intended. This makes it customizable.
43
-
44
- ## 0.13.1
45
- - [BUGFIX] Fix bug detecting keyword in package.json
46
-
47
- ## 0.13.0
48
- - [ENHANCEMENT] Detect EPC-adapters (like ember-power-calendar-luxon and ember-power-calendar-moment)
49
- not using a whitelist, but looking for the keyword `ember-power-calendar-adapter` in their package.json
50
-
51
- ## 0.12.0
52
- - [ENHANCEMENT] Update ember-concurrency to 0.9 for better octane support
53
-
54
- ## 0.11.0
55
- Unsure
56
-
57
- ## 0.10.3
58
- - [ENHANCEMENT] Allow range calendar's `actions.select` to take an range. It used to only
59
- allow a single day from which it constructed a the range. This hasn't change, but now if it receives
60
- a range it it will use that range it will use as is.
61
-
62
- ## 0.10.2
63
- - [ENHANCEMENT] Allow pass a `@unit` and `@format` to the `calendar.Nav` component, which used to be
64
- hardcoded values (`'month'` and `'MMMM YYYY'` respetively).
65
-
66
- ## 0.10.1
67
- - [ENHANCEMENT] Allow multiple calendar's `actions.select` to take an array of days. It used to only
68
- allow a single day from which it constructed a new list. This hasn't change, but now if it receives
69
- a list it it will use that list as the final set of values.
70
-
71
- ## 0.10.0
72
- - [CHORE] Minimum version of `ember-power-calendar-luxon` has to be 0.1.5 and of `ember-power-calendar-moment` 0.1.4.
73
- Some utility functions have been extracted there.
74
-
75
- ## 0.9.7
76
- - [ENHANCEMENT] `{{#cal.days}}` yields the array of weeks as third argument.
77
-
78
- ## 0.9.6
79
- - [ENHANCEMENT] Allow `{{cal.days}}` component to receive a `dayClass` property that can be either a string or a function that takes `(day, calendar, weeks)` and returns a string. That string is added as a class to days.
80
-
81
- ## 0.9.5
82
- - [ENHANCEMENT] Add `type` to public API. Possible values: "single" | "multiple" | "range"
83
- - [DOCS] Document public API object.
84
- - [CHORE] Update dependencies, including babel 7
85
-
86
- ## 0.9.4
87
- - [BUFIX] Fix 0.9.3 in versions of ember-cli >= 3.5
88
-
89
- ## 0.9.3
90
- - [BUGFIX] Fix broken dependency check under yarn workspaces.
91
-
92
- ## 0.9.2
93
- - [BUGFIX] Fix testing of ember-power-calendar from within a whormole to the root of the body.
94
-
95
- ## 0.9.1
96
- - [BUGFIX] Prevent infinite loop rendering the days component
97
-
98
- ## 0.9.0
99
- - [BREAKING] Now this addon requires the user to install either `ember-power-calendar-moment` or `ember-power-calendar-luxon`
100
- to work. However, once installed it should either of those, it should behave the same (obviously you won't ve able to pass
101
- moment object if you choose the luxon addon)
102
-
103
- ## 0.8.1
104
- - [BUGFIX] Update minimum version of `ember-power-calendar-moment` to fix some bugs.
105
-
106
- ## 0.8.0
107
- - [CHORE] 🎉🎉**BIG CHANGE**🎉🎉 Now the utility functions don't live on this addon but on another addon
108
- named `ember-power-calendar-moment`, that for the time being is a runtime dependency so it shouldn't
109
- be breaking. In an upcoming version it will be removed from the runtime dependencies so user will have
110
- to explicitly install that other addon.
111
-
112
- ## 0.8.0-beta.2
113
- - [BREAKING] Require the new testing API based on `setupTest`/`setupRenderingTest`/`setupApplicationTest` that
114
- comes with `ember-qunit` 3.2+.
115
-
116
- ## 0.8.0-beta.1
117
- - [BREAKING] This addon no longer depends on `ember-moment`, only in `ember-cli-moment-shim`, which
118
- means it no longer attempts to read the locale from the `service:moment`. You can now set the locale
119
- (if different from the global moment.js locale) in the `service:power-calendar`.
120
-
121
- - [HUGE REFACTOR] The addon is pretty decoupled from moment.js, with the plan of allowing using it
122
- with luxon.js, or other libraries (maybe without any library!) in the next version.
123
- It should not be a breaking change, but since it was a very big refactor, update it with care.
124
- Due to this refactor and the drop of ember-moment, the addon is ~28kb (~4.5kb min+gzip) smaller
125
- than before.
126
-
127
- ## 0.7.3
128
- - [ENHANCEMENT] Add helpful assertions when a calendar receives an invalid date as center and when the user tries to change the center of a calendar without an `onCenterChange` action.
129
-
130
- ## 0.7.2
131
- - [FEATURE] Add `proximitySelection` to `power-calendar-range`. When true (default is false) the clicking on the calendar after a range has been selected doesn't start a new range, but moves the closest extreme of the current range, expanding or narrowing it.
132
-
133
- ## 0.7.1
134
- - [INTERNAL] Update some testing deps
135
-
136
- ## 0.7.0
137
- - [BREAKING] Require Ember >= 2.10
138
-
139
- ## 0.6.1
140
- - [BUGFIX] Ensure `addon-test-support/` folder is not blacklisted in NPM
141
-
142
- ## 0.6.0
143
- - [ENHANCEMENT] Now the `calendarCenter` and `calendarSelect` helpers are importable from `ember-power-calendar/test-support`
144
- and can be used in both integration and acceptance tests.
145
- - [ENHANCEMENT] When the `moveCenter` action was called with a `null`/`undefined` value it could cause
146
- problems. Now doing that is perfectly legal and it will center the month in the current date.
147
-
148
- ## 0.5.0
149
- - [ENHANCEMENT] Allow invocation without block. It renders both nav and days.
150
- - [BUGFIX] Add `type="button"` to buttons in the nav so they are not implicitly considered
151
- type submit, leading to submitting the enclosing form.
152
- - [INTERNAL] The addon is now jQuery free too.
153
- - [BREAKING] Allow the `ember-power-calendar` SASS/LESS mixin to take a lot more variables
154
- to customize colors and more. Potentially breaking, but probably not for the big majority.
155
-
156
- ## 0.4.0
157
- - [INTERNAL] Update to Babel 6
158
-
159
- ## 0.3.2
160
- - [BUGFIX] Broken safari styles due to unnecesary flex position on days.
161
-
162
- ## 0.3.1
163
- - [ENHANCEMENT] Added less support.
164
-
165
- ## 0.3.0
166
- - [BREAKING] `onSelect` and `onCenterAction` now receive the publicAPI of the component
167
- as second argument and the event as third.
168
-
169
- ## 0.2.7
170
- - [ENHANCEMENT] `data-ember-power-calendar-id` can be bound from the outside
171
-
172
- ## 0.2.6
173
- - [ENHANCEMENT] Added an `onInit` action that can be passed from the outside, and it called with the public API
174
- once.
175
-
176
- ## 0.2.5
177
- - [BREAKING] Renamed `service:power-calendar-clock` to just `service:power-calendar`. This service
178
- wasn't public, so it's unlikely anyone will be affected.
179
- - [ENHANCEMENT] Added `calendar.uniqueId` to the public API. The `{{cal.days}}` use it to display a `data-power-calendar-id`
180
- attribute that reference the original calendar.
181
- - [ENHANCEMENT] The `calendarCenter` and `calendarSelect` test helpers now also work with tagless calendars,
182
- thanks to the enhancement above.
183
-
184
- ## 0.2.4
185
- - [ENHANCEMENT] Add `maxLength` to the `{{cal.days}}` component of multiple selects. It determines the
186
- max number of day selections the user can make. Once that number is reached no more days can be selected,
187
- but those selected can be unselected. Defaults to `Infinity` so there is no limit by default.
188
-
189
- ## 0.2.3
190
- - [ENHANCEMENT] Allow to disable specific days passing `{{cal.days disabledDates=collection}}`.
191
- As usual the property can be a collection of Dates or Moments.
192
-
193
- ## 0.2.2
194
- - [ENHANCEMENT] Improve default styles of calendar days.
195
-
196
- ## 0.2.1
197
- - [ENHANCEMENT] Make Sass mixin more configurable, by accepting more variables. The basic usage remains
198
- the same, this is not breaking.
199
- ## 0.2.1
200
- - [BREAKING] The component no longer automatically gets a `ember-power-calendar--loading` when
201
- the `onCenterChange` returns a promise/task. Instead, the publicAPI of the component will have
202
- the `loading` flag set to true, and you can use that to any purpose. This flag might change
203
- in future.
204
-
205
- ## 0.1.8
206
- - [BUGFIX] Fix styles in IE11 - @nwhittaker
207
-
208
- ## 0.1.7
209
- - [BUGFIX] Fix calculation of days when the `moment` global had a different locale than the `service:moment`.
210
-
211
- ## 0.1.6
212
- - [BUGFIX] Make `ember-assign-helper` a runtime dependency.
213
-
214
- ## 0.1.5
215
- - [FEATURE] Add `maxRange` to prevent users from selecting ranges > the given duration.
216
- - [FEATURE] Add `minRange` to prevent users from selecting ranges < the given duration.
217
- - [BUGFIX] If a range has `start` and `end` in the same day, that day has both `*--range-start` and `*--range-end` classes.
218
- - [BREAKING] Rename `calendar.actions.changeCenter` to `calendar.actions.moveCenter`.
219
- - [BUGFIX] Clicking on the last selected day selected it twice instead of removing it.
220
-
221
- ## 0.1.4
222
- - [FEATURE] Add `weekdayFormat` to customize the format of the weekdays. Values: "short" (default), "long" and "min".
223
-
224
- ## 0.1.3
225
- - [FEATURE] Add `calendarCenter` and `calendarSelect` test-helpers for acceptnace testing.
226
-
227
- ## 0.1.2
228
- - [FEATURE] Add `i18n` based in ember-moment.
229
-
230
- ## 0.1.1
231
- - [FEATURE] Add `minDate` and `maxDate` to default `<calendar.Days/>` component to disabled days before/after
232
- some specific date.