biz9-logic 4.8.267 → 4.8.269

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.
Files changed (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +8 -97
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='7.4.7'
1
+ VERSION='7.4.9'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -983,81 +983,6 @@ class DataType {
983
983
  ]
984
984
  };
985
985
  }
986
- class Blank_Logic {
987
- static get_test = (title,option) =>{
988
- [title,option] = Field_Logic.get_option_title(title,option);
989
- option = Field_Logic.get_option(DataType.BLANK,option?option:{});
990
- let blank = DataItem.get_new(DataType.BLANK,0,Field_Logic.get_test(title,option));
991
- if(option.get_item){
992
- blank.items = Sub_Item_Logic.get_test_list(blank,blank,option);
993
- blank = Sub_Item_Logic.bind_parent_child_list(blank,blank.items);
994
- }
995
- return blank;
996
- };
997
- static get_test_list = (option) =>{
998
- option = Field_Logic.get_option(DataType.BLANK,option?option:{});
999
- let item_list = [];
1000
- for(let a=0;a<option.blank_count+1;a++){
1001
- item_list.push(Blank_Logic.get_test("Blank " +String(parseInt(a+1)),option));
1002
- }
1003
- return item_list;
1004
- }
1005
- static get_test_list_by_category = (option) =>{
1006
- option = Field_Logic.get_option(DataType.BLANK,option?option:{});
1007
- let blank_list = [];
1008
- let category_list = Category_Logic.get_type_category_list(DataType.BLANK,option.category_count);
1009
- let item_count = 0;
1010
- for(let a=0;a<category_list.length;a++){
1011
- for(let b=0;b<option.blank_count;b++){
1012
- item_count++;
1013
- let blank = Blank_Logic.get_test("Blank "+String(parseInt(b+1)),option);
1014
- blank.category = category_list[Num.get_id(category_list.length+1)].title;
1015
- blank_list.push(blank);
1016
- }
1017
- }
1018
- return [category_list,blank_list]
1019
- };
1020
- }
1021
- class Faq_Logic {
1022
- static get_test = (title,option) =>{
1023
- [title,option] = Field_Logic.get_option_title(title,option);
1024
- option = Field_Logic.get_option(DataType.FAQ,option?option:{});
1025
- option.get_value = false;
1026
- let faq = DataItem.get_new(DataType.FAQ,0,Field_Logic.get_test(title,option));
1027
- for(let a=0;a<parseInt(option.question_count)+1;a++){
1028
- if(!option.get_blank){
1029
- let question_title = "FAQ Question " + String(parseInt(a+1));
1030
- let answer = "My answer "+ Num.get_id() + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
1031
- faq[Str.get_title_url(question_title).toLowerCase()] = answer;
1032
- faq['field_'+parseInt(a+1)] =question_title;
1033
- }else{
1034
- let question_title = "";
1035
- let answer = "";
1036
- faq[Str.get_title_url(question_title).toLowerCase()] = answer;
1037
- faq['field_'+parseInt(a+1)] =question_title;
1038
- }
1039
- }
1040
- return faq;
1041
- };
1042
- static get_test_list = (option) =>{
1043
- option = Field_Logic.get_option(DataType.FAQ,option?option:{});
1044
- let item_list = [];
1045
- for(let a=0;a<option.question_count+1;a++){
1046
- item_list.push(Faq_Logic.get_test("FAQ " +String(parseInt(a+1)),option));
1047
- }
1048
- return item_list;
1049
- }
1050
- static get_faq_question_list_old(faq){
1051
- let item_list = [];
1052
- for(let a=0;a<19;a++){
1053
- let row = a + 1;
1054
- if(!Str.check_is_null(faq['field_'+a])) {
1055
- item_list.push({ id: Num.get_id(333), question:faq['field_'+a], answer: String(faq[Str.get_title_url(faq['field_'+a]).toLowerCase() ]) });
1056
- }
1057
- }
1058
- return item_list;
1059
- }
1060
- }
1061
986
  class Favorite_Logic {
1062
987
  static get_new = (parent_data_type,parent_id) =>{
1063
988
  let favorite = DataItem.get_new(DataType.FAVORITE,0,{
@@ -1211,8 +1136,6 @@ class Blog_Post_Url {
1211
1136
  return get_cloud_url_main(app_id,url,action_url,params);
1212
1137
  };
1213
1138
  }
1214
- class Order_Url {
1215
- }
1216
1139
  class Product_Url {
1217
1140
  static detail = (app_id,url,key,params) => {
1218
1141
  let action_url="product/detail/"+key;
@@ -1344,6 +1267,14 @@ class Item_Url {
1344
1267
  let action_url="item/delete_order/"+id;
1345
1268
  return get_cloud_url_main(app_id,url,action_url,params);
1346
1269
  };
1270
+ static template = (app_id,url,key,params) => {
1271
+ let action_url="item/template/"+key;
1272
+ return get_cloud_url_main(app_id,url,action_url,params);
1273
+ };
1274
+ static content = (app_id,url,key,params) => {
1275
+ let action_url="item/content/"+key;
1276
+ return get_cloud_url_main(app_id,url,action_url,params);
1277
+ };
1347
1278
  }
1348
1279
  class Category_Url {
1349
1280
  static detail = (app_id,url,key,params) => {
@@ -1359,12 +1290,6 @@ class Category_Url {
1359
1290
  return get_cloud_url_main(app_id,url,action_url,params);
1360
1291
  };
1361
1292
  }
1362
- class Template_Url {
1363
- static get = (app_id,url,key,params) => {
1364
- let action_url="template/"+key;
1365
- return get_cloud_url_main(app_id,url,action_url,params);
1366
- };
1367
- }
1368
1293
  class Page_Url {
1369
1294
  static get = (app_id,url,title_url,params) => {
1370
1295
  let action_url="page/get/"+title_url;
@@ -1898,16 +1823,6 @@ class Sub_Item_Logic {
1898
1823
  for(let a=0;a<option.section_count;a++){
1899
1824
  let item_title ="Section " + String(parseInt(a+1));
1900
1825
  let item = Sub_Item_Logic.get_test(item_title,parent_item,top_item,option);
1901
- /*
1902
- item.items = [];
1903
- let new_sub_list = [];
1904
- for(let b=0;b<option.section_count;b++){
1905
- let sub_item_title ="Section " + String(parseInt(b+1));
1906
- let sub_item = Sub_Item_Logic.get_test(sub_item_title,item,top_item,option);
1907
- item.items.push(sub_item);
1908
- }
1909
- item = Sub_Item_Logic.bind_parent_child_list(item,new_sub_list);
1910
- */
1911
1826
  new_list.push(item);
1912
1827
  }
1913
1828
  return new_list;
@@ -1932,7 +1847,6 @@ class App_Logic {
1932
1847
  module.exports = {
1933
1848
  App_Logic,
1934
1849
  Admin_Logic,
1935
- Blank_Logic,
1936
1850
  Blog_Post_Logic,
1937
1851
  Blog_Post_Url,
1938
1852
  Dashboard_Url,
@@ -1946,7 +1860,6 @@ module.exports = {
1946
1860
  Event_Url,
1947
1861
  Field_Logic,
1948
1862
  FieldType,
1949
- Faq_Logic,
1950
1863
  Favorite_Logic,
1951
1864
  Gallery_Logic,
1952
1865
  Gallery_Url,
@@ -1961,7 +1874,6 @@ module.exports = {
1961
1874
  Product_Logic,
1962
1875
  Review_Logic,
1963
1876
  Order_Logic,
1964
- Order_Url,
1965
1877
  Service_Logic,
1966
1878
  Service_Url,
1967
1879
  Social,
@@ -1972,7 +1884,6 @@ module.exports = {
1972
1884
  Stock,
1973
1885
  Template_Logic,
1974
1886
  TemplateType,
1975
- Template_Url,
1976
1887
  Url,
1977
1888
  User_Url,
1978
1889
  User_Logic,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.267",
3
+ "version": "4.8.269",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"