@capillarytech/blaze-ui 6.5.0 → 6.6.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/CapAdvancedIcon/types.d.ts +1 -0
- package/CapAdvancedIcon/types.d.ts.map +1 -1
- package/CapDnDGraph/index.js +2 -2
- package/CapDndGraphSidebar/SideBarIcon.d.ts +3 -23
- package/CapDndGraphSidebar/SideBarIcon.d.ts.map +1 -1
- package/CapDndGraphSidebar/SideBarIcon.js +21 -39
- package/CapDndGraphSidebar/SidebarNodesRendered.d.ts +3 -9
- package/CapDndGraphSidebar/SidebarNodesRendered.d.ts.map +1 -1
- package/CapDndGraphSidebar/SidebarNodesRendered.js +13 -4
- package/CapDndGraphSidebar/index.d.ts +4 -20
- package/CapDndGraphSidebar/index.d.ts.map +1 -1
- package/CapDndGraphSidebar/index.js +31 -33
- package/CapDndGraphSidebar/styles.css +19 -6
- package/CapDndGraphSidebar/styles.module.scss.js +15 -0
- package/CapDndGraphSidebar/styles.scss +68 -51
- package/CapDndGraphSidebar/types.d.ts +106 -0
- package/CapDndGraphSidebar/types.d.ts.map +1 -0
- package/CapDragAndDrop/index.d.ts +3 -19
- package/CapDragAndDrop/index.d.ts.map +1 -1
- package/CapDragAndDrop/index.js +24 -29
- package/CapDragAndDrop/messages.d.ts +25 -0
- package/CapDragAndDrop/messages.d.ts.map +1 -0
- package/CapDragAndDrop/messages.js +28 -0
- package/CapDragAndDrop/styles.css +17 -15
- package/CapDragAndDrop/styles.module.scss.js +21 -0
- package/CapDragAndDrop/styles.scss +18 -16
- package/CapDragAndDrop/types.d.ts +17 -0
- package/CapDragAndDrop/types.d.ts.map +1 -0
- package/CapDragAndDrop/types.js +1 -0
- package/CapIcon/index.js +12 -12
- package/CapIcon/styles.css +17 -21
- package/CapIcon/styles.module.scss.js +3 -4
- package/CapIcon/styles.scss +10 -15
- package/CapMediaPreview/ImageRenderer.d.ts +2 -15
- package/CapMediaPreview/ImageRenderer.d.ts.map +1 -1
- package/CapMediaPreview/ImageRenderer.js +3 -11
- package/CapMediaPreview/MediaRenderer.d.ts +2 -1
- package/CapMediaPreview/MediaRenderer.d.ts.map +1 -1
- package/CapMediaPreview/MediaRenderer.js +17 -15
- package/CapMediaPreview/VideoPlayer.d.ts +2 -1
- package/CapMediaPreview/VideoPlayer.d.ts.map +1 -1
- package/CapMediaPreview/VideoPlayer.js +16 -15
- package/CapMediaPreview/index.d.ts +4 -51
- package/CapMediaPreview/index.d.ts.map +1 -1
- package/CapMediaPreview/index.js +86 -69
- package/CapMediaPreview/styles.css +31 -21
- package/CapMediaPreview/styles.module.scss.js +24 -0
- package/CapMediaPreview/styles.scss +38 -27
- package/CapMediaPreview/types.d.ts +48 -0
- package/CapMediaPreview/types.d.ts.map +1 -0
- package/CapMediaPreview/types.js +1 -0
- package/CapPopoverTree/index.d.ts +40 -3
- package/CapPopoverTree/index.d.ts.map +1 -1
- package/CapPopoverTree/index.js +82 -72
- package/CapPopoverTree/style.d.ts +1 -5
- package/CapPopoverTree/style.d.ts.map +1 -1
- package/CapPopoverTree/styles.css +18 -119
- package/CapPopoverTree/styles.scss +31 -179
- package/CapSelectFilter/types.d.ts +1 -1
- package/CapSelectFilter/types.d.ts.map +1 -1
- package/CapTimeline/CapTimelineCard.d.ts +4 -27
- package/CapTimeline/CapTimelineCard.d.ts.map +1 -1
- package/CapTimeline/CapTimelineCard.js +40 -157
- package/CapTimeline/CapTimelinePanesWrapper.d.ts +4 -25
- package/CapTimeline/CapTimelinePanesWrapper.d.ts.map +1 -1
- package/CapTimeline/CapTimelinePanesWrapper.js +24 -20
- package/CapTimeline/index.d.ts +2 -17
- package/CapTimeline/index.d.ts.map +1 -1
- package/CapTimeline/index.js +62 -23
- package/CapTimeline/messages.d.ts +21 -0
- package/CapTimeline/messages.d.ts.map +1 -0
- package/CapTimeline/messages.js +24 -0
- package/CapTimeline/styles.css +40 -40
- package/CapTimeline/styles.module.scss.js +30 -0
- package/CapTimeline/styles.scss +76 -57
- package/CapTimeline/tests/CapTimeline.mockData.d.ts +14 -0
- package/CapTimeline/tests/CapTimeline.mockData.d.ts.map +1 -0
- package/CapTimeline/types.d.ts +60 -0
- package/CapTimeline/types.d.ts.map +1 -0
- package/CapTimeline/types.js +1 -0
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -1
- package/index.js +179 -171
- package/package.json +2 -2
- package/utils/getCapThemeConfig.d.ts +1 -1
- package/utils/getCapThemeConfig.d.ts.map +1 -1
- package/utils/getCapThemeConfig.js +9 -1
- package/CapPopoverTree/styles.module.scss.js +0 -26
- package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts +0 -22
- package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts.map +0 -1
- package/CapPopoverTree/types.d.ts +0 -62
- package/CapPopoverTree/types.d.ts.map +0 -1
- package/CapVirtualSelect/actions.d.ts +0 -16
- package/CapVirtualSelect/actions.d.ts.map +0 -1
- package/CapVirtualSelect/actions.js +0 -21
- package/CapVirtualSelect/constants.d.ts +0 -13
- package/CapVirtualSelect/constants.d.ts.map +0 -1
- package/CapVirtualSelect/constants.js +0 -26
- package/CapVirtualSelect/index.d.ts +0 -169
- package/CapVirtualSelect/index.d.ts.map +0 -1
- package/CapVirtualSelect/index.js +0 -409
- package/CapVirtualSelect/messages.d.ts +0 -9
- package/CapVirtualSelect/messages.d.ts.map +0 -1
- package/CapVirtualSelect/messages.js +0 -12
- package/CapVirtualSelect/reducer.d.ts +0 -4
- package/CapVirtualSelect/reducer.d.ts.map +0 -1
- package/CapVirtualSelect/reducer.js +0 -63
- package/CapVirtualSelect/saga.d.ts +0 -40
- package/CapVirtualSelect/saga.d.ts.map +0 -1
- package/CapVirtualSelect/saga.js +0 -91
- package/CapVirtualSelect/selectors.d.ts +0 -28
- package/CapVirtualSelect/selectors.d.ts.map +0 -1
- package/CapVirtualSelect/selectors.js +0 -30
- package/CapVirtualSelect/styles.css +0 -110
- package/CapVirtualSelect/styles.scss +0 -106
- package/CapVirtualSelect/tests/mockData.d.ts +0 -7
- package/CapVirtualSelect/tests/mockData.d.ts.map +0 -1
- package/CapVirtualSelect/utils.d.ts +0 -2
- package/CapVirtualSelect/utils.d.ts.map +0 -1
- package/CapVirtualSelect/utils.js +0 -12
- /package/{CapPopoverTree → CapDndGraphSidebar}/types.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapVirtualSelect/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,kDAAkD,CAAC;;;;;;;AAErE,wBAKG"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from "react-intl";
|
|
2
|
-
const scope = "app.commonUtils.capUiLibrary.CapVirtualSelect";
|
|
3
|
-
const messages = defineMessages({
|
|
4
|
-
noOptionsFound: {
|
|
5
|
-
id: `${scope}.noOptionsFound`,
|
|
6
|
-
defaultMessage: "No options found!"
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
export {
|
|
10
|
-
messages as default,
|
|
11
|
-
scope
|
|
12
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const initialState: import("immutable").Map<"getPaginatedOptionsStatus" | "getPaginatedOptions" | "getUnTransformedPaginatedOptions" | "getPaginatedOptionsError" | "getPaginatedOptionsTotalCount" | "getOptionByIdStatus" | "getOptionById" | "getOptionByIdError", any>;
|
|
2
|
-
declare function CapVirtualSelectRootReducer(namespace?: string): (state: import("immutable").Map<"getPaginatedOptionsStatus" | "getPaginatedOptions" | "getUnTransformedPaginatedOptions" | "getPaginatedOptionsError" | "getPaginatedOptionsTotalCount" | "getOptionByIdStatus" | "getOptionById" | "getOptionByIdError", any>, action: any) => import("immutable").Map<"getPaginatedOptionsStatus" | "getPaginatedOptions" | "getUnTransformedPaginatedOptions" | "getPaginatedOptionsError" | "getPaginatedOptionsTotalCount" | "getOptionByIdStatus" | "getOptionById" | "getOptionByIdError", any>;
|
|
3
|
-
export default CapVirtualSelectRootReducer;
|
|
4
|
-
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../components/CapVirtualSelect/reducer.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,wPASvB,CAAC;AAGH,iBAAS,2BAA2B,CAAC,SAAS,SAAyB,IAC7B,6PAAoB,EAAE,WAAM,4PAgFrE;AAED,eAAe,2BAA2B,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { fromJS } from "immutable";
|
|
2
|
-
import isEmpty from "lodash/isEmpty";
|
|
3
|
-
import uniqBy from "lodash/uniqBy";
|
|
4
|
-
import * as CapVirtualSelect_constants from "./constants.js";
|
|
5
|
-
import { defaultNamespace, CLEAR_DATA_ON_UNMOUNT, GET_OPTION_BY_ID_FAILURE, GET_OPTION_BY_ID_SUCCESS, GET_OPTION_BY_ID_REQUEST, GET_PAGINATED_OPTIONS_FAILURE, GET_PAGINATED_OPTIONS_SUCCESS, GET_PAGINATED_OPTIONS_REQUEST } from "./constants.js";
|
|
6
|
-
const { REQUEST, SUCCESS, FAILURE } = CapVirtualSelect_constants;
|
|
7
|
-
const initialState = fromJS({
|
|
8
|
-
getPaginatedOptionsStatus: "",
|
|
9
|
-
getPaginatedOptions: [],
|
|
10
|
-
getUnTransformedPaginatedOptions: [],
|
|
11
|
-
getPaginatedOptionsError: null,
|
|
12
|
-
getPaginatedOptionsTotalCount: 0,
|
|
13
|
-
getOptionByIdStatus: "",
|
|
14
|
-
getOptionById: {},
|
|
15
|
-
getOptionByIdError: null
|
|
16
|
-
});
|
|
17
|
-
function CapVirtualSelectRootReducer(namespace = defaultNamespace) {
|
|
18
|
-
return function CapVirtualSelectReducer(state = initialState, action) {
|
|
19
|
-
if ((action == null ? void 0 : action.namespace) !== namespace) {
|
|
20
|
-
return state;
|
|
21
|
-
}
|
|
22
|
-
switch (action.type) {
|
|
23
|
-
case GET_PAGINATED_OPTIONS_REQUEST:
|
|
24
|
-
return state.set("getPaginatedOptionsStatus", REQUEST).set("getPaginatedOptionsError", null);
|
|
25
|
-
case GET_PAGINATED_OPTIONS_SUCCESS: {
|
|
26
|
-
const getSelectedOption = state.get("getOptionByIdStatus") === SUCCESS ? state.get("getOptionById").toJS() : {};
|
|
27
|
-
const existingOptions = state.get("getPaginatedOptions").toJS();
|
|
28
|
-
const existingUnTransformedOptions = state.get("getUnTransformedPaginatedOptions").toJS();
|
|
29
|
-
const selectedValueKey = action == null ? void 0 : action.selectedValueKey;
|
|
30
|
-
const isSelectedOptionDefined = !isEmpty(getSelectedOption) && !(action == null ? void 0 : action.isSearchValueDefined);
|
|
31
|
-
const optionsCount = (action == null ? void 0 : action.totalCount) || 0;
|
|
32
|
-
const totalOptionsCount = isSelectedOptionDefined ? optionsCount + 1 : optionsCount;
|
|
33
|
-
const actionResult = action && action.result ? action.result : [];
|
|
34
|
-
const paginatedOptions = action && action.appendOptions ? uniqBy([...existingOptions, ...actionResult], selectedValueKey) : uniqBy(
|
|
35
|
-
[...isSelectedOptionDefined ? [getSelectedOption] : [], ...actionResult],
|
|
36
|
-
selectedValueKey
|
|
37
|
-
);
|
|
38
|
-
const unTransformedPaginatedOptions = action && action.appendOptions ? uniqBy([...existingUnTransformedOptions, ...actionResult], selectedValueKey) : uniqBy(
|
|
39
|
-
[...isSelectedOptionDefined ? [getSelectedOption] : [], ...actionResult],
|
|
40
|
-
selectedValueKey
|
|
41
|
-
);
|
|
42
|
-
const transformedOptions = (action == null ? void 0 : action.transformOptions) ? action.transformOptions(paginatedOptions) : paginatedOptions;
|
|
43
|
-
return state.set("getPaginatedOptionsStatus", SUCCESS).set("getPaginatedOptions", fromJS(transformedOptions)).set("getUnTransformedPaginatedOptions", fromJS(unTransformedPaginatedOptions)).set("getPaginatedOptionsTotalCount", totalOptionsCount).set("getPaginatedOptionsError", null);
|
|
44
|
-
}
|
|
45
|
-
case GET_PAGINATED_OPTIONS_FAILURE:
|
|
46
|
-
return state.set("getPaginatedOptionsStatus", FAILURE).set("getPaginatedOptionsError", action.error);
|
|
47
|
-
case GET_OPTION_BY_ID_REQUEST:
|
|
48
|
-
return state.set("getOptionByIdStatus", REQUEST).set("getOptionById", fromJS({})).set("getOptionByIdError", null);
|
|
49
|
-
case GET_OPTION_BY_ID_SUCCESS:
|
|
50
|
-
return state.set("getOptionByIdStatus", SUCCESS).set("getOptionById", fromJS(action.result)).set("getOptionByIdError", null);
|
|
51
|
-
case GET_OPTION_BY_ID_FAILURE:
|
|
52
|
-
return state.set("getOptionByIdStatus", FAILURE).set("getOptionById", fromJS({})).set("getOptionByIdError", action.error);
|
|
53
|
-
case CLEAR_DATA_ON_UNMOUNT:
|
|
54
|
-
return initialState;
|
|
55
|
-
default:
|
|
56
|
-
return state;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
CapVirtualSelectRootReducer as default,
|
|
62
|
-
initialState
|
|
63
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare function actionMatcher({ action, namespace, type }: {
|
|
2
|
-
action: any;
|
|
3
|
-
namespace: any;
|
|
4
|
-
type: any;
|
|
5
|
-
}): boolean;
|
|
6
|
-
export declare function getPaginatedOptions(namespace: any, { listingApiConfig, queryParams, transformOptions }: {
|
|
7
|
-
listingApiConfig: any;
|
|
8
|
-
queryParams: any;
|
|
9
|
-
transformOptions: any;
|
|
10
|
-
}): Generator<import("redux-saga/effects").CallEffect<unknown> | import("redux-saga/effects").PutEffect<{
|
|
11
|
-
type: string;
|
|
12
|
-
namespace: any;
|
|
13
|
-
result: any[];
|
|
14
|
-
appendOptions: boolean;
|
|
15
|
-
totalCount: any;
|
|
16
|
-
selectedValueKey: any;
|
|
17
|
-
isSearchValueDefined: boolean;
|
|
18
|
-
transformOptions: any;
|
|
19
|
-
}> | import("redux-saga/effects").PutEffect<{
|
|
20
|
-
type: string;
|
|
21
|
-
namespace: any;
|
|
22
|
-
error: any;
|
|
23
|
-
}>, void, unknown>;
|
|
24
|
-
export declare function getOptionById(namespace: any, { id, getByIdApiConfig, queryParams }: {
|
|
25
|
-
id: any;
|
|
26
|
-
getByIdApiConfig: any;
|
|
27
|
-
queryParams: any;
|
|
28
|
-
}): Generator<import("redux-saga/effects").CallEffect<unknown> | import("redux-saga/effects").PutEffect<{
|
|
29
|
-
type: string;
|
|
30
|
-
namespace: any;
|
|
31
|
-
result: any;
|
|
32
|
-
}> | import("redux-saga/effects").PutEffect<{
|
|
33
|
-
type: string;
|
|
34
|
-
namespace: any;
|
|
35
|
-
error: any;
|
|
36
|
-
}>, void, unknown>;
|
|
37
|
-
export declare function watchGetPaginatedOptions(namespace: any): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
38
|
-
export declare function watchGetOptionById(namespace: any): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
39
|
-
export default function CapVirtualSelectRootSaga(namespace?: string): () => Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>>, void, unknown>;
|
|
40
|
-
//# sourceMappingURL=saga.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"saga.d.ts","sourceRoot":"","sources":["../../components/CapVirtualSelect/saga.ts"],"names":[],"mappings":"AAUA,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;;;;CAAA,WAExD;AAGD,wBAAiB,mBAAmB,CAClC,SAAS,KAAA,EACT,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,EAAE;;;;CAAA;;;;;;;;;;;;;mBA+BpD;AAGD,wBAAiB,aAAa,CAAC,SAAS,KAAA,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE,WAAW,EAAE;;;;CAAA;;;;;;;;mBAuB9E;AAGD,wBAAiB,wBAAwB,CAAC,SAAS,KAAA,4EAOlD;AAGD,wBAAiB,kBAAkB,CAAC,SAAS,KAAA,4EAM5C;AAGD,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,SAAS,SAAyB,oJAIlF"}
|
package/CapVirtualSelect/saga.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import get from "lodash/get";
|
|
2
|
-
import isEmpty from "lodash/isEmpty";
|
|
3
|
-
import values from "lodash/values";
|
|
4
|
-
import { all, takeLatest, call, put } from "redux-saga/effects";
|
|
5
|
-
import { defaultNamespace, GET_PAGINATED_OPTIONS_REQUEST, GET_OPTION_BY_ID_REQUEST, GET_OPTION_BY_ID_SUCCESS, GET_OPTION_BY_ID_FAILURE, GET_PAGINATED_OPTIONS_SUCCESS, GET_PAGINATED_OPTIONS_FAILURE } from "./constants.js";
|
|
6
|
-
const fallbackErrorMessage = "An error ocurred with api!";
|
|
7
|
-
function actionMatcher({ action, namespace, type }) {
|
|
8
|
-
return (action == null ? void 0 : action.namespace) === namespace && (action == null ? void 0 : action.type) === type;
|
|
9
|
-
}
|
|
10
|
-
function* getPaginatedOptions(namespace, { listingApiConfig, queryParams, transformOptions }) {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
12
|
-
try {
|
|
13
|
-
const response = yield call(listingApiConfig == null ? void 0 : listingApiConfig.method, queryParams);
|
|
14
|
-
if (get(response, (_a = listingApiConfig == null ? void 0 : listingApiConfig.payloadPath) == null ? void 0 : _a.successStatus, false)) {
|
|
15
|
-
yield put({
|
|
16
|
-
type: GET_PAGINATED_OPTIONS_SUCCESS,
|
|
17
|
-
namespace,
|
|
18
|
-
result: values(get(response, (_b = listingApiConfig == null ? void 0 : listingApiConfig.payloadPath) == null ? void 0 : _b.success, [])),
|
|
19
|
-
appendOptions: queryParams[(_d = (_c = listingApiConfig == null ? void 0 : listingApiConfig.apiParamsMapper) == null ? void 0 : _c.page) == null ? void 0 : _d.key] !== ((_f = (_e = listingApiConfig == null ? void 0 : listingApiConfig.apiParamsMapper) == null ? void 0 : _e.page) == null ? void 0 : _f.value),
|
|
20
|
-
totalCount: get(response, (_g = listingApiConfig == null ? void 0 : listingApiConfig.payloadPath) == null ? void 0 : _g.totalCount, 0),
|
|
21
|
-
selectedValueKey: (_h = listingApiConfig == null ? void 0 : listingApiConfig.payloadPath) == null ? void 0 : _h.value,
|
|
22
|
-
isSearchValueDefined: !isEmpty(queryParams[(_j = (_i = listingApiConfig == null ? void 0 : listingApiConfig.apiParamsMapper) == null ? void 0 : _i.search) == null ? void 0 : _j.key]),
|
|
23
|
-
transformOptions
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
yield put({
|
|
27
|
-
type: GET_PAGINATED_OPTIONS_FAILURE,
|
|
28
|
-
namespace,
|
|
29
|
-
error: get(response, (_k = listingApiConfig == null ? void 0 : listingApiConfig.payloadPath) == null ? void 0 : _k.error, fallbackErrorMessage)
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
} catch (error) {
|
|
33
|
-
yield put({
|
|
34
|
-
type: GET_PAGINATED_OPTIONS_FAILURE,
|
|
35
|
-
namespace,
|
|
36
|
-
error
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function* getOptionById(namespace, { id, getByIdApiConfig, queryParams }) {
|
|
41
|
-
var _a, _b, _c;
|
|
42
|
-
try {
|
|
43
|
-
const response = yield call(getByIdApiConfig == null ? void 0 : getByIdApiConfig.method, id, queryParams);
|
|
44
|
-
if (get(response, (_a = getByIdApiConfig == null ? void 0 : getByIdApiConfig.payloadPath) == null ? void 0 : _a.successStatus, false)) {
|
|
45
|
-
yield put({
|
|
46
|
-
type: GET_OPTION_BY_ID_SUCCESS,
|
|
47
|
-
namespace,
|
|
48
|
-
result: get(response, (_b = getByIdApiConfig == null ? void 0 : getByIdApiConfig.payloadPath) == null ? void 0 : _b.success, {})
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
yield put({
|
|
52
|
-
type: GET_OPTION_BY_ID_FAILURE,
|
|
53
|
-
namespace,
|
|
54
|
-
error: get(response, (_c = getByIdApiConfig == null ? void 0 : getByIdApiConfig.payloadPath) == null ? void 0 : _c.error, fallbackErrorMessage)
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
} catch (error) {
|
|
58
|
-
yield put({
|
|
59
|
-
type: GET_OPTION_BY_ID_FAILURE,
|
|
60
|
-
namespace,
|
|
61
|
-
error
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function* watchGetPaginatedOptions(namespace) {
|
|
66
|
-
yield takeLatest(
|
|
67
|
-
(action) => actionMatcher({ action, namespace, type: GET_PAGINATED_OPTIONS_REQUEST }),
|
|
68
|
-
getPaginatedOptions,
|
|
69
|
-
namespace
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
function* watchGetOptionById(namespace) {
|
|
73
|
-
yield takeLatest(
|
|
74
|
-
(action) => actionMatcher({ action, namespace, type: GET_OPTION_BY_ID_REQUEST }),
|
|
75
|
-
getOptionById,
|
|
76
|
-
namespace
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
function CapVirtualSelectRootSaga(namespace = defaultNamespace) {
|
|
80
|
-
return function* CapVirtualSelectSaga() {
|
|
81
|
-
yield all([watchGetPaginatedOptions(namespace), watchGetOptionById(namespace)]);
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export {
|
|
85
|
-
actionMatcher,
|
|
86
|
-
CapVirtualSelectRootSaga as default,
|
|
87
|
-
getOptionById,
|
|
88
|
-
getPaginatedOptions,
|
|
89
|
-
watchGetOptionById,
|
|
90
|
-
watchGetPaginatedOptions
|
|
91
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare const makeSelectGetPaginatedOptions: () => ((state: import("immutable").Map<never, never>, ownProps: any) => {
|
|
2
|
-
getPaginatedOptionsStatus: any;
|
|
3
|
-
getPaginatedOptions: any;
|
|
4
|
-
getUnTransformedPaginatedOptions: any;
|
|
5
|
-
getPaginatedOptionsTotalCount: any;
|
|
6
|
-
}) & import("reselect").OutputSelectorFields<(args_0: import("immutable").Map<"getPaginatedOptionsStatus" | "getPaginatedOptions" | "getUnTransformedPaginatedOptions" | "getPaginatedOptionsError" | "getPaginatedOptionsTotalCount" | "getOptionByIdStatus" | "getOptionById" | "getOptionByIdError", any>) => {
|
|
7
|
-
getPaginatedOptionsStatus: any;
|
|
8
|
-
getPaginatedOptions: any;
|
|
9
|
-
getUnTransformedPaginatedOptions: any;
|
|
10
|
-
getPaginatedOptionsTotalCount: any;
|
|
11
|
-
}, {
|
|
12
|
-
clearCache: () => void;
|
|
13
|
-
}> & {
|
|
14
|
-
clearCache: () => void;
|
|
15
|
-
};
|
|
16
|
-
declare const makeSelectGetOptionById: () => ((state: import("immutable").Map<never, never>, ownProps: any) => {
|
|
17
|
-
getOptionByIdStatus: any;
|
|
18
|
-
getOptionById: any;
|
|
19
|
-
}) & import("reselect").OutputSelectorFields<(args_0: import("immutable").Map<"getPaginatedOptionsStatus" | "getPaginatedOptions" | "getUnTransformedPaginatedOptions" | "getPaginatedOptionsError" | "getPaginatedOptionsTotalCount" | "getOptionByIdStatus" | "getOptionById" | "getOptionByIdError", any>) => {
|
|
20
|
-
getOptionByIdStatus: any;
|
|
21
|
-
getOptionById: any;
|
|
22
|
-
}, {
|
|
23
|
-
clearCache: () => void;
|
|
24
|
-
}> & {
|
|
25
|
-
clearCache: () => void;
|
|
26
|
-
};
|
|
27
|
-
export { makeSelectGetPaginatedOptions, makeSelectGetOptionById };
|
|
28
|
-
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../components/CapVirtualSelect/selectors.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;CAc/B,CAAC;AAGL,QAAA,MAAM,uBAAuB;;;;;;;;;;CAOzB,CAAC;AAEL,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { fromJS } from "immutable";
|
|
2
|
-
import { createSelector } from "reselect";
|
|
3
|
-
import { defaultNamespace } from "./constants.js";
|
|
4
|
-
import { initialState } from "./reducer.js";
|
|
5
|
-
const selectCapVirtualSelectDomain = (state = fromJS({}), ownProps) => state.get((ownProps == null ? void 0 : ownProps.namespace) || defaultNamespace, initialState);
|
|
6
|
-
const makeSelectGetPaginatedOptions = () => createSelector(selectCapVirtualSelectDomain, (subState = fromJS({})) => {
|
|
7
|
-
const {
|
|
8
|
-
getPaginatedOptionsStatus,
|
|
9
|
-
getPaginatedOptions,
|
|
10
|
-
getUnTransformedPaginatedOptions,
|
|
11
|
-
getPaginatedOptionsTotalCount
|
|
12
|
-
} = subState.toJS();
|
|
13
|
-
return {
|
|
14
|
-
getPaginatedOptionsStatus,
|
|
15
|
-
getPaginatedOptions,
|
|
16
|
-
getUnTransformedPaginatedOptions,
|
|
17
|
-
getPaginatedOptionsTotalCount
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
const makeSelectGetOptionById = () => createSelector(selectCapVirtualSelectDomain, (subState = fromJS({})) => {
|
|
21
|
-
const { getOptionByIdStatus, getOptionById } = subState.toJS();
|
|
22
|
-
return {
|
|
23
|
-
getOptionByIdStatus,
|
|
24
|
-
getOptionById
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
makeSelectGetOptionById,
|
|
29
|
-
makeSelectGetPaginatedOptions
|
|
30
|
-
};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/* Color Palette */
|
|
2
|
-
/* Fonts */
|
|
3
|
-
/* Backward Compatibility Aliases */
|
|
4
|
-
/* Component Heights */
|
|
5
|
-
/* Border Radius */
|
|
6
|
-
/* Border Width */
|
|
7
|
-
/* Transition */
|
|
8
|
-
/* Timezones Footer */
|
|
9
|
-
.cap-virtual-select-container {
|
|
10
|
-
position: relative;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
padding: 0;
|
|
14
|
-
}
|
|
15
|
-
.cap-virtual-select-container .cap-virtual-select-button {
|
|
16
|
-
position: relative;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
padding: 0 0 0 0.571rem;
|
|
22
|
-
height: 2.857rem;
|
|
23
|
-
width: 100%;
|
|
24
|
-
border-radius: 0.285rem;
|
|
25
|
-
border: 0.071rem solid #b3bac5;
|
|
26
|
-
}
|
|
27
|
-
.cap-virtual-select-container .cap-virtual-select-button:hover {
|
|
28
|
-
border: 0.071rem solid #7a869a;
|
|
29
|
-
}
|
|
30
|
-
.cap-virtual-select-container .cap-virtual-select-button .cap-virtual-select-button-label {
|
|
31
|
-
position: absolute;
|
|
32
|
-
left: 0.857rem;
|
|
33
|
-
color: #5e6c84;
|
|
34
|
-
}
|
|
35
|
-
.cap-virtual-select-container .cap-virtual-select-button .cap-virtual-select-button-label .cap-virtual-select-button-defined-label {
|
|
36
|
-
color: #091e42;
|
|
37
|
-
}
|
|
38
|
-
.cap-virtual-select-container .cap-virtual-select-button .cap-virtual-select-button-arrow {
|
|
39
|
-
position: absolute;
|
|
40
|
-
right: 0.857rem;
|
|
41
|
-
}
|
|
42
|
-
.cap-virtual-select-container .cap-virtual-select-button-disabled {
|
|
43
|
-
cursor: not-allowed;
|
|
44
|
-
border: 0.071rem solid #d9d9d9;
|
|
45
|
-
}
|
|
46
|
-
.cap-virtual-select-container .cap-virtual-select-button-disabled:hover {
|
|
47
|
-
border: 0.071rem solid #d9d9d9;
|
|
48
|
-
}
|
|
49
|
-
.cap-virtual-select-container .cap-virtual-select-button-disabled .cap-virtual-select-button-label {
|
|
50
|
-
color: #97a0af;
|
|
51
|
-
}
|
|
52
|
-
.cap-virtual-select-container .cap-virtual-select-button-disabled .cap-virtual-select-button-arrow {
|
|
53
|
-
color: #97a0af;
|
|
54
|
-
}
|
|
55
|
-
.cap-virtual-select-container .cap-virtual-select-dropdown {
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: 3.428rem;
|
|
58
|
-
left: 0;
|
|
59
|
-
z-index: 1030;
|
|
60
|
-
width: 100%;
|
|
61
|
-
color: #091e42;
|
|
62
|
-
background-color: #ffffff;
|
|
63
|
-
background-clip: padding-box;
|
|
64
|
-
border-radius: 0.285rem;
|
|
65
|
-
box-shadow: 0 0.142rem 0.571rem rgba(0, 0, 0, 0.15);
|
|
66
|
-
}
|
|
67
|
-
.cap-virtual-select-container .cap-virtual-select-dropdown .cap-virtual-select-search-bar {
|
|
68
|
-
padding: 0.857rem;
|
|
69
|
-
font-size: 1rem;
|
|
70
|
-
}
|
|
71
|
-
.cap-virtual-select-container .cap-virtual-select-dropdown .cap-virtual-select-options-list-spinner {
|
|
72
|
-
width: 100%;
|
|
73
|
-
height: 100%;
|
|
74
|
-
}
|
|
75
|
-
.cap-virtual-select-container .cap-virtual-select-dropdown .cap-virtual-select-options-list-spinner .cap-virtual-select-options-list {
|
|
76
|
-
padding-left: 0;
|
|
77
|
-
padding-right: 0;
|
|
78
|
-
}
|
|
79
|
-
.cap-virtual-select-container .cap-virtual-select-option-row {
|
|
80
|
-
padding: 0.571rem 0.571rem 0.571rem 1.714rem;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
color: #5e6c84;
|
|
83
|
-
}
|
|
84
|
-
.cap-virtual-select-container .cap-virtual-select-option-row:hover {
|
|
85
|
-
background-color: #faf9f4;
|
|
86
|
-
}
|
|
87
|
-
.cap-virtual-select-container .cap-virtual-select-selected-option-row {
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
font-weight: 500;
|
|
90
|
-
padding: 0.571rem 0.571rem 0.571rem 1.714rem;
|
|
91
|
-
color: #2466ea;
|
|
92
|
-
background-color: rgba(36, 102, 234, 0.1);
|
|
93
|
-
border-left: 0.142rem solid #2466ea;
|
|
94
|
-
}
|
|
95
|
-
.cap-virtual-select-container .cap-virtual-select-no-options {
|
|
96
|
-
display: flex;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
height: 100%;
|
|
100
|
-
}
|
|
101
|
-
.cap-virtual-select-container .cap-virtual-select-no-options .cap-virtual-select-no-options-image {
|
|
102
|
-
font-size: 2.286rem;
|
|
103
|
-
color: #b3bac5;
|
|
104
|
-
}
|
|
105
|
-
.cap-virtual-select-container .cap-virtual-select-no-options .cap-virtual-select-no-options-text {
|
|
106
|
-
margin-top: 0.571rem;
|
|
107
|
-
text-align: center;
|
|
108
|
-
color: #97a0af;
|
|
109
|
-
font-size: 1rem;
|
|
110
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
@import '../styles/_variables.scss';
|
|
2
|
-
|
|
3
|
-
$clsPrefix: 'cap-virtual-select';
|
|
4
|
-
|
|
5
|
-
.#{$clsPrefix}-container {
|
|
6
|
-
position: relative;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
padding: 0;
|
|
10
|
-
.#{$clsPrefix}-button {
|
|
11
|
-
position: relative;
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
padding: 0 0 0 $CAP_SPACE_08;
|
|
17
|
-
height: $CAP_SPACE_40;
|
|
18
|
-
width: 100%;
|
|
19
|
-
border-radius: $CAP_SPACE_04;
|
|
20
|
-
border: 0.071rem solid $CAP_G06;
|
|
21
|
-
&:hover {
|
|
22
|
-
border: 0.071rem solid $CAP_G11;
|
|
23
|
-
}
|
|
24
|
-
.#{$clsPrefix}-button-label {
|
|
25
|
-
position: absolute;
|
|
26
|
-
left: $CAP_SPACE_12;
|
|
27
|
-
color: $CAP_G04;
|
|
28
|
-
.#{$clsPrefix}-button-defined-label {
|
|
29
|
-
color: $FONT_COLOR_01;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.#{$clsPrefix}-button-arrow {
|
|
33
|
-
position: absolute;
|
|
34
|
-
right: $CAP_SPACE_12;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
.#{$clsPrefix}-button-disabled {
|
|
38
|
-
cursor: not-allowed;
|
|
39
|
-
border: 0.071rem solid $CAP_COLOR_16;
|
|
40
|
-
&:hover {
|
|
41
|
-
border: 0.071rem solid $CAP_COLOR_16;
|
|
42
|
-
}
|
|
43
|
-
.#{$clsPrefix}-button-label {
|
|
44
|
-
color: $CAP_G05;
|
|
45
|
-
}
|
|
46
|
-
.#{$clsPrefix}-button-arrow {
|
|
47
|
-
color: $CAP_G05;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
.#{$clsPrefix}-dropdown {
|
|
51
|
-
position: absolute;
|
|
52
|
-
top: $CAP_SPACE_48;
|
|
53
|
-
left: 0;
|
|
54
|
-
z-index: 1030;
|
|
55
|
-
width: 100%;
|
|
56
|
-
color: $FONT_COLOR_01;
|
|
57
|
-
background-color: $CAP_WHITE;
|
|
58
|
-
background-clip: padding-box;
|
|
59
|
-
border-radius: $CAP_SPACE_04;
|
|
60
|
-
box-shadow: 0 $CAP_SPACE_02 $CAP_SPACE_08 rgba(0, 0, 0, 0.15);
|
|
61
|
-
.#{$clsPrefix}-search-bar {
|
|
62
|
-
padding: $CAP_SPACE_12;
|
|
63
|
-
font-size: $FONT_SIZE_M;
|
|
64
|
-
}
|
|
65
|
-
.#{$clsPrefix}-options-list-spinner {
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
.#{$clsPrefix}-options-list {
|
|
69
|
-
padding-left: 0;
|
|
70
|
-
padding-right: 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
.#{$clsPrefix}-option-row {
|
|
75
|
-
padding: $CAP_SPACE_08 $CAP_SPACE_08 $CAP_SPACE_08 $CAP_SPACE_24;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
color: $FONT_COLOR_02;
|
|
78
|
-
&:hover {
|
|
79
|
-
background-color: $BG_01;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
.#{$clsPrefix}-selected-option-row {
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
font-weight: $FONT_WEIGHT_MEDIUM;
|
|
85
|
-
padding: $CAP_SPACE_08 $CAP_SPACE_08 $CAP_SPACE_08 $CAP_SPACE_24;
|
|
86
|
-
color: map-get($CAP_SECONDARY, base);
|
|
87
|
-
background-color: map-get($CAP_SECONDARY, light);
|
|
88
|
-
border-left: $CAP_SPACE_02 solid map-get($CAP_SECONDARY, base);
|
|
89
|
-
}
|
|
90
|
-
.#{$clsPrefix}-no-options {
|
|
91
|
-
display: flex;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
height: 100%;
|
|
95
|
-
.#{$clsPrefix}-no-options-image {
|
|
96
|
-
font-size: $ICON_SIZE_L;
|
|
97
|
-
color: $CAP_G06;
|
|
98
|
-
}
|
|
99
|
-
.#{$clsPrefix}-no-options-text {
|
|
100
|
-
margin-top: $CAP_SPACE_08;
|
|
101
|
-
text-align: center;
|
|
102
|
-
color: $CAP_G05;
|
|
103
|
-
font-size: $FONT_SIZE_M;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../components/CapVirtualSelect/tests/mockData.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;;;GAWpC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../components/CapVirtualSelect/utils.ts"],"names":[],"mappings":"AACA,wBAAgB,8BAA8B,CAAC,eAAe,KAAK,WAOlE"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function convertApiParamsMapperToObject(apiParamsMapper = {}) {
|
|
2
|
-
var _a;
|
|
3
|
-
return (_a = Object.values(apiParamsMapper)) == null ? void 0 : _a.reduce((result, { key, value }) => {
|
|
4
|
-
if (key) {
|
|
5
|
-
result[key] = value;
|
|
6
|
-
}
|
|
7
|
-
return result;
|
|
8
|
-
}, {});
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
convertApiParamsMapperToObject
|
|
12
|
-
};
|
|
File without changes
|