awing-library 2.1.2-dev.553 → 2.1.2-dev.555

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.
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/component.tsx"],"names":[],"mappings":"AAuBA,OAAO,wBAAwB,CAAC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAmB7C,QAAA,MAAM,gBAAgB,UAAW,iBAAiB,4CAmUjD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/component.tsx"],"names":[],"mappings":"AAwBA,OAAO,wBAAwB,CAAC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAmB7C,QAAA,MAAM,gBAAgB,UAAW,iBAAiB,4CAqUjD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -32,6 +32,7 @@ const BarLineComponent = (props)=>{
32
32
  const handleClose = ()=>{
33
33
  setAnchorEl(null);
34
34
  };
35
+ const titleCallbackBound = (tooltipItems)=>titleCallback(tooltipItems, t);
35
36
  const { width = 'auto', height = 350, timeline = TimelineType.Day, optionCustom = {}, dataChart, type, enableExport = {
36
37
  png: true,
37
38
  pdf: true,
@@ -54,7 +55,7 @@ const BarLineComponent = (props)=>{
54
55
  bodyColor: '#263238',
55
56
  bodySpacing: 8,
56
57
  callbacks: {
57
- title: titleCallback,
58
+ title: titleCallbackBound,
58
59
  label: labelCallback
59
60
  },
60
61
  titleColor: '#212121',
@@ -1,7 +1,7 @@
1
1
  import { Chart as ChartJS, ChartTypeRegistry, TooltipItem } from 'chart.js';
2
2
  import { DataSet } from '../../../Utils/exportFile';
3
3
  export declare const getOrCreateLegendList: (id: string) => HTMLUListElement;
4
- export declare const titleCallback: (tooltipItems: TooltipItem<keyof ChartTypeRegistry>[]) => string;
4
+ export declare const titleCallback: (tooltipItems: TooltipItem<keyof ChartTypeRegistry>[], t: any) => string;
5
5
  export declare const labelCallback: (tooltipItem: TooltipItem<keyof ChartTypeRegistry>) => string;
6
6
  export declare const exportToPNG: (element: HTMLElement, nameFile?: string) => void;
7
7
  export declare const exportToJPG: (chartRef: ChartJS<keyof ChartTypeRegistry>, nameFile?: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,OAAQ,MAAM,qBAe/C,CAAC;AAEF,eAAO,MAAM,aAAa,iBAAkB,WAAW,CAAC,MAAM,iBAAiB,CAAC,EAAE,WAUjF,CAAC;AAEF,eAAO,MAAM,aAAa,gBAAiB,WAAW,CAAC,MAAM,iBAAiB,CAAC,WAO9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAQlE,CAAC;AAGF,eAAO,MAAM,WAAW,aAAc,OAAO,CAAC,MAAM,iBAAiB,CAAC,aAAa,MAAM,SAUxF,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAuClE,CAAC;AAGF,eAAO,MAAM,YAAY,aAAoB,OAAO,CAAC,MAAM,iBAAiB,CAAC,kBA8D5E,CAAC;AAGF,eAAO,MAAM,aAAa,eAAgB,OAAO,EAAE,aAAa,MAAM,SAOrE,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,OAAQ,MAAM,qBAe/C,CAAC;AAEF,eAAO,MAAM,aAAa,iBAAkB,WAAW,CAAC,MAAM,iBAAiB,CAAC,EAAE,KAAK,GAAG,WAUzF,CAAC;AAEF,eAAO,MAAM,aAAa,gBAAiB,WAAW,CAAC,MAAM,iBAAiB,CAAC,WAO9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAQlE,CAAC;AAGF,eAAO,MAAM,WAAW,aAAc,OAAO,CAAC,MAAM,iBAAiB,CAAC,aAAa,MAAM,SAUxF,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAuClE,CAAC;AAGF,eAAO,MAAM,YAAY,aAAoB,OAAO,CAAC,MAAM,iBAAiB,CAAC,kBA8D5E,CAAC;AAGF,eAAO,MAAM,aAAa,eAAgB,OAAO,EAAE,aAAa,MAAM,SAOrE,CAAC"}
@@ -17,16 +17,16 @@ const getOrCreateLegendList = (id)=>{
17
17
  }
18
18
  return listContainer;
19
19
  };
20
- const titleCallback = (tooltipItems)=>{
20
+ const titleCallback = (tooltipItems, t)=>{
21
21
  const timeFormat = tooltipItems[0].raw?.x;
22
22
  const isTimelineHour = timeFormat?.length > 8;
23
23
  if (isTimelineHour) {
24
24
  const timeText = moment(timeFormat, 'YYYYMMDDHH').format('HH[h] DD-MM-YYYY');
25
- return 'Hour: ' + timeText;
25
+ return t('Common.Hour') + ': ' + timeText;
26
26
  }
27
27
  {
28
28
  const timeText = moment(timeFormat, 'YYYYMMDD').format('DD-MM-YYYY');
29
- return 'Day: ' + timeText;
29
+ return t('Common.Day') + ': ' + timeText;
30
30
  }
31
31
  };
32
32
  const labelCallback = (tooltipItem)=>{
@@ -1 +1 @@
1
- {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/AWING/DirectoryPermission/AddOrEdit/Container.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,SAAS,CAAC;AAEvE,QAAA,MAAM,mBAAmB,UAAW,cAAc,4CAiTjD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/AWING/DirectoryPermission/AddOrEdit/Container.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,SAAS,CAAC;AAEvE,QAAA,MAAM,mBAAmB,UAAW,cAAc,4CAgTjD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -30,16 +30,17 @@ const AddOrEditPermission = (props)=>{
30
30
  const setSchemas = useSetAtom(schemasState);
31
31
  const { authenType, authenValue } = getAuthenValueAndType(authenTypeValue ?? '', AUTHEN_PATH_SEPARATION);
32
32
  const currentEditPermission = listPermission?.find((p)=>p.authenType === authenType && p.authenValue === authenValue);
33
+ const defaultPermission = {
34
+ schemaId: null,
35
+ permissions: [],
36
+ workflowStateIds: []
37
+ };
33
38
  const [readyForSubmit, setReadyForSubmit] = useState(false);
34
39
  const [confirmExit, setConfirmExit] = useState(false);
35
40
  const [authenPermissions, setAuthenPermissions] = useState([]);
36
41
  const [explicitMatrixPermissions, setExplicitMatrixPermissions] = useState([]);
37
42
  const [explicitPermissions, setExplicitPermissions] = useState([
38
- {
39
- schemaId: null,
40
- permissions: [],
41
- workflowStateIds: []
42
- }
43
+ defaultPermission
43
44
  ]);
44
45
  const [schemasByWorkspace, setSchemasByWorkspace] = useState([]);
45
46
  const [currentPermission, setCurrentPermission] = useState(getDefaultCurrentPermission('Role'));
@@ -172,15 +173,16 @@ const AddOrEditPermission = (props)=>{
172
173
  objectTypeCodeSelected
173
174
  ]);
174
175
  useEffect(()=>{
175
- if (schemasFiltered.length) setExplicitPermissions((prev)=>{
176
- const isDefaultState = 1 === prev.length && prev[0]?.schemaId == null;
177
- if (!isDefaultState) return prev;
176
+ schemasFiltered.length ? setExplicitPermissions((prev)=>{
177
+ if (!isCreate) return prev;
178
178
  return schemasFiltered.map((s)=>({
179
179
  schemaId: s.id,
180
180
  permissions: [],
181
181
  workflowStateIds: []
182
182
  }));
183
- });
183
+ }) : setExplicitPermissions([
184
+ defaultPermission
185
+ ]);
184
186
  setSchemas(schemasFiltered);
185
187
  }, [
186
188
  schemasFiltered
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.2-dev.553",
3
+ "version": "2.1.2-dev.555",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {