@abp/luxon 5.0.0-beta.2 → 5.0.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.
@@ -1,6 +1,6 @@
1
- module.exports = {
2
- mappings: {
3
- "@node_modules/luxon/build/global/*.*": "@libs/luxon/",
4
- "@node_modules/@abp/luxon/src/*.*": "@libs/abp/luxon/"
5
- }
1
+ module.exports = {
2
+ mappings: {
3
+ "@node_modules/luxon/build/global/*.*": "@libs/luxon/",
4
+ "@node_modules/@abp/luxon/src/*.*": "@libs/abp/luxon/"
5
+ }
6
6
  }
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
- "version": "5.0.0-beta.2",
2
+ "version": "5.0.0",
3
3
  "name": "@abp/luxon",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/abpframework/abp.git",
7
+ "directory": "npm/packs/luxon"
8
+ },
4
9
  "publishConfig": {
5
10
  "access": "public"
6
11
  },
7
12
  "dependencies": {
8
- "@abp/core": "~5.0.0-beta.2",
13
+ "@abp/core": "~5.0.0",
9
14
  "luxon": "^1.24.1"
10
15
  },
11
16
  "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431"
package/src/abp.luxon.js CHANGED
@@ -1,46 +1,46 @@
1
- var abp = abp || {};
2
- (function () {
3
-
4
- if (!luxon) {
5
- throw "abp/luxon library requires the luxon library included to the page!";
6
- }
7
-
8
- /* TIMING *************************************************/
9
-
10
- abp.timing = abp.timing || {};
11
-
12
- var setObjectValue = function (obj, property, value) {
13
- if (typeof property === "string") {
14
- property = property.split('.');
15
- }
16
-
17
- if (property.length > 1) {
18
- var p = property.shift();
19
- setObjectValue(obj[p], property, value);
20
- } else {
21
- obj[property[0]] = value;
22
- }
23
- }
24
-
25
- var getObjectValue = function (obj, property) {
26
- return property.split('.').reduce((a, v) => a[v], obj)
27
- }
28
-
29
- abp.timing.convertFieldsToIsoDate = function (form, fields) {
30
- for (var field of fields) {
31
- var dateTime = luxon.DateTime
32
- .fromFormat(
33
- getObjectValue(form, field),
34
- abp.localization.currentCulture.dateTimeFormat.shortDatePattern,
35
- {locale: abp.localization.currentCulture.cultureName}
36
- );
37
-
38
- if (!dateTime.invalid) {
39
- setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss"))
40
- }
41
- }
42
-
43
- return form;
44
- }
45
-
46
- })(jQuery);
1
+ var abp = abp || {};
2
+ (function () {
3
+
4
+ if (!luxon) {
5
+ throw "abp/luxon library requires the luxon library included to the page!";
6
+ }
7
+
8
+ /* TIMING *************************************************/
9
+
10
+ abp.timing = abp.timing || {};
11
+
12
+ var setObjectValue = function (obj, property, value) {
13
+ if (typeof property === "string") {
14
+ property = property.split('.');
15
+ }
16
+
17
+ if (property.length > 1) {
18
+ var p = property.shift();
19
+ setObjectValue(obj[p], property, value);
20
+ } else {
21
+ obj[property[0]] = value;
22
+ }
23
+ }
24
+
25
+ var getObjectValue = function (obj, property) {
26
+ return property.split('.').reduce((a, v) => a[v], obj)
27
+ }
28
+
29
+ abp.timing.convertFieldsToIsoDate = function (form, fields) {
30
+ for (var field of fields) {
31
+ var dateTime = luxon.DateTime
32
+ .fromFormat(
33
+ getObjectValue(form, field),
34
+ abp.localization.currentCulture.dateTimeFormat.shortDatePattern,
35
+ {locale: abp.localization.currentCulture.cultureName}
36
+ );
37
+
38
+ if (!dateTime.invalid) {
39
+ setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss"))
40
+ }
41
+ }
42
+
43
+ return form;
44
+ }
45
+
46
+ })(jQuery);