@freelog/tools-lib 0.1.172 → 0.1.174

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.
@@ -661,62 +661,66 @@ function collectionExhibitManagement(_ref30) {
661
661
  openAuthDrawer: openAuthDrawer
662
662
  });
663
663
  }
664
- function informNodeManagement(_ref31) {
665
- var nodeID = _ref31.nodeID,
666
- _ref31$showPage = _ref31.showPage,
667
- showPage = _ref31$showPage === void 0 ? 'exhibit' : _ref31$showPage,
668
- params = _objectWithoutPropertiesLoose(_ref31, _excluded4);
664
+ function collectionExhibitCreator(_ref31) {
665
+ var nodeID = _ref31.nodeID;
666
+ return "/node/collectionExhibitCreator/" + nodeID;
667
+ }
668
+ function informNodeManagement(_ref32) {
669
+ var nodeID = _ref32.nodeID,
670
+ _ref32$showPage = _ref32.showPage,
671
+ showPage = _ref32$showPage === void 0 ? 'exhibit' : _ref32$showPage,
672
+ params = _objectWithoutPropertiesLoose(_ref32, _excluded4);
669
673
  return "/node/informal/" + nodeID + handleQuery(_extends({
670
674
  showPage: showPage
671
675
  }, params));
672
676
  }
673
- function informExhibitManagement(_ref32) {
674
- var exhibitID = _ref32.exhibitID;
677
+ function informExhibitManagement(_ref33) {
678
+ var exhibitID = _ref33.exhibitID;
675
679
  return "/node/exhibit/informal/" + exhibitID;
676
680
  }
677
681
  function storageSpace(_temp14) {
678
- var _ref33 = _temp14 === void 0 ? {} : _temp14,
679
- params = _extends({}, (_objectDestructuringEmpty(_ref33), _ref33));
682
+ var _ref34 = _temp14 === void 0 ? {} : _temp14,
683
+ params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
680
684
  return "/storage" + handleQuery(params);
681
685
  }
682
- function objectDetails(_ref34) {
683
- var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
686
+ function objectDetails(_ref35) {
687
+ var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
684
688
  return "/storage" + handleQuery(params);
685
689
  }
686
- function collectionCreateSuccess(_ref35) {
687
- var collectionID = _ref35.collectionID;
690
+ function collectionCreateSuccess(_ref36) {
691
+ var collectionID = _ref36.collectionID;
688
692
  return "/result/collection/create/success/" + collectionID;
689
693
  }
690
- function resourceCreateSuccess(_ref36) {
691
- var resourceID = _ref36.resourceID;
694
+ function resourceCreateSuccess(_ref37) {
695
+ var resourceID = _ref37.resourceID;
692
696
  return "/result/resource/create/success/" + resourceID;
693
697
  }
694
- function resourceVersionCreateSuccess(_ref37) {
695
- var resourceID = _ref37.resourceID,
696
- version = _ref37.version;
697
- return "/result/resource/version/create/success/" + resourceID + "/" + version;
698
- }
699
- function resourceVersionCreateRelease(_ref38) {
698
+ function resourceVersionCreateSuccess(_ref38) {
700
699
  var resourceID = _ref38.resourceID,
701
700
  version = _ref38.version;
701
+ return "/result/resource/version/create/success/" + resourceID + "/" + version;
702
+ }
703
+ function resourceVersionCreateRelease(_ref39) {
704
+ var resourceID = _ref39.resourceID,
705
+ version = _ref39.version;
702
706
  return "/result/resource/version/create/release/" + resourceID + "/" + version;
703
707
  }
704
- function nodeCreateSuccess(_ref39) {
705
- var nodeID = _ref39.nodeID;
708
+ function nodeCreateSuccess(_ref40) {
709
+ var nodeID = _ref40.nodeID;
706
710
  return "/result/node/create/success/" + nodeID;
707
711
  }
708
712
  function invitation(_temp15) {
709
- var _ref40 = _temp15 === void 0 ? {} : _temp15,
710
- goTo = _ref40.goTo,
711
- params = _objectWithoutPropertiesLoose(_ref40, _excluded5);
713
+ var _ref41 = _temp15 === void 0 ? {} : _temp15,
714
+ goTo = _ref41.goTo,
715
+ params = _objectWithoutPropertiesLoose(_ref41, _excluded5);
712
716
  // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
713
717
  return "/invitation" + handleQuery(_extends({}, params, {
714
718
  returnUrl: goTo ? encodeURIComponent(goTo) : undefined
715
719
  }));
716
720
  }
717
721
  function exception403(_temp16) {
718
- var _ref41 = _temp16 === void 0 ? {} : _temp16,
719
- params = _extends({}, (_objectDestructuringEmpty(_ref41), _ref41));
722
+ var _ref42 = _temp16 === void 0 ? {} : _temp16,
723
+ params = _extends({}, (_objectDestructuringEmpty(_ref42), _ref42));
720
724
  var fromUrl = params.from || '';
721
725
  if (!fromUrl) {
722
726
  var _window$location = window.location,
@@ -729,8 +733,8 @@ function exception403(_temp16) {
729
733
  });
730
734
  }
731
735
  function exceptionUnableToAccess(_temp17) {
732
- var _ref42 = _temp17 === void 0 ? {} : _temp17,
733
- params = _extends({}, (_objectDestructuringEmpty(_ref42), _ref42));
736
+ var _ref43 = _temp17 === void 0 ? {} : _temp17,
737
+ params = _extends({}, (_objectDestructuringEmpty(_ref43), _ref43));
734
738
  var fromUrl = params.from || '';
735
739
  if (!fromUrl) {
736
740
  var _window$location2 = window.location,
@@ -742,83 +746,88 @@ function exceptionUnableToAccess(_temp17) {
742
746
  from: fromUrl
743
747
  });
744
748
  }
745
- function nodeFreeze(_ref43) {
746
- var nodeID = _ref43.nodeID;
749
+ function exceptionCommon(_temp18) {
750
+ var _ref44 = _temp18 === void 0 ? {} : _temp18,
751
+ params = _extends({}, (_objectDestructuringEmpty(_ref44), _ref44));
752
+ return "/exception/common" + handleQuery(_extends({}, params));
753
+ }
754
+ function nodeFreeze(_ref45) {
755
+ var nodeID = _ref45.nodeID;
747
756
  return "/result/node/freeze/" + nodeID;
748
757
  }
749
- function resourceFreeze(_ref44) {
750
- var resourceID = _ref44.resourceID;
758
+ function resourceFreeze(_ref46) {
759
+ var resourceID = _ref46.resourceID;
751
760
  return "/result/resource/freeze/" + resourceID;
752
761
  }
753
- function globalSearch(_ref45) {
754
- var search = _ref45.search;
762
+ function globalSearch(_ref47) {
763
+ var search = _ref47.search;
755
764
  return "/search" + handleQuery({
756
765
  search: search
757
766
  });
758
767
  }
759
- function login(_temp18) {
760
- var _ref46 = _temp18 === void 0 ? {} : _temp18,
761
- goTo = _ref46.goTo;
768
+ function login(_temp19) {
769
+ var _ref48 = _temp19 === void 0 ? {} : _temp19,
770
+ goTo = _ref48.goTo;
762
771
  return "/login" + handleQuery({
763
772
  goTo: goTo ? encodeURIComponent(goTo) : undefined
764
773
  });
765
774
  }
766
- function logon(_temp19) {
767
- var _ref47 = _temp19 === void 0 ? {} : _temp19,
768
- goTo = _ref47.goTo,
769
- params = _objectWithoutPropertiesLoose(_ref47, _excluded6);
775
+ function logon(_temp20) {
776
+ var _ref49 = _temp20 === void 0 ? {} : _temp20,
777
+ goTo = _ref49.goTo,
778
+ params = _objectWithoutPropertiesLoose(_ref49, _excluded6);
770
779
  return "/logon" + handleQuery(_extends({
771
780
  goTo: goTo ? encodeURIComponent(goTo) : undefined
772
781
  }, params));
773
782
  }
774
- function bind(_temp20) {
775
- var _ref48 = _temp20 === void 0 ? {} : _temp20,
776
- goTo = _ref48.goTo,
777
- returnUrl = _ref48.returnUrl,
778
- params = _objectWithoutPropertiesLoose(_ref48, _excluded7);
783
+ function bind(_temp21) {
784
+ var _ref50 = _temp21 === void 0 ? {} : _temp21,
785
+ goTo = _ref50.goTo,
786
+ returnUrl = _ref50.returnUrl,
787
+ params = _objectWithoutPropertiesLoose(_ref50, _excluded7);
779
788
  return "/bind" + handleQuery(_extends({
780
789
  goTo: goTo ? encodeURIComponent(goTo) : undefined,
781
790
  returnUrl: returnUrl ? encodeURIComponent(returnUrl) : undefined
782
791
  }, params));
783
792
  }
784
- function retrieveUserPassword(_temp21) {
785
- var _ref49 = _temp21 === void 0 ? {} : _temp21,
786
- goTo = _ref49.goTo;
793
+ function retrieveUserPassword(_temp22) {
794
+ var _ref51 = _temp22 === void 0 ? {} : _temp22,
795
+ goTo = _ref51.goTo;
787
796
  return "/retrieve" + handleQuery({
788
797
  goTo: goTo ? encodeURIComponent(goTo) : undefined
789
798
  });
790
799
  }
791
- function retrievePayPassword(_temp22) {
792
- _objectDestructuringEmpty(_temp22 === void 0 ? {} : _temp22);
800
+ function retrievePayPassword(_temp23) {
801
+ _objectDestructuringEmpty(_temp23 === void 0 ? {} : _temp23);
793
802
  return "/retrievePayPassword";
794
803
  }
795
- function userFreeze(_temp23) {
796
- _objectDestructuringEmpty(_temp23 === void 0 ? {} : _temp23);
804
+ function userFreeze(_temp24) {
805
+ _objectDestructuringEmpty(_temp24 === void 0 ? {} : _temp24);
797
806
  return "/freeze";
798
807
  }
799
- function wallet(_temp24) {
800
- _objectDestructuringEmpty(_temp24 === void 0 ? {} : _temp24);
808
+ function wallet(_temp25) {
809
+ _objectDestructuringEmpty(_temp25 === void 0 ? {} : _temp25);
801
810
  return "/logged/wallet";
802
811
  }
803
- function reward(_temp25) {
804
- _objectDestructuringEmpty(_temp25 === void 0 ? {} : _temp25);
812
+ function reward(_temp26) {
813
+ _objectDestructuringEmpty(_temp26 === void 0 ? {} : _temp26);
805
814
  return "/logged/reward";
806
815
  }
807
- function contract(_temp26) {
808
- var _ref54 = _temp26 === void 0 ? {} : _temp26,
809
- params = _extends({}, (_objectDestructuringEmpty(_ref54), _ref54));
816
+ function contract(_temp27) {
817
+ var _ref56 = _temp27 === void 0 ? {} : _temp27,
818
+ params = _extends({}, (_objectDestructuringEmpty(_ref56), _ref56));
810
819
  return "/logged/contract" + handleQuery(_extends({}, params));
811
820
  }
812
- function setting(_temp27) {
813
- _objectDestructuringEmpty(_temp27 === void 0 ? {} : _temp27);
821
+ function setting(_temp28) {
822
+ _objectDestructuringEmpty(_temp28 === void 0 ? {} : _temp28);
814
823
  return "/logged/setting";
815
824
  }
816
- function binding(_temp28) {
817
- _objectDestructuringEmpty(_temp28 === void 0 ? {} : _temp28);
825
+ function binding(_temp29) {
826
+ _objectDestructuringEmpty(_temp29 === void 0 ? {} : _temp29);
818
827
  return "/logged/binding";
819
828
  }
820
- function resultBindingSuccess(_temp29) {
821
- _objectDestructuringEmpty(_temp29 === void 0 ? {} : _temp29);
829
+ function resultBindingSuccess(_temp30) {
830
+ _objectDestructuringEmpty(_temp30 === void 0 ? {} : _temp30);
822
831
  return "/result/binding";
823
832
  }
824
833
  /************** user End ******************************************************/
@@ -868,6 +877,7 @@ var LinkTo = {
868
877
  nodeManagement: nodeManagement,
869
878
  exhibitManagement: exhibitManagement,
870
879
  collectionExhibitManagement: collectionExhibitManagement,
880
+ collectionExhibitCreator: collectionExhibitCreator,
871
881
  informNodeManagement: informNodeManagement,
872
882
  informExhibitManagement: informExhibitManagement,
873
883
  storageSpace: storageSpace,
@@ -880,6 +890,7 @@ var LinkTo = {
880
890
  invitation: invitation,
881
891
  exception403: exception403,
882
892
  exceptionUnableToAccess: exceptionUnableToAccess,
893
+ exceptionCommon: exceptionCommon,
883
894
  nodeFreeze: nodeFreeze,
884
895
  resourceFreeze: resourceFreeze,
885
896
  globalSearch: globalSearch,
@@ -1016,7 +1027,12 @@ var _excluded$1 = ["presentableId"],
1016
1027
  _excluded8 = ["presentableId"],
1017
1028
  _excluded9 = ["nodeId"],
1018
1029
  _excluded10 = ["nodeId"],
1019
- _excluded11 = ["presentableId"];
1030
+ _excluded11 = ["presentableId"],
1031
+ _excluded12 = ["presentableId"],
1032
+ _excluded13 = ["presentableId"],
1033
+ _excluded14 = ["presentableId"],
1034
+ _excluded15 = ["presentableId"],
1035
+ _excluded16 = ["presentableId"];
1020
1036
  function createPresentable(params) {
1021
1037
  return FUtil.Request({
1022
1038
  method: 'POST',
@@ -1167,6 +1183,59 @@ function ignorePresentableVersionUpdateTip(_ref12) {
1167
1183
  data: params
1168
1184
  });
1169
1185
  }
1186
+ function createPresentableCollection(_ref13) {
1187
+ var params = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13));
1188
+ return FUtil.Request({
1189
+ method: 'POST',
1190
+ url: "/v2/presentables/catalogues",
1191
+ data: params
1192
+ });
1193
+ }
1194
+ function addItemsToPresentableCollection(_ref14) {
1195
+ var presentableId = _ref14.presentableId,
1196
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1197
+ return FUtil.Request({
1198
+ method: 'POST',
1199
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1200
+ data: params
1201
+ });
1202
+ }
1203
+ function removeItemsFromPresentableCollection(_ref15) {
1204
+ var presentableId = _ref15.presentableId,
1205
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1206
+ return FUtil.Request({
1207
+ method: 'DELETE',
1208
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1209
+ params: params
1210
+ });
1211
+ }
1212
+ function getItemsFromPresentableCollection(_ref16) {
1213
+ var presentableId = _ref16.presentableId,
1214
+ params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1215
+ return FUtil.Request({
1216
+ method: 'GET',
1217
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1218
+ params: params
1219
+ });
1220
+ }
1221
+ function setItemsSortFromPresentableCollectionManual(_ref17) {
1222
+ var presentableId = _ref17.presentableId,
1223
+ params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1224
+ return FUtil.Request({
1225
+ method: 'PUT',
1226
+ url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1227
+ data: params
1228
+ });
1229
+ }
1230
+ function setItemsSortFromPresentableCollectionQuick(_ref18) {
1231
+ var presentableId = _ref18.presentableId,
1232
+ params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1233
+ return FUtil.Request({
1234
+ method: 'PUT',
1235
+ url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1236
+ data: params
1237
+ });
1238
+ }
1170
1239
 
1171
1240
  var Exhibit = {
1172
1241
  __proto__: null,
@@ -1186,7 +1255,13 @@ var Exhibit = {
1186
1255
  batchCreatePresentable: batchCreatePresentable,
1187
1256
  batchUpdatePresentable: batchUpdatePresentable,
1188
1257
  batchUpdatePresentableStatus: batchUpdatePresentableStatus,
1189
- ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip
1258
+ ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip,
1259
+ createPresentableCollection: createPresentableCollection,
1260
+ addItemsToPresentableCollection: addItemsToPresentableCollection,
1261
+ removeItemsFromPresentableCollection: removeItemsFromPresentableCollection,
1262
+ getItemsFromPresentableCollection: getItemsFromPresentableCollection,
1263
+ setItemsSortFromPresentableCollectionManual: setItemsSortFromPresentableCollectionManual,
1264
+ setItemsSortFromPresentableCollectionQuick: setItemsSortFromPresentableCollectionQuick
1190
1265
  };
1191
1266
 
1192
1267
  var _excluded$2 = ["bucketName"],
@@ -1518,11 +1593,11 @@ var _excluded$3 = ["resourceIdOrName"],
1518
1593
  _excluded9$1 = ["resourceId"],
1519
1594
  _excluded10$1 = ["resourceId"],
1520
1595
  _excluded11$1 = ["resourceId"],
1521
- _excluded12 = ["resourceId"],
1522
- _excluded13 = ["resourceId"],
1523
- _excluded14 = ["resourceId"],
1524
- _excluded15 = ["resourceId"],
1525
- _excluded16 = ["resourceId"],
1596
+ _excluded12$1 = ["resourceId"],
1597
+ _excluded13$1 = ["resourceId"],
1598
+ _excluded14$1 = ["resourceId"],
1599
+ _excluded15$1 = ["resourceId"],
1600
+ _excluded16$1 = ["resourceId"],
1526
1601
  _excluded17 = ["resourceId"],
1527
1602
  _excluded18 = ["resourceId"],
1528
1603
  _excluded19 = ["resourceId"],
@@ -1768,7 +1843,7 @@ function cycleDependencyCheck$1(_ref13) {
1768
1843
  }
1769
1844
  function relationTree$1(_ref14) {
1770
1845
  var resourceId = _ref14.resourceId,
1771
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1846
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12$1);
1772
1847
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1773
1848
  // params,
1774
1849
  // });
@@ -1780,7 +1855,7 @@ function relationTree$1(_ref14) {
1780
1855
  }
1781
1856
  function relationTreeAuth(_ref15) {
1782
1857
  var resourceId = _ref15.resourceId,
1783
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1858
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13$1);
1784
1859
  return FUtil.Request({
1785
1860
  method: 'GET',
1786
1861
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
@@ -1881,7 +1956,7 @@ function generateResourceNames(_ref26) {
1881
1956
  }
1882
1957
  function updateCollection(_ref27) {
1883
1958
  var resourceId = _ref27.resourceId,
1884
- params = _objectWithoutPropertiesLoose(_ref27, _excluded14);
1959
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded14$1);
1885
1960
  return FUtil.Request({
1886
1961
  method: 'PUT',
1887
1962
  url: "/v2/resources/catalogue/" + resourceId,
@@ -1898,7 +1973,7 @@ function deleteCollectionUnitResource(_ref28) {
1898
1973
  }
1899
1974
  function getCollectionItems(_ref29) {
1900
1975
  var resourceId = _ref29.resourceId,
1901
- params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
1976
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
1902
1977
  return FUtil.Request({
1903
1978
  method: 'GET',
1904
1979
  url: "/v2/resources/catalogue/" + resourceId + "/items",
@@ -1907,7 +1982,7 @@ function getCollectionItems(_ref29) {
1907
1982
  }
1908
1983
  function getCollectionItems_Draft(_ref30) {
1909
1984
  var resourceId = _ref30.resourceId,
1910
- params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
1985
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
1911
1986
  return FUtil.Request({
1912
1987
  method: 'GET',
1913
1988
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",