warqadui 0.0.296 → 0.0.297

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/index.d.mts CHANGED
@@ -2607,11 +2607,17 @@ declare function ProductList$1({ v, url, deleteUrl, updateImageUrl, updateGaller
2607
2607
  deleteImageUrl?: string;
2608
2608
  }): react_jsx_runtime.JSX.Element;
2609
2609
 
2610
- declare function ProductForm({ v, getUrl, createUrl, updateUrl, }: {
2610
+ declare function ProductForm({ v, getUrl, createUrl, updateUrl, categoryApi, categoryUrl, subCategoryApi, subCategoryUrl, brandApi, brandUrl, }: {
2611
2611
  v?: 1 | 2 | 3;
2612
2612
  getUrl?: string;
2613
2613
  createUrl?: string;
2614
2614
  updateUrl?: string;
2615
+ categoryApi?: string;
2616
+ categoryUrl?: string;
2617
+ subCategoryApi?: string;
2618
+ subCategoryUrl?: string;
2619
+ brandApi?: string;
2620
+ brandUrl?: string;
2615
2621
  }): react_jsx_runtime.JSX.Element;
2616
2622
 
2617
2623
  declare function CategoryList({ v, url }: {
package/dist/index.d.ts CHANGED
@@ -2607,11 +2607,17 @@ declare function ProductList$1({ v, url, deleteUrl, updateImageUrl, updateGaller
2607
2607
  deleteImageUrl?: string;
2608
2608
  }): react_jsx_runtime.JSX.Element;
2609
2609
 
2610
- declare function ProductForm({ v, getUrl, createUrl, updateUrl, }: {
2610
+ declare function ProductForm({ v, getUrl, createUrl, updateUrl, categoryApi, categoryUrl, subCategoryApi, subCategoryUrl, brandApi, brandUrl, }: {
2611
2611
  v?: 1 | 2 | 3;
2612
2612
  getUrl?: string;
2613
2613
  createUrl?: string;
2614
2614
  updateUrl?: string;
2615
+ categoryApi?: string;
2616
+ categoryUrl?: string;
2617
+ subCategoryApi?: string;
2618
+ subCategoryUrl?: string;
2619
+ brandApi?: string;
2620
+ brandUrl?: string;
2615
2621
  }): react_jsx_runtime.JSX.Element;
2616
2622
 
2617
2623
  declare function CategoryList({ v, url }: {
package/dist/index.js CHANGED
@@ -41362,9 +41362,18 @@ function ProductForm2({
41362
41362
  v,
41363
41363
  getUrl,
41364
41364
  createUrl,
41365
- updateUrl
41365
+ updateUrl,
41366
+ categoryApi,
41367
+ categoryUrl,
41368
+ subCategoryApi,
41369
+ subCategoryUrl,
41370
+ brandApi,
41371
+ brandUrl
41366
41372
  }) {
41367
41373
  const { getQuery, navigate } = useApp_default();
41374
+ const catApi = categoryApi || categoryUrl || "/inventory/categories/get";
41375
+ const subCatBaseApi = subCategoryApi || subCategoryUrl || "/inventory/sub-categories/get";
41376
+ const bApi = brandApi || brandUrl || "/inventory/brands/get";
41368
41377
  const id = getQuery("id");
41369
41378
  const isEdit = !!id;
41370
41379
  const {
@@ -41610,8 +41619,8 @@ function ProductForm2({
41610
41619
  form: methods,
41611
41620
  name: "category",
41612
41621
  obj: "categoryData",
41613
- api: "/inventory/categories/get",
41614
- v: 3,
41622
+ api: catApi,
41623
+ v,
41615
41624
  label: "Category",
41616
41625
  placeholder: "Select Category"
41617
41626
  }
@@ -41622,21 +41631,21 @@ function ProductForm2({
41622
41631
  form: methods,
41623
41632
  name: "subCategory",
41624
41633
  obj: "subCategoryData",
41625
- api: selectedCategory ? `/inventory/sub-categories/get?category=${selectedCategory}` : "/inventory/sub-categories/get",
41626
- v: 3,
41634
+ api: selectedCategory ? `${subCatBaseApi}${subCatBaseApi.includes("?") ? "&" : "?"}category=${selectedCategory}` : subCatBaseApi,
41635
+ v,
41627
41636
  label: "SubCategory",
41628
41637
  placeholder: "Select SubCategory",
41629
41638
  disabled: !selectedCategory
41630
41639
  }
41631
41640
  ),
41632
- /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
41641
+ brandApi && /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
41633
41642
  Fields_default.SearchApi,
41634
41643
  {
41635
41644
  form: methods,
41636
41645
  name: "brand",
41637
41646
  obj: "brandData",
41638
- api: "/inventory/brands/get",
41639
- v: 3,
41647
+ api: bApi,
41648
+ v,
41640
41649
  label: "Brand",
41641
41650
  placeholder: "Select Brand"
41642
41651
  }
package/dist/index.mjs CHANGED
@@ -41558,9 +41558,18 @@ function ProductForm2({
41558
41558
  v,
41559
41559
  getUrl,
41560
41560
  createUrl,
41561
- updateUrl
41561
+ updateUrl,
41562
+ categoryApi,
41563
+ categoryUrl,
41564
+ subCategoryApi,
41565
+ subCategoryUrl,
41566
+ brandApi,
41567
+ brandUrl
41562
41568
  }) {
41563
41569
  const { getQuery, navigate } = useApp_default();
41570
+ const catApi = categoryApi || categoryUrl || "/inventory/categories/get";
41571
+ const subCatBaseApi = subCategoryApi || subCategoryUrl || "/inventory/sub-categories/get";
41572
+ const bApi = brandApi || brandUrl || "/inventory/brands/get";
41564
41573
  const id = getQuery("id");
41565
41574
  const isEdit = !!id;
41566
41575
  const {
@@ -41806,8 +41815,8 @@ function ProductForm2({
41806
41815
  form: methods,
41807
41816
  name: "category",
41808
41817
  obj: "categoryData",
41809
- api: "/inventory/categories/get",
41810
- v: 3,
41818
+ api: catApi,
41819
+ v,
41811
41820
  label: "Category",
41812
41821
  placeholder: "Select Category"
41813
41822
  }
@@ -41818,21 +41827,21 @@ function ProductForm2({
41818
41827
  form: methods,
41819
41828
  name: "subCategory",
41820
41829
  obj: "subCategoryData",
41821
- api: selectedCategory ? `/inventory/sub-categories/get?category=${selectedCategory}` : "/inventory/sub-categories/get",
41822
- v: 3,
41830
+ api: selectedCategory ? `${subCatBaseApi}${subCatBaseApi.includes("?") ? "&" : "?"}category=${selectedCategory}` : subCatBaseApi,
41831
+ v,
41823
41832
  label: "SubCategory",
41824
41833
  placeholder: "Select SubCategory",
41825
41834
  disabled: !selectedCategory
41826
41835
  }
41827
41836
  ),
41828
- /* @__PURE__ */ jsx233(
41837
+ brandApi && /* @__PURE__ */ jsx233(
41829
41838
  Fields_default.SearchApi,
41830
41839
  {
41831
41840
  form: methods,
41832
41841
  name: "brand",
41833
41842
  obj: "brandData",
41834
- api: "/inventory/brands/get",
41835
- v: 3,
41843
+ api: bApi,
41844
+ v,
41836
41845
  label: "Brand",
41837
41846
  placeholder: "Select Brand"
41838
41847
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warqadui",
3
- "version": "0.0.296",
3
+ "version": "0.0.297",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",