@fctc/widget-logic 1.3.4 → 1.3.6
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/config.d.mts +1 -2
- package/dist/config.d.ts +1 -2
- package/dist/config.js +2 -2
- package/dist/config.mjs +1 -1
- package/dist/hooks.d.mts +7 -8
- package/dist/hooks.d.ts +7 -8
- package/dist/hooks.js +50 -41
- package/dist/hooks.mjs +30 -33
- package/dist/index.d.mts +32 -8
- package/dist/index.d.ts +32 -8
- package/dist/index.js +157 -146
- package/dist/index.mjs +104 -131
- package/dist/store.d.mts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/store.js +9 -3
- package/dist/store.mjs +4 -1
- package/package.json +2 -12
- package/dist/model.d.mts +0 -1
- package/dist/model.d.ts +0 -1
- package/dist/model.js +0 -24
- package/dist/model.mjs +0 -2
- package/dist/types.d.mts +0 -31
- package/dist/types.d.ts +0 -31
- package/dist/types.js +0 -24
- package/dist/types.mjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -4066,6 +4066,7 @@ __export(index_exports, {
|
|
|
4066
4066
|
many2oneFieldController: () => many2oneFieldController,
|
|
4067
4067
|
mergeButtons: () => mergeButtons,
|
|
4068
4068
|
priorityFieldController: () => priorityFieldController,
|
|
4069
|
+
selectProfile: () => selectProfile,
|
|
4069
4070
|
setStorageItemAsync: () => setStorageItemAsync,
|
|
4070
4071
|
statusDropdownController: () => statusDropdownController,
|
|
4071
4072
|
tableBodyController: () => tableBodyController,
|
|
@@ -4107,8 +4108,9 @@ __export(hooks_exports, {
|
|
|
4107
4108
|
});
|
|
4108
4109
|
|
|
4109
4110
|
// src/hooks/core/use-call-action.ts
|
|
4110
|
-
import { getEnv, useLoadAction, useRunAction } from "@fctc/interface-logic";
|
|
4111
4111
|
import { useState } from "react";
|
|
4112
|
+
import { getEnv } from "@fctc/interface-logic/environment";
|
|
4113
|
+
import { useLoadAction, useRunAction } from "@fctc/interface-logic/hooks";
|
|
4112
4114
|
var useCallAction = () => {
|
|
4113
4115
|
const queryLoadAction = useLoadAction();
|
|
4114
4116
|
const queryRunAction = useRunAction();
|
|
@@ -4137,12 +4139,9 @@ var useCallAction = () => {
|
|
|
4137
4139
|
};
|
|
4138
4140
|
|
|
4139
4141
|
// src/hooks/core/use-config.ts
|
|
4140
|
-
import {
|
|
4141
|
-
getEnv as getEnv2,
|
|
4142
|
-
setEnvFile,
|
|
4143
|
-
useAppDispatch
|
|
4144
|
-
} from "@fctc/interface-logic";
|
|
4145
4142
|
import { useEffect, useMemo } from "react";
|
|
4143
|
+
import { getEnv as getEnv2 } from "@fctc/interface-logic/environment";
|
|
4144
|
+
import { useAppDispatch, setEnvFile } from "@fctc/interface-logic/store";
|
|
4146
4145
|
var useConfig = ({ localStorageUtils, sessionStorageUtils }) => {
|
|
4147
4146
|
const dispatch = useAppDispatch();
|
|
4148
4147
|
const envConfig = useMemo(() => {
|
|
@@ -4193,9 +4192,10 @@ var useConfig = ({ localStorageUtils, sessionStorageUtils }) => {
|
|
|
4193
4192
|
};
|
|
4194
4193
|
|
|
4195
4194
|
// src/hooks/core/use-detail.ts
|
|
4196
|
-
import { setProfile, useAppDispatch as useAppDispatch2
|
|
4195
|
+
import { setProfile, useAppDispatch as useAppDispatch2 } from "@fctc/interface-logic/store";
|
|
4197
4196
|
import { useQuery } from "@tanstack/react-query";
|
|
4198
4197
|
import { useEffect as useEffect2 } from "react";
|
|
4198
|
+
import { useGetDetail } from "@fctc/interface-logic/hooks";
|
|
4199
4199
|
var useDetail = (accessToken, sub) => {
|
|
4200
4200
|
const dispatch = useAppDispatch2();
|
|
4201
4201
|
const fetchGetDetail = useGetDetail();
|
|
@@ -4223,15 +4223,6 @@ var useDetail = (accessToken, sub) => {
|
|
|
4223
4223
|
|
|
4224
4224
|
// src/hooks/core/use-list-data.ts
|
|
4225
4225
|
import { useMemo as useMemo2, useState as useState3 } from "react";
|
|
4226
|
-
import {
|
|
4227
|
-
evalJSONDomain,
|
|
4228
|
-
formatSortingString,
|
|
4229
|
-
selectList,
|
|
4230
|
-
selectSearch,
|
|
4231
|
-
useAppSelector,
|
|
4232
|
-
useGetListData,
|
|
4233
|
-
useModel
|
|
4234
|
-
} from "@fctc/interface-logic";
|
|
4235
4226
|
|
|
4236
4227
|
// src/utils/function.ts
|
|
4237
4228
|
import { useCallback, useEffect as useEffect3, useReducer, useRef, useState as useState2 } from "react";
|
|
@@ -4446,6 +4437,16 @@ function useStorageState(key) {
|
|
|
4446
4437
|
}
|
|
4447
4438
|
|
|
4448
4439
|
// src/hooks/core/use-list-data.ts
|
|
4440
|
+
import { useModel, useGetListData } from "@fctc/interface-logic/hooks";
|
|
4441
|
+
import {
|
|
4442
|
+
useAppSelector,
|
|
4443
|
+
selectSearch,
|
|
4444
|
+
selectList
|
|
4445
|
+
} from "@fctc/interface-logic/store";
|
|
4446
|
+
import {
|
|
4447
|
+
evalJSONDomain,
|
|
4448
|
+
formatSortingString
|
|
4449
|
+
} from "@fctc/interface-logic/utils";
|
|
4449
4450
|
var useListData = ({
|
|
4450
4451
|
action,
|
|
4451
4452
|
context,
|
|
@@ -4519,7 +4520,6 @@ var useListData = ({
|
|
|
4519
4520
|
|
|
4520
4521
|
// src/hooks/core/use-menu.ts
|
|
4521
4522
|
import { useEffect as useEffect4, useMemo as useMemo3, useState as useState4 } from "react";
|
|
4522
|
-
import { useGetMenu } from "@fctc/interface-logic";
|
|
4523
4523
|
|
|
4524
4524
|
// src/utils/constants.ts
|
|
4525
4525
|
var languages = [
|
|
@@ -4536,6 +4536,7 @@ var API_APP_URL = {
|
|
|
4536
4536
|
};
|
|
4537
4537
|
|
|
4538
4538
|
// src/hooks/core/use-menu.ts
|
|
4539
|
+
import { useGetMenu } from "@fctc/interface-logic/hooks";
|
|
4539
4540
|
var useMenu = ({ context }) => {
|
|
4540
4541
|
const menuData = useGetMenu(context, !!context);
|
|
4541
4542
|
const [menuid, setMenuId] = useState4(void 0);
|
|
@@ -4589,12 +4590,9 @@ var useMenu = ({ context }) => {
|
|
|
4589
4590
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4590
4591
|
import { useEffect as useEffect5, useMemo as useMemo4 } from "react";
|
|
4591
4592
|
import { useTranslation } from "react-i18next";
|
|
4592
|
-
import {
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
useAppDispatch as useAppDispatch3,
|
|
4596
|
-
useGetProfile
|
|
4597
|
-
} from "@fctc/interface-logic";
|
|
4593
|
+
import { getEnv as getEnv3 } from "@fctc/interface-logic/environment";
|
|
4594
|
+
import { useGetProfile } from "@fctc/interface-logic/hooks";
|
|
4595
|
+
import { useAppDispatch as useAppDispatch3, setDataUser } from "@fctc/interface-logic/store";
|
|
4598
4596
|
var useProfile = (accessToken) => {
|
|
4599
4597
|
const getProfile = useGetProfile();
|
|
4600
4598
|
const dispatch = useAppDispatch3();
|
|
@@ -4641,7 +4639,7 @@ var useUser = (accessToken) => {
|
|
|
4641
4639
|
|
|
4642
4640
|
// src/hooks/core/use-view-v2.ts
|
|
4643
4641
|
import { useMemo as useMemo5 } from "react";
|
|
4644
|
-
import { useGetView } from "@fctc/interface-logic";
|
|
4642
|
+
import { useGetView } from "@fctc/interface-logic/hooks";
|
|
4645
4643
|
var useViewV2 = ({
|
|
4646
4644
|
action,
|
|
4647
4645
|
context
|
|
@@ -4676,13 +4674,13 @@ var useViewV2 = ({
|
|
|
4676
4674
|
};
|
|
4677
4675
|
|
|
4678
4676
|
// src/hooks/core/use-auth.ts
|
|
4677
|
+
import { useLoginCredential } from "@fctc/interface-logic/hooks";
|
|
4679
4678
|
import {
|
|
4680
4679
|
setDataUser as setDataUser2,
|
|
4681
4680
|
setMenuList,
|
|
4682
4681
|
setProfile as setProfile2,
|
|
4683
|
-
useAppDispatch as useAppDispatch4
|
|
4684
|
-
|
|
4685
|
-
} from "@fctc/interface-logic";
|
|
4682
|
+
useAppDispatch as useAppDispatch4
|
|
4683
|
+
} from "@fctc/interface-logic/store";
|
|
4686
4684
|
var useAuth = () => {
|
|
4687
4685
|
const [[isLoading, accessToken], setAccessToken] = useStorageState("TOKEN");
|
|
4688
4686
|
const loginMutate = useLoginCredential();
|
|
@@ -4725,13 +4723,13 @@ var useAuth = () => {
|
|
|
4725
4723
|
import { createContext, useContext, useMemo as useMemo7 } from "react";
|
|
4726
4724
|
|
|
4727
4725
|
// src/hooks/core/use-company.ts
|
|
4728
|
-
import {
|
|
4729
|
-
getEnv as getEnv4,
|
|
4730
|
-
useGetCompanyInfo,
|
|
4731
|
-
useGetCurrentCompany
|
|
4732
|
-
} from "@fctc/interface-logic";
|
|
4733
4726
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
4734
4727
|
import { useEffect as useEffect6, useMemo as useMemo6 } from "react";
|
|
4728
|
+
import { getEnv as getEnv4 } from "@fctc/interface-logic/environment";
|
|
4729
|
+
import {
|
|
4730
|
+
useGetCurrentCompany,
|
|
4731
|
+
useGetCompanyInfo
|
|
4732
|
+
} from "@fctc/interface-logic/hooks";
|
|
4735
4733
|
var useCompany = (accessToken) => {
|
|
4736
4734
|
const getCurrentCompany = useGetCurrentCompany();
|
|
4737
4735
|
const fetchCurrentCompany = async () => {
|
|
@@ -4777,7 +4775,7 @@ var useCompany = (accessToken) => {
|
|
|
4777
4775
|
var use_company_default = useCompany;
|
|
4778
4776
|
|
|
4779
4777
|
// src/hooks/core/use-app-provider.tsx
|
|
4780
|
-
import { evalJSONContext } from "@fctc/interface-logic";
|
|
4778
|
+
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
4781
4779
|
import { jsx } from "react/jsx-runtime";
|
|
4782
4780
|
var AppProviderInitialValue = {
|
|
4783
4781
|
config: {},
|
|
@@ -4897,8 +4895,8 @@ __reExport(index_exports, hooks_exports);
|
|
|
4897
4895
|
|
|
4898
4896
|
// src/config.ts
|
|
4899
4897
|
var config_exports = {};
|
|
4900
|
-
__reExport(config_exports,
|
|
4901
|
-
import * as
|
|
4898
|
+
__reExport(config_exports, configs_star);
|
|
4899
|
+
import * as configs_star from "@fctc/interface-logic/configs";
|
|
4902
4900
|
|
|
4903
4901
|
// src/index.ts
|
|
4904
4902
|
__reExport(index_exports, config_exports);
|
|
@@ -5011,7 +5009,8 @@ var CloseIcon = ({ className = "" }) => {
|
|
|
5011
5009
|
|
|
5012
5010
|
// src/widget/basic/status-dropdown-field/controller.ts
|
|
5013
5011
|
import { useEffect as useEffect9, useRef as useRef3, useState as useState6 } from "react";
|
|
5014
|
-
import { getEnv as getEnv5
|
|
5012
|
+
import { getEnv as getEnv5 } from "@fctc/interface-logic/environment";
|
|
5013
|
+
import { useSave } from "@fctc/interface-logic/hooks";
|
|
5015
5014
|
var statusDropdownController = (props) => {
|
|
5016
5015
|
const { selection, isForm, id, model, name, state, onRefetch } = props;
|
|
5017
5016
|
const env = getEnv5();
|
|
@@ -5064,15 +5063,14 @@ var statusDropdownController = (props) => {
|
|
|
5064
5063
|
|
|
5065
5064
|
// src/widget/basic/many2one-field/controller.ts
|
|
5066
5065
|
import { useCallback as useCallback2, useEffect as useEffect10, useMemo as useMemo8, useState as useState7 } from "react";
|
|
5066
|
+
import { useGetSelection } from "@fctc/interface-logic/hooks";
|
|
5067
5067
|
import {
|
|
5068
|
-
evalJSONContext as evalJSONContext2,
|
|
5069
|
-
evalJSONDomain as evalJSONDomain2,
|
|
5070
|
-
selectEnv,
|
|
5071
|
-
selectNavbar,
|
|
5072
|
-
setListSubject,
|
|
5073
5068
|
useAppSelector as useAppSelector2,
|
|
5074
|
-
|
|
5075
|
-
|
|
5069
|
+
selectNavbar,
|
|
5070
|
+
selectEnv,
|
|
5071
|
+
setListSubject
|
|
5072
|
+
} from "@fctc/interface-logic/store";
|
|
5073
|
+
import { evalJSONDomain as evalJSONDomain2, evalJSONContext as evalJSONContext2 } from "@fctc/interface-logic/utils";
|
|
5076
5074
|
var many2oneFieldController = (props) => {
|
|
5077
5075
|
const {
|
|
5078
5076
|
name,
|
|
@@ -5242,12 +5240,9 @@ var many2oneFieldController = (props) => {
|
|
|
5242
5240
|
};
|
|
5243
5241
|
|
|
5244
5242
|
// src/widget/basic/many2one-button-field/controller.ts
|
|
5245
|
-
import {
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
getEnv as getEnv6,
|
|
5249
|
-
useGetSelection as useGetSelection2
|
|
5250
|
-
} from "@fctc/interface-logic";
|
|
5243
|
+
import { getEnv as getEnv6 } from "@fctc/interface-logic/environment";
|
|
5244
|
+
import { useGetSelection as useGetSelection2 } from "@fctc/interface-logic/hooks";
|
|
5245
|
+
import { evalJSONDomain as evalJSONDomain3, evalJSONContext as evalJSONContext3 } from "@fctc/interface-logic/utils";
|
|
5251
5246
|
var many2oneButtonController = (props) => {
|
|
5252
5247
|
const { domain, methods, relation } = props;
|
|
5253
5248
|
const actionDataString = sessionStorage.getItem("actionData");
|
|
@@ -5273,25 +5268,9 @@ var many2oneButtonController = (props) => {
|
|
|
5273
5268
|
|
|
5274
5269
|
// src/widget/basic/many2many-field/controller.ts
|
|
5275
5270
|
import { useEffect as useEffect14, useMemo as useMemo12, useState as useState10 } from "react";
|
|
5276
|
-
import {
|
|
5277
|
-
evalJSONContext as evalJSONContext4,
|
|
5278
|
-
formatSortingString as formatSortingString2,
|
|
5279
|
-
getEnv as getEnv8,
|
|
5280
|
-
selectSearch as selectSearch5,
|
|
5281
|
-
setFirstDomain,
|
|
5282
|
-
setGroupByDomain,
|
|
5283
|
-
setPage,
|
|
5284
|
-
setViewDataStore,
|
|
5285
|
-
useAppDispatch as useAppDispatch8,
|
|
5286
|
-
useAppSelector as useAppSelector6,
|
|
5287
|
-
useGetFormView,
|
|
5288
|
-
useGetListData as useGetListData3,
|
|
5289
|
-
useGetView as useGetView2,
|
|
5290
|
-
useModel as useModel2
|
|
5291
|
-
} from "@fctc/interface-logic";
|
|
5292
5271
|
|
|
5293
5272
|
// src/widget/advance/table/table-body/controller.ts
|
|
5294
|
-
import {
|
|
5273
|
+
import { useAppDispatch as useAppDispatch5, setSelectedRowKeys } from "@fctc/interface-logic/store";
|
|
5295
5274
|
import { useEffect as useEffect11, useMemo as useMemo9 } from "react";
|
|
5296
5275
|
var tableBodyController = (props) => {
|
|
5297
5276
|
const {
|
|
@@ -5359,11 +5338,11 @@ var tableBodyController = (props) => {
|
|
|
5359
5338
|
|
|
5360
5339
|
// src/widget/advance/table/table-head/controller.ts
|
|
5361
5340
|
import {
|
|
5362
|
-
selectSearch as selectSearch2,
|
|
5363
|
-
setSelectedRowKeys as setSelectedRowKeys2,
|
|
5364
5341
|
useAppDispatch as useAppDispatch6,
|
|
5365
|
-
useAppSelector as useAppSelector3
|
|
5366
|
-
|
|
5342
|
+
useAppSelector as useAppSelector3,
|
|
5343
|
+
selectSearch as selectSearch2,
|
|
5344
|
+
setSelectedRowKeys as setSelectedRowKeys2
|
|
5345
|
+
} from "@fctc/interface-logic/store";
|
|
5367
5346
|
var tableHeadController = (props) => {
|
|
5368
5347
|
const { typeTable, rows, selectedRowKeysRef } = props;
|
|
5369
5348
|
const appDispatch = useAppDispatch6();
|
|
@@ -5400,13 +5379,13 @@ var tableHeadController = (props) => {
|
|
|
5400
5379
|
};
|
|
5401
5380
|
|
|
5402
5381
|
// src/widget/advance/table/table-view/controller.ts
|
|
5382
|
+
import { useEffect as useEffect12, useMemo as useMemo10, useRef as useRef4, useState as useState8 } from "react";
|
|
5403
5383
|
import {
|
|
5404
|
-
|
|
5405
|
-
selectList as selectList2,
|
|
5384
|
+
useAppSelector as useAppSelector4,
|
|
5406
5385
|
selectSearch as selectSearch3,
|
|
5407
|
-
|
|
5408
|
-
} from "@fctc/interface-logic";
|
|
5409
|
-
import {
|
|
5386
|
+
selectList as selectList2
|
|
5387
|
+
} from "@fctc/interface-logic/store";
|
|
5388
|
+
import { domainHelper } from "@fctc/interface-logic/utils";
|
|
5410
5389
|
var tableController = ({ data }) => {
|
|
5411
5390
|
const [rows, setRows] = useState8(data.records || []);
|
|
5412
5391
|
const [columns, setColumns] = useState8([]);
|
|
@@ -5483,16 +5462,6 @@ var tableController = ({ data }) => {
|
|
|
5483
5462
|
};
|
|
5484
5463
|
|
|
5485
5464
|
// src/widget/advance/table/table-group/controller.ts
|
|
5486
|
-
import {
|
|
5487
|
-
getEnv as getEnv7,
|
|
5488
|
-
selectList as selectList3,
|
|
5489
|
-
selectSearch as selectSearch4,
|
|
5490
|
-
setSelectedRowKeys as setSelectedRowKeys3,
|
|
5491
|
-
useAppDispatch as useAppDispatch7,
|
|
5492
|
-
useAppSelector as useAppSelector5,
|
|
5493
|
-
useGetListData as useGetListData2,
|
|
5494
|
-
useOdooDataTransform
|
|
5495
|
-
} from "@fctc/interface-logic";
|
|
5496
5465
|
import { useEffect as useEffect13, useMemo as useMemo11, useState as useState9 } from "react";
|
|
5497
5466
|
|
|
5498
5467
|
// src/utils/i18n.ts
|
|
@@ -6262,6 +6231,18 @@ i18n.use(LanguageDetector).use(initReactI18next).init({
|
|
|
6262
6231
|
var i18n_default = i18n;
|
|
6263
6232
|
|
|
6264
6233
|
// src/widget/advance/table/table-group/controller.ts
|
|
6234
|
+
import { getEnv as getEnv7 } from "@fctc/interface-logic/environment";
|
|
6235
|
+
import {
|
|
6236
|
+
useOdooDataTransform,
|
|
6237
|
+
useGetListData as useGetListData2
|
|
6238
|
+
} from "@fctc/interface-logic/hooks";
|
|
6239
|
+
import {
|
|
6240
|
+
useAppSelector as useAppSelector5,
|
|
6241
|
+
selectSearch as selectSearch4,
|
|
6242
|
+
selectList as selectList3,
|
|
6243
|
+
useAppDispatch as useAppDispatch7,
|
|
6244
|
+
setSelectedRowKeys as setSelectedRowKeys3
|
|
6245
|
+
} from "@fctc/interface-logic/store";
|
|
6265
6246
|
var tableGroupController = (props) => {
|
|
6266
6247
|
const env = getEnv7();
|
|
6267
6248
|
const {
|
|
@@ -6422,6 +6403,20 @@ var tableGroupController = (props) => {
|
|
|
6422
6403
|
};
|
|
6423
6404
|
|
|
6424
6405
|
// src/widget/basic/many2many-field/controller.ts
|
|
6406
|
+
import { getEnv as getEnv8 } from "@fctc/interface-logic/environment";
|
|
6407
|
+
import {
|
|
6408
|
+
useAppDispatch as useAppDispatch8,
|
|
6409
|
+
useAppSelector as useAppSelector6,
|
|
6410
|
+
selectSearch as selectSearch5,
|
|
6411
|
+
setFirstDomain,
|
|
6412
|
+
setViewDataStore,
|
|
6413
|
+
setPage,
|
|
6414
|
+
setGroupByDomain
|
|
6415
|
+
} from "@fctc/interface-logic/store";
|
|
6416
|
+
import {
|
|
6417
|
+
evalJSONContext as evalJSONContext4,
|
|
6418
|
+
formatSortingString as formatSortingString2
|
|
6419
|
+
} from "@fctc/interface-logic/utils";
|
|
6425
6420
|
var many2manyFieldController = (props) => {
|
|
6426
6421
|
const {
|
|
6427
6422
|
relation,
|
|
@@ -6454,7 +6449,7 @@ var many2manyFieldController = (props) => {
|
|
|
6454
6449
|
],
|
|
6455
6450
|
context
|
|
6456
6451
|
};
|
|
6457
|
-
const { data: viewResponse, isFetched: isViewReponseFetched } =
|
|
6452
|
+
const { data: viewResponse, isFetched: isViewReponseFetched } = (0, hooks_exports.useGetView)(
|
|
6458
6453
|
viewParams,
|
|
6459
6454
|
actionData
|
|
6460
6455
|
);
|
|
@@ -6470,7 +6465,7 @@ var many2manyFieldController = (props) => {
|
|
|
6470
6465
|
}),
|
|
6471
6466
|
[model, viewResponse]
|
|
6472
6467
|
);
|
|
6473
|
-
const initModel =
|
|
6468
|
+
const initModel = (0, hooks_exports.useModel)();
|
|
6474
6469
|
const modelInstance = useMemo12(() => {
|
|
6475
6470
|
if (viewResponse) {
|
|
6476
6471
|
return initModel.initModel(baseModel);
|
|
@@ -6530,7 +6525,7 @@ var many2manyFieldController = (props) => {
|
|
|
6530
6525
|
isLoading: isDataLoading,
|
|
6531
6526
|
isFetched: isDataResponseFetched,
|
|
6532
6527
|
isPlaceholderData
|
|
6533
|
-
} =
|
|
6528
|
+
} = (0, hooks_exports.useGetListData)(data, queryKey, enabled);
|
|
6534
6529
|
useEffect14(() => {
|
|
6535
6530
|
if (viewResponse) {
|
|
6536
6531
|
fetchData();
|
|
@@ -6565,7 +6560,7 @@ var many2manyFieldController = (props) => {
|
|
|
6565
6560
|
refetch,
|
|
6566
6561
|
data: dataFormViewResponse,
|
|
6567
6562
|
isSuccess
|
|
6568
|
-
} = useGetFormView({
|
|
6563
|
+
} = (0, hooks_exports.useGetFormView)({
|
|
6569
6564
|
data: dataFormView,
|
|
6570
6565
|
queryKey: [`form-view-action-${relation}`],
|
|
6571
6566
|
enabled: false
|
|
@@ -6593,14 +6588,10 @@ var many2manyFieldController = (props) => {
|
|
|
6593
6588
|
|
|
6594
6589
|
// src/widget/basic/many2many-tags-field/controller.ts
|
|
6595
6590
|
import { useMemo as useMemo13 } from "react";
|
|
6596
|
-
import {
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
useGetSelection as useGetSelection3,
|
|
6601
|
-
WIDGETAVATAR,
|
|
6602
|
-
WIDGETCOLOR
|
|
6603
|
-
} from "@fctc/interface-logic";
|
|
6591
|
+
import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
|
|
6592
|
+
import { getEnv as getEnv9 } from "@fctc/interface-logic/environment";
|
|
6593
|
+
import { useGetSelection as useGetSelection3 } from "@fctc/interface-logic/hooks";
|
|
6594
|
+
import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
|
|
6604
6595
|
var many2manyTagsController = (props) => {
|
|
6605
6596
|
const {
|
|
6606
6597
|
relation,
|
|
@@ -6657,13 +6648,9 @@ var many2manyTagsController = (props) => {
|
|
|
6657
6648
|
|
|
6658
6649
|
// src/widget/basic/status-bar-field/controller.ts
|
|
6659
6650
|
import { useState as useState11 } from "react";
|
|
6660
|
-
import {
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
useAppSelector as useAppSelector7,
|
|
6664
|
-
useChangeStatus,
|
|
6665
|
-
useGetListData as useGetListData4
|
|
6666
|
-
} from "@fctc/interface-logic";
|
|
6651
|
+
import { useGetListData as useGetListData4, useChangeStatus } from "@fctc/interface-logic/hooks";
|
|
6652
|
+
import { useAppSelector as useAppSelector7, selectEnv as selectEnv2 } from "@fctc/interface-logic/store";
|
|
6653
|
+
import { evalJSONDomain as evalJSONDomain5 } from "@fctc/interface-logic/utils";
|
|
6667
6654
|
var durationController = (props) => {
|
|
6668
6655
|
const {
|
|
6669
6656
|
relation,
|
|
@@ -6734,7 +6721,8 @@ var durationController = (props) => {
|
|
|
6734
6721
|
};
|
|
6735
6722
|
|
|
6736
6723
|
// src/widget/basic/priority-field/controller.ts
|
|
6737
|
-
import {
|
|
6724
|
+
import { useSave as useSave2 } from "@fctc/interface-logic/hooks";
|
|
6725
|
+
import { evalJSONContext as evalJSONContext6 } from "@fctc/interface-logic/utils";
|
|
6738
6726
|
var priorityFieldController = (props) => {
|
|
6739
6727
|
const {
|
|
6740
6728
|
value,
|
|
@@ -6789,7 +6777,10 @@ var priorityFieldController = (props) => {
|
|
|
6789
6777
|
|
|
6790
6778
|
// src/widget/basic/float-time-field/controller.ts
|
|
6791
6779
|
import { useState as useState12 } from "react";
|
|
6792
|
-
import {
|
|
6780
|
+
import {
|
|
6781
|
+
convertFloatToTime,
|
|
6782
|
+
convertTimeToFloat
|
|
6783
|
+
} from "@fctc/interface-logic/utils";
|
|
6793
6784
|
var floatTimeFiledController = ({
|
|
6794
6785
|
onChange: fieldOnChange,
|
|
6795
6786
|
onBlur,
|
|
@@ -7165,7 +7156,7 @@ var dateFieldController = (props) => {
|
|
|
7165
7156
|
|
|
7166
7157
|
// src/widget/basic/copy-link-button/controller.ts
|
|
7167
7158
|
import { useState as useState15 } from "react";
|
|
7168
|
-
import { copyTextToClipboard } from "@fctc/interface-logic";
|
|
7159
|
+
import { copyTextToClipboard } from "@fctc/interface-logic/utils";
|
|
7169
7160
|
var copyLinkButtonController = (props) => {
|
|
7170
7161
|
const { value, defaultValue } = props;
|
|
7171
7162
|
const [isCopied, setIsCopied] = useState15(false);
|
|
@@ -7183,7 +7174,9 @@ var copyLinkButtonController = (props) => {
|
|
|
7183
7174
|
};
|
|
7184
7175
|
|
|
7185
7176
|
// src/widget/basic/color-field/color-controller.ts
|
|
7186
|
-
import {
|
|
7177
|
+
import { getEnv as getEnv10 } from "@fctc/interface-logic/environment";
|
|
7178
|
+
import { useSave as useSave3 } from "@fctc/interface-logic/hooks";
|
|
7179
|
+
import { evalJSONContext as evalJSONContext7 } from "@fctc/interface-logic/utils";
|
|
7187
7180
|
var colorFieldController = (props) => {
|
|
7188
7181
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
7189
7182
|
const env = getEnv10();
|
|
@@ -7216,7 +7209,7 @@ var colorFieldController = (props) => {
|
|
|
7216
7209
|
|
|
7217
7210
|
// src/widget/basic/binary-field/controller.ts
|
|
7218
7211
|
import { useEffect as useEffect16, useId as useId2, useRef as useRef6, useState as useState16 } from "react";
|
|
7219
|
-
import { isBase64Image } from "@fctc/interface-logic";
|
|
7212
|
+
import { isBase64Image } from "@fctc/interface-logic/utils";
|
|
7220
7213
|
var binaryFieldController = (props) => {
|
|
7221
7214
|
const { name, methods, readonly = false, value } = props;
|
|
7222
7215
|
const inputId = useId2();
|
|
@@ -7312,14 +7305,6 @@ var binaryFieldController = (props) => {
|
|
|
7312
7305
|
};
|
|
7313
7306
|
};
|
|
7314
7307
|
|
|
7315
|
-
// src/types.ts
|
|
7316
|
-
var types_exports = {};
|
|
7317
|
-
__reExport(types_exports, types_star);
|
|
7318
|
-
import * as types_star from "@fctc/interface-logic/types";
|
|
7319
|
-
|
|
7320
|
-
// src/index.ts
|
|
7321
|
-
__reExport(index_exports, types_exports);
|
|
7322
|
-
|
|
7323
7308
|
// src/utils.ts
|
|
7324
7309
|
var utils_exports = {};
|
|
7325
7310
|
__export(utils_exports, {
|
|
@@ -7343,12 +7328,7 @@ import * as utils_star2 from "@fctc/interface-logic/utils";
|
|
|
7343
7328
|
__reExport(index_exports, utils_exports);
|
|
7344
7329
|
|
|
7345
7330
|
// src/store.ts
|
|
7346
|
-
|
|
7347
|
-
__reExport(store_exports, store_star);
|
|
7348
|
-
import * as store_star from "@fctc/interface-logic/store";
|
|
7349
|
-
|
|
7350
|
-
// src/index.ts
|
|
7351
|
-
__reExport(index_exports, store_exports);
|
|
7331
|
+
import { selectProfile } from "@fctc/interface-logic/store";
|
|
7352
7332
|
|
|
7353
7333
|
// src/constants.ts
|
|
7354
7334
|
var constants_exports = {};
|
|
@@ -7366,14 +7346,6 @@ import * as environment_star from "@fctc/interface-logic/environment";
|
|
|
7366
7346
|
// src/index.ts
|
|
7367
7347
|
__reExport(index_exports, environment_exports);
|
|
7368
7348
|
|
|
7369
|
-
// src/model.ts
|
|
7370
|
-
var model_exports = {};
|
|
7371
|
-
__reExport(model_exports, model_star);
|
|
7372
|
-
import * as model_star from "@fctc/interface-logic/model";
|
|
7373
|
-
|
|
7374
|
-
// src/index.ts
|
|
7375
|
-
__reExport(index_exports, model_exports);
|
|
7376
|
-
|
|
7377
7349
|
// src/provider.ts
|
|
7378
7350
|
var provider_exports = {};
|
|
7379
7351
|
__reExport(provider_exports, provider_star);
|
|
@@ -7417,6 +7389,7 @@ export {
|
|
|
7417
7389
|
many2oneFieldController,
|
|
7418
7390
|
mergeButtons,
|
|
7419
7391
|
priorityFieldController,
|
|
7392
|
+
selectProfile,
|
|
7420
7393
|
setStorageItemAsync,
|
|
7421
7394
|
statusDropdownController,
|
|
7422
7395
|
tableBodyController,
|
package/dist/store.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { selectProfile } from '@fctc/interface-logic/store';
|
package/dist/store.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { selectProfile } from '@fctc/interface-logic/store';
|
package/dist/store.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,14 +15,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
15
|
}
|
|
12
16
|
return to;
|
|
13
17
|
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
19
|
|
|
17
20
|
// src/store.ts
|
|
18
21
|
var store_exports = {};
|
|
22
|
+
__export(store_exports, {
|
|
23
|
+
selectProfile: () => import_store.selectProfile
|
|
24
|
+
});
|
|
19
25
|
module.exports = __toCommonJS(store_exports);
|
|
20
|
-
|
|
26
|
+
var import_store = require("@fctc/interface-logic/store");
|
|
21
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22
28
|
0 && (module.exports = {
|
|
23
|
-
|
|
29
|
+
selectProfile
|
|
24
30
|
});
|
package/dist/store.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
"import": "./dist/hooks.mjs",
|
|
16
16
|
"require": "./dist/hooks.cjs"
|
|
17
17
|
},
|
|
18
|
-
"./types": {
|
|
19
|
-
"types": "./dist/types.d.ts",
|
|
20
|
-
"import": "./dist/types.mjs",
|
|
21
|
-
"require": "./dist/types.cjs"
|
|
22
|
-
},
|
|
23
18
|
"./widget": {
|
|
24
19
|
"types": "./dist/widget.d.ts",
|
|
25
20
|
"import": "./dist/widget.mjs",
|
|
@@ -55,11 +50,6 @@
|
|
|
55
50
|
"import": "./dist/environment.mjs",
|
|
56
51
|
"require": "./dist/environment.cjs"
|
|
57
52
|
},
|
|
58
|
-
"./model": {
|
|
59
|
-
"types": "./dist/model.d.ts",
|
|
60
|
-
"import": "./dist/model.mjs",
|
|
61
|
-
"require": "./dist/model.cjs"
|
|
62
|
-
},
|
|
63
53
|
"./provider": {
|
|
64
54
|
"types": "./dist/provider.d.ts",
|
|
65
55
|
"import": "./dist/provider.mjs",
|
|
@@ -79,7 +69,7 @@
|
|
|
79
69
|
"test": "jest"
|
|
80
70
|
},
|
|
81
71
|
"dependencies": {
|
|
82
|
-
"@fctc/interface-logic": "^1.2
|
|
72
|
+
"@fctc/interface-logic": "^1.3.2",
|
|
83
73
|
"@headlessui/react": "^2.2.6",
|
|
84
74
|
"@tanstack/react-query": "^5.84.0",
|
|
85
75
|
"@types/react-dom": "^19.1.7",
|
package/dist/model.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@fctc/interface-logic/model';
|
package/dist/model.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@fctc/interface-logic/model';
|
package/dist/model.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/model.ts
|
|
18
|
-
var model_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(model_exports);
|
|
20
|
-
__reExport(model_exports, require("@fctc/interface-logic/model"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("@fctc/interface-logic/model")
|
|
24
|
-
});
|
package/dist/model.mjs
DELETED
package/dist/types.d.mts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export * from '@fctc/interface-logic/types';
|
|
2
|
-
|
|
3
|
-
interface ValuePropsType {
|
|
4
|
-
id: number | string;
|
|
5
|
-
display_name: number | string;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
interface IInputFieldProps {
|
|
9
|
-
name?: string;
|
|
10
|
-
type?: string;
|
|
11
|
-
readonly?: boolean;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
defaultValue?: string | number | ValuePropsType;
|
|
15
|
-
invisible?: boolean;
|
|
16
|
-
methods?: any;
|
|
17
|
-
onChange?: (name: string, value: any) => void;
|
|
18
|
-
onBlur?: Function;
|
|
19
|
-
onRefetch?: Function;
|
|
20
|
-
isForm?: boolean;
|
|
21
|
-
className?: string;
|
|
22
|
-
value?: string | number | ValuePropsType | null | Record<any, any> | any;
|
|
23
|
-
string?: string;
|
|
24
|
-
isEditTable?: boolean;
|
|
25
|
-
formValues?: any;
|
|
26
|
-
model?: string;
|
|
27
|
-
relation?: string;
|
|
28
|
-
domain?: any;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type { IInputFieldProps, ValuePropsType };
|