@mediafly/js-ui 51.6.0-6 → 51.6.0-8

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.
@@ -10,6 +10,9 @@ export default class DateTimeZoneCityPickerController implements IComponentContr
10
10
  isDisabled: boolean;
11
11
  isRequired: boolean;
12
12
  onOpen: () => void;
13
+ onChange: (param: {
14
+ newValue: DateTimeZoneCity;
15
+ }) => void;
13
16
  protected ngModelCtrl: ng.INgModelController;
14
17
  protected dateLuxon: DateTime | null;
15
18
  protected timeLuxon: DateTime | null;
@@ -16,6 +16,7 @@ let DateTimeZoneCityPickerController = class DateTimeZoneCityPickerController {
16
16
  $onInit() {
17
17
  // Set up formatters and parsers for ngModel
18
18
  this.ngModelCtrl.$formatters.push((modelValue) => {
19
+ var _a;
19
20
  if (modelValue) {
20
21
  this.initModelFromAPI(modelValue);
21
22
  }
@@ -24,13 +25,17 @@ let DateTimeZoneCityPickerController = class DateTimeZoneCityPickerController {
24
25
  this.timeLuxon = null;
25
26
  this.timeZoneName = null;
26
27
  }
28
+ (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, { newValue: modelValue });
27
29
  return modelValue;
28
30
  });
29
31
  this.ngModelCtrl.$parsers.push((modelValue) => {
32
+ var _a;
33
+ (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, { newValue: modelValue });
30
34
  return modelValue;
31
35
  });
32
36
  }
33
37
  initModelFromAPI(value) {
38
+ console.log(`-----> initModelFromAPI: ${JSON.stringify(value)}`);
34
39
  let luxon;
35
40
  if (!(value === null || value === void 0 ? void 0 : value.dateTime)) {
36
41
  luxon = undefined;
@@ -71,16 +76,20 @@ let DateTimeZoneCityPickerController = class DateTimeZoneCityPickerController {
71
76
  }
72
77
  const bestMatchTimeZone = time_zone_city_service_1.getTimeZone(value.timeZoneName);
73
78
  this.timeZoneName = (bestMatchTimeZone === null || bestMatchTimeZone === void 0 ? void 0 : bestMatchTimeZone.timeZoneName) || Intl.DateTimeFormat().resolvedOptions().timeZone;
79
+ console.log(`-----> and so: ${this.dateLuxon} and ${this.timeLuxon} and ${this.timeZoneName}`);
74
80
  }
75
81
  updateDate(dateLuxon) {
82
+ console.log(`-----> updateDate: ${dateLuxon} (time is ${this.timeLuxon})`);
76
83
  this.dateLuxon = dateLuxon;
77
84
  this.updateModel();
78
85
  }
79
86
  updateTime(timeLuxon) {
87
+ console.log(`-----> updateTime: ${timeLuxon}`);
80
88
  this.timeLuxon = timeLuxon;
81
89
  this.updateModel();
82
90
  }
83
91
  updateTimeZone(timeZoneName) {
92
+ console.log(`-----> updateTimeZone: ${timeZoneName}`);
84
93
  this.timeZoneName = timeZoneName;
85
94
  this.updateModel();
86
95
  }
@@ -126,6 +135,10 @@ __decorate([
126
135
  decorators_1.Output('&?'),
127
136
  __metadata("design:type", Function)
128
137
  ], DateTimeZoneCityPickerController.prototype, "onOpen", void 0);
138
+ __decorate([
139
+ decorators_1.Output('&?'),
140
+ __metadata("design:type", Function)
141
+ ], DateTimeZoneCityPickerController.prototype, "onChange", void 0);
129
142
  DateTimeZoneCityPickerController = __decorate([
130
143
  decorators_1.Component({
131
144
  selector: 'mflyDateTimeZoneCityPicker',
@@ -1 +1 @@
1
- {"version":3,"file":"date-time-zone-city-picker.js","sourceRoot":"","sources":["../../../../src/components/date-time-zone-city-picker/date-time-zone-city-picker.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,8CAAwD;AACxD,iCAAgC;AAChC,qEAAsD;AActD,IAAqB,gCAAgC,GAArD,MAAqB,gCAAgC;IAcpD,OAAO;QAEN,4CAA4C;QAC5C,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAA4B,EAAE,EAAE;YAClE,IAAI,UAAU,EAAE;gBACf,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAA;aACjC;iBAAM;gBACN,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;gBACrB,IAAI,CAAC,SAAS,GAAG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AAG,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG;gBACvB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;gBACzB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM;gBAC7B,MAAM,EAAE,CAAC;gBACT,WAAW,EAAE,CAAC;aACd,EAAE;gBACF,IAAI,EAAE,UAAU;aAChB,CAAC,CAAA;SACF;QAED,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC9B,QAAQ;YACR,YAAY,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC,CAAA;IACH,CAAC;CACD,CAAA;AAlHY;IAAX,kBAAK,CAAC,GAAG,CAAC;;gEAAe;AACd;IAAX,kBAAK,CAAC,GAAG,CAAC;;iEAAgB;AACf;IAAX,kBAAK,CAAC,GAAG,CAAC;;oEAAoB;AACnB;IAAX,kBAAK,CAAC,GAAG,CAAC;;oEAAoB;AACjB;IAAb,mBAAM,CAAC,IAAI,CAAC;;gEAAmB;AANZ,gCAAgC;IAPpD,sBAAS,CAAC;QACV,QAAQ,EAAE,4BAA4B;QACtC,QAAQ,EAAE,OAAO,CAAC,mCAAmC,CAAC;QACtD,OAAO,EAAE;YACR,WAAW,EAAE,SAAS;SACtB;KACD,CAAC;GACmB,gCAAgC,CAoHpD;kBApHoB,gCAAgC"}
1
+ {"version":3,"file":"date-time-zone-city-picker.js","sourceRoot":"","sources":["../../../../src/components/date-time-zone-city-picker/date-time-zone-city-picker.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,8CAAwD;AACxD,iCAAgC;AAChC,qEAAsD;AActD,IAAqB,gCAAgC,GAArD,MAAqB,gCAAgC;IAepD,OAAO;QAEN,4CAA4C;QAC5C,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAA4B,EAAE,EAAE;;YAClE,IAAI,UAAU,EAAE;gBACf,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAA;aACjC;iBAAM;gBACN,IAAI,CAA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;;oEAAoB;AACjB;IAAb,mBAAM,CAAC,IAAI,CAAC;;gEAAmB;AAClB;IAAb,mBAAM,CAAC,IAAI,CAAC;;kEAA0D;AAPnD,gCAAgC;IAPpD,sBAAS,CAAC;QACV,QAAQ,EAAE,4BAA4B;QACtC,QAAQ,EAAE,OAAO,CAAC,mCAAmC,CAAC;QACtD,OAAO,EAAE;YACR,WAAW,EAAE,SAAS;SACtB;KACD,CAAC;GACmB,gCAAgC,CA4HpD;kBA5HoB,gCAAgC"}
@@ -1,3 +1,4 @@
1
1
  import './date-time-zone-city-picker';
2
2
  import './time-zone-city-picker';
3
- export { DateTimeZoneCity } from './date-time-zone-city-picker';
3
+ export type { DateTimeZoneCity } from './date-time-zone-city-picker';
4
+ export { default as DateTimeZoneCityPickerController } from './date-time-zone-city-picker';
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DateTimeZoneCityPickerController = void 0;
3
7
  require("./date-time-zone-city-picker");
4
8
  require("./time-zone-city-picker");
9
+ var date_time_zone_city_picker_1 = require("./date-time-zone-city-picker");
10
+ Object.defineProperty(exports, "DateTimeZoneCityPickerController", { enumerable: true, get: function () { return __importDefault(date_time_zone_city_picker_1).default; } });
5
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/date-time-zone-city-picker/index.ts"],"names":[],"mappings":";;AAAA,wCAAqC;AACrC,mCAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/date-time-zone-city-picker/index.ts"],"names":[],"mappings":";;;;;;AAAA,wCAAqC;AACrC,mCAAgC;AAGhC,2EAA0F;AAAjF,+JAAA,OAAO,OAAoC"}
@@ -47,5 +47,6 @@ import './translate';
47
47
  import './tree';
48
48
  import './type-string';
49
49
  import './url-modification';
50
- export { DateTimeZoneCity } from './date-time-zone-city-picker';
51
- export { TimeZone } from './date-time-zone-city-picker/time-zone-city.service';
50
+ export type { DateTimeZoneCity } from './date-time-zone-city-picker';
51
+ export type { TimeZone } from './date-time-zone-city-picker/time-zone-city.service';
52
+ export { getTimeZone, getTimeZones, clearTimeZoneCache } from './date-time-zone-city-picker/time-zone-city.service';
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearTimeZoneCache = exports.getTimeZones = exports.getTimeZone = void 0;
3
4
  require("./actionable-empty-state");
4
5
  require("./auto-complete");
5
6
  require("./auto-focus");
@@ -49,4 +50,8 @@ require("./translate");
49
50
  require("./tree");
50
51
  require("./type-string");
51
52
  require("./url-modification");
53
+ var time_zone_city_service_1 = require("./date-time-zone-city-picker/time-zone-city.service");
54
+ Object.defineProperty(exports, "getTimeZone", { enumerable: true, get: function () { return time_zone_city_service_1.getTimeZone; } });
55
+ Object.defineProperty(exports, "getTimeZones", { enumerable: true, get: function () { return time_zone_city_service_1.getTimeZones; } });
56
+ Object.defineProperty(exports, "clearTimeZoneCache", { enumerable: true, get: function () { return time_zone_city_service_1.clearTimeZoneCache; } });
52
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;AAAA,oCAAiC;AACjC,2BAAwB;AACxB,wBAAqB;AACrB,mBAAgB;AAChB,sBAAmB;AACnB,sBAAmB;AACnB,yBAAsB;AACtB,yBAAsB;AACtB,uBAAoB;AACpB,wBAAqB;AACrB,wCAAqC;AACrC,mCAAgC;AAChC,2BAAwB;AACxB,sBAAmB;AACnB,sBAAmB;AACnB,kCAA+B;AAC/B,2BAAwB;AACxB,kCAA+B;AAC/B,oBAAiB;AACjB,mCAAgC;AAChC,yBAAsB;AACtB,6BAA0B;AAC1B,uBAAoB;AACpB,2BAAwB;AACxB,kBAAe;AACf,+BAA4B;AAC5B,+BAA4B;AAC5B,6BAA0B;AAC1B,2BAAwB;AACxB,mBAAgB;AAChB,4BAAyB;AACzB,4BAAyB;AACzB,oBAAiB;AACjB,0BAAuB;AACvB,6BAA0B;AAC1B,+BAA4B;AAC5B,uBAAoB;AACpB,yBAAsB;AACtB,+BAA4B;AAC5B,kBAAe;AACf,uBAAoB;AACpB,sBAAmB;AACnB,uBAAoB;AACpB,mBAAgB;AAChB,wBAAqB;AACrB,uBAAoB;AACpB,kBAAe;AACf,yBAAsB;AACtB,8BAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,oCAAiC;AACjC,2BAAwB;AACxB,wBAAqB;AACrB,mBAAgB;AAChB,sBAAmB;AACnB,sBAAmB;AACnB,yBAAsB;AACtB,yBAAsB;AACtB,uBAAoB;AACpB,wBAAqB;AACrB,wCAAqC;AACrC,mCAAgC;AAChC,2BAAwB;AACxB,sBAAmB;AACnB,sBAAmB;AACnB,kCAA+B;AAC/B,2BAAwB;AACxB,kCAA+B;AAC/B,oBAAiB;AACjB,mCAAgC;AAChC,yBAAsB;AACtB,6BAA0B;AAC1B,uBAAoB;AACpB,2BAAwB;AACxB,kBAAe;AACf,+BAA4B;AAC5B,+BAA4B;AAC5B,6BAA0B;AAC1B,2BAAwB;AACxB,mBAAgB;AAChB,4BAAyB;AACzB,4BAAyB;AACzB,oBAAiB;AACjB,0BAAuB;AACvB,6BAA0B;AAC1B,+BAA4B;AAC5B,uBAAoB;AACpB,yBAAsB;AACtB,+BAA4B;AAC5B,kBAAe;AACf,uBAAoB;AACpB,sBAAmB;AACnB,uBAAoB;AACpB,mBAAgB;AAChB,wBAAqB;AACrB,uBAAoB;AACpB,kBAAe;AACf,yBAAsB;AACtB,8BAA2B;AAK3B,8FAAmH;AAA1G,qHAAA,WAAW,OAAA;AAAE,sHAAA,YAAY,OAAA;AAAE,4HAAA,kBAAkB,OAAA"}
@@ -477,8 +477,8 @@
477
477
  "affectsGlobalScope": false
478
478
  },
479
479
  "../src/components/date-time-zone-city-picker/date-time-zone-city-picker.ts": {
480
- "version": "bb4e2fa21fb365291c90f1d17ceeb720eb9ff9514749074f5aeab44d0023f7a6",
481
- "signature": "fab2b0de8d5296cfb3c4c58e8a772db2243198aacde8d43d8bf190835f7a9e98",
480
+ "version": "9edbd92d1f24807d277da711c20a45a2048ef69809e27ef8bbb195098306aee4",
481
+ "signature": "83b2b7b3169e7f02a65593bd488b1fe24db16ff975635cf7dc7a03200301196b",
482
482
  "affectsGlobalScope": false
483
483
  },
484
484
  "../src/components/date-time-zone-city-picker/time-zone-city-picker.ts": {
@@ -487,8 +487,8 @@
487
487
  "affectsGlobalScope": false
488
488
  },
489
489
  "../src/components/date-time-zone-city-picker/index.ts": {
490
- "version": "16ce820a73bc551be0e14bf54478e290f1aa4daf7f4ca7ae0d51388d57263841",
491
- "signature": "b9dd80825d2b506b5fb5c1aec8f1552c8efa2da566df59442a94e096078dd4af",
490
+ "version": "bfcebaaa4400ddce457416d75181ece22ab19f68d8d4cc14fd7c35f6098b1f6e",
491
+ "signature": "e38edcbeb8ba0f8a6bb9e916ce9111df8885b43351dad239db7ded9d51274424",
492
492
  "affectsGlobalScope": false
493
493
  },
494
494
  "../src/components/date-time-zone-picker/date-time-zone-factory.ts": {
@@ -1597,8 +1597,8 @@
1597
1597
  "affectsGlobalScope": false
1598
1598
  },
1599
1599
  "../src/components/index.ts": {
1600
- "version": "04fec9c00f26993314ec28c9ecae264ec0d4ccb1f8e3506966baade1af71f0ba",
1601
- "signature": "7d51839fbf839fe6f28017d61c794e57426873d1b04325ccacb08819d7400e90",
1600
+ "version": "9c125d0f982c2fba84f8aaa5789c03343c11b1eec3de21a9fb3630b6563474b5",
1601
+ "signature": "8f8ff9873621332db8e5b6ef14c9a4f63f4ab042ca1c05acf7075d7830df3f14",
1602
1602
  "affectsGlobalScope": false
1603
1603
  },
1604
1604
  "../typings/index.d.ts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediafly/js-ui",
3
- "version": "51.6.0-6",
3
+ "version": "51.6.0-8",
4
4
  "license": "UNLICENSED",
5
5
  "description": "UI components for Mediafly Angular applications",
6
6
  "repository": {
@@ -22,6 +22,7 @@ export default class DateTimeZoneCityPickerController implements IComponentContr
22
22
  @Input('=') isDisabled: boolean
23
23
  @Input('@') isRequired: boolean
24
24
  @Output('&?') onOpen: () => void
25
+ @Output('&?') onChange: (param: { newValue: DateTimeZoneCity }) => void
25
26
 
26
27
  protected ngModelCtrl: ng.INgModelController
27
28
 
@@ -40,16 +41,19 @@ export default class DateTimeZoneCityPickerController implements IComponentContr
40
41
  this.timeLuxon = null
41
42
  this.timeZoneName = null
42
43
  }
44
+ this.onChange?.({ newValue: modelValue })
43
45
  return modelValue
44
46
  })
45
47
 
46
48
  this.ngModelCtrl.$parsers.push((modelValue: DateTimeZoneCity) => {
49
+ this.onChange?.({ newValue: modelValue })
47
50
  return modelValue
48
51
  })
49
52
  }
50
53
 
51
54
  private initModelFromAPI(value: DateTimeZoneCity): void {
52
55
 
56
+ console.log(`-----> initModelFromAPI: ${JSON.stringify(value)}`)
53
57
  let luxon: DateTime | undefined
54
58
  if (!value?.dateTime) {
55
59
  luxon = undefined
@@ -88,22 +92,26 @@ export default class DateTimeZoneCityPickerController implements IComponentContr
88
92
 
89
93
  const bestMatchTimeZone = getTimeZone(value.timeZoneName)
90
94
  this.timeZoneName = bestMatchTimeZone?.timeZoneName || Intl.DateTimeFormat().resolvedOptions().timeZone
95
+ console.log(`-----> and so: ${this.dateLuxon} and ${this.timeLuxon} and ${this.timeZoneName}`)
91
96
  }
92
97
 
93
98
  protected updateDate(dateLuxon: DateTime): void {
94
99
 
100
+ console.log(`-----> updateDate: ${dateLuxon} (time is ${this.timeLuxon})`)
95
101
  this.dateLuxon = dateLuxon
96
102
  this.updateModel()
97
103
  }
98
104
 
99
105
  protected updateTime(timeLuxon: DateTime): void {
100
106
 
107
+ console.log(`-----> updateTime: ${timeLuxon}`)
101
108
  this.timeLuxon = timeLuxon
102
109
  this.updateModel()
103
110
  }
104
111
 
105
112
  protected updateTimeZone(timeZoneName: string): void {
106
113
 
114
+ console.log(`-----> updateTimeZone: ${timeZoneName}`)
107
115
  this.timeZoneName = timeZoneName
108
116
  this.updateModel()
109
117
  }
@@ -1,4 +1,5 @@
1
1
  import './date-time-zone-city-picker'
2
2
  import './time-zone-city-picker'
3
3
 
4
- export { DateTimeZoneCity } from './date-time-zone-city-picker'
4
+ export type { DateTimeZoneCity } from './date-time-zone-city-picker'
5
+ export { default as DateTimeZoneCityPickerController } from './date-time-zone-city-picker'
@@ -49,5 +49,6 @@ import './type-string'
49
49
  import './url-modification'
50
50
 
51
51
  // Export reuseable types and interfaces
52
- export { DateTimeZoneCity } from './date-time-zone-city-picker'
53
- export { TimeZone } from './date-time-zone-city-picker/time-zone-city.service'
52
+ export type { DateTimeZoneCity } from './date-time-zone-city-picker'
53
+ export type { TimeZone } from './date-time-zone-city-picker/time-zone-city.service'
54
+ export { getTimeZone, getTimeZones, clearTimeZoneCache } from './date-time-zone-city-picker/time-zone-city.service'