@tulipnpm/timekit_project_selector 3.0.0-rc.0 → 3.0.0-rc.2
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.
- package/dist/timekit_project_selector.js +314 -124
- package/dist/timekit_project_selector.min.js +1 -1
- package/package-lock.json +25103 -0
- package/package.json +1 -1
|
@@ -25455,13 +25455,91 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25455
25455
|
}() // New function
|
|
25456
25456
|
|
|
25457
25457
|
}, {
|
|
25458
|
-
key: "
|
|
25458
|
+
key: "getServicesByLocationId",
|
|
25459
25459
|
value: function () {
|
|
25460
|
-
var
|
|
25461
|
-
var
|
|
25460
|
+
var _getServicesByLocationId = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee7() {
|
|
25461
|
+
var locationId,
|
|
25462
|
+
query,
|
|
25463
|
+
_args7 = arguments;
|
|
25462
25464
|
return regenerator_default().wrap(function _callee7$(_context7) {
|
|
25463
25465
|
while (1) {
|
|
25464
25466
|
switch (_context7.prev = _context7.next) {
|
|
25467
|
+
case 0:
|
|
25468
|
+
locationId = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : null;
|
|
25469
|
+
query = this.getMetaQueryForServices();
|
|
25470
|
+
|
|
25471
|
+
if (locationId) {
|
|
25472
|
+
query = query + ";locations.uuid:".concat(locationId);
|
|
25473
|
+
}
|
|
25474
|
+
|
|
25475
|
+
_context7.next = 5;
|
|
25476
|
+
return this.getServicesByMetaQuery(query);
|
|
25477
|
+
|
|
25478
|
+
case 5:
|
|
25479
|
+
return _context7.abrupt("return", _context7.sent);
|
|
25480
|
+
|
|
25481
|
+
case 6:
|
|
25482
|
+
case "end":
|
|
25483
|
+
return _context7.stop();
|
|
25484
|
+
}
|
|
25485
|
+
}
|
|
25486
|
+
}, _callee7, this);
|
|
25487
|
+
}));
|
|
25488
|
+
|
|
25489
|
+
function getServicesByLocationId() {
|
|
25490
|
+
return _getServicesByLocationId.apply(this, arguments);
|
|
25491
|
+
}
|
|
25492
|
+
|
|
25493
|
+
return getServicesByLocationId;
|
|
25494
|
+
}() // New function
|
|
25495
|
+
|
|
25496
|
+
}, {
|
|
25497
|
+
key: "getLocationsByServiceId",
|
|
25498
|
+
value: function () {
|
|
25499
|
+
var _getLocationsByServiceId = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee8() {
|
|
25500
|
+
var serviceId,
|
|
25501
|
+
query,
|
|
25502
|
+
_args8 = arguments;
|
|
25503
|
+
return regenerator_default().wrap(function _callee8$(_context8) {
|
|
25504
|
+
while (1) {
|
|
25505
|
+
switch (_context8.prev = _context8.next) {
|
|
25506
|
+
case 0:
|
|
25507
|
+
serviceId = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : null;
|
|
25508
|
+
query = this.getMetaQueryForLocations();
|
|
25509
|
+
|
|
25510
|
+
if (serviceId) {
|
|
25511
|
+
query = query + ";services.uuid:".concat(serviceId);
|
|
25512
|
+
}
|
|
25513
|
+
|
|
25514
|
+
_context8.next = 5;
|
|
25515
|
+
return this.getLocationsByMetaQuery(query);
|
|
25516
|
+
|
|
25517
|
+
case 5:
|
|
25518
|
+
return _context8.abrupt("return", _context8.sent);
|
|
25519
|
+
|
|
25520
|
+
case 6:
|
|
25521
|
+
case "end":
|
|
25522
|
+
return _context8.stop();
|
|
25523
|
+
}
|
|
25524
|
+
}
|
|
25525
|
+
}, _callee8, this);
|
|
25526
|
+
}));
|
|
25527
|
+
|
|
25528
|
+
function getLocationsByServiceId() {
|
|
25529
|
+
return _getLocationsByServiceId.apply(this, arguments);
|
|
25530
|
+
}
|
|
25531
|
+
|
|
25532
|
+
return getLocationsByServiceId;
|
|
25533
|
+
}() // New function
|
|
25534
|
+
|
|
25535
|
+
}, {
|
|
25536
|
+
key: "getServiceLocations",
|
|
25537
|
+
value: function () {
|
|
25538
|
+
var _getServiceLocations = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee9(includePrivate) {
|
|
25539
|
+
var query;
|
|
25540
|
+
return regenerator_default().wrap(function _callee9$(_context9) {
|
|
25541
|
+
while (1) {
|
|
25542
|
+
switch (_context9.prev = _context9.next) {
|
|
25465
25543
|
case 0:
|
|
25466
25544
|
query = this.getMetaQueryForServiceLocations();
|
|
25467
25545
|
|
|
@@ -25469,18 +25547,18 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25469
25547
|
query = query + ';meta.t_private:0';
|
|
25470
25548
|
}
|
|
25471
25549
|
|
|
25472
|
-
|
|
25550
|
+
_context9.next = 4;
|
|
25473
25551
|
return this.getProjectsByMetaQuery(query);
|
|
25474
25552
|
|
|
25475
25553
|
case 4:
|
|
25476
|
-
return
|
|
25554
|
+
return _context9.abrupt("return", _context9.sent);
|
|
25477
25555
|
|
|
25478
25556
|
case 5:
|
|
25479
25557
|
case "end":
|
|
25480
|
-
return
|
|
25558
|
+
return _context9.stop();
|
|
25481
25559
|
}
|
|
25482
25560
|
}
|
|
25483
|
-
},
|
|
25561
|
+
}, _callee9, this);
|
|
25484
25562
|
}));
|
|
25485
25563
|
|
|
25486
25564
|
function getServiceLocations(_x5) {
|
|
@@ -25493,11 +25571,11 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25493
25571
|
}, {
|
|
25494
25572
|
key: "getServices",
|
|
25495
25573
|
value: function () {
|
|
25496
|
-
var _getServices = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25574
|
+
var _getServices = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee10(includePrivate) {
|
|
25497
25575
|
var query;
|
|
25498
|
-
return regenerator_default().wrap(function
|
|
25576
|
+
return regenerator_default().wrap(function _callee10$(_context10) {
|
|
25499
25577
|
while (1) {
|
|
25500
|
-
switch (
|
|
25578
|
+
switch (_context10.prev = _context10.next) {
|
|
25501
25579
|
case 0:
|
|
25502
25580
|
query = this.getMetaQueryForServices();
|
|
25503
25581
|
|
|
@@ -25505,18 +25583,18 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25505
25583
|
query = query + ';meta.t_private:0';
|
|
25506
25584
|
}
|
|
25507
25585
|
|
|
25508
|
-
|
|
25586
|
+
_context10.next = 4;
|
|
25509
25587
|
return this.getServicesByMetaQuery(query + '&include=locations');
|
|
25510
25588
|
|
|
25511
25589
|
case 4:
|
|
25512
|
-
return
|
|
25590
|
+
return _context10.abrupt("return", _context10.sent);
|
|
25513
25591
|
|
|
25514
25592
|
case 5:
|
|
25515
25593
|
case "end":
|
|
25516
|
-
return
|
|
25594
|
+
return _context10.stop();
|
|
25517
25595
|
}
|
|
25518
25596
|
}
|
|
25519
|
-
},
|
|
25597
|
+
}, _callee10, this);
|
|
25520
25598
|
}));
|
|
25521
25599
|
|
|
25522
25600
|
function getServices(_x6) {
|
|
@@ -25529,33 +25607,33 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25529
25607
|
}, {
|
|
25530
25608
|
key: "getStoreProjects",
|
|
25531
25609
|
value: function () {
|
|
25532
|
-
var _getStoreProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25610
|
+
var _getStoreProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee11() {
|
|
25533
25611
|
var storeQuery,
|
|
25534
25612
|
query,
|
|
25535
|
-
|
|
25536
|
-
return regenerator_default().wrap(function
|
|
25613
|
+
_args11 = arguments;
|
|
25614
|
+
return regenerator_default().wrap(function _callee11$(_context11) {
|
|
25537
25615
|
while (1) {
|
|
25538
|
-
switch (
|
|
25616
|
+
switch (_context11.prev = _context11.next) {
|
|
25539
25617
|
case 0:
|
|
25540
|
-
storeQuery =
|
|
25618
|
+
storeQuery = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : null;
|
|
25541
25619
|
query = this.getMetaQueryForStores();
|
|
25542
25620
|
|
|
25543
25621
|
if (storeQuery) {
|
|
25544
25622
|
query = query + ";".concat(storeQuery);
|
|
25545
25623
|
}
|
|
25546
25624
|
|
|
25547
|
-
|
|
25625
|
+
_context11.next = 5;
|
|
25548
25626
|
return this.getProjectsByMetaQuery(query);
|
|
25549
25627
|
|
|
25550
25628
|
case 5:
|
|
25551
|
-
return
|
|
25629
|
+
return _context11.abrupt("return", _context11.sent);
|
|
25552
25630
|
|
|
25553
25631
|
case 6:
|
|
25554
25632
|
case "end":
|
|
25555
|
-
return
|
|
25633
|
+
return _context11.stop();
|
|
25556
25634
|
}
|
|
25557
25635
|
}
|
|
25558
|
-
},
|
|
25636
|
+
}, _callee11, this);
|
|
25559
25637
|
}));
|
|
25560
25638
|
|
|
25561
25639
|
function getStoreProjects() {
|
|
@@ -25568,11 +25646,11 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25568
25646
|
}, {
|
|
25569
25647
|
key: "getStoreAppointmentProjects",
|
|
25570
25648
|
value: function () {
|
|
25571
|
-
var _getStoreAppointmentProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25649
|
+
var _getStoreAppointmentProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee12(includePrivate) {
|
|
25572
25650
|
var query;
|
|
25573
|
-
return regenerator_default().wrap(function
|
|
25651
|
+
return regenerator_default().wrap(function _callee12$(_context12) {
|
|
25574
25652
|
while (1) {
|
|
25575
|
-
switch (
|
|
25653
|
+
switch (_context12.prev = _context12.next) {
|
|
25576
25654
|
case 0:
|
|
25577
25655
|
query = this.getMetaQueryForServiceLocations();
|
|
25578
25656
|
|
|
@@ -25580,18 +25658,18 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25580
25658
|
query = query + ';meta.t_private:0';
|
|
25581
25659
|
}
|
|
25582
25660
|
|
|
25583
|
-
|
|
25661
|
+
_context12.next = 4;
|
|
25584
25662
|
return this.getProjectsByMetaQuery(query);
|
|
25585
25663
|
|
|
25586
25664
|
case 4:
|
|
25587
|
-
return
|
|
25665
|
+
return _context12.abrupt("return", _context12.sent);
|
|
25588
25666
|
|
|
25589
25667
|
case 5:
|
|
25590
25668
|
case "end":
|
|
25591
|
-
return
|
|
25669
|
+
return _context12.stop();
|
|
25592
25670
|
}
|
|
25593
25671
|
}
|
|
25594
|
-
},
|
|
25672
|
+
}, _callee12, this);
|
|
25595
25673
|
}));
|
|
25596
25674
|
|
|
25597
25675
|
function getStoreAppointmentProjects(_x7) {
|
|
@@ -25604,11 +25682,11 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25604
25682
|
}, {
|
|
25605
25683
|
key: "getGlobalAppointmentProjects",
|
|
25606
25684
|
value: function () {
|
|
25607
|
-
var _getGlobalAppointmentProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25685
|
+
var _getGlobalAppointmentProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee13(includePrivate) {
|
|
25608
25686
|
var query;
|
|
25609
|
-
return regenerator_default().wrap(function
|
|
25687
|
+
return regenerator_default().wrap(function _callee13$(_context13) {
|
|
25610
25688
|
while (1) {
|
|
25611
|
-
switch (
|
|
25689
|
+
switch (_context13.prev = _context13.next) {
|
|
25612
25690
|
case 0:
|
|
25613
25691
|
query = this.getMetaQueryForGlobalAppointments();
|
|
25614
25692
|
|
|
@@ -25616,18 +25694,18 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25616
25694
|
query = query + ';meta.t_private:0';
|
|
25617
25695
|
}
|
|
25618
25696
|
|
|
25619
|
-
|
|
25697
|
+
_context13.next = 4;
|
|
25620
25698
|
return this.getProjectsByMetaQuery(query);
|
|
25621
25699
|
|
|
25622
25700
|
case 4:
|
|
25623
|
-
return
|
|
25701
|
+
return _context13.abrupt("return", _context13.sent);
|
|
25624
25702
|
|
|
25625
25703
|
case 5:
|
|
25626
25704
|
case "end":
|
|
25627
|
-
return
|
|
25705
|
+
return _context13.stop();
|
|
25628
25706
|
}
|
|
25629
25707
|
}
|
|
25630
|
-
},
|
|
25708
|
+
}, _callee13, this);
|
|
25631
25709
|
}));
|
|
25632
25710
|
|
|
25633
25711
|
function getGlobalAppointmentProjects(_x8) {
|
|
@@ -25639,10 +25717,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25639
25717
|
}, {
|
|
25640
25718
|
key: "getGlobalAppointments",
|
|
25641
25719
|
value: function () {
|
|
25642
|
-
var _getGlobalAppointments = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25643
|
-
return regenerator_default().wrap(function
|
|
25720
|
+
var _getGlobalAppointments = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee14(includePrivate) {
|
|
25721
|
+
return regenerator_default().wrap(function _callee14$(_context14) {
|
|
25644
25722
|
while (1) {
|
|
25645
|
-
switch (
|
|
25723
|
+
switch (_context14.prev = _context14.next) {
|
|
25646
25724
|
case 0:
|
|
25647
25725
|
if (!includePrivate) {
|
|
25648
25726
|
query = query + 'meta.t_private:0';
|
|
@@ -25650,10 +25728,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25650
25728
|
|
|
25651
25729
|
case 1:
|
|
25652
25730
|
case "end":
|
|
25653
|
-
return
|
|
25731
|
+
return _context14.stop();
|
|
25654
25732
|
}
|
|
25655
25733
|
}
|
|
25656
|
-
},
|
|
25734
|
+
}, _callee14);
|
|
25657
25735
|
}));
|
|
25658
25736
|
|
|
25659
25737
|
function getGlobalAppointments(_x9) {
|
|
@@ -25666,34 +25744,34 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25666
25744
|
}, {
|
|
25667
25745
|
key: "getLocationsByMetaQuery",
|
|
25668
25746
|
value: function () {
|
|
25669
|
-
var _getLocationsByMetaQuery = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25747
|
+
var _getLocationsByMetaQuery = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee16(query) {
|
|
25670
25748
|
var _this = this;
|
|
25671
25749
|
|
|
25672
25750
|
var limit,
|
|
25673
|
-
|
|
25674
|
-
return regenerator_default().wrap(function
|
|
25751
|
+
_args16 = arguments;
|
|
25752
|
+
return regenerator_default().wrap(function _callee16$(_context16) {
|
|
25675
25753
|
while (1) {
|
|
25676
|
-
switch (
|
|
25754
|
+
switch (_context16.prev = _context16.next) {
|
|
25677
25755
|
case 0:
|
|
25678
|
-
limit =
|
|
25679
|
-
return
|
|
25680
|
-
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25681
|
-
return regenerator_default().wrap(function
|
|
25756
|
+
limit = _args16.length > 1 && _args16[1] !== undefined ? _args16[1] : 100;
|
|
25757
|
+
return _context16.abrupt("return", this.timeKitPaginate( /*#__PURE__*/function () {
|
|
25758
|
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee15(page) {
|
|
25759
|
+
return regenerator_default().wrap(function _callee15$(_context15) {
|
|
25682
25760
|
while (1) {
|
|
25683
|
-
switch (
|
|
25761
|
+
switch (_context15.prev = _context15.next) {
|
|
25684
25762
|
case 0:
|
|
25685
|
-
|
|
25763
|
+
_context15.next = 2;
|
|
25686
25764
|
return _this.getLocationsEndpoint("search=".concat(query, "&limit=").concat(limit, "&page=").concat(page));
|
|
25687
25765
|
|
|
25688
25766
|
case 2:
|
|
25689
|
-
return
|
|
25767
|
+
return _context15.abrupt("return", _context15.sent);
|
|
25690
25768
|
|
|
25691
25769
|
case 3:
|
|
25692
25770
|
case "end":
|
|
25693
|
-
return
|
|
25771
|
+
return _context15.stop();
|
|
25694
25772
|
}
|
|
25695
25773
|
}
|
|
25696
|
-
},
|
|
25774
|
+
}, _callee15);
|
|
25697
25775
|
}));
|
|
25698
25776
|
|
|
25699
25777
|
return function (_x11) {
|
|
@@ -25703,10 +25781,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25703
25781
|
|
|
25704
25782
|
case 2:
|
|
25705
25783
|
case "end":
|
|
25706
|
-
return
|
|
25784
|
+
return _context16.stop();
|
|
25707
25785
|
}
|
|
25708
25786
|
}
|
|
25709
|
-
},
|
|
25787
|
+
}, _callee16, this);
|
|
25710
25788
|
}));
|
|
25711
25789
|
|
|
25712
25790
|
function getLocationsByMetaQuery(_x10) {
|
|
@@ -25719,34 +25797,34 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25719
25797
|
}, {
|
|
25720
25798
|
key: "getServicesByMetaQuery",
|
|
25721
25799
|
value: function () {
|
|
25722
|
-
var _getServicesByMetaQuery = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25800
|
+
var _getServicesByMetaQuery = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee18(query) {
|
|
25723
25801
|
var _this2 = this;
|
|
25724
25802
|
|
|
25725
25803
|
var limit,
|
|
25726
|
-
|
|
25727
|
-
return regenerator_default().wrap(function
|
|
25804
|
+
_args18 = arguments;
|
|
25805
|
+
return regenerator_default().wrap(function _callee18$(_context18) {
|
|
25728
25806
|
while (1) {
|
|
25729
|
-
switch (
|
|
25807
|
+
switch (_context18.prev = _context18.next) {
|
|
25730
25808
|
case 0:
|
|
25731
|
-
limit =
|
|
25732
|
-
return
|
|
25733
|
-
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25734
|
-
return regenerator_default().wrap(function
|
|
25809
|
+
limit = _args18.length > 1 && _args18[1] !== undefined ? _args18[1] : 100;
|
|
25810
|
+
return _context18.abrupt("return", this.timeKitPaginate( /*#__PURE__*/function () {
|
|
25811
|
+
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee17(page) {
|
|
25812
|
+
return regenerator_default().wrap(function _callee17$(_context17) {
|
|
25735
25813
|
while (1) {
|
|
25736
|
-
switch (
|
|
25814
|
+
switch (_context17.prev = _context17.next) {
|
|
25737
25815
|
case 0:
|
|
25738
|
-
|
|
25816
|
+
_context17.next = 2;
|
|
25739
25817
|
return _this2.getServicesEndpoint("search=".concat(query, "&limit=").concat(limit, "&page=").concat(page));
|
|
25740
25818
|
|
|
25741
25819
|
case 2:
|
|
25742
|
-
return
|
|
25820
|
+
return _context17.abrupt("return", _context17.sent);
|
|
25743
25821
|
|
|
25744
25822
|
case 3:
|
|
25745
25823
|
case "end":
|
|
25746
|
-
return
|
|
25824
|
+
return _context17.stop();
|
|
25747
25825
|
}
|
|
25748
25826
|
}
|
|
25749
|
-
},
|
|
25827
|
+
}, _callee17);
|
|
25750
25828
|
}));
|
|
25751
25829
|
|
|
25752
25830
|
return function (_x13) {
|
|
@@ -25756,10 +25834,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25756
25834
|
|
|
25757
25835
|
case 2:
|
|
25758
25836
|
case "end":
|
|
25759
|
-
return
|
|
25837
|
+
return _context18.stop();
|
|
25760
25838
|
}
|
|
25761
25839
|
}
|
|
25762
|
-
},
|
|
25840
|
+
}, _callee18, this);
|
|
25763
25841
|
}));
|
|
25764
25842
|
|
|
25765
25843
|
function getServicesByMetaQuery(_x12) {
|
|
@@ -25771,34 +25849,34 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25771
25849
|
}, {
|
|
25772
25850
|
key: "getProjectsByMetaQuery",
|
|
25773
25851
|
value: function () {
|
|
25774
|
-
var _getProjectsByMetaQuery = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25852
|
+
var _getProjectsByMetaQuery = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee20(query) {
|
|
25775
25853
|
var _this3 = this;
|
|
25776
25854
|
|
|
25777
25855
|
var limit,
|
|
25778
|
-
|
|
25779
|
-
return regenerator_default().wrap(function
|
|
25856
|
+
_args20 = arguments;
|
|
25857
|
+
return regenerator_default().wrap(function _callee20$(_context20) {
|
|
25780
25858
|
while (1) {
|
|
25781
|
-
switch (
|
|
25859
|
+
switch (_context20.prev = _context20.next) {
|
|
25782
25860
|
case 0:
|
|
25783
|
-
limit =
|
|
25784
|
-
return
|
|
25785
|
-
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25786
|
-
return regenerator_default().wrap(function
|
|
25861
|
+
limit = _args20.length > 1 && _args20[1] !== undefined ? _args20[1] : 100;
|
|
25862
|
+
return _context20.abrupt("return", this.timeKitPaginate( /*#__PURE__*/function () {
|
|
25863
|
+
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee19(page) {
|
|
25864
|
+
return regenerator_default().wrap(function _callee19$(_context19) {
|
|
25787
25865
|
while (1) {
|
|
25788
|
-
switch (
|
|
25866
|
+
switch (_context19.prev = _context19.next) {
|
|
25789
25867
|
case 0:
|
|
25790
|
-
|
|
25868
|
+
_context19.next = 2;
|
|
25791
25869
|
return _this3.getProjects("search=".concat(query, "&limit=").concat(limit, "&page=").concat(page, "&include=locations"));
|
|
25792
25870
|
|
|
25793
25871
|
case 2:
|
|
25794
|
-
return
|
|
25872
|
+
return _context19.abrupt("return", _context19.sent);
|
|
25795
25873
|
|
|
25796
25874
|
case 3:
|
|
25797
25875
|
case "end":
|
|
25798
|
-
return
|
|
25876
|
+
return _context19.stop();
|
|
25799
25877
|
}
|
|
25800
25878
|
}
|
|
25801
|
-
},
|
|
25879
|
+
}, _callee19);
|
|
25802
25880
|
}));
|
|
25803
25881
|
|
|
25804
25882
|
return function (_x15) {
|
|
@@ -25808,10 +25886,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25808
25886
|
|
|
25809
25887
|
case 2:
|
|
25810
25888
|
case "end":
|
|
25811
|
-
return
|
|
25889
|
+
return _context20.stop();
|
|
25812
25890
|
}
|
|
25813
25891
|
}
|
|
25814
|
-
},
|
|
25892
|
+
}, _callee20, this);
|
|
25815
25893
|
}));
|
|
25816
25894
|
|
|
25817
25895
|
function getProjectsByMetaQuery(_x14) {
|
|
@@ -25824,34 +25902,34 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25824
25902
|
}, {
|
|
25825
25903
|
key: "getProjectsByMetaValue",
|
|
25826
25904
|
value: function () {
|
|
25827
|
-
var _getProjectsByMetaValue = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25905
|
+
var _getProjectsByMetaValue = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee22(key, value) {
|
|
25828
25906
|
var _this4 = this;
|
|
25829
25907
|
|
|
25830
25908
|
var limit,
|
|
25831
|
-
|
|
25832
|
-
return regenerator_default().wrap(function
|
|
25909
|
+
_args22 = arguments;
|
|
25910
|
+
return regenerator_default().wrap(function _callee22$(_context22) {
|
|
25833
25911
|
while (1) {
|
|
25834
|
-
switch (
|
|
25912
|
+
switch (_context22.prev = _context22.next) {
|
|
25835
25913
|
case 0:
|
|
25836
|
-
limit =
|
|
25837
|
-
return
|
|
25838
|
-
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25839
|
-
return regenerator_default().wrap(function
|
|
25914
|
+
limit = _args22.length > 2 && _args22[2] !== undefined ? _args22[2] : 100;
|
|
25915
|
+
return _context22.abrupt("return", this.timeKitPaginate( /*#__PURE__*/function () {
|
|
25916
|
+
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee21(page) {
|
|
25917
|
+
return regenerator_default().wrap(function _callee21$(_context21) {
|
|
25840
25918
|
while (1) {
|
|
25841
|
-
switch (
|
|
25919
|
+
switch (_context21.prev = _context21.next) {
|
|
25842
25920
|
case 0:
|
|
25843
|
-
|
|
25921
|
+
_context21.next = 2;
|
|
25844
25922
|
return _this4.getProjects("search=meta.".concat(key, ":").concat(value, "&limit=").concat(limit, "&page=").concat(page));
|
|
25845
25923
|
|
|
25846
25924
|
case 2:
|
|
25847
|
-
return
|
|
25925
|
+
return _context21.abrupt("return", _context21.sent);
|
|
25848
25926
|
|
|
25849
25927
|
case 3:
|
|
25850
25928
|
case "end":
|
|
25851
|
-
return
|
|
25929
|
+
return _context21.stop();
|
|
25852
25930
|
}
|
|
25853
25931
|
}
|
|
25854
|
-
},
|
|
25932
|
+
}, _callee21);
|
|
25855
25933
|
}));
|
|
25856
25934
|
|
|
25857
25935
|
return function (_x18) {
|
|
@@ -25861,10 +25939,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25861
25939
|
|
|
25862
25940
|
case 2:
|
|
25863
25941
|
case "end":
|
|
25864
|
-
return
|
|
25942
|
+
return _context22.stop();
|
|
25865
25943
|
}
|
|
25866
25944
|
}
|
|
25867
|
-
},
|
|
25945
|
+
}, _callee22, this);
|
|
25868
25946
|
}));
|
|
25869
25947
|
|
|
25870
25948
|
function getProjectsByMetaValue(_x16, _x17) {
|
|
@@ -25876,34 +25954,34 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25876
25954
|
}, {
|
|
25877
25955
|
key: "getLocationProjects",
|
|
25878
25956
|
value: function () {
|
|
25879
|
-
var _getLocationProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25957
|
+
var _getLocationProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee24(locationId) {
|
|
25880
25958
|
var _this5 = this;
|
|
25881
25959
|
|
|
25882
25960
|
var limit,
|
|
25883
|
-
|
|
25884
|
-
return regenerator_default().wrap(function
|
|
25961
|
+
_args24 = arguments;
|
|
25962
|
+
return regenerator_default().wrap(function _callee24$(_context24) {
|
|
25885
25963
|
while (1) {
|
|
25886
|
-
switch (
|
|
25964
|
+
switch (_context24.prev = _context24.next) {
|
|
25887
25965
|
case 0:
|
|
25888
|
-
limit =
|
|
25889
|
-
return
|
|
25890
|
-
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function
|
|
25891
|
-
return regenerator_default().wrap(function
|
|
25966
|
+
limit = _args24.length > 1 && _args24[1] !== undefined ? _args24[1] : 100;
|
|
25967
|
+
return _context24.abrupt("return", this.timeKitPaginate( /*#__PURE__*/function () {
|
|
25968
|
+
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee23(page) {
|
|
25969
|
+
return regenerator_default().wrap(function _callee23$(_context23) {
|
|
25892
25970
|
while (1) {
|
|
25893
|
-
switch (
|
|
25971
|
+
switch (_context23.prev = _context23.next) {
|
|
25894
25972
|
case 0:
|
|
25895
|
-
|
|
25973
|
+
_context23.next = 2;
|
|
25896
25974
|
return _this5.getProjects("search=locations.uuid:".concat(locationId, "&limit=").concat(limit, "&page=").concat(page));
|
|
25897
25975
|
|
|
25898
25976
|
case 2:
|
|
25899
|
-
return
|
|
25977
|
+
return _context23.abrupt("return", _context23.sent);
|
|
25900
25978
|
|
|
25901
25979
|
case 3:
|
|
25902
25980
|
case "end":
|
|
25903
|
-
return
|
|
25981
|
+
return _context23.stop();
|
|
25904
25982
|
}
|
|
25905
25983
|
}
|
|
25906
|
-
},
|
|
25984
|
+
}, _callee23);
|
|
25907
25985
|
}));
|
|
25908
25986
|
|
|
25909
25987
|
return function (_x20) {
|
|
@@ -25913,10 +25991,10 @@ var TimekitApiClient = /*#__PURE__*/function () {
|
|
|
25913
25991
|
|
|
25914
25992
|
case 2:
|
|
25915
25993
|
case "end":
|
|
25916
|
-
return
|
|
25994
|
+
return _context24.stop();
|
|
25917
25995
|
}
|
|
25918
25996
|
}
|
|
25919
|
-
},
|
|
25997
|
+
}, _callee24, this);
|
|
25920
25998
|
}));
|
|
25921
25999
|
|
|
25922
26000
|
function getLocationProjects(_x19) {
|
|
@@ -26460,17 +26538,17 @@ var DefaultProjectStrategy = /*#__PURE__*/function () {
|
|
|
26460
26538
|
}();
|
|
26461
26539
|
|
|
26462
26540
|
/* harmony default export */ const Strategy_DefaultProjectStrategy = (DefaultProjectStrategy);
|
|
26463
|
-
;// CONCATENATED MODULE: ./src/Strategy/
|
|
26541
|
+
;// CONCATENATED MODULE: ./src/Strategy/ServiceProjectsStatergy.js
|
|
26464
26542
|
|
|
26465
26543
|
|
|
26466
26544
|
|
|
26467
26545
|
|
|
26468
|
-
var
|
|
26469
|
-
function
|
|
26470
|
-
classCallCheck_default()(this,
|
|
26546
|
+
var ServiceProjectsStatergy = /*#__PURE__*/function () {
|
|
26547
|
+
function ServiceProjectsStatergy() {
|
|
26548
|
+
classCallCheck_default()(this, ServiceProjectsStatergy);
|
|
26471
26549
|
}
|
|
26472
26550
|
|
|
26473
|
-
createClass_default()(
|
|
26551
|
+
createClass_default()(ServiceProjectsStatergy, [{
|
|
26474
26552
|
key: "getProjects",
|
|
26475
26553
|
value: function getProjects() {
|
|
26476
26554
|
var projectType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -26479,10 +26557,110 @@ var LocationServiceStatergy = /*#__PURE__*/function () {
|
|
|
26479
26557
|
}
|
|
26480
26558
|
}]);
|
|
26481
26559
|
|
|
26560
|
+
return ServiceProjectsStatergy;
|
|
26561
|
+
}();
|
|
26562
|
+
|
|
26563
|
+
/* harmony default export */ const Strategy_ServiceProjectsStatergy = (ServiceProjectsStatergy);
|
|
26564
|
+
;// CONCATENATED MODULE: ./src/Strategy/LocationServiceStatergy.js
|
|
26565
|
+
|
|
26566
|
+
|
|
26567
|
+
|
|
26568
|
+
|
|
26569
|
+
|
|
26570
|
+
|
|
26571
|
+
|
|
26572
|
+
var LocationServiceStatergy = /*#__PURE__*/function () {
|
|
26573
|
+
function LocationServiceStatergy() {
|
|
26574
|
+
classCallCheck_default()(this, LocationServiceStatergy);
|
|
26575
|
+
}
|
|
26576
|
+
|
|
26577
|
+
createClass_default()(LocationServiceStatergy, [{
|
|
26578
|
+
key: "getProjects",
|
|
26579
|
+
value: function () {
|
|
26580
|
+
var _getProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee(locationId) {
|
|
26581
|
+
var apiClient;
|
|
26582
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
|
26583
|
+
while (1) {
|
|
26584
|
+
switch (_context.prev = _context.next) {
|
|
26585
|
+
case 0:
|
|
26586
|
+
apiClient = new TimekitApiClient();
|
|
26587
|
+
apiClient.setAppKey(instance.app_key);
|
|
26588
|
+
_context.next = 4;
|
|
26589
|
+
return apiClient.getServicesByLocationId(locationId);
|
|
26590
|
+
|
|
26591
|
+
case 4:
|
|
26592
|
+
return _context.abrupt("return", _context.sent);
|
|
26593
|
+
|
|
26594
|
+
case 5:
|
|
26595
|
+
case "end":
|
|
26596
|
+
return _context.stop();
|
|
26597
|
+
}
|
|
26598
|
+
}
|
|
26599
|
+
}, _callee);
|
|
26600
|
+
}));
|
|
26601
|
+
|
|
26602
|
+
function getProjects(_x) {
|
|
26603
|
+
return _getProjects.apply(this, arguments);
|
|
26604
|
+
}
|
|
26605
|
+
|
|
26606
|
+
return getProjects;
|
|
26607
|
+
}()
|
|
26608
|
+
}]);
|
|
26609
|
+
|
|
26482
26610
|
return LocationServiceStatergy;
|
|
26483
26611
|
}();
|
|
26484
26612
|
|
|
26485
26613
|
/* harmony default export */ const Strategy_LocationServiceStatergy = (LocationServiceStatergy);
|
|
26614
|
+
;// CONCATENATED MODULE: ./src/Strategy/ServiceLocationsStatergy.js
|
|
26615
|
+
|
|
26616
|
+
|
|
26617
|
+
|
|
26618
|
+
|
|
26619
|
+
|
|
26620
|
+
|
|
26621
|
+
|
|
26622
|
+
var ServiceLocationsStatergy = /*#__PURE__*/function () {
|
|
26623
|
+
function ServiceLocationsStatergy() {
|
|
26624
|
+
classCallCheck_default()(this, ServiceLocationsStatergy);
|
|
26625
|
+
}
|
|
26626
|
+
|
|
26627
|
+
createClass_default()(ServiceLocationsStatergy, [{
|
|
26628
|
+
key: "getProjects",
|
|
26629
|
+
value: function () {
|
|
26630
|
+
var _getProjects = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee(serviceId) {
|
|
26631
|
+
var apiClient;
|
|
26632
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
|
26633
|
+
while (1) {
|
|
26634
|
+
switch (_context.prev = _context.next) {
|
|
26635
|
+
case 0:
|
|
26636
|
+
apiClient = new TimekitApiClient();
|
|
26637
|
+
apiClient.setAppKey(instance.app_key);
|
|
26638
|
+
_context.next = 4;
|
|
26639
|
+
return apiClient.getLocationsByServiceId(serviceId);
|
|
26640
|
+
|
|
26641
|
+
case 4:
|
|
26642
|
+
return _context.abrupt("return", _context.sent);
|
|
26643
|
+
|
|
26644
|
+
case 5:
|
|
26645
|
+
case "end":
|
|
26646
|
+
return _context.stop();
|
|
26647
|
+
}
|
|
26648
|
+
}
|
|
26649
|
+
}, _callee);
|
|
26650
|
+
}));
|
|
26651
|
+
|
|
26652
|
+
function getProjects(_x) {
|
|
26653
|
+
return _getProjects.apply(this, arguments);
|
|
26654
|
+
}
|
|
26655
|
+
|
|
26656
|
+
return getProjects;
|
|
26657
|
+
}()
|
|
26658
|
+
}]);
|
|
26659
|
+
|
|
26660
|
+
return ServiceLocationsStatergy;
|
|
26661
|
+
}();
|
|
26662
|
+
|
|
26663
|
+
/* harmony default export */ const Strategy_ServiceLocationsStatergy = (ServiceLocationsStatergy);
|
|
26486
26664
|
;// CONCATENATED MODULE: ./src/Strategy/ProjectsStrategy.js
|
|
26487
26665
|
|
|
26488
26666
|
|
|
@@ -26491,6 +26669,8 @@ var LocationServiceStatergy = /*#__PURE__*/function () {
|
|
|
26491
26669
|
|
|
26492
26670
|
|
|
26493
26671
|
|
|
26672
|
+
|
|
26673
|
+
|
|
26494
26674
|
var ProjectsStrategy = /*#__PURE__*/function () {
|
|
26495
26675
|
function ProjectsStrategy() {
|
|
26496
26676
|
classCallCheck_default()(this, ProjectsStrategy);
|
|
@@ -26498,7 +26678,9 @@ var ProjectsStrategy = /*#__PURE__*/function () {
|
|
|
26498
26678
|
this.store = ProjectsStore_instance;
|
|
26499
26679
|
this.storeProjectsStrategy = new Strategy_StoreProjectsStrategy();
|
|
26500
26680
|
this.defaultStrategy = new Strategy_DefaultProjectStrategy();
|
|
26501
|
-
this.
|
|
26681
|
+
this.serviceProjectsStrategy = new Strategy_ServiceProjectsStatergy();
|
|
26682
|
+
this.locationServicesStatergy = new Strategy_LocationServiceStatergy();
|
|
26683
|
+
this.serviceLocationsStatergy = new Strategy_ServiceLocationsStatergy();
|
|
26502
26684
|
}
|
|
26503
26685
|
|
|
26504
26686
|
createClass_default()(ProjectsStrategy, [{
|
|
@@ -26512,7 +26694,15 @@ var ProjectsStrategy = /*#__PURE__*/function () {
|
|
|
26512
26694
|
break;
|
|
26513
26695
|
|
|
26514
26696
|
case 'service_project':
|
|
26515
|
-
strategy = this.
|
|
26697
|
+
strategy = this.serviceProjectsStrategy;
|
|
26698
|
+
break;
|
|
26699
|
+
|
|
26700
|
+
case 'service_location':
|
|
26701
|
+
strategy = this.serviceLocationsStatergy;
|
|
26702
|
+
break;
|
|
26703
|
+
|
|
26704
|
+
case 'location_service':
|
|
26705
|
+
strategy = this.locationServicesStatergy;
|
|
26516
26706
|
break;
|
|
26517
26707
|
|
|
26518
26708
|
default:
|