@fctc/widget-logic 1.3.4 → 1.3.5
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 +31 -7
- package/dist/index.d.ts +31 -7
- package/dist/index.js +154 -141
- package/dist/index.mjs +101 -125
- 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
|
@@ -4107,8 +4107,9 @@ __export(hooks_exports, {
|
|
|
4107
4107
|
});
|
|
4108
4108
|
|
|
4109
4109
|
// src/hooks/core/use-call-action.ts
|
|
4110
|
-
import { getEnv, useLoadAction, useRunAction } from "@fctc/interface-logic";
|
|
4111
4110
|
import { useState } from "react";
|
|
4111
|
+
import { getEnv } from "@fctc/interface-logic/environment";
|
|
4112
|
+
import { useLoadAction, useRunAction } from "@fctc/interface-logic/hooks";
|
|
4112
4113
|
var useCallAction = () => {
|
|
4113
4114
|
const queryLoadAction = useLoadAction();
|
|
4114
4115
|
const queryRunAction = useRunAction();
|
|
@@ -4137,12 +4138,9 @@ var useCallAction = () => {
|
|
|
4137
4138
|
};
|
|
4138
4139
|
|
|
4139
4140
|
// src/hooks/core/use-config.ts
|
|
4140
|
-
import {
|
|
4141
|
-
getEnv as getEnv2,
|
|
4142
|
-
setEnvFile,
|
|
4143
|
-
useAppDispatch
|
|
4144
|
-
} from "@fctc/interface-logic";
|
|
4145
4141
|
import { useEffect, useMemo } from "react";
|
|
4142
|
+
import { getEnv as getEnv2 } from "@fctc/interface-logic/environment";
|
|
4143
|
+
import { useAppDispatch, setEnvFile } from "@fctc/interface-logic/store";
|
|
4146
4144
|
var useConfig = ({ localStorageUtils, sessionStorageUtils }) => {
|
|
4147
4145
|
const dispatch = useAppDispatch();
|
|
4148
4146
|
const envConfig = useMemo(() => {
|
|
@@ -4193,9 +4191,10 @@ var useConfig = ({ localStorageUtils, sessionStorageUtils }) => {
|
|
|
4193
4191
|
};
|
|
4194
4192
|
|
|
4195
4193
|
// src/hooks/core/use-detail.ts
|
|
4196
|
-
import { setProfile, useAppDispatch as useAppDispatch2
|
|
4194
|
+
import { setProfile, useAppDispatch as useAppDispatch2 } from "@fctc/interface-logic/store";
|
|
4197
4195
|
import { useQuery } from "@tanstack/react-query";
|
|
4198
4196
|
import { useEffect as useEffect2 } from "react";
|
|
4197
|
+
import { useGetDetail } from "@fctc/interface-logic/hooks";
|
|
4199
4198
|
var useDetail = (accessToken, sub) => {
|
|
4200
4199
|
const dispatch = useAppDispatch2();
|
|
4201
4200
|
const fetchGetDetail = useGetDetail();
|
|
@@ -4223,15 +4222,6 @@ var useDetail = (accessToken, sub) => {
|
|
|
4223
4222
|
|
|
4224
4223
|
// src/hooks/core/use-list-data.ts
|
|
4225
4224
|
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
4225
|
|
|
4236
4226
|
// src/utils/function.ts
|
|
4237
4227
|
import { useCallback, useEffect as useEffect3, useReducer, useRef, useState as useState2 } from "react";
|
|
@@ -4446,6 +4436,16 @@ function useStorageState(key) {
|
|
|
4446
4436
|
}
|
|
4447
4437
|
|
|
4448
4438
|
// src/hooks/core/use-list-data.ts
|
|
4439
|
+
import { useModel, useGetListData } from "@fctc/interface-logic/hooks";
|
|
4440
|
+
import {
|
|
4441
|
+
useAppSelector,
|
|
4442
|
+
selectSearch,
|
|
4443
|
+
selectList
|
|
4444
|
+
} from "@fctc/interface-logic/store";
|
|
4445
|
+
import {
|
|
4446
|
+
evalJSONDomain,
|
|
4447
|
+
formatSortingString
|
|
4448
|
+
} from "@fctc/interface-logic/utils";
|
|
4449
4449
|
var useListData = ({
|
|
4450
4450
|
action,
|
|
4451
4451
|
context,
|
|
@@ -4519,7 +4519,6 @@ var useListData = ({
|
|
|
4519
4519
|
|
|
4520
4520
|
// src/hooks/core/use-menu.ts
|
|
4521
4521
|
import { useEffect as useEffect4, useMemo as useMemo3, useState as useState4 } from "react";
|
|
4522
|
-
import { useGetMenu } from "@fctc/interface-logic";
|
|
4523
4522
|
|
|
4524
4523
|
// src/utils/constants.ts
|
|
4525
4524
|
var languages = [
|
|
@@ -4536,6 +4535,7 @@ var API_APP_URL = {
|
|
|
4536
4535
|
};
|
|
4537
4536
|
|
|
4538
4537
|
// src/hooks/core/use-menu.ts
|
|
4538
|
+
import { useGetMenu } from "@fctc/interface-logic/hooks";
|
|
4539
4539
|
var useMenu = ({ context }) => {
|
|
4540
4540
|
const menuData = useGetMenu(context, !!context);
|
|
4541
4541
|
const [menuid, setMenuId] = useState4(void 0);
|
|
@@ -4589,12 +4589,9 @@ var useMenu = ({ context }) => {
|
|
|
4589
4589
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4590
4590
|
import { useEffect as useEffect5, useMemo as useMemo4 } from "react";
|
|
4591
4591
|
import { useTranslation } from "react-i18next";
|
|
4592
|
-
import {
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
useAppDispatch as useAppDispatch3,
|
|
4596
|
-
useGetProfile
|
|
4597
|
-
} from "@fctc/interface-logic";
|
|
4592
|
+
import { getEnv as getEnv3 } from "@fctc/interface-logic/environment";
|
|
4593
|
+
import { useGetProfile } from "@fctc/interface-logic/hooks";
|
|
4594
|
+
import { useAppDispatch as useAppDispatch3, setDataUser } from "@fctc/interface-logic/store";
|
|
4598
4595
|
var useProfile = (accessToken) => {
|
|
4599
4596
|
const getProfile = useGetProfile();
|
|
4600
4597
|
const dispatch = useAppDispatch3();
|
|
@@ -4641,7 +4638,7 @@ var useUser = (accessToken) => {
|
|
|
4641
4638
|
|
|
4642
4639
|
// src/hooks/core/use-view-v2.ts
|
|
4643
4640
|
import { useMemo as useMemo5 } from "react";
|
|
4644
|
-
import { useGetView } from "@fctc/interface-logic";
|
|
4641
|
+
import { useGetView } from "@fctc/interface-logic/hooks";
|
|
4645
4642
|
var useViewV2 = ({
|
|
4646
4643
|
action,
|
|
4647
4644
|
context
|
|
@@ -4676,13 +4673,13 @@ var useViewV2 = ({
|
|
|
4676
4673
|
};
|
|
4677
4674
|
|
|
4678
4675
|
// src/hooks/core/use-auth.ts
|
|
4676
|
+
import { useLoginCredential } from "@fctc/interface-logic/hooks";
|
|
4679
4677
|
import {
|
|
4680
4678
|
setDataUser as setDataUser2,
|
|
4681
4679
|
setMenuList,
|
|
4682
4680
|
setProfile as setProfile2,
|
|
4683
|
-
useAppDispatch as useAppDispatch4
|
|
4684
|
-
|
|
4685
|
-
} from "@fctc/interface-logic";
|
|
4681
|
+
useAppDispatch as useAppDispatch4
|
|
4682
|
+
} from "@fctc/interface-logic/store";
|
|
4686
4683
|
var useAuth = () => {
|
|
4687
4684
|
const [[isLoading, accessToken], setAccessToken] = useStorageState("TOKEN");
|
|
4688
4685
|
const loginMutate = useLoginCredential();
|
|
@@ -4725,13 +4722,13 @@ var useAuth = () => {
|
|
|
4725
4722
|
import { createContext, useContext, useMemo as useMemo7 } from "react";
|
|
4726
4723
|
|
|
4727
4724
|
// src/hooks/core/use-company.ts
|
|
4728
|
-
import {
|
|
4729
|
-
getEnv as getEnv4,
|
|
4730
|
-
useGetCompanyInfo,
|
|
4731
|
-
useGetCurrentCompany
|
|
4732
|
-
} from "@fctc/interface-logic";
|
|
4733
4725
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
4734
4726
|
import { useEffect as useEffect6, useMemo as useMemo6 } from "react";
|
|
4727
|
+
import { getEnv as getEnv4 } from "@fctc/interface-logic/environment";
|
|
4728
|
+
import {
|
|
4729
|
+
useGetCurrentCompany,
|
|
4730
|
+
useGetCompanyInfo
|
|
4731
|
+
} from "@fctc/interface-logic/hooks";
|
|
4735
4732
|
var useCompany = (accessToken) => {
|
|
4736
4733
|
const getCurrentCompany = useGetCurrentCompany();
|
|
4737
4734
|
const fetchCurrentCompany = async () => {
|
|
@@ -4777,7 +4774,7 @@ var useCompany = (accessToken) => {
|
|
|
4777
4774
|
var use_company_default = useCompany;
|
|
4778
4775
|
|
|
4779
4776
|
// src/hooks/core/use-app-provider.tsx
|
|
4780
|
-
import { evalJSONContext } from "@fctc/interface-logic";
|
|
4777
|
+
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
4781
4778
|
import { jsx } from "react/jsx-runtime";
|
|
4782
4779
|
var AppProviderInitialValue = {
|
|
4783
4780
|
config: {},
|
|
@@ -4897,8 +4894,8 @@ __reExport(index_exports, hooks_exports);
|
|
|
4897
4894
|
|
|
4898
4895
|
// src/config.ts
|
|
4899
4896
|
var config_exports = {};
|
|
4900
|
-
__reExport(config_exports,
|
|
4901
|
-
import * as
|
|
4897
|
+
__reExport(config_exports, configs_star);
|
|
4898
|
+
import * as configs_star from "@fctc/interface-logic/configs";
|
|
4902
4899
|
|
|
4903
4900
|
// src/index.ts
|
|
4904
4901
|
__reExport(index_exports, config_exports);
|
|
@@ -5011,7 +5008,8 @@ var CloseIcon = ({ className = "" }) => {
|
|
|
5011
5008
|
|
|
5012
5009
|
// src/widget/basic/status-dropdown-field/controller.ts
|
|
5013
5010
|
import { useEffect as useEffect9, useRef as useRef3, useState as useState6 } from "react";
|
|
5014
|
-
import { getEnv as getEnv5
|
|
5011
|
+
import { getEnv as getEnv5 } from "@fctc/interface-logic/environment";
|
|
5012
|
+
import { useSave } from "@fctc/interface-logic/hooks";
|
|
5015
5013
|
var statusDropdownController = (props) => {
|
|
5016
5014
|
const { selection, isForm, id, model, name, state, onRefetch } = props;
|
|
5017
5015
|
const env = getEnv5();
|
|
@@ -5064,15 +5062,14 @@ var statusDropdownController = (props) => {
|
|
|
5064
5062
|
|
|
5065
5063
|
// src/widget/basic/many2one-field/controller.ts
|
|
5066
5064
|
import { useCallback as useCallback2, useEffect as useEffect10, useMemo as useMemo8, useState as useState7 } from "react";
|
|
5065
|
+
import { useGetSelection } from "@fctc/interface-logic/hooks";
|
|
5067
5066
|
import {
|
|
5068
|
-
evalJSONContext as evalJSONContext2,
|
|
5069
|
-
evalJSONDomain as evalJSONDomain2,
|
|
5070
|
-
selectEnv,
|
|
5071
|
-
selectNavbar,
|
|
5072
|
-
setListSubject,
|
|
5073
5067
|
useAppSelector as useAppSelector2,
|
|
5074
|
-
|
|
5075
|
-
|
|
5068
|
+
selectNavbar,
|
|
5069
|
+
selectEnv,
|
|
5070
|
+
setListSubject
|
|
5071
|
+
} from "@fctc/interface-logic/store";
|
|
5072
|
+
import { evalJSONDomain as evalJSONDomain2, evalJSONContext as evalJSONContext2 } from "@fctc/interface-logic/utils";
|
|
5076
5073
|
var many2oneFieldController = (props) => {
|
|
5077
5074
|
const {
|
|
5078
5075
|
name,
|
|
@@ -5242,12 +5239,9 @@ var many2oneFieldController = (props) => {
|
|
|
5242
5239
|
};
|
|
5243
5240
|
|
|
5244
5241
|
// 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";
|
|
5242
|
+
import { getEnv as getEnv6 } from "@fctc/interface-logic/environment";
|
|
5243
|
+
import { useGetSelection as useGetSelection2 } from "@fctc/interface-logic/hooks";
|
|
5244
|
+
import { evalJSONDomain as evalJSONDomain3, evalJSONContext as evalJSONContext3 } from "@fctc/interface-logic/utils";
|
|
5251
5245
|
var many2oneButtonController = (props) => {
|
|
5252
5246
|
const { domain, methods, relation } = props;
|
|
5253
5247
|
const actionDataString = sessionStorage.getItem("actionData");
|
|
@@ -5273,25 +5267,9 @@ var many2oneButtonController = (props) => {
|
|
|
5273
5267
|
|
|
5274
5268
|
// src/widget/basic/many2many-field/controller.ts
|
|
5275
5269
|
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
5270
|
|
|
5293
5271
|
// src/widget/advance/table/table-body/controller.ts
|
|
5294
|
-
import {
|
|
5272
|
+
import { useAppDispatch as useAppDispatch5, setSelectedRowKeys } from "@fctc/interface-logic/store";
|
|
5295
5273
|
import { useEffect as useEffect11, useMemo as useMemo9 } from "react";
|
|
5296
5274
|
var tableBodyController = (props) => {
|
|
5297
5275
|
const {
|
|
@@ -5359,11 +5337,11 @@ var tableBodyController = (props) => {
|
|
|
5359
5337
|
|
|
5360
5338
|
// src/widget/advance/table/table-head/controller.ts
|
|
5361
5339
|
import {
|
|
5362
|
-
selectSearch as selectSearch2,
|
|
5363
|
-
setSelectedRowKeys as setSelectedRowKeys2,
|
|
5364
5340
|
useAppDispatch as useAppDispatch6,
|
|
5365
|
-
useAppSelector as useAppSelector3
|
|
5366
|
-
|
|
5341
|
+
useAppSelector as useAppSelector3,
|
|
5342
|
+
selectSearch as selectSearch2,
|
|
5343
|
+
setSelectedRowKeys as setSelectedRowKeys2
|
|
5344
|
+
} from "@fctc/interface-logic/store";
|
|
5367
5345
|
var tableHeadController = (props) => {
|
|
5368
5346
|
const { typeTable, rows, selectedRowKeysRef } = props;
|
|
5369
5347
|
const appDispatch = useAppDispatch6();
|
|
@@ -5400,13 +5378,13 @@ var tableHeadController = (props) => {
|
|
|
5400
5378
|
};
|
|
5401
5379
|
|
|
5402
5380
|
// src/widget/advance/table/table-view/controller.ts
|
|
5381
|
+
import { useEffect as useEffect12, useMemo as useMemo10, useRef as useRef4, useState as useState8 } from "react";
|
|
5403
5382
|
import {
|
|
5404
|
-
|
|
5405
|
-
selectList as selectList2,
|
|
5383
|
+
useAppSelector as useAppSelector4,
|
|
5406
5384
|
selectSearch as selectSearch3,
|
|
5407
|
-
|
|
5408
|
-
} from "@fctc/interface-logic";
|
|
5409
|
-
import {
|
|
5385
|
+
selectList as selectList2
|
|
5386
|
+
} from "@fctc/interface-logic/store";
|
|
5387
|
+
import { domainHelper } from "@fctc/interface-logic/utils";
|
|
5410
5388
|
var tableController = ({ data }) => {
|
|
5411
5389
|
const [rows, setRows] = useState8(data.records || []);
|
|
5412
5390
|
const [columns, setColumns] = useState8([]);
|
|
@@ -5483,16 +5461,6 @@ var tableController = ({ data }) => {
|
|
|
5483
5461
|
};
|
|
5484
5462
|
|
|
5485
5463
|
// 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
5464
|
import { useEffect as useEffect13, useMemo as useMemo11, useState as useState9 } from "react";
|
|
5497
5465
|
|
|
5498
5466
|
// src/utils/i18n.ts
|
|
@@ -6262,6 +6230,18 @@ i18n.use(LanguageDetector).use(initReactI18next).init({
|
|
|
6262
6230
|
var i18n_default = i18n;
|
|
6263
6231
|
|
|
6264
6232
|
// src/widget/advance/table/table-group/controller.ts
|
|
6233
|
+
import { getEnv as getEnv7 } from "@fctc/interface-logic/environment";
|
|
6234
|
+
import {
|
|
6235
|
+
useOdooDataTransform,
|
|
6236
|
+
useGetListData as useGetListData2
|
|
6237
|
+
} from "@fctc/interface-logic/hooks";
|
|
6238
|
+
import {
|
|
6239
|
+
useAppSelector as useAppSelector5,
|
|
6240
|
+
selectSearch as selectSearch4,
|
|
6241
|
+
selectList as selectList3,
|
|
6242
|
+
useAppDispatch as useAppDispatch7,
|
|
6243
|
+
setSelectedRowKeys as setSelectedRowKeys3
|
|
6244
|
+
} from "@fctc/interface-logic/store";
|
|
6265
6245
|
var tableGroupController = (props) => {
|
|
6266
6246
|
const env = getEnv7();
|
|
6267
6247
|
const {
|
|
@@ -6422,6 +6402,20 @@ var tableGroupController = (props) => {
|
|
|
6422
6402
|
};
|
|
6423
6403
|
|
|
6424
6404
|
// src/widget/basic/many2many-field/controller.ts
|
|
6405
|
+
import { getEnv as getEnv8 } from "@fctc/interface-logic/environment";
|
|
6406
|
+
import {
|
|
6407
|
+
useAppDispatch as useAppDispatch8,
|
|
6408
|
+
useAppSelector as useAppSelector6,
|
|
6409
|
+
selectSearch as selectSearch5,
|
|
6410
|
+
setFirstDomain,
|
|
6411
|
+
setViewDataStore,
|
|
6412
|
+
setPage,
|
|
6413
|
+
setGroupByDomain
|
|
6414
|
+
} from "@fctc/interface-logic/store";
|
|
6415
|
+
import {
|
|
6416
|
+
evalJSONContext as evalJSONContext4,
|
|
6417
|
+
formatSortingString as formatSortingString2
|
|
6418
|
+
} from "@fctc/interface-logic/utils";
|
|
6425
6419
|
var many2manyFieldController = (props) => {
|
|
6426
6420
|
const {
|
|
6427
6421
|
relation,
|
|
@@ -6454,7 +6448,7 @@ var many2manyFieldController = (props) => {
|
|
|
6454
6448
|
],
|
|
6455
6449
|
context
|
|
6456
6450
|
};
|
|
6457
|
-
const { data: viewResponse, isFetched: isViewReponseFetched } =
|
|
6451
|
+
const { data: viewResponse, isFetched: isViewReponseFetched } = (0, hooks_exports.useGetView)(
|
|
6458
6452
|
viewParams,
|
|
6459
6453
|
actionData
|
|
6460
6454
|
);
|
|
@@ -6470,7 +6464,7 @@ var many2manyFieldController = (props) => {
|
|
|
6470
6464
|
}),
|
|
6471
6465
|
[model, viewResponse]
|
|
6472
6466
|
);
|
|
6473
|
-
const initModel =
|
|
6467
|
+
const initModel = (0, hooks_exports.useModel)();
|
|
6474
6468
|
const modelInstance = useMemo12(() => {
|
|
6475
6469
|
if (viewResponse) {
|
|
6476
6470
|
return initModel.initModel(baseModel);
|
|
@@ -6530,7 +6524,7 @@ var many2manyFieldController = (props) => {
|
|
|
6530
6524
|
isLoading: isDataLoading,
|
|
6531
6525
|
isFetched: isDataResponseFetched,
|
|
6532
6526
|
isPlaceholderData
|
|
6533
|
-
} =
|
|
6527
|
+
} = (0, hooks_exports.useGetListData)(data, queryKey, enabled);
|
|
6534
6528
|
useEffect14(() => {
|
|
6535
6529
|
if (viewResponse) {
|
|
6536
6530
|
fetchData();
|
|
@@ -6565,7 +6559,7 @@ var many2manyFieldController = (props) => {
|
|
|
6565
6559
|
refetch,
|
|
6566
6560
|
data: dataFormViewResponse,
|
|
6567
6561
|
isSuccess
|
|
6568
|
-
} = useGetFormView({
|
|
6562
|
+
} = (0, hooks_exports.useGetFormView)({
|
|
6569
6563
|
data: dataFormView,
|
|
6570
6564
|
queryKey: [`form-view-action-${relation}`],
|
|
6571
6565
|
enabled: false
|
|
@@ -6593,14 +6587,10 @@ var many2manyFieldController = (props) => {
|
|
|
6593
6587
|
|
|
6594
6588
|
// src/widget/basic/many2many-tags-field/controller.ts
|
|
6595
6589
|
import { useMemo as useMemo13 } from "react";
|
|
6596
|
-
import {
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
useGetSelection as useGetSelection3,
|
|
6601
|
-
WIDGETAVATAR,
|
|
6602
|
-
WIDGETCOLOR
|
|
6603
|
-
} from "@fctc/interface-logic";
|
|
6590
|
+
import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
|
|
6591
|
+
import { getEnv as getEnv9 } from "@fctc/interface-logic/environment";
|
|
6592
|
+
import { useGetSelection as useGetSelection3 } from "@fctc/interface-logic/hooks";
|
|
6593
|
+
import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
|
|
6604
6594
|
var many2manyTagsController = (props) => {
|
|
6605
6595
|
const {
|
|
6606
6596
|
relation,
|
|
@@ -6657,13 +6647,9 @@ var many2manyTagsController = (props) => {
|
|
|
6657
6647
|
|
|
6658
6648
|
// src/widget/basic/status-bar-field/controller.ts
|
|
6659
6649
|
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";
|
|
6650
|
+
import { useGetListData as useGetListData4, useChangeStatus } from "@fctc/interface-logic/hooks";
|
|
6651
|
+
import { useAppSelector as useAppSelector7, selectEnv as selectEnv2 } from "@fctc/interface-logic/store";
|
|
6652
|
+
import { evalJSONDomain as evalJSONDomain5 } from "@fctc/interface-logic/utils";
|
|
6667
6653
|
var durationController = (props) => {
|
|
6668
6654
|
const {
|
|
6669
6655
|
relation,
|
|
@@ -6734,7 +6720,8 @@ var durationController = (props) => {
|
|
|
6734
6720
|
};
|
|
6735
6721
|
|
|
6736
6722
|
// src/widget/basic/priority-field/controller.ts
|
|
6737
|
-
import {
|
|
6723
|
+
import { useSave as useSave2 } from "@fctc/interface-logic/hooks";
|
|
6724
|
+
import { evalJSONContext as evalJSONContext6 } from "@fctc/interface-logic/utils";
|
|
6738
6725
|
var priorityFieldController = (props) => {
|
|
6739
6726
|
const {
|
|
6740
6727
|
value,
|
|
@@ -6789,7 +6776,10 @@ var priorityFieldController = (props) => {
|
|
|
6789
6776
|
|
|
6790
6777
|
// src/widget/basic/float-time-field/controller.ts
|
|
6791
6778
|
import { useState as useState12 } from "react";
|
|
6792
|
-
import {
|
|
6779
|
+
import {
|
|
6780
|
+
convertFloatToTime,
|
|
6781
|
+
convertTimeToFloat
|
|
6782
|
+
} from "@fctc/interface-logic/utils";
|
|
6793
6783
|
var floatTimeFiledController = ({
|
|
6794
6784
|
onChange: fieldOnChange,
|
|
6795
6785
|
onBlur,
|
|
@@ -7165,7 +7155,7 @@ var dateFieldController = (props) => {
|
|
|
7165
7155
|
|
|
7166
7156
|
// src/widget/basic/copy-link-button/controller.ts
|
|
7167
7157
|
import { useState as useState15 } from "react";
|
|
7168
|
-
import { copyTextToClipboard } from "@fctc/interface-logic";
|
|
7158
|
+
import { copyTextToClipboard } from "@fctc/interface-logic/utils";
|
|
7169
7159
|
var copyLinkButtonController = (props) => {
|
|
7170
7160
|
const { value, defaultValue } = props;
|
|
7171
7161
|
const [isCopied, setIsCopied] = useState15(false);
|
|
@@ -7183,7 +7173,9 @@ var copyLinkButtonController = (props) => {
|
|
|
7183
7173
|
};
|
|
7184
7174
|
|
|
7185
7175
|
// src/widget/basic/color-field/color-controller.ts
|
|
7186
|
-
import {
|
|
7176
|
+
import { getEnv as getEnv10 } from "@fctc/interface-logic/environment";
|
|
7177
|
+
import { useSave as useSave3 } from "@fctc/interface-logic/hooks";
|
|
7178
|
+
import { evalJSONContext as evalJSONContext7 } from "@fctc/interface-logic/utils";
|
|
7187
7179
|
var colorFieldController = (props) => {
|
|
7188
7180
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
7189
7181
|
const env = getEnv10();
|
|
@@ -7216,7 +7208,7 @@ var colorFieldController = (props) => {
|
|
|
7216
7208
|
|
|
7217
7209
|
// src/widget/basic/binary-field/controller.ts
|
|
7218
7210
|
import { useEffect as useEffect16, useId as useId2, useRef as useRef6, useState as useState16 } from "react";
|
|
7219
|
-
import { isBase64Image } from "@fctc/interface-logic";
|
|
7211
|
+
import { isBase64Image } from "@fctc/interface-logic/utils";
|
|
7220
7212
|
var binaryFieldController = (props) => {
|
|
7221
7213
|
const { name, methods, readonly = false, value } = props;
|
|
7222
7214
|
const inputId = useId2();
|
|
@@ -7312,14 +7304,6 @@ var binaryFieldController = (props) => {
|
|
|
7312
7304
|
};
|
|
7313
7305
|
};
|
|
7314
7306
|
|
|
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
7307
|
// src/utils.ts
|
|
7324
7308
|
var utils_exports = {};
|
|
7325
7309
|
__export(utils_exports, {
|
|
@@ -7366,14 +7350,6 @@ import * as environment_star from "@fctc/interface-logic/environment";
|
|
|
7366
7350
|
// src/index.ts
|
|
7367
7351
|
__reExport(index_exports, environment_exports);
|
|
7368
7352
|
|
|
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
7353
|
// src/provider.ts
|
|
7378
7354
|
var provider_exports = {};
|
|
7379
7355
|
__reExport(provider_exports, provider_star);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
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 };
|
package/dist/types.d.ts
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 };
|
package/dist/types.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/types.ts
|
|
18
|
-
var types_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(types_exports);
|
|
20
|
-
__reExport(types_exports, require("@fctc/interface-logic/types"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("@fctc/interface-logic/types")
|
|
24
|
-
});
|
package/dist/types.mjs
DELETED