@irontec/ivoz-ui 1.4.0 → 1.4.2

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.
@@ -2,11 +2,10 @@
2
2
  to: src/entities/<%= Name %>/<%= Name %>.tsx
3
3
  ---
4
4
  import AccountTreeIcon from '@mui/icons-material/AccountTree';
5
- import EntityInterface from '@irontec-voip/ivoz-ui/entities/EntityInterface';
6
- import _ from '@irontec-voip/ivoz-ui/services/translations/translate';
7
- import defaultEntityBehavior from '@irontec-voip/ivoz-ui/entities/DefaultEntityBehavior';
8
- import { EntityValue } from '@irontec-voip/ivoz-ui';
9
- import selectOptions from './SelectOptions';
5
+ import EntityInterface from '@irontec/ivoz-ui/entities/EntityInterface';
6
+ import _ from '@irontec/ivoz-ui/services/translations/translate';
7
+ import defaultEntityBehavior from '@irontec/ivoz-ui/entities/DefaultEntityBehavior';
8
+ import { EntityValue } from '@irontec/ivoz-ui';
10
9
  import { <%= Name %>Properties, <%= Name %>PropertyList } from './<%= Name %>Properties';
11
10
 
12
11
  const properties: <%= Name %>Properties = {
@@ -19,9 +18,13 @@ const <%= Name %>: EntityInterface = {
19
18
  iden: '<%= Name %>',
20
19
  title: _('<%= Name %>', { count: 2 }),
21
20
  path: '/<%= h.inflection.pluralize(name) %>',
22
- toStr: (row: <%= Name %>PropertyList<EntityValue>) => row.id.toStr(),
21
+ toStr: (row: <%= Name %>PropertyList<EntityValue>) => String(row.id),
23
22
  properties,
24
- selectOptions,
23
+ selectOptions: async () => {
24
+ const module = await import('./SelectOptions');
25
+
26
+ return module.default;
27
+ },
25
28
  foreignKeyResolver: async () => {
26
29
  const module = await import('./ForeignKeyResolver');
27
30
 
@@ -30,7 +33,7 @@ const <%= Name %>: EntityInterface = {
30
33
  foreignKeyGetter: async () => {
31
34
  const module = await import('./ForeignKeyGetter');
32
35
 
33
- return module.default;
36
+ return module.foreignKeyGetter;
34
37
  },
35
38
  Form: async () => {
36
39
  const module = await import('./Form');
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  to: src/entities/<%= Name %>/<%= Name %>Properties.ts
3
3
  ---
4
- import { PropertySpec } from '@irontec-voip/ivoz-ui/services/api/ParsedApiSpecInterface';
5
- import { EntityValue, EntityValues } from '@irontec-voip/ivoz-ui/services/entity/EntityService';
4
+ import { PropertySpec } from '@irontec/ivoz-ui/services/api/ParsedApiSpecInterface';
5
+ import { EntityValue, EntityValues } from '@irontec/ivoz-ui/services/entity/EntityService';
6
6
 
7
7
  export type <%= Name %>PropertyList<T> = {
8
8
  <%- h.formattedEntityProperties(h.url(), Name)%>
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  to: src/entities/<%= Name %>/ForeignKeyGetter.tsx
3
3
  ---
4
- import { ForeignKeyGetterType } from '@irontec-voip/ivoz-ui/entities/EntityInterface';
5
- import { autoSelectOptions } from '@irontec-voip/ivoz-ui/entities/DefaultEntityBehavior';
4
+ import { ForeignKeyGetterType } from '@irontec/ivoz-ui/entities/EntityInterface';
5
+ import { autoSelectOptions } from '@irontec/ivoz-ui/entities/DefaultEntityBehavior';
6
6
  import { <%= Name %>PropertyList } from './<%= Name %>Properties';
7
7
 
8
8
  /** TODO remove this file unless you need to change default behaviour **/
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  to: src/entities/<%= Name %>/ForeignKeyResolver.tsx
3
3
  ---
4
- import { autoForeignKeyResolver } from '@irontec-voip/ivoz-ui/entities/DefaultEntityBehavior';
5
- import { foreignKeyResolverType } from '@irontec-voip/ivoz-ui/entities/EntityInterface';
4
+ import { autoForeignKeyResolver } from '@irontec/ivoz-ui/entities/DefaultEntityBehavior';
5
+ import { foreignKeyResolverType } from '@irontec/ivoz-ui/entities/EntityInterface';
6
6
  import { <%= Name %>PropertiesList } from './<%= Name %>Properties';
7
7
 
8
8
  /** TODO remove this file unless you need to change default behaviour **/
@@ -1,22 +1,12 @@
1
1
  ---
2
2
  to: src/entities/<%= Name %>/Form.tsx
3
3
  ---
4
- import useFkChoices from '@irontec-voip/ivoz-ui/entities/data/useFkChoices';
5
- import defaultEntityBehavior, { EntityFormProps, FieldsetGroups } from '@irontec-voip/ivoz-ui/entities/DefaultEntityBehavior';
6
- import _ from '@irontec-voip/ivoz-ui/services/translations/translate';
7
- import { Form as DefaultEntityForm } from '@irontec-voip/ivoz-ui/entities/DefaultEntityBehavior/Form';
8
- import { foreignKeyGetter } from './ForeignKeyGetter';
4
+ import { EntityFormProps, FieldsetGroups } from '@irontec/ivoz-ui/entities/DefaultEntityBehavior';
5
+ import _ from '@irontec/ivoz-ui/services/translations/translate';
6
+ import { Form as DefaultEntityForm } from '@irontec/ivoz-ui/entities/DefaultEntityBehavior/Form';
9
7
 
10
8
  const Form = (props: EntityFormProps): JSX.Element => {
11
9
 
12
- const { entityService, row, match } = props;
13
- const fkChoices = useFkChoices({
14
- foreignKeyGetter,
15
- entityService,
16
- row,
17
- match,
18
- });
19
-
20
10
  const groups: Array<FieldsetGroups | false> = [
21
11
  {
22
12
  legend: _('Main'),
@@ -27,7 +17,7 @@ const Form = (props: EntityFormProps): JSX.Element => {
27
17
  ];
28
18
 
29
19
  return (
30
- <DefaultEntityForm {...props} fkChoices={fkChoices} groups={groups} />
20
+ <DefaultEntityForm {...props} groups={groups} />
31
21
  );
32
22
  };
33
23
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  to: src/entities/<%= Name %>/SelectOptions.ts
3
3
  ---
4
- import defaultEntityBehavior from '@irontec-voip/ivoz-ui/entities/DefaultEntityBehavior';
5
- import { SelectOptionsType } from '@irontec-voip/ivoz-ui/entities/EntityInterface';
4
+ import defaultEntityBehavior from '@irontec/ivoz-ui/entities/DefaultEntityBehavior';
5
+ import { SelectOptionsType } from '@irontec/ivoz-ui/entities/EntityInterface';
6
6
  import { <%= Name %>PropertiesList } from './<%= Name %>Properties';
7
- import { DropdownChoices } from '@irontec-voip/ivoz-ui';
7
+ import { DropdownChoices } from '@irontec/ivoz-ui';
8
8
  import store from 'store';
9
9
 
10
10
  const <%= Name %>SelectOptions: SelectOptionsType = ({ callback, cancelToken }): Promise<unknown> => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@irontec/ivoz-ui",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "UI library used in ivozprovider",
5
5
  "license": "GPL-3.0",
6
6
  "main": "index.js",