@bynder/compact-view 5.2.3 → 5.2.4
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/AccessToken2.js +1 -1
- package/ActiveFilters.js +49 -50
- package/AddMedia.js +19 -18
- package/Advanced.js +13 -13
- package/App.js +60 -59
- package/Arrow.js +1 -1
- package/AssetFilter.js +38 -38
- package/AssetItem.js +10 -17
- package/AssetList.js +5 -5
- package/AssetTypeItem.js +21 -21
- package/AssetsView.js +13 -13
- package/Axios2.js +82 -76
- package/AxiosError.js +36 -35
- package/ButtonAction.js +1 -1
- package/CanceledError.js +15 -8
- package/Card.js +1 -1
- package/Chip.js +1 -1
- package/CollectionCard.js +22 -22
- package/CollectionItem.js +9 -9
- package/CollectionList.js +5 -5
- package/CollectionView.js +11 -11
- package/ColorPicker.js +1 -1
- package/ColorPickerSolid.js +3 -3
- package/ColorPickerWithOpacity.js +3 -3
- package/Component.js +158 -0
- package/Component2.js +4 -0
- package/ConfigContext.js +7 -8
- package/Container.js +1 -1
- package/ContextAction.js +1 -1
- package/ControlGroup.js +6 -6
- package/Dat.js +33 -32
- package/DatDropdownItem.js +1 -1
- package/DesignSystemProvider.js +7 -7
- package/DirectionSelect.js +11 -10
- package/DomainInput.js +19 -11
- package/Draggable.js +337 -0
- package/Draggable2.js +4 -0
- package/DraggableCore.js +312 -0
- package/DraggableCore2.js +4 -0
- package/Dropdown.js +37 -37
- package/Dropdown2.js +1 -1
- package/DropdownListItem.js +1 -1
- package/FieldSelect.js +19 -17
- package/FileSelector.js +38 -37
- package/FontPicker.js +1 -1
- package/Form.js +1 -1
- package/Header.js +5 -4
- package/HttpStatusCode.js +7 -1
- package/InfiniteScroll.js +1 -1
- package/InlineBanner.js +1 -1
- package/Input.js +1 -1
- package/InterceptorManager.js +2 -1
- package/Item.js +8 -8
- package/Item4.js +2 -2
- package/LeftArrow.js +1 -1
- package/ListItem2.js +1 -1
- package/ModalBase.js +15 -15
- package/NoResults.js +1 -1
- package/Option_new.js +36 -29
- package/ReactPropTypesSecret.js +10 -0
- package/RightArrow.js +1 -1
- package/SearchInput.js +1 -1
- package/SearchInput2.js +1 -1
- package/SelectionFooter.js +41 -31
- package/Shield.js +2 -2
- package/Smartfilters_new.js +107 -98
- package/StatefulAssetList.js +50 -50
- package/StoreInitializer.js +32 -16
- package/SwitchNLS.js +1 -1
- package/TagItem.js +15 -15
- package/Tags.js +1 -1
- package/Toolbar.js +23 -20
- package/Tooltip2.js +1 -1
- package/ViewSwitch.js +17 -15
- package/_commonjsHelpers.js +28 -3
- package/adapters.js +54 -42
- package/api/filterAssets.d.ts +1 -1
- package/api/getAssets.d.ts +1 -1
- package/api/getFilters.d.ts +1 -1
- package/api/rest/index.d.ts +1 -1
- package/api/rest/types.d.ts +1 -1
- package/api2.js +1 -1
- package/asset.type.js +1 -1
- package/autocomplete.js +1 -1
- package/axios.js +1 -1
- package/bodyScrollLock.esm.js +68 -0
- package/buildURL.js +13 -15
- package/checkGlobals.js +1 -1
- package/cjs.js +7 -0
- package/cjs2.js +15 -0
- package/cjs3.js +4 -0
- package/clsx.m.js +6 -0
- package/clsx.m2.js +15 -0
- package/combineMetaproperties.js +3 -1
- package/composeSignals.js +1 -1
- package/cookieStore.js +1 -1
- package/cookies.js +13 -11
- package/currentScopes.js +1 -1
- package/data.js +1 -1
- package/devUtils.js +1 -1
- package/dispatchRequest.js +5 -5
- package/domFns.js +151 -0
- package/domFns2.js +4 -0
- package/factoryWithThrowingShims.js +52 -0
- package/fetch2.js +156 -128
- package/filter/AssetFilterContext.d.ts +3 -3
- package/filterAssets.js +1 -1
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +1 -1
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- package/getSimilarityAssets.js +1 -1
- package/goober.modern.js +75 -0
- package/handlers.js +1 -1
- package/iconBase.js +56 -0
- package/iconContext.js +12 -0
- package/iconsManifest.js +222 -0
- package/index-esm.js +1 -4
- package/index.browser.js +1 -1
- package/index.m.js +9 -0
- package/index.m2.js +17 -0
- package/index10.js +18 -2
- package/index11.js +181 -15
- package/index112.js +1 -1
- package/index12.js +313 -36
- package/index13.js +5 -2430
- package/index14.js +3 -557
- package/index15.js +15 -55
- package/index16.js +3 -2
- package/index17.js +3 -87
- package/index18.js +36 -60
- package/index19.js +3 -7
- package/index20.js +2429 -12
- package/index21.js +557 -10
- package/index22.js +1 -1
- package/index23.js +119 -6
- package/index24.js +39 -7
- package/index25.js +2 -5
- package/index26.js +86 -9
- package/index27.js +55 -8
- package/index28.js +6 -636
- package/index29.js +8692 -74
- package/index3.js +1684 -5
- package/index30.js +2 -5
- package/index31.js +4 -20
- package/index310.js +2 -0
- package/index32.js +11 -2
- package/index33.js +5083 -4
- package/index34.js +2 -18
- package/index35.js +59 -5
- package/index36.js +2 -2
- package/index37.js +13 -11
- package/index38.js +46 -10
- package/index39.js +6 -12
- package/index4.js +5 -1684
- package/index40.js +8 -11
- package/index41.js +26 -18
- package/index42.js +2 -64
- package/index43.js +63 -5
- package/index44.js +9 -55
- package/index45.js +7 -67
- package/index46.js +8 -31
- package/index47.js +5 -11
- package/index48.js +10 -121
- package/index49.js +9 -86
- package/index5.js +215 -23
- package/index50.js +636 -7
- package/index51.js +74 -11
- package/index52.js +4 -13
- package/index53.js +19 -13
- package/index54.js +4 -6
- package/index55.js +18 -7
- package/index56.js +5 -14
- package/index57.js +10 -28
- package/index58.js +10 -15
- package/index59.js +15 -0
- package/index6.js +250 -299
- package/index60.js +13 -0
- package/index61.js +21 -0
- package/index62.js +8 -0
- package/index63.js +57 -0
- package/index64.js +4 -0
- package/index65.js +69 -0
- package/index66.js +33 -0
- package/index67.js +13 -0
- package/index68.js +123 -0
- package/index69.js +88 -0
- package/index7.js +22 -5047
- package/index70.js +10 -0
- package/index71.js +13 -0
- package/index72.js +13 -225
- package/index73.js +16 -0
- package/index74.js +9 -0
- package/index75.js +228 -0
- package/index76.js +9 -0
- package/index77.js +17 -0
- package/index78.js +31 -0
- package/index79.js +18 -0
- package/index8.js +5044 -47
- package/index9.js +50 -15
- package/isAbsoluteURL.js +1 -1
- package/isURLSameOrigin.js +1 -1
- package/localization.js +15 -15
- package/log.js +14 -0
- package/log2.js +4 -0
- package/matchRequestUrl.js +1 -1
- package/mergeConfig.js +37 -32
- package/notify.js +2 -2
- package/package.json +1 -1
- package/positionFns.js +101 -0
- package/positionFns2.js +4 -0
- package/react-laag.esm.js +957 -0
- package/react.js +8 -8
- package/react2.js +9 -9
- package/resolveConfig.js +23 -23
- package/select/add-media/AddMedia.d.ts +3 -1
- package/select/current-selection/SelectedItems.d.ts +1 -1
- package/shims.js +29 -0
- package/shims2.js +4 -0
- package/store/StoreInitializer.d.ts +5 -1
- package/store/useAssetFilterStore.d.ts +55 -0
- package/store/useSelectionStore.d.ts +47 -0
- package/styled-components.browser.esm.js +2 -2
- package/throttle.js +1 -1
- package/toURLEncodedForm.js +11 -10
- package/tokenExpirationHelper.js +1 -1
- package/transformData.js +1 -1
- package/transitional.js +4 -3
- package/useAssetFilterStore.js +152 -0
- package/useDatStore.js +1 -1
- package/useEffectEvent.js +7 -7
- package/useFonts.js +2 -2
- package/useOrderingStore.js +1 -1
- package/useRouterStore.js +1 -1
- package/useSearchStore.js +1 -1
- package/useSelectionStore.js +131 -0
- package/useSimilaritySearchStore.js +1 -1
- package/useTranslate.js +1 -1
- package/utils/combineMetaproperties.d.ts +2 -0
- package/utils6.js +160 -118
- package/utils7.js +7 -68
- package/utils8.js +68 -7
- package/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/SelectionContext.js +0 -143
- package/select/SelectionContext.d.ts +0 -30
- /package/{Middleware.js → Middleware2.js} +0 -0
- /package/{middleware2.js → middleware.js} +0 -0
package/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { createStore as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
2
|
+
import { createStore as c } from "./vanilla.js";
|
|
3
|
+
const u = (t) => t;
|
|
4
|
+
function o(t, e = u) {
|
|
5
5
|
const n = r.useSyncExternalStore(
|
|
6
6
|
t.subscribe,
|
|
7
7
|
r.useCallback(() => e(t.getState()), [t, e]),
|
|
@@ -9,11 +9,11 @@ function s(t, e = o) {
|
|
|
9
9
|
);
|
|
10
10
|
return r.useDebugValue(n), n;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
const e =
|
|
12
|
+
const s = (t) => {
|
|
13
|
+
const e = c(t), n = (a) => o(e, a);
|
|
14
14
|
return Object.assign(n, e), n;
|
|
15
|
-
},
|
|
15
|
+
}, i = (t) => s;
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
i as create,
|
|
18
|
+
o as useStore
|
|
19
19
|
};
|
package/react2.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createStore as
|
|
1
|
+
import u from "react";
|
|
2
|
+
import { createStore as s } from "./vanilla2.js";
|
|
3
3
|
const c = (t) => t;
|
|
4
4
|
function a(t, e = c) {
|
|
5
|
-
const n =
|
|
5
|
+
const n = u.useSyncExternalStore(
|
|
6
6
|
t.subscribe,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
u.useCallback(() => e(t.getState()), [t, e]),
|
|
8
|
+
u.useCallback(() => e(t.getInitialState()), [t, e])
|
|
9
9
|
);
|
|
10
|
-
return
|
|
10
|
+
return u.useDebugValue(n), n;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
const e =
|
|
12
|
+
const o = (t) => {
|
|
13
|
+
const e = s(t), n = (r) => a(e, r);
|
|
14
14
|
return Object.assign(n, e), n;
|
|
15
|
-
}, b = ((t) => t ?
|
|
15
|
+
}, b = ((t) => t ? o(t) : o);
|
|
16
16
|
export {
|
|
17
17
|
b as create,
|
|
18
18
|
a as useStore
|
package/resolveConfig.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import n from "./
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import n from "./index28.js";
|
|
2
|
+
import m from "./utils6.js";
|
|
3
|
+
import c from "./isURLSameOrigin.js";
|
|
4
|
+
import h from "./cookies.js";
|
|
5
5
|
import w from "./buildFullPath.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
const e =
|
|
11
|
-
let { data:
|
|
12
|
-
e.headers =
|
|
6
|
+
import b from "./mergeConfig.js";
|
|
7
|
+
import C from "./AxiosHeaders.js";
|
|
8
|
+
import g from "./buildURL.js";
|
|
9
|
+
const E = (a) => {
|
|
10
|
+
const e = b({}, a);
|
|
11
|
+
let { data: i, withXSRFToken: r, xsrfHeaderName: f, xsrfCookieName: d, headers: o, auth: s } = e;
|
|
12
|
+
if (e.headers = o = C.from(o), e.url = g(w(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), s && o.set(
|
|
13
13
|
"Authorization",
|
|
14
|
-
"Basic " + btoa((
|
|
15
|
-
)
|
|
16
|
-
let i;
|
|
17
|
-
if (l.isFormData(p)) {
|
|
14
|
+
"Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
|
|
15
|
+
), m.isFormData(i)) {
|
|
18
16
|
if (n.hasStandardBrowserEnv || n.hasStandardBrowserWebWorkerEnv)
|
|
19
|
-
|
|
20
|
-
else if ((i
|
|
21
|
-
const
|
|
22
|
-
|
|
17
|
+
o.setContentType(void 0);
|
|
18
|
+
else if (m.isFunction(i.getHeaders)) {
|
|
19
|
+
const t = i.getHeaders(), u = ["content-type", "content-length"];
|
|
20
|
+
Object.entries(t).forEach(([l, p]) => {
|
|
21
|
+
u.includes(l.toLowerCase()) && o.set(l, p);
|
|
22
|
+
});
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
if (n.hasStandardBrowserEnv && (
|
|
26
|
-
const
|
|
27
|
-
|
|
25
|
+
if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
|
|
26
|
+
const t = f && d && h.read(d);
|
|
27
|
+
t && o.set(f, t);
|
|
28
28
|
}
|
|
29
29
|
return e;
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
E as default
|
|
33
33
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Asset } from '../../api/getAsset';
|
|
3
|
+
import { SelectedItem } from '../../store/useSelectionStore';
|
|
3
4
|
interface Props {
|
|
4
5
|
selection: SelectedItem[];
|
|
5
6
|
}
|
|
6
7
|
export declare function AddMedia(props: Props): React.JSX.Element;
|
|
8
|
+
export declare function sortAssets(assetA: Asset, assetB: Asset, preselectedAssetIds: any): number;
|
|
7
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { SelectedItem } from '
|
|
2
|
+
import { SelectedItem } from '../../store/useSelectionStore';
|
|
3
3
|
export declare function SelectedItems({ selection }: {
|
|
4
4
|
selection: SelectedItem[];
|
|
5
5
|
}): React.JSX.Element;
|
package/shims.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __exports as n } from "./shims2.js";
|
|
2
|
+
var r;
|
|
3
|
+
function h() {
|
|
4
|
+
if (r) return n;
|
|
5
|
+
r = 1, Object.defineProperty(n, "__esModule", {
|
|
6
|
+
value: !0
|
|
7
|
+
}), n.dontSetMe = f, n.findInArray = o, n.int = c, n.isFunction = u, n.isNum = s;
|
|
8
|
+
function o(t, i) {
|
|
9
|
+
for (let e = 0, p = t.length; e < p; e++)
|
|
10
|
+
if (i.apply(i, [t[e], e, t])) return t[e];
|
|
11
|
+
}
|
|
12
|
+
function u(t) {
|
|
13
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Function]";
|
|
14
|
+
}
|
|
15
|
+
function s(t) {
|
|
16
|
+
return typeof t == "number" && !isNaN(t);
|
|
17
|
+
}
|
|
18
|
+
function c(t) {
|
|
19
|
+
return parseInt(t, 10);
|
|
20
|
+
}
|
|
21
|
+
function f(t, i, e) {
|
|
22
|
+
if (t[i])
|
|
23
|
+
return new Error("Invalid prop ".concat(i, " passed to ").concat(e, " - do not set this, set it on the child."));
|
|
24
|
+
}
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
h as __require
|
|
29
|
+
};
|
package/shims2.js
ADDED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { AssetFilterJson } from '../filter/assetFilter.type';
|
|
1
2
|
interface StoreInitializerProps {
|
|
2
3
|
defaultSearchTerm?: string;
|
|
3
4
|
resetOnMount?: boolean;
|
|
5
|
+
predefinedFilter?: AssetFilterJson;
|
|
6
|
+
hideLimitedUse?: boolean;
|
|
7
|
+
preselectedAssetIds?: string[];
|
|
4
8
|
}
|
|
5
9
|
declare function resetAllStores(): void;
|
|
6
|
-
export declare function StoreInitializer({ defaultSearchTerm, resetOnMount, }: StoreInitializerProps): null;
|
|
10
|
+
export declare function StoreInitializer({ defaultSearchTerm, resetOnMount, predefinedFilter, hideLimitedUse, preselectedAssetIds, }: StoreInitializerProps): null;
|
|
7
11
|
export declare function useResetAllStores(): typeof resetAllStores;
|
|
8
12
|
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AssetType } from '../views/asset/asset.type';
|
|
2
|
+
import { MetapropertyOptionType as MetapropertyOption } from '../filter/filters/metaproperty/MetapropertyOption';
|
|
3
|
+
import { AssetFilterJson } from '../filter/assetFilter.type';
|
|
4
|
+
import { AutocompleteResponseOption, SmartfilterOption, selectedSmartfilterOptionsType, AssetCountType } from '../api/rest/types';
|
|
5
|
+
type MetapropertyMapType = Record<string, MetapropertyOption>;
|
|
6
|
+
export interface Filter {
|
|
7
|
+
assetTypes: AssetType[];
|
|
8
|
+
existingFilters: Record<string, Record<string, number>> | null;
|
|
9
|
+
isDropdownActive: boolean;
|
|
10
|
+
isLimited?: boolean;
|
|
11
|
+
metaproperties: MetapropertyOption[];
|
|
12
|
+
metapropertyIds: string[];
|
|
13
|
+
metapropertyMap: MetapropertyMapType;
|
|
14
|
+
predefinedFilter?: AssetFilterJson;
|
|
15
|
+
selectedSmartfilterOptions: selectedSmartfilterOptionsType;
|
|
16
|
+
tags: string[];
|
|
17
|
+
}
|
|
18
|
+
interface Actions {
|
|
19
|
+
addAssetType: (assetType: AssetType) => void;
|
|
20
|
+
setAssetTypes: (assetTypes: AssetType[]) => void;
|
|
21
|
+
removeAssetType: (assetType: AssetType) => void;
|
|
22
|
+
addMetaproperty: (metaproperty: MetapropertyOption) => void;
|
|
23
|
+
removeMetaproperty: (metaproperty: MetapropertyOption) => void;
|
|
24
|
+
setPredefinedMetaproperties: () => void;
|
|
25
|
+
addTag: (tag: string) => void;
|
|
26
|
+
setTags: (tags: string[]) => void;
|
|
27
|
+
removeTag: (tag: string) => void;
|
|
28
|
+
clear: () => void;
|
|
29
|
+
setDropdownState: (active: boolean) => void;
|
|
30
|
+
selectSmartfilterOption: (metapropertyName: string, option: SmartfilterOption | AutocompleteResponseOption, isMultifilter?: boolean) => void;
|
|
31
|
+
removeSmartfilterOption: (metapropertyName: string, optionId: string) => void;
|
|
32
|
+
setActiveFiltersState: (count: AssetCountType) => void;
|
|
33
|
+
setPredefinedFilter: (filter?: AssetFilterJson) => void;
|
|
34
|
+
setHideLimitedUse: (hide: boolean) => void;
|
|
35
|
+
}
|
|
36
|
+
export type AssetFilterStore = Filter & Actions;
|
|
37
|
+
export declare const useAssetFilterStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<AssetFilterStore>, "setState" | "devtools"> & {
|
|
38
|
+
setState(partial: AssetFilterStore | Partial<AssetFilterStore> | ((state: AssetFilterStore) => AssetFilterStore | Partial<AssetFilterStore>), replace?: false | undefined, action?: (string | {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
[x: number]: unknown;
|
|
41
|
+
[x: symbol]: unknown;
|
|
42
|
+
type: string;
|
|
43
|
+
}) | undefined): void;
|
|
44
|
+
setState(state: AssetFilterStore | ((state: AssetFilterStore) => AssetFilterStore), replace: true, action?: (string | {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
[x: number]: unknown;
|
|
47
|
+
[x: symbol]: unknown;
|
|
48
|
+
type: string;
|
|
49
|
+
}) | undefined): void;
|
|
50
|
+
devtools: {
|
|
51
|
+
cleanup: () => void;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
export declare function keepPredefinedMetapropertiesInMap(metapropertyMap: MetapropertyMapType, predefinedMetaproperties: string[]): {};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Asset, AssetData } from '../views/asset/asset.type';
|
|
2
|
+
import { Collection } from '../views/collection/collection.types';
|
|
3
|
+
export type SelectedAsset = {
|
|
4
|
+
type: 'asset';
|
|
5
|
+
value: Asset;
|
|
6
|
+
};
|
|
7
|
+
export type SelectedCollection = {
|
|
8
|
+
type: 'collection';
|
|
9
|
+
value: Collection;
|
|
10
|
+
};
|
|
11
|
+
export type SelectedItem = SelectedAsset | SelectedCollection;
|
|
12
|
+
interface SelectionState {
|
|
13
|
+
selection: SelectedItem[];
|
|
14
|
+
preselectedAssetIds?: string[];
|
|
15
|
+
allAssetsStore: Asset[];
|
|
16
|
+
setPreselectedAssetIds: (ids: string[]) => void;
|
|
17
|
+
clear: () => void;
|
|
18
|
+
selectAll: () => void;
|
|
19
|
+
selectAssets: (assets: Asset[]) => void;
|
|
20
|
+
toggleAssets: (assets: Asset[]) => void;
|
|
21
|
+
toggleCollection: (collection: Collection) => void;
|
|
22
|
+
setAllAssets: (assetData: AssetData) => void;
|
|
23
|
+
setSelection: (selection: SelectedItem[]) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const useSelectionStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<SelectionState>, "setState" | "devtools"> & {
|
|
26
|
+
setState(partial: SelectionState | Partial<SelectionState> | ((state: SelectionState) => SelectionState | Partial<SelectionState>), replace?: false | undefined, action?: (string | {
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
[x: number]: unknown;
|
|
29
|
+
[x: symbol]: unknown;
|
|
30
|
+
type: string;
|
|
31
|
+
}) | undefined): void;
|
|
32
|
+
setState(state: SelectionState | ((state: SelectionState) => SelectionState), replace: true, action?: (string | {
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
[x: number]: unknown;
|
|
35
|
+
[x: symbol]: unknown;
|
|
36
|
+
type: string;
|
|
37
|
+
}) | undefined): void;
|
|
38
|
+
devtools: {
|
|
39
|
+
cleanup: () => void;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
export declare const useSelectionModeHandler: () => {
|
|
43
|
+
assetToggleHandler: (assets: Asset[]) => void;
|
|
44
|
+
};
|
|
45
|
+
export declare function usePreselectedAssets(preselectedAssetIds?: string[]): Asset[];
|
|
46
|
+
export declare function useSelectedCollectionIds(): string[];
|
|
47
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __assign as g, __spreadArray as T } from "./tslib.es6.js";
|
|
2
2
|
import S, { useContext as ie, useState as ae, useMemo as ut, useEffect as ue, createElement as ce } from "react";
|
|
3
|
-
import le from "./
|
|
3
|
+
import le from "./index4.js";
|
|
4
4
|
import pe from "./emotion-unitless.esm.js";
|
|
5
5
|
import { RULESET as fe } from "./Enum.js";
|
|
6
|
-
import { prefixer as he, middleware as de, rulesheet as me } from "./
|
|
6
|
+
import { prefixer as he, middleware as de, rulesheet as me } from "./Middleware2.js";
|
|
7
7
|
import { stringify as ve, serialize as ye } from "./Serializer.js";
|
|
8
8
|
import { compile as ge } from "./Parser.js";
|
|
9
9
|
var j = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", Ft = "active", $t = "data-styled-version", nt = "6.1.13", vt = `/*!sc*/
|
package/throttle.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function h(r, a) {
|
|
2
2
|
let s = 0, u = 1e3 / a, e, t;
|
|
3
3
|
const n = (l, o = Date.now()) => {
|
|
4
|
-
s = o, e = null, t && (clearTimeout(t), t = null), r
|
|
4
|
+
s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
|
|
5
5
|
};
|
|
6
6
|
return [(...l) => {
|
|
7
7
|
const o = Date.now(), i = o - s;
|
package/toURLEncodedForm.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import r from "./
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
visitor: function(t,
|
|
7
|
-
return r.isNode &&
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
import s from "./utils6.js";
|
|
2
|
+
import f from "./toFormData.js";
|
|
3
|
+
import r from "./index28.js";
|
|
4
|
+
function d(o, i) {
|
|
5
|
+
return f(o, new r.classes.URLSearchParams(), {
|
|
6
|
+
visitor: function(t, a, n, e) {
|
|
7
|
+
return r.isNode && s.isBuffer(t) ? (this.append(a, t.toString("base64")), !1) : e.defaultVisitor.apply(this, arguments);
|
|
8
|
+
},
|
|
9
|
+
...i
|
|
10
|
+
});
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
d as default
|
|
13
14
|
};
|
package/tokenExpirationHelper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as i } from "./tokenExpirationHelper2.js";
|
|
2
|
-
import { __require as E } from "./
|
|
2
|
+
import { __require as E } from "./index27.js";
|
|
3
3
|
import { __require as x } from "./constants4.js";
|
|
4
4
|
import { __require as b } from "./localStorageHelper.js";
|
|
5
5
|
var u;
|
package/transformData.js
CHANGED
package/transitional.js
CHANGED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { devtools as f } from "./middleware.js";
|
|
2
|
+
import { create as c } from "./react.js";
|
|
3
|
+
function l(t, e) {
|
|
4
|
+
return t.includes(e) ? t : [...t, e];
|
|
5
|
+
}
|
|
6
|
+
function a(t, e) {
|
|
7
|
+
return t.filter((r) => r !== e);
|
|
8
|
+
}
|
|
9
|
+
const u = c()(
|
|
10
|
+
f(
|
|
11
|
+
(t) => ({
|
|
12
|
+
assetTypes: [],
|
|
13
|
+
metaproperties: [],
|
|
14
|
+
metapropertyIds: [],
|
|
15
|
+
predefinedFilter: void 0,
|
|
16
|
+
tags: [],
|
|
17
|
+
isLimited: void 0,
|
|
18
|
+
isDropdownActive: !1,
|
|
19
|
+
selectedSmartfilterOptions: {},
|
|
20
|
+
existingFilters: null,
|
|
21
|
+
metapropertyMap: {},
|
|
22
|
+
setPredefinedFilter: (e) => t(() => ({
|
|
23
|
+
predefinedFilter: e
|
|
24
|
+
})),
|
|
25
|
+
addAssetType: (e) => t((r) => ({
|
|
26
|
+
assetTypes: l(r.assetTypes, e)
|
|
27
|
+
})),
|
|
28
|
+
setAssetTypes: (e) => t(() => ({
|
|
29
|
+
assetTypes: e
|
|
30
|
+
})),
|
|
31
|
+
removeAssetType: (e) => {
|
|
32
|
+
t((r) => {
|
|
33
|
+
const { predefinedFilter: i } = r;
|
|
34
|
+
return i?.showToolbar && i.predefinedAssetType?.includes(e) ? { assetTypes: r.assetTypes } : {
|
|
35
|
+
assetTypes: a(r.assetTypes, e)
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
addMetaproperty: (e) => t((r) => ({
|
|
40
|
+
metapropertyIds: l(r.metapropertyIds, e.id),
|
|
41
|
+
metapropertyMap: {
|
|
42
|
+
...r.metapropertyMap,
|
|
43
|
+
[e.id]: e
|
|
44
|
+
}
|
|
45
|
+
})),
|
|
46
|
+
removeMetaproperty: (e) => t((r) => {
|
|
47
|
+
const { [e.id]: i, ...s } = r.metapropertyMap;
|
|
48
|
+
return {
|
|
49
|
+
metapropertyIds: a(r.metapropertyIds, e.id),
|
|
50
|
+
metapropertyMap: s
|
|
51
|
+
};
|
|
52
|
+
}),
|
|
53
|
+
setPredefinedMetaproperties: () => t((e) => {
|
|
54
|
+
const r = {}, { predefinedFilter: i } = e;
|
|
55
|
+
return Object.entries(i?.predefinedMetapropertiesOptions || {}).reduce(
|
|
56
|
+
(s, [n, d]) => (s[n] = {}, Object.entries(d).forEach(([o, p]) => {
|
|
57
|
+
s[n][p] = {
|
|
58
|
+
id: p,
|
|
59
|
+
label: o,
|
|
60
|
+
metapropertyName: n
|
|
61
|
+
};
|
|
62
|
+
}), s),
|
|
63
|
+
r
|
|
64
|
+
), { selectedSmartfilterOptions: r };
|
|
65
|
+
}),
|
|
66
|
+
addTag: (e) => t((r) => ({
|
|
67
|
+
tags: l(r.tags, e)
|
|
68
|
+
})),
|
|
69
|
+
setTags: (e) => t(() => ({
|
|
70
|
+
tags: e
|
|
71
|
+
})),
|
|
72
|
+
removeTag: (e) => {
|
|
73
|
+
t((r) => {
|
|
74
|
+
const { predefinedFilter: i } = r;
|
|
75
|
+
return i?.showToolbar && i.predefinedTagNames?.includes(e) ? { tags: r.tags } : {
|
|
76
|
+
tags: a(r.tags, e)
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
selectSmartfilterOption: (e, r, i) => t((s) => {
|
|
81
|
+
const n = {
|
|
82
|
+
id: r.id,
|
|
83
|
+
label: r.label,
|
|
84
|
+
metapropertyName: e
|
|
85
|
+
}, d = s.selectedSmartfilterOptions[e] || {}, o = !!d[r.id];
|
|
86
|
+
return i ? {
|
|
87
|
+
selectedSmartfilterOptions: {
|
|
88
|
+
...s.selectedSmartfilterOptions,
|
|
89
|
+
[e]: o ? (
|
|
90
|
+
// Remove if already selected
|
|
91
|
+
Object.fromEntries(
|
|
92
|
+
Object.entries(d).filter(
|
|
93
|
+
([p]) => p !== r.id
|
|
94
|
+
)
|
|
95
|
+
)
|
|
96
|
+
) : (
|
|
97
|
+
// Add if not selected already
|
|
98
|
+
{
|
|
99
|
+
...d,
|
|
100
|
+
[r.id]: n
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
} : o ? {
|
|
105
|
+
selectedSmartfilterOptions: {
|
|
106
|
+
...s.selectedSmartfilterOptions,
|
|
107
|
+
[e]: {}
|
|
108
|
+
}
|
|
109
|
+
} : {
|
|
110
|
+
selectedSmartfilterOptions: {
|
|
111
|
+
...s.selectedSmartfilterOptions,
|
|
112
|
+
[e]: {
|
|
113
|
+
[r.id]: n
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}),
|
|
118
|
+
removeSmartfilterOption: (e, r) => t((i) => {
|
|
119
|
+
const { [e]: s, ...n } = i.selectedSmartfilterOptions, { [r]: d, ...o } = s || {};
|
|
120
|
+
return o && Object.keys(o).length > 0 ? {
|
|
121
|
+
selectedSmartfilterOptions: {
|
|
122
|
+
...i.selectedSmartfilterOptions,
|
|
123
|
+
[e]: o
|
|
124
|
+
}
|
|
125
|
+
} : { selectedSmartfilterOptions: n };
|
|
126
|
+
}),
|
|
127
|
+
setActiveFiltersState: (e) => {
|
|
128
|
+
const r = e.count, i = Object.entries(r || {}).filter(
|
|
129
|
+
([s, n]) => s.startsWith("property") && n && Object.keys(n).length > 0
|
|
130
|
+
).reduce((s, [n, d]) => (s[n.replace("property_", "")] = d, s), {});
|
|
131
|
+
t({ existingFilters: i });
|
|
132
|
+
},
|
|
133
|
+
clear: () => t((e) => {
|
|
134
|
+
const r = e.predefinedFilter?.showToolbar && e.predefinedFilter?.predefinedAssetType ? [...e.predefinedFilter.predefinedAssetType] : [], i = e.predefinedFilter?.showToolbar && e.predefinedFilter?.predefinedTagNames ? [...e.predefinedFilter.predefinedTagNames] : [];
|
|
135
|
+
return {
|
|
136
|
+
assetTypes: r,
|
|
137
|
+
tags: i,
|
|
138
|
+
selectedSmartfilterOptions: {},
|
|
139
|
+
existingFilters: null
|
|
140
|
+
};
|
|
141
|
+
}),
|
|
142
|
+
setDropdownState: (e) => t({ isDropdownActive: e }),
|
|
143
|
+
setHideLimitedUse: (e) => t(() => ({
|
|
144
|
+
isLimited: e ? !1 : void 0
|
|
145
|
+
}))
|
|
146
|
+
}),
|
|
147
|
+
{ name: "AssetFilterStore", enabled: !1 }
|
|
148
|
+
)
|
|
149
|
+
);
|
|
150
|
+
export {
|
|
151
|
+
u as useAssetFilterStore
|
|
152
|
+
};
|
package/useDatStore.js
CHANGED
package/useEffectEvent.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useLayoutEffect as f } from "./useLayoutEffect.js";
|
|
2
|
-
import
|
|
2
|
+
import u, { useRef as o, useCallback as n } from "react";
|
|
3
3
|
var a;
|
|
4
|
-
const s = (a =
|
|
5
|
-
function d(
|
|
6
|
-
const
|
|
4
|
+
const s = (a = u.useInsertionEffect) !== null && a !== void 0 ? a : f;
|
|
5
|
+
function d(t) {
|
|
6
|
+
const c = o(null);
|
|
7
7
|
return s(() => {
|
|
8
|
-
|
|
8
|
+
c.current = t;
|
|
9
9
|
}, [
|
|
10
|
-
|
|
10
|
+
t
|
|
11
11
|
]), n((...r) => {
|
|
12
|
-
const e =
|
|
12
|
+
const e = c.current;
|
|
13
13
|
return e?.(...r);
|
|
14
14
|
}, []);
|
|
15
15
|
}
|
package/useFonts.js
CHANGED
|
@@ -2,9 +2,9 @@ import { useState as o, useCallback as c, useEffect as E, useMemo as O } from "r
|
|
|
2
2
|
import { produce as d } from "./immer.js";
|
|
3
3
|
import { useDebouncedCallback as x } from "./index.module3.js";
|
|
4
4
|
import { notify as P } from "./notify.js";
|
|
5
|
-
import { useTranslate as B } from "./
|
|
5
|
+
import { useTranslate as B } from "./index12.js";
|
|
6
6
|
import { API as T } from "./api2.js";
|
|
7
|
-
import { filterFamilies as k, moveSelectedFamilyToTop as w, getFamilyAndSubfamily as U, getDefaultFont as H } from "./
|
|
7
|
+
import { filterFamilies as k, moveSelectedFamilyToTop as w, getFamilyAndSubfamily as U, getDefaultFont as H } from "./utils8.js";
|
|
8
8
|
import { captureException as b } from "./exports3.js";
|
|
9
9
|
const M = 500, Z = 20;
|
|
10
10
|
function $(A) {
|
package/useOrderingStore.js
CHANGED
package/useRouterStore.js
CHANGED
package/useSearchStore.js
CHANGED