@smartsoft001/crud-shell-react 2.193.0 → 2.194.0
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/README.md +1 -2
- package/package.json +6 -6
- package/src/lib/components/export/export.d.ts +2 -2
- package/src/lib/components/export/export.js +2 -2
- package/src/lib/components/export/export.types.d.ts +1 -1
- package/src/lib/components/export/use-crud-export.d.ts +5 -6
- package/src/lib/components/export/use-crud-export.js +7 -9
- package/src/lib/components/export/use-crud-export.js.map +1 -1
- package/src/lib/components/filter/base/use-crud-filter.d.ts +15 -18
- package/src/lib/components/filter/base/use-crud-filter.js +20 -24
- package/src/lib/components/filter/base/use-crud-filter.js.map +1 -1
- package/src/lib/components/filter/check/filter-check.d.ts +2 -3
- package/src/lib/components/filter/check/filter-check.js +5 -6
- package/src/lib/components/filter/check/filter-check.js.map +1 -1
- package/src/lib/components/filter/date/filter-date.d.ts +2 -3
- package/src/lib/components/filter/date/filter-date.js +4 -5
- package/src/lib/components/filter/date/filter-date.js.map +1 -1
- package/src/lib/components/filter/date/use-crud-filter-date.d.ts +3 -4
- package/src/lib/components/filter/date/use-crud-filter-date.js +3 -4
- package/src/lib/components/filter/date/use-crud-filter-date.js.map +1 -1
- package/src/lib/components/filter/date/use-crud-filter-value.d.ts +6 -0
- package/src/lib/components/filter/date/use-crud-filter-value.js +25 -0
- package/src/lib/components/filter/date/use-crud-filter-value.js.map +1 -0
- package/src/lib/components/filter/date-time/filter-date-time.d.ts +3 -4
- package/src/lib/components/filter/date-time/filter-date-time.js +8 -9
- package/src/lib/components/filter/date-time/filter-date-time.js.map +1 -1
- package/src/lib/components/filter/date-with-edit/filter-date-with-edit.d.ts +3 -4
- package/src/lib/components/filter/date-with-edit/filter-date-with-edit.js +12 -13
- package/src/lib/components/filter/date-with-edit/filter-date-with-edit.js.map +1 -1
- package/src/lib/components/filter/filter.d.ts +3 -4
- package/src/lib/components/filter/filter.js +3 -4
- package/src/lib/components/filter/filter.js.map +1 -1
- package/src/lib/components/filter/filter.types.d.ts +1 -4
- package/src/lib/components/filter/flag/filter-flag.d.ts +2 -3
- package/src/lib/components/filter/flag/filter-flag.js +2 -3
- package/src/lib/components/filter/flag/filter-flag.js.map +1 -1
- package/src/lib/components/filter/index.d.ts +1 -1
- package/src/lib/components/filter/index.js +1 -1
- package/src/lib/components/filter/index.js.map +1 -1
- package/src/lib/components/filter/int/filter-int.d.ts +6 -7
- package/src/lib/components/filter/int/filter-int.js +7 -9
- package/src/lib/components/filter/int/filter-int.js.map +1 -1
- package/src/lib/components/filter/radio/filter-radio.d.ts +3 -3
- package/src/lib/components/filter/radio/filter-radio.js +3 -3
- package/src/lib/components/filter/text/filter-text.d.ts +2 -2
- package/src/lib/components/filter/text/filter-text.js +2 -2
- package/src/lib/components/filters/filters.d.ts +4 -5
- package/src/lib/components/filters/filters.js +4 -5
- package/src/lib/components/filters/filters.js.map +1 -1
- package/src/lib/components/filters/filters.types.d.ts +1 -1
- package/src/lib/components/filters/use-crud-filters.d.ts +4 -5
- package/src/lib/components/filters/use-crud-filters.js +7 -8
- package/src/lib/components/filters/use-crud-filters.js.map +1 -1
- package/src/lib/components/filters-config/filters-config.d.ts +3 -3
- package/src/lib/components/filters-config/filters-config.js +4 -5
- package/src/lib/components/filters-config/filters-config.js.map +1 -1
- package/src/lib/components/group/group.d.ts +4 -5
- package/src/lib/components/group/group.js +4 -5
- package/src/lib/components/group/group.js.map +1 -1
- package/src/lib/components/group/group.types.d.ts +1 -1
- package/src/lib/components/group/use-crud-group.d.ts +5 -6
- package/src/lib/components/group/use-crud-group.js +8 -10
- package/src/lib/components/group/use-crud-group.js.map +1 -1
- package/src/lib/components/multiselect/multiselect.d.ts +2 -3
- package/src/lib/components/multiselect/multiselect.js +3 -4
- package/src/lib/components/multiselect/multiselect.js.map +1 -1
- package/src/lib/components/multiselect/use-crud-multiselect.d.ts +3 -4
- package/src/lib/components/multiselect/use-crud-multiselect.js +3 -4
- package/src/lib/components/multiselect/use-crud-multiselect.js.map +1 -1
- package/src/lib/crud.config.d.ts +1 -2
- package/src/lib/crud.provider.d.ts +2 -2
- package/src/lib/crud.provider.js +4 -5
- package/src/lib/crud.provider.js.map +1 -1
- package/src/lib/factories/form-options.d.ts +2 -2
- package/src/lib/factories/form-options.js +2 -2
- package/src/lib/hooks.d.ts +2 -2
- package/src/lib/hooks.js +2 -2
- package/src/lib/pages/crud-pages.d.ts +7 -8
- package/src/lib/pages/crud-pages.js +9 -10
- package/src/lib/pages/crud-pages.js.map +1 -1
- package/src/lib/pages/item/item-page.d.ts +9 -12
- package/src/lib/pages/item/item-page.js +9 -12
- package/src/lib/pages/item/item-page.js.map +1 -1
- package/src/lib/pages/item/item-page.types.d.ts +8 -12
- package/src/lib/pages/item/standard/item-page-standard.d.ts +2 -4
- package/src/lib/pages/item/standard/item-page-standard.js +2 -4
- package/src/lib/pages/item/standard/item-page-standard.js.map +1 -1
- package/src/lib/pages/item/use-crud-item-page-base.d.ts +5 -6
- package/src/lib/pages/item/use-crud-item-page-base.js +5 -6
- package/src/lib/pages/item/use-crud-item-page-base.js.map +1 -1
- package/src/lib/pages/item/use-crud-item-page.d.ts +4 -4
- package/src/lib/pages/item/use-crud-item-page.js +6 -7
- package/src/lib/pages/item/use-crud-item-page.js.map +1 -1
- package/src/lib/pages/list/list-page.d.ts +8 -11
- package/src/lib/pages/list/list-page.js +8 -11
- package/src/lib/pages/list/list-page.js.map +1 -1
- package/src/lib/pages/list/list-page.types.d.ts +6 -8
- package/src/lib/pages/list/standard/list-page-standard.d.ts +4 -6
- package/src/lib/pages/list/standard/list-page-standard.js +4 -6
- package/src/lib/pages/list/standard/list-page-standard.js.map +1 -1
- package/src/lib/pages/list/use-crud-list-page.d.ts +2 -2
- package/src/lib/pages/list/use-crud-list-page.js +9 -11
- package/src/lib/pages/list/use-crud-list-page.js.map +1 -1
- package/src/lib/pages/use-crud-bound-component.d.ts +2 -3
- package/src/lib/pages/use-crud-bound-component.js +2 -3
- package/src/lib/pages/use-crud-bound-component.js.map +1 -1
- package/src/lib/pages/use-crud-page-config.d.ts +1 -2
- package/src/lib/pages/use-crud-page-config.js +1 -2
- package/src/lib/pages/use-crud-page-config.js.map +1 -1
- package/src/lib/services/crud/crud.service.d.ts +3 -4
- package/src/lib/services/crud/crud.service.js +3 -4
- package/src/lib/services/crud/crud.service.js.map +1 -1
- package/src/lib/services/page/page.service.d.ts +2 -2
- package/src/lib/services/page/page.service.js +2 -2
- package/src/lib/state/crud.effects.d.ts +5 -6
- package/src/lib/state/crud.effects.js +7 -8
- package/src/lib/state/crud.effects.js.map +1 -1
- package/src/lib/state/crud.facade.d.ts +3 -4
- package/src/lib/state/crud.facade.js +3 -4
- package/src/lib/state/crud.facade.js.map +1 -1
- package/src/lib/state/crud.reducer.d.ts +1 -1
- package/src/lib/state/crud.selectors.js +2 -3
- package/src/lib/state/crud.selectors.js.map +1 -1
- package/src/lib/state/crud.store.d.ts +1 -1
- package/src/lib/state/crud.store.js +1 -1
- package/src/lib/components/filter/date/use-crud-filter-ng-model.d.ts +0 -6
- package/src/lib/components/filter/date/use-crud-filter-ng-model.js +0 -25
- package/src/lib/components/filter/date/use-crud-filter-ng-model.js.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* with the count and a close button, the `config.list.components.multi`
|
|
3
|
+
* The panel of the items selected in the list, opened in the end menu. A
|
|
4
|
+
* header with the count and a close button, the `config.list.components.multi`
|
|
6
5
|
* component with the selected `items`, and the `multiUpdate` form of the
|
|
7
6
|
* model with the button applying it to every selected item. Render it inside
|
|
8
7
|
* `<CrudProvider>`.
|
|
@@ -7,9 +7,8 @@ const react_2 = require("@smartsoft001/react");
|
|
|
7
7
|
const use_crud_multiselect_1 = require("./use-crud-multiselect");
|
|
8
8
|
const form_options_1 = require("../../factories/form-options");
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* with the count and a close button, the `config.list.components.multi`
|
|
10
|
+
* The panel of the items selected in the list, opened in the end menu. A
|
|
11
|
+
* header with the count and a close button, the `config.list.components.multi`
|
|
13
12
|
* component with the selected `items`, and the `multiUpdate` form of the
|
|
14
13
|
* model with the button applying it to every selected item. Render it inside
|
|
15
14
|
* `<CrudProvider>`.
|
|
@@ -18,7 +17,7 @@ function SmartCrudMultiselect() {
|
|
|
18
17
|
const t = (0, react_2.useTranslate)();
|
|
19
18
|
const { config, list, item, showForm, lock, valid, buttonOptions, onClose, onPartialChange, onValidChange, } = (0, use_crud_multiselect_1.useCrudMultiselect)();
|
|
20
19
|
const Multi = config?.list?.components?.multi;
|
|
21
|
-
// The
|
|
20
|
+
// The `multiUpdate` form options of the shared values.
|
|
22
21
|
const formOptions = (0, react_1.useMemo)(() => (0, form_options_1.getCrudFormOptions)(item, 'multiUpdate', config.type), [item, config.type]);
|
|
23
22
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("header", { className: "smart:flex smart:items-center smart:justify-between smart:border-b smart:border-gray-200 smart:px-4 smart:py-3", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "smart:text-lg smart:font-semibold smart:text-gray-900", children: [t('selected'), ": ", list.length] }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onClose, "aria-label": "close", className: "smart:rounded smart:p-1 smart:text-gray-500 smart:hover:bg-gray-100", children: "\u2715" })] }), Multi && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Multi, { items: list }) })), showForm && item && formOptions && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(react_2.SmartForm, { options: formOptions, onValuePartialChange: (changes) => onPartialChange(changes, list), onValidChange: onValidChange }), (0, jsx_runtime_1.jsx)(react_2.SmartButton, { className: "smart:float-right", disabled: lock || !valid, options: buttonOptions, children: t('change') })] }))] }));
|
|
24
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/components/multiselect/multiselect.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"multiselect.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/components/multiselect/multiselect.tsx"],"names":[],"mappings":";;AAeA,oDAgEC;;AA/ED,iCAAgC;AAGhC,+CAA2E;AAE3E,iEAA4D;AAC5D,+DAAkE;AAElE;;;;;;GAMG;AACH,SAAgB,oBAAoB;IAClC,MAAM,CAAC,GAAG,IAAA,oBAAY,GAAE,CAAC;IACzB,MAAM,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,aAAa,EACb,OAAO,EACP,eAAe,EACf,aAAa,GACd,GAAG,IAAA,yCAAkB,GAAK,CAAC;IAE5B,MAAM,KAAK,GAAG,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC;IAE9C,uDAAuD;IACvD,MAAM,WAAW,GAAG,IAAA,eAAO,EACzB,GAAG,EAAE,CAAC,IAAA,iCAAkB,EAAC,IAAI,EAAE,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,EAC1D,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CACpB,CAAC;IAEF,OAAO,CACL,6DACE,oCAAQ,SAAS,EAAC,gHAAgH,aAChI,gCAAI,SAAS,EAAC,uDAAuD,aAClE,CAAC,CAAC,UAAU,CAAC,QAAI,IAAI,CAAC,MAAM,IAC1B,EACL,mCACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,gBACL,OAAO,EAClB,SAAS,EAAC,qEAAqE,uBAGxE,IACF,EAER,KAAK,IAAI,CACR,0CACE,uBAAC,KAAK,IAAC,KAAK,EAAE,IAAI,GAAI,GAClB,CACP,EAEA,QAAQ,IAAI,IAAI,IAAI,WAAW,IAAI,CAClC,4CACE,uBAAC,iBAAS,IACR,OAAO,EAAE,WAAW,EACpB,oBAAoB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,EACjE,aAAa,EAAE,aAAa,GAC5B,EAEF,uBAAC,mBAAW,IACV,SAAS,EAAC,mBAAmB,EAC7B,QAAQ,EAAE,IAAI,IAAI,CAAC,KAAK,EACxB,OAAO,EAAE,aAAa,YAErB,CAAC,CAAC,QAAQ,CAAC,GACA,IACV,CACP,IACA,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
2
2
|
import { IButtonOptions } from '@smartsoft001/react';
|
|
3
3
|
/**
|
|
4
|
-
* The behaviour of the multi-selection panel
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
* with `update.multi` (`showForm` when there is such a field). The form
|
|
4
|
+
* The behaviour of the multi-selection panel: `list` is the selection, `item`
|
|
5
|
+
* a model of `config.type` holding the values the selected items share in
|
|
6
|
+
* the fields with `update.multi` (`showForm` when there is such a field). The form
|
|
8
7
|
* reports its changes with `onPartialChange(changes, list)` and its validity
|
|
9
8
|
* with `onValidChange`; `buttonOptions` (with confirmation) apply the changes
|
|
10
9
|
* to every selected item and close the end menu. `lock` is set again
|
|
@@ -7,10 +7,9 @@ const react_2 = require("@smartsoft001/react");
|
|
|
7
7
|
const crud_context_1 = require("../../crud.context");
|
|
8
8
|
const hooks_1 = require("../../hooks");
|
|
9
9
|
/**
|
|
10
|
-
* The behaviour of the multi-selection panel
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
13
|
-
* with `update.multi` (`showForm` when there is such a field). The form
|
|
10
|
+
* The behaviour of the multi-selection panel: `list` is the selection, `item`
|
|
11
|
+
* a model of `config.type` holding the values the selected items share in
|
|
12
|
+
* the fields with `update.multi` (`showForm` when there is such a field). The form
|
|
14
13
|
* reports its changes with `onPartialChange(changes, list)` and its validity
|
|
15
14
|
* with `onValidChange`; `buttonOptions` (with confirmation) apply the changes
|
|
16
15
|
* to every selected item and close the end menu. `lock` is set again
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-crud-multiselect.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/components/multiselect/use-crud-multiselect.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"use-crud-multiselect.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/components/multiselect/use-crud-multiselect.ts"],"names":[],"mappings":";;AA0BA,gDA2EC;AArGD,iCAAuD;AAGvD,iDAG8B;AAC9B,+CAAqE;AAErE,qDAAkE;AAClE,uCAA2C;AAO3C;;;;;;;;GAQG;AACH,SAAgB,kBAAkB;IAChC,MAAM,MAAM,GAAG,IAAA,4BAAa,GAAK,CAAC;IAClC,MAAM,MAAM,GAAG,IAAA,4BAAa,GAAK,CAAC;IAClC,MAAM,WAAW,GAAG,IAAA,sBAAc,GAAE,CAAC;IACrC,MAAM,aAAa,GAAG,IAAA,oBAAY,EAChC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAC/B,CAAC;IACF,MAAM,IAAI,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,aAAa,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAA0B,IAAI,CAAC,CAAC;IACtE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAEnD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACtC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAEhC,MAAM,iBAAiB,GAAG,I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AmB,EAAE;QACpD,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,MAAM,eAAe,GAAG,IAAA,mBAAW,EACjC,CAAC,OAAmB,EAAE,OAAiB,EAAE,EAAE;QACzC,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC,EACD,EAAE,CACH,CAAC;IAEF,MAAM,aAAa,GAAG,IAAA,mBAAW,EAAC,CAAC,KAAc,EAAE,EAAE;QACnD,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,QAAQ;QACR,IAAI;QACJ,KAAK;QACL,aAAa;QACb,OAAO;QACP,eAAe;QACf,aAAa;KACd,CAAC;AACJ,CAAC"}
|
package/src/lib/crud.config.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ import { ICrudFilterQueryItem, ICrudListGroup } from './models';
|
|
|
4
4
|
import type { CrudAction } from './state/crud.actions';
|
|
5
5
|
import type { CrudState } from './state/crud.reducer';
|
|
6
6
|
/**
|
|
7
|
-
* What a CRUD feature talks to: the REST resource and the model.
|
|
8
|
-
* `CrudConfig` was a class used as an injection token; here it is a plain
|
|
7
|
+
* What a CRUD feature talks to: the REST resource and the model. A plain
|
|
9
8
|
* object handed to `<CrudProvider config>`.
|
|
10
9
|
*/
|
|
11
10
|
export interface CrudConfig<T> {
|
|
@@ -10,7 +10,7 @@ export interface CrudProviderProps<T extends IEntity<string>> {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Sets up a CRUD feature for its subtree: the service, the store with its
|
|
13
|
-
* effects, the facade and the file service pointed at the resource
|
|
14
|
-
*
|
|
13
|
+
* effects, the facade and the file service pointed at the resource. Pass a
|
|
14
|
+
* memoised `config`.
|
|
15
15
|
*/
|
|
16
16
|
export declare function CrudProvider<T extends IEntity<string>>({ config, service, children, }: CrudProviderProps<T>): import("react/jsx-runtime").JSX.Element;
|
package/src/lib/crud.provider.js
CHANGED
|
@@ -13,9 +13,8 @@ const crud_facade_1 = require("./state/crud.facade");
|
|
|
13
13
|
const crud_reducer_1 = require("./state/crud.reducer");
|
|
14
14
|
const crud_store_1 = require("./state/crud.store");
|
|
15
15
|
// One registry per application (per `SmartProvider`, whose HTTP client is
|
|
16
|
-
// created once), so features with the same entity share their state
|
|
17
|
-
//
|
|
18
|
-
// stay apart.
|
|
16
|
+
// created once), so features with the same entity share their state, while
|
|
17
|
+
// two applications rendered in one process (SSR) stay apart.
|
|
19
18
|
const registries = new WeakMap();
|
|
20
19
|
function getRegistry(http) {
|
|
21
20
|
let registry = registries.get(http);
|
|
@@ -27,8 +26,8 @@ function getRegistry(http) {
|
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* Sets up a CRUD feature for its subtree: the service, the store with its
|
|
30
|
-
* effects, the facade and the file service pointed at the resource
|
|
31
|
-
*
|
|
29
|
+
* effects, the facade and the file service pointed at the resource. Pass a
|
|
30
|
+
* memoised `config`.
|
|
32
31
|
*/
|
|
33
32
|
function CrudProvider({ config, service, children, }) {
|
|
34
33
|
const smart = (0, react_2.useSmart)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.provider.js","sourceRoot":"","sources":["../../../../../../../packages/crud/shell/react/src/lib/crud.provider.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"crud.provider.js","sourceRoot":"","sources":["../../../../../../../packages/crud/shell/react/src/lib/crud.provider.tsx"],"names":[],"mappings":";;AA2DA,oCAyDC;;AApHD,iCAAgC;AAIhC,+CAK6B;AAG7B,iDAA+D;AAC/D,+DAA2D;AAC3D,iFAAgF;AAChF,qEAAqE;AACrE,uDAAmD;AACnD,qDAAiD;AACjD,uDAAkD;AAClD,mDAA+C;AAY/C,0EAA0E;AAC1E,2EAA2E;A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EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;YAC7B,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,uEAAuE;YACvE,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG,WAAW,CAAC;QACxC,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,wBAAU,CAAI,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAExD,OAAO;YACL,MAAM;YACN,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM;YACN,aAAa,EAAE,QAAQ,CAAC,aAAa;YACrC,gBAAgB,EAAE,IAAI,yCAAoB,CAAI,MAAM,CAAC;SACtD,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAElC,6DAA6D;IAC7D,MAAM,UAAU,GAAG,IAAA,eAAO,EACxB,GAAG,EAAE,CAAC,CAAC;QACL,GAAG,KAAK;QACR,WAAW,EAAE,IAAI,mBAAW,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CACvE,KAAK,CAAC,WAAW,CAAC,cAAc,EAAE,CACnC;KACF,CAAC,EACF,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CACvB,CAAC;IAEF,OAAO,CACL,uBAAC,oBAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YACtC,uBAAC,0BAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAAG,QAAQ,GAAwB,GAC9C,CACzB,CAAC;AACJ,CAAC"}
|
|
@@ -2,8 +2,8 @@ import type { ComponentType } from 'react';
|
|
|
2
2
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
3
3
|
import { IFormOptions } from '@smartsoft001/react';
|
|
4
4
|
/**
|
|
5
|
-
* The form options of the item page
|
|
6
|
-
*
|
|
5
|
+
* The form options of the item page: a fresh model for `create`, a model
|
|
6
|
+
* filled from `item` for any other mode.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getCrudFormOptions<T extends IEntity<string>>(item: T | null | undefined, mode: string, type: any, uniqueProvider?: (values: Record<keyof T, any>) => Promise<boolean>, inputComponents?: {
|
|
9
9
|
[key: string]: ComponentType<any>;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCrudFormOptions = getCrudFormOptions;
|
|
4
4
|
/**
|
|
5
|
-
* The form options of the item page
|
|
6
|
-
*
|
|
5
|
+
* The form options of the item page: a fresh model for `create`, a model
|
|
6
|
+
* filled from `item` for any other mode.
|
|
7
7
|
*/
|
|
8
8
|
function getCrudFormOptions(item, mode, type, uniqueProvider, inputComponents) {
|
|
9
9
|
if (!mode || !type)
|
package/src/lib/hooks.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare function useCrudState<T extends IEntity<string>>(): CrudState<T>;
|
|
|
6
6
|
export declare function useCrudState<T extends IEntity<string>, S>(selector: (state: CrudState<T>) => S): S;
|
|
7
7
|
/**
|
|
8
8
|
* The pagination options of the list, driven by the feature's filter and
|
|
9
|
-
* links
|
|
10
|
-
*
|
|
9
|
+
* links: the next / previous page loaders resolve once the read settled, with
|
|
10
|
+
* whether there is a further page.
|
|
11
11
|
*/
|
|
12
12
|
export declare function useCrudListPagination(options: {
|
|
13
13
|
mode?: PaginationMode;
|
package/src/lib/hooks.js
CHANGED
|
@@ -25,8 +25,8 @@ function whenLoaded(store) {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* The pagination options of the list, driven by the feature's filter and
|
|
28
|
-
* links
|
|
29
|
-
*
|
|
28
|
+
* links: the next / previous page loaders resolve once the read settled, with
|
|
29
|
+
* whether there is a further page.
|
|
30
30
|
*/
|
|
31
31
|
function useCrudListPagination(options) {
|
|
32
32
|
const { store, facade } = (0, crud_context_1.useCrud)();
|
|
@@ -6,10 +6,9 @@ export type CrudRoute = {
|
|
|
6
6
|
id?: string;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* The page
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* other URL.
|
|
9
|
+
* The CRUD page that `url` leads to, relative to `basePath`: `basePath` is
|
|
10
|
+
* the list, `basePath/add` the item page creating an item, `basePath/:id` the
|
|
11
|
+
* item page of `id`. `null` for any other URL.
|
|
13
12
|
*/
|
|
14
13
|
export declare function matchCrudRoute(url: string, basePath: string): CrudRoute | null;
|
|
15
14
|
export interface SmartCrudPagesProps {
|
|
@@ -17,10 +16,10 @@ export interface SmartCrudPagesProps {
|
|
|
17
16
|
basePath: string;
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
|
-
* The
|
|
21
|
-
* `
|
|
22
|
-
* `
|
|
23
|
-
*
|
|
19
|
+
* The CRUD pages without a router: renders `SmartCrudListPage` on
|
|
20
|
+
* `basePath`, `SmartCrudItemPage` creating an item on `basePath/add` and
|
|
21
|
+
* `SmartCrudItemPage` of the item on `basePath/:id`, following the URL of
|
|
22
|
+
* `useNavigation()` (`getCurrentUrl()` + `subscribe`).
|
|
24
23
|
* Renders nothing on any other URL. Render it inside the `CrudProvider` of
|
|
25
24
|
* the feature.
|
|
26
25
|
*
|
|
@@ -12,10 +12,9 @@ function normalizePath(path) {
|
|
|
12
12
|
return path.split(/[?#]/)[0].replace(/\/+$/, '') || '/';
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* The page
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* other URL.
|
|
15
|
+
* The CRUD page that `url` leads to, relative to `basePath`: `basePath` is
|
|
16
|
+
* the list, `basePath/add` the item page creating an item, `basePath/:id` the
|
|
17
|
+
* item page of `id`. `null` for any other URL.
|
|
19
18
|
*/
|
|
20
19
|
function matchCrudRoute(url, basePath) {
|
|
21
20
|
const path = normalizePath(url);
|
|
@@ -33,10 +32,10 @@ function matchCrudRoute(url, basePath) {
|
|
|
33
32
|
return { page: 'item', id: decodeURIComponent(segment) };
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
|
-
* The
|
|
37
|
-
* `
|
|
38
|
-
* `
|
|
39
|
-
*
|
|
35
|
+
* The CRUD pages without a router: renders `SmartCrudListPage` on
|
|
36
|
+
* `basePath`, `SmartCrudItemPage` creating an item on `basePath/add` and
|
|
37
|
+
* `SmartCrudItemPage` of the item on `basePath/:id`, following the URL of
|
|
38
|
+
* `useNavigation()` (`getCurrentUrl()` + `subscribe`).
|
|
40
39
|
* Renders nothing on any other URL. Render it inside the `CrudProvider` of
|
|
41
40
|
* the feature.
|
|
42
41
|
*
|
|
@@ -57,8 +56,8 @@ function SmartCrudPages({ basePath }) {
|
|
|
57
56
|
return null;
|
|
58
57
|
if (route.page === 'list')
|
|
59
58
|
return (0, jsx_runtime_1.jsx)(list_page_1.SmartCrudListPage, { basePath: basePath });
|
|
60
|
-
// `add` and
|
|
61
|
-
//
|
|
59
|
+
// The page is created anew between `add` and an id; between two ids the
|
|
60
|
+
// same page stays and gets the new `id`.
|
|
62
61
|
return ((0, jsx_runtime_1.jsx)(item_page_1.SmartCrudItemPage, { id: route.id, basePath: basePath }, route.id === undefined ? 'add' : 'item'));
|
|
63
62
|
}
|
|
64
63
|
//# sourceMappingURL=crud-pages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-pages.js","sourceRoot":"","sources":["../../../../../../../../packages/crud/shell/react/src/lib/pages/crud-pages.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"crud-pages.js","sourceRoot":"","sources":["../../../../../../../../packages/crud/shell/react/src/lib/pages/crud-pages.tsx"],"names":[],"mappings":";;AAoBA,wCAoBC;AAoBD,wCAyBC;;AArFD,iCAA4C;AAE5C,+CAAoD;AAEpD,gDAAqD;AACrD,gDAA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,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;QAEnC,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAE5C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,uBAAC,6BAAiB,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAAC;IAE5E,wEAAwE;IACxE,yCAAyC;IACzC,OAAO,CACL,uBAAC,6BAAiB,IAEhB,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,QAAQ,EAAE,QAAQ,IAFb,KAAK,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAG5C,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
2
2
|
import { SmartCrudItemPageProps } from './item-page.types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* components
|
|
8
|
-
* `
|
|
9
|
-
* `
|
|
10
|
-
* Without `id` it creates an item. Render it inside the feature's
|
|
11
|
-
* `CrudProvider` with a `CrudFullConfig`.
|
|
4
|
+
* The item page of a CRUD feature: a `SmartPage` with the title, back button
|
|
5
|
+
* and mode buttons of `useCrudItemPage`, the add / edit components above and
|
|
6
|
+
* below the body, and the body: the one registered as
|
|
7
|
+
* `components['crud-item-page']` on `SmartProvider`, else
|
|
8
|
+
* `SmartCrudItemPageStandard`. Without `id` it creates an item. Render it
|
|
9
|
+
* inside the feature's `CrudProvider` with a `CrudFullConfig`.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* nothing.
|
|
11
|
+
* A registered body renders in the `.dynamic-content` element. It gets the
|
|
12
|
+
* same props as the standard one and must put the form it renders in
|
|
13
|
+
* `formRef` (see `useCrudItemPageBase`), or add and save do nothing.
|
|
17
14
|
*/
|
|
18
15
|
export declare function SmartCrudItemPage<T extends IEntity<string>>(props: SmartCrudItemPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,19 +6,16 @@ const react_1 = require("@smartsoft001/react");
|
|
|
6
6
|
const item_page_standard_1 = require("./standard/item-page-standard");
|
|
7
7
|
const use_crud_item_page_1 = require("./use-crud-item-page");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* components
|
|
13
|
-
* `
|
|
14
|
-
* `
|
|
15
|
-
* Without `id` it creates an item. Render it inside the feature's
|
|
16
|
-
* `CrudProvider` with a `CrudFullConfig`.
|
|
9
|
+
* The item page of a CRUD feature: a `SmartPage` with the title, back button
|
|
10
|
+
* and mode buttons of `useCrudItemPage`, the add / edit components above and
|
|
11
|
+
* below the body, and the body: the one registered as
|
|
12
|
+
* `components['crud-item-page']` on `SmartProvider`, else
|
|
13
|
+
* `SmartCrudItemPageStandard`. Without `id` it creates an item. Render it
|
|
14
|
+
* inside the feature's `CrudProvider` with a `CrudFullConfig`.
|
|
17
15
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* nothing.
|
|
16
|
+
* A registered body renders in the `.dynamic-content` element. It gets the
|
|
17
|
+
* same props as the standard one and must put the form it renders in
|
|
18
|
+
* `formRef` (see `useCrudItemPageBase`), or add and save do nothing.
|
|
22
19
|
*/
|
|
23
20
|
function SmartCrudItemPage(props) {
|
|
24
21
|
const { children } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-page.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/item-page.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"item-page.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/item-page.tsx"],"names":[],"mappings":";;AAsBA,8CAiDC;;AAtED,+CAAmE;AAMnE,sEAA0E;AAC1E,6DAAuD;AAEvD;;;;;;;;;;;GAWG;AACH,SAAgB,iBAAiB,CAC/B,KAA6B;IAE7B,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,EACJ,MAAM,EACN,IAAI,EACJ,WAAW,EACX,cAAc,EACd,cAAc,EACd,eAAe,EACf,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,EACZ,eAAe,GAChB,GAAG,IAAA,oCAAe,EAAI,KAAK,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAA,yBAAiB,EAC5B,gBAAgB,EAChB,8CAAyB,CAC1B,CAAC;IACF,MAAM,QAAQ,GAAG,IAAI,KAAK,8CAAyB,CAAC;IAEpD,MAAM,IAAI,GAAG,CACX,uBAAC,IAAI,IACH,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,YAEf,QAAQ,GACJ,CACR,CAAC;IAEF,OAAO,CACL,wBAAC,iBAAS,IAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE,aAChE,gCAAK,SAAS,EAAC,0BAA0B,YACtC,YAAY,CAAC,CAAC,CAAC,uBAAC,YAAY,KAAG,CAAC,CAAC,CAAC,IAAI,GACnC,EACL,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EACvB,gCAAK,SAAS,EAAC,iBAAiB,YAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAO,EAChE,gCAAK,SAAS,EAAC,0BAA0B,YACtC,eAAe,CAAC,CAAC,CAAC,uBAAC,eAAe,KAAG,CAAC,CAAC,CAAC,IAAI,GACzC,IACI,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
import type { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
3
3
|
import { IDetailsOptions, SmartFormGroup } from '@smartsoft001/react';
|
|
4
|
-
/** The props of `<SmartCrudItemPage
|
|
4
|
+
/** The props of `<SmartCrudItemPage>`. */
|
|
5
5
|
export interface SmartCrudItemPageProps {
|
|
6
6
|
/**
|
|
7
|
-
* The id of the item
|
|
8
|
-
* a new item, as on the Angular `add` route.
|
|
7
|
+
* The id of the item. Without it the page creates a new item.
|
|
9
8
|
*/
|
|
10
9
|
id?: string;
|
|
11
10
|
/**
|
|
12
11
|
* The path of the list. After a create, or a save without details, the page
|
|
13
|
-
* navigates there; without it, it goes back in the history
|
|
14
|
-
* page did with `Location.back()`.
|
|
12
|
+
* navigates there; without it, it goes back in the history.
|
|
15
13
|
*/
|
|
16
14
|
basePath?: string;
|
|
17
15
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* as `crud-item-page` can.
|
|
16
|
+
* Handed to the body. The standard body does not render it; a body
|
|
17
|
+
* registered as `crud-item-page` can.
|
|
21
18
|
*/
|
|
22
19
|
children?: ReactNode;
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
25
22
|
* The props of the item page body: `SmartCrudItemPageStandard` or a body
|
|
26
|
-
* registered as `components['crud-item-page']` on `SmartProvider
|
|
27
|
-
* and outputs of the Angular `CrudItemPageBaseComponent`).
|
|
23
|
+
* registered as `components['crud-item-page']` on `SmartProvider`.
|
|
28
24
|
*/
|
|
29
25
|
export interface SmartCrudItemPageBodyProps<T extends IEntity<string> = any> {
|
|
30
26
|
detailsOptions?: IDetailsOptions<T>;
|
|
@@ -38,8 +34,8 @@ export interface SmartCrudItemPageBodyProps<T extends IEntity<string> = any> {
|
|
|
38
34
|
/** The form validity (`onValidChange`). */
|
|
39
35
|
onValidChange?: (valid: boolean) => void;
|
|
40
36
|
/**
|
|
41
|
-
* Where the body keeps the form it renders
|
|
42
|
-
*
|
|
37
|
+
* Where the body keeps the form it renders: the page validates it before a
|
|
38
|
+
* create or a save. `useCrudItemPageBase` fills
|
|
43
39
|
* it.
|
|
44
40
|
*/
|
|
45
41
|
formRef?: RefObject<SmartFormGroup | null>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
2
2
|
import { SmartCrudItemPageBodyProps } from '../item-page.types';
|
|
3
3
|
/**
|
|
4
|
-
* The default item page body
|
|
5
|
-
* `ItemStandardComponent`): `SmartDetails` of `detailsOptions` in the
|
|
4
|
+
* The default item page body: `SmartDetails` of `detailsOptions` in the
|
|
6
5
|
* details mode, else `SmartForm` of the selected item for the mode, reporting
|
|
7
|
-
* its changes, value and validity. `children` are not rendered
|
|
8
|
-
* Angular template had no `ng-content`.
|
|
6
|
+
* its changes, value and validity. `children` are not rendered.
|
|
9
7
|
*/
|
|
10
8
|
export declare function SmartCrudItemPageStandard<T extends IEntity<string>>(props: SmartCrudItemPageBodyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,11 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("@smartsoft001/react");
|
|
6
6
|
const use_crud_item_page_base_1 = require("../use-crud-item-page-base");
|
|
7
7
|
/**
|
|
8
|
-
* The default item page body
|
|
9
|
-
* `ItemStandardComponent`): `SmartDetails` of `detailsOptions` in the
|
|
8
|
+
* The default item page body: `SmartDetails` of `detailsOptions` in the
|
|
10
9
|
* details mode, else `SmartForm` of the selected item for the mode, reporting
|
|
11
|
-
* its changes, value and validity. `children` are not rendered
|
|
12
|
-
* Angular template had no `ng-content`.
|
|
10
|
+
* its changes, value and validity. `children` are not rendered.
|
|
13
11
|
*/
|
|
14
12
|
function SmartCrudItemPageStandard(props) {
|
|
15
13
|
const { mode, detailsOptions, onPartialChange, onChange, onValidChange } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-page-standard.js","sourceRoot":"","sources":["../../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/standard/item-page-standard.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"item-page-standard.js","sourceRoot":"","sources":["../../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/standard/item-page-standard.tsx"],"names":[],"mappings":";;AAWA,8DAyBC;;AAnCD,+CAA8D;AAG9D,wEAAiE;AAEjE;;;;GAIG;AACH,SAAgB,yBAAyB,CACvC,KAAoC;IAEpC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,GACtE,KAAK,CAAC;IACR,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,6CAAmB,EAAI,KAAK,CAAC,CAAC;IAEtD,OAAO,CACL,6DACG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CACpB,cAAc,CAAC,CAAC,CAAC,CACf,uBAAC,oBAAY,IAAC,OAAO,EAAE,cAAc,GAAI,CAC1C,CAAC,CAAC,CAAC,IAAI,CACT,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAChB,uBAAC,iBAAS,IACR,OAAO,EAAE,WAAW,EACpB,oBAAoB,EAAE,eAAe,EACrC,aAAa,EAAE,QAAQ,EACvB,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC,CAAC,CAAC,IAAI,EACR,gCAAM,EACN,gCAAM,IACL,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -2,13 +2,12 @@ import { IEntity } from '@smartsoft001/domain-core';
|
|
|
2
2
|
import { IFormOptions } from '@smartsoft001/react';
|
|
3
3
|
import { SmartCrudItemPageBodyProps } from './item-page.types';
|
|
4
4
|
/**
|
|
5
|
-
* What every item page body shares
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `selected`, `mode`, `config.type`, `uniqueProvider` and
|
|
5
|
+
* What every item page body shares: `config`, `facade`, the `selected` item
|
|
6
|
+
* and, outside the details mode, the form of the item: `formOptions` (built
|
|
7
|
+
* from `selected`, `mode`, `config.type`, `uniqueProvider` and
|
|
9
8
|
* `config.inputComponents`, with the built form as `control`) and `form`,
|
|
10
|
-
* which is put in `formRef` for the page to validate
|
|
11
|
-
*
|
|
9
|
+
* which is put in `formRef` for the page to validate. Render
|
|
10
|
+
* `<SmartForm options={formOptions}>` once both exist.
|
|
12
11
|
*
|
|
13
12
|
* A new form is built when the selected item, the mode or the provider
|
|
14
13
|
* change; while creating, the selected item is ignored.
|
|
@@ -7,13 +7,12 @@ const crud_context_1 = require("../../crud.context");
|
|
|
7
7
|
const form_options_1 = require("../../factories/form-options");
|
|
8
8
|
const hooks_1 = require("../../hooks");
|
|
9
9
|
/**
|
|
10
|
-
* What every item page body shares
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `selected`, `mode`, `config.type`, `uniqueProvider` and
|
|
10
|
+
* What every item page body shares: `config`, `facade`, the `selected` item
|
|
11
|
+
* and, outside the details mode, the form of the item: `formOptions` (built
|
|
12
|
+
* from `selected`, `mode`, `config.type`, `uniqueProvider` and
|
|
14
13
|
* `config.inputComponents`, with the built form as `control`) and `form`,
|
|
15
|
-
* which is put in `formRef` for the page to validate
|
|
16
|
-
*
|
|
14
|
+
* which is put in `formRef` for the page to validate. Render
|
|
15
|
+
* `<SmartForm options={formOptions}>` once both exist.
|
|
17
16
|
*
|
|
18
17
|
* A new form is built when the selected item, the mode or the provider
|
|
19
18
|
* change; while creating, the selected item is ignored.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-crud-item-page-base.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/use-crud-item-page-base.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"use-crud-item-page-base.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/use-crud-item-page-base.ts"],"names":[],"mappings":";;AAqBA,kDAmDC;AAxED,iCAA2C;AAG3C,+CAAiE;AAGjE,qDAAkE;AAClE,+DAAkE;AAClE,uCAA2C;AAE3C;;;;;;;;;;GAUG;AACH,SAAgB,mBAAmB,CAA4B,EAC7D,IAAI,EACJ,cAAc,EACd,OAAO,GACuB;IAC9B,MAAM,MAAM,GAAG,IAAA,4BAAa,GAAK,CAAC;IAClC,MAAM,MAAM,GAAG,IAAA,4BAAa,GAAK,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAA,oBAAY,EAC3B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAC1B,CAAC;IAEF,MAAM,IAAI,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACjD,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,CAAC;IAC1B,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IAE/C,MAAM,OAAO,GAAG,IAAA,eAAO,EACrB,GAAG,EAAE,CACH,IAAI,IAAI,IAAI,KAAK,SAAS;QACxB,CAAC,CAAC,IAAA,iCAAkB,EAChB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,eAAe,CAChB;QACH,CAAC,CAAC,IAAI,EACV,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,eAAe,CAAC,CACpD,CAAC;IAEF,MAAM,IAAI,GAAG,IAAA,oBAAY,EAAC,OAAO,EAAE,KAAK,EAAE;QACxC,IAAI,EAAE,OAAO,EAAE,IAAI;QACnB,cAAc,EAAE,OAAO,EAAE,cACwC;KAClE,CAAC,CAAC;IAEH,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QAE/B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QAEvB,OAAO,GAAG,EAAE;YACV,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;gBAAE,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QACvD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpB,MAAM,WAAW,GAAG,IAAA,eAAO,EACzB,GAAG,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAC9D,CAAC,OAAO,EAAE,IAAI,CAAC,CAChB,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -4,8 +4,8 @@ import { IDetailsOptions, IPageOptions, SmartFormGroup } from '@smartsoft001/rea
|
|
|
4
4
|
import { SmartCrudItemPageProps } from './item-page.types';
|
|
5
5
|
import { CrudFullConfig } from '../../crud.config';
|
|
6
6
|
/**
|
|
7
|
-
* The logic of the item page
|
|
8
|
-
*
|
|
7
|
+
* The logic of the item page, for `SmartCrudItemPage` or a page of your own
|
|
8
|
+
* around the same feature:
|
|
9
9
|
*
|
|
10
10
|
* - `mode`: `'create'` without an `id`; with one `'details'` when
|
|
11
11
|
* `config.details` is set, else `'update'`; the `edit` query param (or the
|
|
@@ -26,8 +26,8 @@ import { CrudFullConfig } from '../../crud.config';
|
|
|
26
26
|
* - `TopComponent` / `BottomComponent`: the `components` of `config.add`
|
|
27
27
|
* while creating, of `config.edit` while updating.
|
|
28
28
|
*
|
|
29
|
-
* Switching between creating and an id needs a new page (a `key`)
|
|
30
|
-
*
|
|
29
|
+
* Switching between creating and an id needs a new page (a `key`): the mode
|
|
30
|
+
* is set once, when the page is created.
|
|
31
31
|
*/
|
|
32
32
|
export declare function useCrudItemPage<T extends IEntity<string>>({ id, basePath, }?: SmartCrudItemPageProps): {
|
|
33
33
|
config: CrudFullConfig<T>;
|
|
@@ -58,8 +58,8 @@ function getInvalidFields(control, invalidFields, baseField, t, key = null) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* The logic of the item page
|
|
62
|
-
*
|
|
61
|
+
* The logic of the item page, for `SmartCrudItemPage` or a page of your own
|
|
62
|
+
* around the same feature:
|
|
63
63
|
*
|
|
64
64
|
* - `mode`: `'create'` without an `id`; with one `'details'` when
|
|
65
65
|
* `config.details` is set, else `'update'`; the `edit` query param (or the
|
|
@@ -80,8 +80,8 @@ function getInvalidFields(control, invalidFields, baseField, t, key = null) {
|
|
|
80
80
|
* - `TopComponent` / `BottomComponent`: the `components` of `config.add`
|
|
81
81
|
* while creating, of `config.edit` while updating.
|
|
82
82
|
*
|
|
83
|
-
* Switching between creating and an id needs a new page (a `key`)
|
|
84
|
-
*
|
|
83
|
+
* Switching between creating and an id needs a new page (a `key`): the mode
|
|
84
|
+
* is set once, when the page is created.
|
|
85
85
|
*/
|
|
86
86
|
function useCrudItemPage({ id, basePath, } = {}) {
|
|
87
87
|
const config = (0, use_crud_page_config_1.useCrudPageConfig)();
|
|
@@ -94,13 +94,12 @@ function useCrudItemPage({ id, basePath, } = {}) {
|
|
|
94
94
|
const selected = (0, hooks_1.useCrudState)((state) => state.selected);
|
|
95
95
|
const create = id === undefined;
|
|
96
96
|
const [mode, setMode] = (0, react_1.useState)(() => create ? 'create' : config.details ? 'details' : 'update');
|
|
97
|
-
// Before the body renders
|
|
98
|
-
// the details set the root while rendering.
|
|
97
|
+
// Before the body renders: the details set the root while rendering.
|
|
99
98
|
(0, react_1.useState)(() => detailsService.init());
|
|
100
99
|
const formRef = (0, react_1.useRef)(null);
|
|
101
100
|
const formValue = (0, react_1.useRef)(undefined);
|
|
102
101
|
const formPartialValue = (0, react_1.useRef)(undefined);
|
|
103
|
-
//
|
|
102
|
+
// The last reported validity; the buttons validate the form itself.
|
|
104
103
|
const formValid = (0, react_1.useRef)(false);
|
|
105
104
|
const idRef = (0, react_1.useRef)(id);
|
|
106
105
|
(0, react_1.useEffect)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-crud-item-page.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/use-crud-item-page.ts"],"names":[],"mappings":";;AAiIA,
|
|
1
|
+
{"version":3,"file":"use-crud-item-page.js","sourceRoot":"","sources":["../../../../../../../../../packages/crud/shell/react/src/lib/pages/item/use-crud-item-page.ts"],"names":[],"mappings":";;AAiIA,0CA2PC;AA5XD,iCAA0E;AAI1E,iDAAuD;AACvD,+CAc6B;AAC7B,+CAA2D;AAI3D,qDAAmE;AACnE,uCAA2C;AAE3C,kEAA4D;AAE5D,qFAAqF;AACrF,SAAS,QAAQ,CACf,KAAsD;IAEtD,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,IAAI,KAAK;QAChE,CAAC,CAAC,KAAK,CAAC,UAAU;QAClB,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,sEAAsE;AACtE,SAAS,eAAe,CAAC,GAAW;IAClC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAEjD,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IACrD,CAAC;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC;IAEpB,OAAO,GAAG,CAAC,gBAAgB,CAAC,GAAG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