@dropins/tools 1.5.0-alpha3001 → 1.5.0-alpha3002
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/chunks/Image.js +1 -1
- package/chunks/Image.js.map +1 -1
- package/components.js +1 -1
- package/components.js.map +1 -1
- package/lib/aem/assets.js +1 -1
- package/lib/aem/configs.js +1 -1
- package/package.json +1 -1
- package/types/elsie/src/components/Table/Table.d.ts +4 -2
- package/types/elsie/src/i18n/en_US.json.d.ts +0 -3
- package/types/elsie/src/i18n/index.d.ts +0 -9
package/lib/aem/assets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{getConfigValue as O}from"./configs.js";import{p as f,I as g}from"../../chunks/Image.js";import"../../chunks/
|
|
3
|
+
import{getConfigValue as O}from"./configs.js";import{p as f,I as g}from"../../chunks/Image.js";import"../../chunks/cjs.js";import"../../chunks/get-path-value.js";import"../../preact-jsx-runtime.js";import"../../chunks/icons/Add.js";import"../../i18n.js";import"../../chunks/vcomponent.js";import"../../chunks/image-params-keymap.js";import"../../signals.js";const b=["gif","jpg","jpeg","png","webp"],v=[90,180,270],U=["h","v","hv"];function l(e){let t=e;if(t.startsWith("//")){const{protocol:s}=window.location;t=s+t}return t}function I(e){return U.includes(e)}function L(e){return v.includes(e)}function y(e){return b.includes(e)}function u(e,t,s){if(e!==void 0&&!t(e))throw new Error(s)}function h(){const e=O("commerce-assets-enabled");return e&&(typeof e=="string"&&e.toLowerCase()==="true"||typeof e=="boolean"&&e===!0)}function R(){return{quality:80,format:"webp"}}function A(e){return!!(typeof e=="string"?new URL(l(e)):e).pathname.startsWith("/adobe/assets/urn:aaid:aem")}function w(e,t,s={}){const r={...R(),...s},{format:i,crop:n,...o}=r;u(i,y,"Invalid format"),u(o.flip,I,"Invalid flip"),u(o.rotate,L,"Invalid rotation");const a=Object.fromEntries(Object.entries(o).map(([p,d])=>[p,String(d)])),c=new URLSearchParams(a);if(n){const[p,d]=[n.xOrigin||0,n.yOrigin||0],[P,E]=[n.width||100,n.height||100],S=`${p}p,${d}p,${P}p,${E}p`;c.set("crop",S)}return`${e}/as/${t}.${i}?${c.toString()}`}function q(e,t,s={}){if(!h())return e;const r=new URL(l(e));if(!A(r))return e;const i=r.origin+r.pathname;return w(i,t,s)}function _(e){return t=>{const{wrapper:s,alias:m,params:r,imageProps:i}=e;if(!i.src)throw new Error("An image source is required. Please provide a `src` or `imageProps.src`.");const n=s??document.createElement("div"),o=w(i.src,m,r),a={width:r.width,height:r.height,crop:void 0,fit:void 0,auto:void 0},c={...i,width:r.width,height:r.height,src:o,params:a};f.render(g,c)(n),t.replaceWith(n)}}function x(e,t){function s(){const i=t.wrapper??document.createElement("div"),{imageProps:n,params:o}=t,a={...n,width:o.width,height:o.height};f.render(g,a)(i),e.replaceWith(i)}if(!h()){s();return}if(!t.imageProps.src)throw new Error("An image source is required. Please provide a `src` or `imageProps.src`.");const r=new URL(l(t.imageProps.src));if(!A(r)){s();return}_(t)(e)}export{w as generateAemAssetsOptimizedUrl,R as getDefaultAemAssetsOptimizationParams,h as isAemAssetsEnabled,A as isAemAssetsUrl,_ as makeAemAssetsImageSlot,q as tryGenerateAemAssetsOptimizedUrl,x as tryRenderAemAssetsImage};
|
|
4
4
|
//# sourceMappingURL=assets.js.map
|
package/lib/aem/configs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{
|
|
3
|
+
import{d as u}from"../../chunks/cjs.js";import{g as f}from"../../chunks/get-path-value.js";let e=null,r=null,l=null;function C(){e=null,r=null,l=null}function s(t=e){return t?Object.keys(t==null?void 0:t.public).sort((i,o)=>{const a=i.split("/").filter(Boolean).length;return o.split("/").filter(Boolean).length-a}).find(i=>window.location.pathname===i||window.location.pathname.startsWith(i))??"/":(console.warn("No config found. Please call initializeConfig() first."),"/")}function c(){return e?Object.keys(e.public).filter(t=>t!=="default"):(console.warn("No config found. Please call initializeConfig() first."),[])}function m(){return c().length>=1}function w(t){if(!l)throw new Error("Configuration not initialized. Call initializeConfig() first.");const n=l.headers??{};return{...n.all??{},...n[t]??{}}}function g(t,n){var o;const i=(o=t.public)==null?void 0:o.default;return n==="/"||!t.public[n]?i:u(i,t.public[n])}function z(t){return e=t,r=s(e),l=g(e,r),l}function P(t){if(!l)throw new Error("Configuration not initialized. Call initializeConfig() first.");return f(l,t)}export{P as getConfigValue,w as getHeaders,c as getListOfRootPaths,s as getRootPath,z as initializeConfig,m as isMultistore,C as resetConfig};
|
|
4
4
|
//# sourceMappingURL=configs.js.map
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/tools", "version": "1.5.0-
|
|
1
|
+
{"name": "@dropins/tools", "version": "1.5.0-alpha3002", "license": "SEE LICENSE IN LICENSE.md"}
|
|
@@ -11,13 +11,15 @@ type RowData = {
|
|
|
11
11
|
[key: string]: VNode | string | number | undefined;
|
|
12
12
|
_rowDetails?: VNode | string;
|
|
13
13
|
};
|
|
14
|
-
export interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
14
|
+
export interface TableProps extends Omit<HTMLAttributes<HTMLTableElement>, 'loading'> {
|
|
15
15
|
columns: Column[];
|
|
16
16
|
rowData: RowData[];
|
|
17
17
|
mobileLayout?: 'stacked' | 'none';
|
|
18
18
|
caption?: string;
|
|
19
|
-
onSortChange?: (columnKey: string, direction: Sortable) => void;
|
|
20
19
|
expandedRows?: Set<number>;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
skeletonRowCount?: number;
|
|
22
|
+
onSortChange?: (columnKey: string, direction: Sortable) => void;
|
|
21
23
|
}
|
|
22
24
|
export declare const Table: FunctionComponent<TableProps>;
|
|
23
25
|
export {};
|
|
@@ -143,9 +143,6 @@ declare const _default: {
|
|
|
143
143
|
"picker": "Select a date"
|
|
144
144
|
},
|
|
145
145
|
"Table": {
|
|
146
|
-
"ariaSortNone": "none",
|
|
147
|
-
"ariaSortAscending": "ascending",
|
|
148
|
-
"ariaSortDescending": "descending",
|
|
149
146
|
"sortedAscending": "Sort {label} ascending",
|
|
150
147
|
"sortedDescending": "Sort {label} descending",
|
|
151
148
|
"sortBy": "Sort by {label}"
|
|
@@ -153,9 +153,6 @@ export declare const definition: {
|
|
|
153
153
|
picker: string;
|
|
154
154
|
};
|
|
155
155
|
Table: {
|
|
156
|
-
ariaSortNone: string;
|
|
157
|
-
ariaSortAscending: string;
|
|
158
|
-
ariaSortDescending: string;
|
|
159
156
|
sortedAscending: string;
|
|
160
157
|
sortedDescending: string;
|
|
161
158
|
sortBy: string;
|
|
@@ -307,9 +304,6 @@ export declare const definition: {
|
|
|
307
304
|
picker: string;
|
|
308
305
|
};
|
|
309
306
|
Table: {
|
|
310
|
-
ariaSortNone: string;
|
|
311
|
-
ariaSortAscending: string;
|
|
312
|
-
ariaSortDescending: string;
|
|
313
307
|
sortedAscending: string;
|
|
314
308
|
sortedDescending: string;
|
|
315
309
|
sortBy: string;
|
|
@@ -463,9 +457,6 @@ export declare const getDefinitionByLanguage: (lang: Lang) => {
|
|
|
463
457
|
picker: string;
|
|
464
458
|
};
|
|
465
459
|
Table: {
|
|
466
|
-
ariaSortNone: string;
|
|
467
|
-
ariaSortAscending: string;
|
|
468
|
-
ariaSortDescending: string;
|
|
469
460
|
sortedAscending: string;
|
|
470
461
|
sortedDescending: string;
|
|
471
462
|
sortBy: string;
|