@orangelogic/design-system 4.29.0 → 4.31.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/library/assets/validation.worker-CATXl-v2.js +1 -0
- package/library/chunks/{alert.CuW7fOVy.js → alert.l5EVK3-E.js} +2 -2
- package/library/chunks/{array-line-clamp.AbuJqKJ3.js → array-line-clamp.CU5D9cZY.js} +2 -2
- package/library/chunks/{asset-link-format.DLmg4fTR.js → asset-link-format.vptDP26p.js} +116 -106
- package/library/chunks/{audio.BVQX3_8E.js → audio.CeFgoQdF.js} +14 -7
- package/library/chunks/{bicolor-picker.C9XSuhnX.js → bicolor-picker.CU3ukAg7.js} +1 -1
- package/library/chunks/{block-width.rWsXJkoW.js → block-width.CMPZBHqn.js} +81 -81
- package/library/chunks/{border-input-group.DESRXoh1.js → border-input-group.CD01EzK_.js} +3 -3
- package/library/chunks/{breadcrumb.qggcceb5.js → breadcrumb.wAs0dDVb.js} +1 -1
- package/library/chunks/{button.CI1tg4c9.js → button.CD8evBb3.js} +2 -2
- package/library/chunks/{color-picker.DUEghDon.js → color-picker.BJqVkgCG.js} +10 -10
- package/library/chunks/{color-swatch-group.Cf9NcMte.js → color-swatch-group.RTIWNZVn.js} +690 -614
- package/library/chunks/{color-swatch.CoiPHwMX.js → color-swatch.CZKAA6aA.js} +5 -5
- package/library/chunks/{config-manager.FRWbPVTc.js → config-manager.D7YYUDHX.js} +28 -28
- package/library/chunks/{configs-controller.R67BMWep.js → configs-controller.CGAljtXC.js} +55 -7
- package/library/chunks/{confirm-popover.CaNKM2dH.js → confirm-popover.CuUcSDEG.js} +4 -4
- package/library/chunks/{copy-button.BLHge7EN.js → copy-button.Db9OgUsk.js} +2 -2
- package/library/chunks/{corner-position-input-group.CPrsYabs.js → corner-position-input-group.D7nqy1PF.js} +4 -4
- package/library/chunks/{date-calendar.UWxXkZCn.js → date-calendar.QH4E3gcB.js} +1 -1
- package/library/chunks/{details.DLqFxjTf.js → details.QX575PyS.js} +1 -1
- package/library/chunks/{dialog.BuirdRW8.js → dialog.CWc63UTR.js} +3 -3
- package/library/chunks/{document-viewer.DZp_IRF7.js → document-viewer.CqFpoWJg.js} +14 -14
- package/library/chunks/{dot-pagination.CSSalEx6.js → dot-pagination.DecVZgSJ.js} +2 -2
- package/library/chunks/{drawer.BO3puoiw.js → drawer.DlQiWzOM.js} +2 -2
- package/library/chunks/{dropdown.HoJsYnUC.js → dropdown.HWaiHRYl.js} +4 -4
- package/library/chunks/{dynamic-select.G1V7Da24.js → dynamic-select.C4ZFmny4.js} +5 -5
- package/library/chunks/{e-chart.BopkVc04.js → e-chart.c19ibTnT.js} +2 -2
- package/library/chunks/{element-clamp.DIUYu8kK.js → element-clamp.Bo_TtVq2.js} +2 -2
- package/library/chunks/{file-on-demand.C_2vBGS3.js → file-on-demand.C7BgY0Pl.js} +16 -16
- package/library/chunks/{folder-select.CzNXsgl_.js → folder-select.Cymp8xGF.js} +7 -7
- package/library/chunks/{format-time.BO9Y72qk.js → format-time.Dfu1FCrK.js} +1 -1
- package/library/chunks/{header.BaWpIXRz.js → header.BosjiWVg.js} +2 -2
- package/library/chunks/{i18n.BMXeDUpk.js → i18n.D_iHIFdS.js} +3 -0
- package/library/chunks/{icon-button.CziUJUiX.js → icon-button.D6mTxvLN.js} +2 -2
- package/library/chunks/{iframe.BnAR2-o2.js → iframe.C7j4Uzku.js} +1 -1
- package/library/chunks/{image-comparer.DStatUUS.js → image-comparer.D7C-cLm6.js} +1 -1
- package/library/chunks/{image.BD0t8XU4.js → image.CIGPxKGh.js} +17 -4
- package/library/chunks/{input.B3HfssSr.js → input.C44u0jQi.js} +1 -1
- package/library/chunks/{line-clamp.DlenWria.js → line-clamp.D9NJFIfS.js} +2 -2
- package/library/chunks/{markdown.C-q35PEY.js → markdown.B6J44eJB.js} +2 -2
- package/library/chunks/{masonry.B3G5f-eL.js → masonry.BwhxOJL-.js} +3 -3
- package/library/chunks/{menu-item.DS4-vQe3.js → menu-item.BpB-Zp1I.js} +3 -3
- package/library/chunks/{menu.BRFXqBpq.js → menu.TbftncJn.js} +2 -2
- package/library/chunks/{option.wsYX6Pp-.js → option.DFutJxYo.js} +1 -1
- package/library/chunks/{padding-input-group.DKIv6567.js → padding-input-group.CSYzP2s4.js} +1 -1
- package/library/chunks/{pagination.By0sijVv.js → pagination.DQgNOqGM.js} +7 -7
- package/library/chunks/{popup.CxGrVXG-.js → popup.DwPq0yI9.js} +1 -1
- package/library/chunks/{position-picker.CyXlSYCi.js → position-picker.aNCROlig.js} +1 -1
- package/library/chunks/{progress-bar.Cp8jz3Cn.js → progress-bar.VFfb2YnK.js} +1 -1
- package/library/chunks/{progress-ring.CMylJgKR.js → progress-ring.Czn6GoZL.js} +1 -1
- package/library/chunks/{radio-card.DPIcsAW9.js → radio-card.BKJtxuuO.js} +1 -1
- package/library/chunks/{range.Dl85wEtv.js → range.UVbDGy7M.js} +2 -2
- package/library/chunks/{rating.C-3rSMOT.js → rating.Dpqp5fJ2.js} +1 -1
- package/library/chunks/{relative-time.5fu63h4C.js → relative-time.ImRpAXxg.js} +1 -1
- package/library/chunks/{select.v6t2pNH4.js → select.eBMe63kf.js} +8 -8
- package/library/chunks/{shadow-input-group.CFb61kzG.js → shadow-input-group.CZaqMPQV.js} +2 -2
- package/library/chunks/{share-option-list.BO50cnCs.js → share-option-list.CVyc5zE3.js} +2 -2
- package/library/chunks/{sidebar.CDTaDQY_.js → sidebar.B1CkFnS-.js} +1 -1
- package/library/chunks/{size-input-group.Z_9n7Nv6.js → size-input-group.IVVAysAr.js} +5 -5
- package/library/chunks/{spinner.-79sJ3oo.js → spinner.BPSFoJkz.js} +1 -1
- package/library/chunks/{split-panel.DE2NmORY.js → split-panel.BsE9_zvp.js} +1 -1
- package/library/chunks/{src.DKYroWZc.js → src.BVh8NgdB.js} +1 -1
- package/library/chunks/{src.fDrPRx_j.js → src.CswHQQN4.js} +47 -47
- package/library/chunks/{step.BKIlgV-h.js → step.GmnPARTV.js} +3 -3
- package/library/chunks/{stepper-wizard.BCNJD-aa.js → stepper-wizard.D_MmYLfc.js} +2 -2
- package/library/chunks/{stepper.D-B3UVVF.js → stepper.-RZKsA5t.js} +1 -1
- package/library/chunks/{tab-group.oiueox5q.js → tab-group.xQlBJJPJ.js} +7 -7
- package/library/chunks/{tab.Dd0cNxxc.js → tab.DMcCiQv2.js} +3 -3
- package/library/chunks/{tag.CWTVcGc7.js → tag.dbXBL3Rg.js} +3 -3
- package/library/chunks/{tooltip.CGCOh4cQ.js → tooltip.BAg1FXgE.js} +2 -2
- package/library/chunks/{tree.BZvt8Ol0.js → tree.CydKk_dU.js} +3 -3
- package/library/chunks/{typeface.BU6CLTXo.js → typeface.CbVDDGWe.js} +3 -3
- package/library/chunks/{video.Ba5xl_3K.js → video.dKdkgJUo.js} +4575 -4525
- package/library/components/alert.js +1 -1
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +1 -1
- package/library/components/atoms.js +48 -48
- package/library/components/audio.js +1 -1
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/color-swatch.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +1 -1
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dot-pagination.js +1 -1
- package/library/components/drawer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +1 -1
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/folder-select.js +1 -1
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +1 -1
- package/library/components/icon-button.js +1 -1
- package/library/components/iframe.js +1 -1
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +1 -1
- package/library/components/masonry.js +1 -1
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +16 -16
- package/library/components/option.js +1 -1
- package/library/components/organisms.js +3 -3
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +1 -1
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +1 -1
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +1 -1
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/tab.js +1 -1
- package/library/components/tag.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +1 -1
- package/library/components/tree.js +1 -1
- package/library/components/typeface.js +1 -1
- package/library/components/types.js +10623 -10454
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/audio/audio.d.ts +15 -0
- package/library/packages/atoms/src/components/image/image.d.ts +1 -1
- package/library/packages/atoms/src/components/video/video.d.ts +23 -0
- package/library/packages/molecules/src/multi-select/components/board-list-item/board-list-item.d.ts +1 -0
- package/library/packages/organisms/src/chatbot/chatbot.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/blocks/gallery/gallery.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +17 -1
- package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +4 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +14 -10
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/services/src/api/asset/asset.d.ts +3 -3
- package/library/packages/services/src/api/asset/asset.types.d.ts +4 -0
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +8 -4
- package/library/packages/types/src/table.d.ts +7 -6
- package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
- package/library/react-web-component.d.ts +4 -0
- package/library/utils.js +2 -2
- package/package.json +1 -1
- package/library/assets/validation.worker-DnJlaA8S.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){function e(e){return e===``||e==null}function t(e){return Number.isFinite(Number(e))}function n(e,t){if(!t||typeof t!=`object`)return!0;let n=Number(e);return!(t.min!==void 0&&n<t.min||t.max!==void 0&&n>t.max)}function r(e){return e instanceof Date?e.getTime():typeof e==`number`?Number.isFinite(e)?e:NaN:typeof e==`string`?Date.parse(e):NaN}let i=[{part:`year`,pattern:`\\d{4}`,token:`yyyy`},{part:`year`,pattern:`\\d{4}`,token:`YYYY`},{part:`month`,pattern:`\\d{2}`,token:`MM`},{part:`day`,pattern:`\\d{2}`,token:`dd`},{part:`day`,pattern:`\\d{2}`,token:`DD`},{part:`hour`,pattern:`\\d{2}`,token:`HH`},{part:`minute`,pattern:`\\d{2}`,token:`mm`},{part:`second`,pattern:`\\d{2}`,token:`ss`},{part:`fraction`,pattern:`\\d{3}`,token:`fff`},{part:`fraction`,pattern:`\\d{2}`,token:`ff`},{part:`fraction`,pattern:`\\d`,token:`f`},{part:`offsetSign`,pattern:`[+-]`,token:`zzz`},{part:`offsetSign`,pattern:`[+-]`,token:`zz`},{part:`offsetSign`,pattern:`[+-]`,token:`z`},{part:`utc`,pattern:`Z`,token:`Z`}];function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function o(e,t,n){return e.push(t),`(${n})`}function s(e){let t=[],n=``,r=0;for(;r<e.length;){if(e.endsWith(`-HH:mm`)&&r===e.length-6){n+=`-`,n+=o(t,`offsetHour`,`\\d{2}`),n+=`:`,n+=o(t,`offsetMinute`,`\\d{2}`),t.push(`offsetSign`),n+=`()`,r=e.length;continue}let s=i.find(({token:t})=>e.startsWith(t,r));s?(s.part===`offsetSign`?(n+=o(t,`offsetSign`,`[+-]`),n+=o(t,`offsetHour`,s.token===`z`?`\\d{1,2}`:`\\d{2}`),s.token===`zzz`&&(n+=`:`,n+=o(t,`offsetMinute`,`\\d{2}`))):n+=o(t,s.part,s.pattern),r+=s.token.length):(n+=a(e[r]),r+=1)}try{return{captures:t,pattern:RegExp(`^${n}$`)}}catch{return}}function c(e,t){return t.reduce((t,n,r)=>((t[n]??=[]).push(e[r+1]),t),{})}function l(e,t){if(!e?.length)return t;let n=e.map(Number);return n.every(e=>e===n[0])?n[0]:NaN}function u(e,t){let n=s(t),r=n?.pattern.exec(e);if(!r||!n)return NaN;let i=c(r,n.captures),a=l(i.year,1970),o=l(i.month,1),u=l(i.day,1),d=l(i.hour,0),f=l(i.minute,0),p=l(i.second,0),m=i.fraction?.[0]??``,h=m?Number(m.padEnd(3,`0`)):0,g=l(i.offsetHour,0),_=l(i.offsetMinute,0);if(o<1||o>12||d<0||d>23||f<0||f>59||p<0||p>59||g<0||g>14||_<0||_>59||g===14&&_!==0)return NaN;let v=i.utc!==void 0||i.offsetSign!==void 0,y=v?new Date(Date.UTC(a,o-1,u,d,f,p,h)):new Date(a,o-1,u,d,f,p,h);if(a>=0&&a<100&&(v?y.setUTCFullYear(a):y.setFullYear(a)),(v?y.getUTCFullYear():y.getFullYear())!==a||(v?y.getUTCMonth():y.getMonth())!==o-1||(v?y.getUTCDate():y.getDate())!==u)return NaN;if(i.utc!==void 0)return y.getTime();if(i.offsetSign!==void 0){let e=(i.offsetSign[0]===``||i.offsetSign[0]===`-`?-1:1)*(g*60+_)*6e4;return y.getTime()-e}return y.getTime()}let d={alphanumeric(t){return e(t)?!0:/^[a-z0-9]+$/i.test(String(t))},boolean(t){return e(t)?!0:typeof t==`boolean`||t===`true`||t===`false`},date(t,n){if(e(t))return!0;let i=n&&typeof n==`object`?n.format:void 0,a=i===void 0?r(t):u(String(t),i);if(Number.isNaN(a))return!1;if(!n||typeof n!=`object`)return!0;if(n.starts!==void 0){let e=r(n.starts);if(Number.isNaN(e)||a<e)return!1}if(n.ends!==void 0){let e=r(n.ends);if(Number.isNaN(e)||a>e)return!1}return!0},ends(t,n){return e(t)?!0:String(t).toLowerCase().endsWith(String(n).toLowerCase())},float(r,i){if(e(r))return!0;let a=Number(r);return t(r)&&a%1!=0&&n(r,i)},in(t,n){if(e(t))return!0;let r=typeof n==`string`?n.split(`|`):n;return Array.isArray(r)&&r.includes(t)},integer(r,i){if(e(r))return!0;let a=Number(r);return t(r)&&Math.floor(a)===a&&n(r,i)},max(t,n){return e(t)?!0:Number.parseFloat(String(t))<=Number(n)},maxLength(t,n){return e(t)?!0:String(t).length<=Number(n)},min(t,n){return e(t)?!0:Number.parseFloat(String(t))>=Number(n)},minLength(t,n){return e(t)?!0:String(t).length>=Number(n)},numeric(t,r){return e(t)?!0:!Number.isNaN(Number(t))&&n(t,r)},regex(t,n){if(e(t))return!0;let r;r=n instanceof RegExp?n:n===void 0?``:String(n);try{return new RegExp(r).test(String(t))}catch{return!1}},required(t){return!e(t)},starts(t,n){return e(t)?!0:String(t).toLowerCase().startsWith(String(n).toLowerCase())},string(t,n){if(e(t))return!0;if(!Number.isNaN(Number(t)))return!1;if(!n||typeof n!=`object`)return!0;let r=String(t).length;return!(n.minLength!==void 0&&r<n.minLength||n.maxLength!==void 0&&r>n.maxLength)},unique(t,n,r){return e(t)||!r?.columnValues?!0:!r.columnValues.some(e=>e===t)}},f=1e3;function p(e){return e===``||e==null}function m(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{p(e)||t.set(e,(t.get(e)??0)+1)}),t}function h(e,t,n){let r=[];return t.forEach(t=>{let i;if(t.type===`unique`)i=p(e)||(n.get(e)??0)<=1;else{let n=d[t.type];i=!n||n(e,t.parameters)}i||r.push({message:t.message,parameters:t.parameters,type:t.type})}),r}globalThis.addEventListener(`message`,e=>{if(e.origin!==``||e.data?.type!==`cx-validation-request`)return;let{fields:t,id:n}=e.data.payload,r=t.map(e=>e.rules.some(e=>e.type===`unique`)?m(e.values):/* @__PURE__ */ new Map),i=t.reduce((e,t)=>Math.max(e,t.values.length),0);for(let e=0;e<i||e===0;e+=f){let a=Math.min(e+f,i),o=[];for(let n=e;n<a;n++)t.forEach((e,t)=>{let i=h(e.values[n],e.rules,r[t]);i.length&&o.push({failures:i,fieldIndex:t,rowIndex:n})});let s={done:a>=i,id:n,results:o};if(globalThis.postMessage({payload:s,type:`cx-validation-response`}),a>=i)break}})})();
|
|
@@ -4,12 +4,12 @@ import { t as s } from "./query.B1yi7t71.js";
|
|
|
4
4
|
import { t as c } from "./component.styles.0xM1ZmBs.js";
|
|
5
5
|
import { n as l, o as u, t as d } from "./event.C11S4obG.js";
|
|
6
6
|
import { t as f } from "./custom-element.BEMYNDK1.js";
|
|
7
|
-
import { t as p } from "./i18n.
|
|
7
|
+
import { t as p } from "./i18n.D_iHIFdS.js";
|
|
8
8
|
import { t as m } from "./slot.CZUlACxT.js";
|
|
9
9
|
import { t as h } from "./watch.Ub5r8btz.js";
|
|
10
10
|
import { t as g } from "./class-map.D8nsNOVJ.js";
|
|
11
11
|
import { r as _, t as v } from "./animation-registry.DKd2AOcC.js";
|
|
12
|
-
import { t as y } from "./icon-button.
|
|
12
|
+
import { t as y } from "./icon-button.D6mTxvLN.js";
|
|
13
13
|
//#region ../../packages/atoms/src/components/alert/alert.styles.ts
|
|
14
14
|
var b = t`:host{margin:0;display:contents}.alert{background-color:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-top-width:calc(var(--cx-panel-border-width) * 3);border-radius:var(--cx-border-radius-small);font-family:var(--cx-font-sans);font-size:var(--cx-font-size-small);font-weight:var(--cx-font-weight-regular);color:var(--cx-color-neutral-700);margin:inherit;align-items:stretch;line-height:1.6;display:flex;position:relative;overflow:hidden}.alert:not(.alert--has-icon) .alert__icon,.alert:not(.alert--closable) .alert__close-button{display:none}.alert__icon{font-size:var(--cx-font-size-large);flex:none;align-items:center;padding-inline-start:var(--cx-spacing-large);display:flex}.alert--has-countdown{border-bottom:none}.alert--primary{border-top-color:var(--cx-color-primary)}.alert--primary .alert__icon{color:var(--cx-color-primary)}.alert--success{border-top-color:var(--cx-color-success)}.alert--success .alert__icon{color:var(--cx-color-success)}.alert--neutral{border-top-color:var(--cx-color-neutral)}.alert--neutral .alert__icon{color:var(--cx-color-neutral)}.alert--warning{border-top-color:var(--cx-color-warning)}.alert--warning .alert__icon{color:var(--cx-color-warning)}.alert--danger{border-top-color:var(--cx-color-danger)}.alert--danger .alert__icon{color:var(--cx-color-danger)}.alert__message{padding:var(--cx-spacing-large);flex:auto;display:block;overflow:hidden}.alert__close-button{font-size:var(--cx-font-size-medium);flex:none;align-items:center;padding-inline-end:var(--cx-spacing-medium);display:flex}.alert__countdown{width:100%;height:calc(var(--cx-panel-border-width) * 3);background-color:var(--cx-panel-border-color);display:flex;position:absolute;bottom:0;left:0}.alert__countdown--ltr{justify-content:flex-end}.alert__countdown .alert__countdown-elapsed{width:0;height:100%}.alert--primary .alert__countdown-elapsed{background-color:var(--cx-color-primary)}.alert--success .alert__countdown-elapsed{background-color:var(--cx-color-success)}.alert--neutral .alert__countdown-elapsed{background-color:var(--cx-color-neutral-600)}.alert--warning .alert__countdown-elapsed{background-color:var(--cx-color-warning)}.alert--danger .alert__countdown-elapsed{background-color:var(--cx-color-danger)}.alert__timer{display:none}`, x = Object.assign(document.createElement("div"), { className: "cx-toast-stack" }), S = class extends o {
|
|
15
15
|
constructor(...e) {
|
|
@@ -7,8 +7,8 @@ import { t as d } from "./watch.Ub5r8btz.js";
|
|
|
7
7
|
import { t as f } from "./when.BUskJLtZ.js";
|
|
8
8
|
import { t as p } from "./style-map.DPGQIxip.js";
|
|
9
9
|
import { t as m } from "./resize-observer.D9EHlnZI.js";
|
|
10
|
-
import { t as h } from "./line-clamp.
|
|
11
|
-
import { t as g } from "./tag.
|
|
10
|
+
import { t as h } from "./line-clamp.D9NJFIfS.js";
|
|
11
|
+
import { t as g } from "./tag.dbXBL3Rg.js";
|
|
12
12
|
//#region ../../packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.ts
|
|
13
13
|
var _ = t`.array-clamp{flex-wrap:nowrap;flex-grow:1;flex-shrink:1;align-items:center;display:flex;overflow:hidden}.array-clamp__items-container{flex-wrap:nowrap;flex-grow:1;flex-shrink:1;align-items:center;width:100%;min-width:0;display:flex;overflow:hidden}.array-clamp__items-container ::slotted(.array-clamp__item){white-space:nowrap;flex-shrink:0}.array-clamp__items-container ::slotted(.array-clamp__item:not(:last-child)):after{content:var(--array-clamp-separator,", ");white-space:pre}.array-clamp__items-container ::slotted(.array-clamp__item.clamped){display:none}.array-clamp__items-container ::slotted(.array-clamp__item.array-clamp__last-visible){-webkit-line-clamp:1;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;flex-shrink:1;min-width:0;display:-webkit-box;overflow:hidden}.array-clamp__indicator{flex-shrink:0}.array-clamp__indicator::part(base){overflow-wrap:break-word;min-width:2rem;max-width:4rem}`, v = "array-clamp__item", y = "array-clamp__last-visible", b = "clamped", x = class extends s {
|
|
14
14
|
constructor(...e) {
|
|
@@ -3,15 +3,15 @@ import { a as r, i, n as a, r as o, t as s } from "./cortex-element.DTrNUtdr.js"
|
|
|
3
3
|
import { t as c } from "./query.B1yi7t71.js";
|
|
4
4
|
import { t as l } from "./component.styles.0xM1ZmBs.js";
|
|
5
5
|
import { t as u } from "./custom-element.BEMYNDK1.js";
|
|
6
|
-
import { t as d } from "./i18n.
|
|
6
|
+
import { t as d } from "./i18n.D_iHIFdS.js";
|
|
7
7
|
import { t as f } from "./watch.Ub5r8btz.js";
|
|
8
|
-
import { t as p } from "./icon-button.
|
|
8
|
+
import { t as p } from "./icon-button.D6mTxvLN.js";
|
|
9
9
|
import { t as m } from "./when.BUskJLtZ.js";
|
|
10
10
|
import { t as h } from "./icon.CeQpEaQz.js";
|
|
11
11
|
import { t as g } from "./style-map.DPGQIxip.js";
|
|
12
|
-
import { t as _ } from "./button.
|
|
12
|
+
import { t as _ } from "./button.CD8evBb3.js";
|
|
13
13
|
import { m as ee } from "./string.DamEXDH2.js";
|
|
14
|
-
import { t as te } from "./tooltip.
|
|
14
|
+
import { t as te } from "./tooltip.BAg1FXgE.js";
|
|
15
15
|
import { n as v } from "./position-picker.dY_vgF_H.js";
|
|
16
16
|
import { l as ne, r as y } from "./number.CNp5LKkv.js";
|
|
17
17
|
import { t as re } from "./image.C0s1gL4z.js";
|
|
@@ -19,19 +19,19 @@ import { t as b } from "./typography.B0mkhqTB.js";
|
|
|
19
19
|
import { t as ie } from "./button-group.CPfXrqyq.js";
|
|
20
20
|
import { t as ae } from "./checkbox.C6vsHW9n.js";
|
|
21
21
|
import { t as x } from "./repeat.CKv9FPlC.js";
|
|
22
|
-
import { t as oe } from "./input.
|
|
23
|
-
import { t as S } from "./option.
|
|
22
|
+
import { t as oe } from "./input.C44u0jQi.js";
|
|
23
|
+
import { t as S } from "./option.DFutJxYo.js";
|
|
24
24
|
import { t as C } from "./space.Dd8jezXK.js";
|
|
25
|
-
import { t as w } from "./select.
|
|
26
|
-
import { E as se, T as ce, b as le, d as ue, h as T, p as de, w as fe, y as pe } from "./src.
|
|
27
|
-
import { t as E } from "./details.
|
|
25
|
+
import { t as w } from "./select.eBMe63kf.js";
|
|
26
|
+
import { E as se, T as ce, b as le, d as ue, h as T, p as de, w as fe, y as pe } from "./src.BVh8NgdB.js";
|
|
27
|
+
import { t as E } from "./details.QX575PyS.js";
|
|
28
28
|
import { t as me } from "./divider.CqSNZCU8.js";
|
|
29
29
|
import { i as D, n as O, r as k } from "./asset-link-format.DhdgEsA0.js";
|
|
30
30
|
import { t as he } from "./v4.JyXW8GUB.js";
|
|
31
31
|
import "./cropper.D4ymxgab.js";
|
|
32
32
|
import { t as ge } from "./_baseUniq.h_pGICPH.js";
|
|
33
33
|
import { a as _e, f as A, n as ve, o as ye, r as be, t as xe, u as Se } from "./endpoints.jOHOmF_t.js";
|
|
34
|
-
import { t as j } from "./position-picker.
|
|
34
|
+
import { t as j } from "./position-picker.aNCROlig.js";
|
|
35
35
|
//#region ../../node_modules/lodash-es/uniq.js
|
|
36
36
|
function Ce(e) {
|
|
37
37
|
return e && e.length ? ge(e) : [];
|
|
@@ -154,44 +154,45 @@ function qe(e) {
|
|
|
154
154
|
for (let [n, r] of Object.entries(e)) r != null && (Array.isArray(r) ? r.forEach((e) => t.append(n, String(e))) : t.append(n, String(r)));
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
|
-
async function Je({ consistency: e, countPerPage: t, fields: n, getPermanentAssetsPaths: r, httpMethod: i = "GET", isSiteBuilder: a, pageNumber: o, query: s, securityByPassToken: c, siteUrl: l, sort: u,
|
|
158
|
-
let
|
|
157
|
+
async function Je({ consistency: e, countPerPage: t, fields: n, getPermanentAssetsPaths: r, httpMethod: i = "GET", isSiteBuilder: a, pageNumber: o, query: s, securityByPassToken: c, siteUrl: l, sort: u, throwOnError: d, token: f, useSession: p }) {
|
|
158
|
+
let m = n?.flatMap(We), h = n?.includes("CoreField.TitleWithFallback") ?? !1, g = (e) => {
|
|
159
159
|
let t = Ge(e);
|
|
160
|
-
return
|
|
161
|
-
},
|
|
160
|
+
return h && (t[Ne] = U(t, "Document.Title") || U(t, "CoreField.OriginalFileName")), t;
|
|
161
|
+
}, _ = {
|
|
162
162
|
Consistency: e || void 0,
|
|
163
163
|
CountPerPage: t,
|
|
164
|
-
Fields: Ce(
|
|
164
|
+
Fields: Ce(m),
|
|
165
165
|
Format: "json",
|
|
166
166
|
GetPermanentAssetsPaths: r ?? void 0,
|
|
167
167
|
PageNumber: o,
|
|
168
168
|
Query: P(s),
|
|
169
169
|
SecurityByPassToken: c || void 0,
|
|
170
170
|
Sort: u || void 0,
|
|
171
|
-
UseSession:
|
|
172
|
-
},
|
|
171
|
+
UseSession: p || void 0
|
|
172
|
+
}, ee = i === "POST";
|
|
173
173
|
try {
|
|
174
174
|
return (await A.request({
|
|
175
175
|
baseURL: l,
|
|
176
|
-
headers:
|
|
176
|
+
headers: f ? { Authorization: `Bearer ${f}` } : void 0,
|
|
177
177
|
method: i,
|
|
178
|
-
...
|
|
179
|
-
params:
|
|
178
|
+
...ee ? { data: qe(_) } : {
|
|
179
|
+
params: _,
|
|
180
180
|
paramsSerializer: { indexes: null }
|
|
181
181
|
},
|
|
182
182
|
responseType: "json",
|
|
183
183
|
transformResponse: [...Array.isArray(A.defaults.transformResponse) ? A.defaults.transformResponse : [], a ? (e) => ({
|
|
184
|
-
items: (e.results?.Items ?? []).map(
|
|
184
|
+
items: (e.results?.Items ?? []).map(g),
|
|
185
185
|
sort: e.results?.GlobalInfo?.Sort ?? "",
|
|
186
186
|
totalCount: e.results?.GlobalInfo?.TotalCount ?? 0
|
|
187
187
|
}) : (e) => ({
|
|
188
|
-
items: (e.APIResponse?.Items ?? []).map(
|
|
188
|
+
items: (e.APIResponse?.Items ?? []).map(g),
|
|
189
189
|
sort: e.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
190
190
|
totalCount: e.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
191
191
|
})],
|
|
192
192
|
url: a ? ye.SEARCH_ASSETS : Se["4.0"]
|
|
193
193
|
})).data;
|
|
194
|
-
} catch {
|
|
194
|
+
} catch (e) {
|
|
195
|
+
if (d) throw e;
|
|
195
196
|
return {
|
|
196
197
|
items: [],
|
|
197
198
|
sort: "",
|
|
@@ -225,60 +226,61 @@ function Ze(e, t) {
|
|
|
225
226
|
for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
|
|
226
227
|
return n;
|
|
227
228
|
}
|
|
228
|
-
async function Qe({ consistency: e, extraFields: t, getPermanentAssetsPaths: n, isSiteBuilder: r, recordIds: i, securityByPassToken: a,
|
|
229
|
+
async function Qe({ consistency: e, extraFields: t, getPermanentAssetsPaths: n, isSiteBuilder: r, recordIds: i, securityByPassToken: a, throwOnError: o, token: s }) {
|
|
229
230
|
if (!Array.isArray(i) || i.length === 0) return {
|
|
230
231
|
facets: [],
|
|
231
232
|
items: [],
|
|
232
233
|
totalCount: 0
|
|
233
234
|
};
|
|
234
|
-
let
|
|
235
|
-
...
|
|
235
|
+
let c = t?.filter((e) => e && typeof e == "string") ?? [], l = [
|
|
236
|
+
...c,
|
|
236
237
|
H,
|
|
237
238
|
I,
|
|
238
239
|
Ae,
|
|
239
240
|
B
|
|
240
|
-
],
|
|
241
|
+
], u = Ze(i, Xe), d = await Promise.all(u.map((t) => Je({
|
|
241
242
|
consistency: e,
|
|
242
243
|
countPerPage: t.length,
|
|
243
|
-
fields:
|
|
244
|
+
fields: l,
|
|
244
245
|
getPermanentAssetsPaths: n,
|
|
245
246
|
httpMethod: r ? "GET" : "POST",
|
|
246
247
|
isSiteBuilder: r,
|
|
247
248
|
pageNumber: 1,
|
|
248
249
|
query: { recordId: t },
|
|
249
250
|
securityByPassToken: a,
|
|
250
|
-
|
|
251
|
-
|
|
251
|
+
throwOnError: o,
|
|
252
|
+
token: s
|
|
253
|
+
}))), f = new Map(i.map((e, t) => [e, t]));
|
|
252
254
|
return {
|
|
253
255
|
facets: [],
|
|
254
|
-
items:
|
|
256
|
+
items: d.flatMap((e) => e.items).map((e) => ({
|
|
255
257
|
name: U(e, H),
|
|
256
258
|
recordId: U(e, B),
|
|
257
|
-
...
|
|
258
|
-
})).sort((e, t) => (
|
|
259
|
-
totalCount:
|
|
259
|
+
...c.reduce((t, n) => Ke(t, e, n), {})
|
|
260
|
+
})).sort((e, t) => (f.get(e.recordId) ?? Infinity) - (f.get(t.recordId) ?? Infinity)),
|
|
261
|
+
totalCount: d.reduce((e, t) => e + t.totalCount, 0)
|
|
260
262
|
};
|
|
261
263
|
}
|
|
262
264
|
function U(e, t) {
|
|
263
265
|
let n = e[t];
|
|
264
266
|
return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : M(n) ? n.URI : "";
|
|
265
267
|
}
|
|
266
|
-
async function $e({ consistency: e, countPerPage: t, directParentFolderIdentifier: n, extraFields: r, getPermanentAssetsPaths: i, isSiteBuilder: a, limitedDocTypes: o, pageNumber: s, parentFolderIdentifier: c, searchTerm: l, securityByPassToken: u, sortOrder: d,
|
|
268
|
+
async function $e({ consistency: e, countPerPage: t, directParentFolderIdentifier: n, extraFields: r, getPermanentAssetsPaths: i, isSiteBuilder: a, limitedDocTypes: o, pageNumber: s, parentFolderIdentifier: c, searchTerm: l, securityByPassToken: u, sortOrder: d, throwOnError: f, token: p }) {
|
|
267
269
|
if (!n && !c) return {
|
|
268
270
|
facets: [],
|
|
269
271
|
items: [],
|
|
270
272
|
totalCount: 0
|
|
271
273
|
};
|
|
272
|
-
let
|
|
274
|
+
let m = (r?.filter((e) => e && typeof e == "string") ?? []).map((e) => e.replace("%20", " ")), h = {
|
|
273
275
|
directParentFolderIdentifier: n,
|
|
274
276
|
parentFolderIdentifier: c,
|
|
275
277
|
...l ? { text: l } : {},
|
|
276
278
|
...o && o.length > 0 ? { docType: o } : {}
|
|
277
|
-
},
|
|
279
|
+
}, g = await Je({
|
|
278
280
|
consistency: e,
|
|
279
281
|
countPerPage: t,
|
|
280
282
|
fields: [
|
|
281
|
-
...
|
|
283
|
+
...m,
|
|
282
284
|
Ne,
|
|
283
285
|
R,
|
|
284
286
|
F,
|
|
@@ -291,14 +293,15 @@ async function $e({ consistency: e, countPerPage: t, directParentFolderIdentifie
|
|
|
291
293
|
getPermanentAssetsPaths: i,
|
|
292
294
|
isSiteBuilder: a,
|
|
293
295
|
pageNumber: s,
|
|
294
|
-
query:
|
|
296
|
+
query: h,
|
|
295
297
|
securityByPassToken: u,
|
|
296
298
|
sort: d || void 0,
|
|
297
|
-
|
|
299
|
+
throwOnError: f,
|
|
300
|
+
token: p
|
|
298
301
|
});
|
|
299
302
|
return {
|
|
300
303
|
facets: [],
|
|
301
|
-
items:
|
|
304
|
+
items: g.items.map((e) => {
|
|
302
305
|
let t = U(e, L);
|
|
303
306
|
t && !t.startsWith(".") && (t = "." + t);
|
|
304
307
|
let n = U(e, B);
|
|
@@ -311,10 +314,10 @@ async function $e({ consistency: e, countPerPage: t, directParentFolderIdentifie
|
|
|
311
314
|
name: U(e, H),
|
|
312
315
|
recordId: n,
|
|
313
316
|
size: U(e, "CoreField.FileSize") || "0 MB",
|
|
314
|
-
...
|
|
317
|
+
...m.reduce((t, n) => Ke(t, e, n), {})
|
|
315
318
|
};
|
|
316
319
|
}),
|
|
317
|
-
totalCount:
|
|
320
|
+
totalCount: g.totalCount
|
|
318
321
|
};
|
|
319
322
|
}
|
|
320
323
|
async function et({ autoCropMode: e, cropHeight: t, cropWidth: n, imageUrl: r, useSession: i }) {
|
|
@@ -482,22 +485,22 @@ var ut = class {
|
|
|
482
485
|
let n = this.fetchedPages.size > 0;
|
|
483
486
|
n && t < this.pageSize || (this.pageSize = t, n && (this.requestEpoch += 1, this.fetchedPages.clear()));
|
|
484
487
|
}
|
|
485
|
-
async fetchImages({ end: e, extraFields: t = [], format: n, manualFormat: r = !0, start: i,
|
|
488
|
+
async fetchImages({ end: e, extraFields: t = [], format: n, manualFormat: r = !0, start: i, throwOnError: a = !1, transformations: o }) {
|
|
486
489
|
if (e < i || this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < i)) return this.data;
|
|
487
|
-
let
|
|
488
|
-
if (!this.folderId ||
|
|
489
|
-
let
|
|
490
|
-
c,
|
|
490
|
+
let s = this.requestEpoch, c = fe(this.host.ownerDocument.defaultView);
|
|
491
|
+
if (!this.folderId || s !== this.requestEpoch) return this.data;
|
|
492
|
+
let l = n ? `path_${n}` : void 0, u = `path_${W}`, d = `path_${G}`, f = c ? [u, d] : [...new Set([
|
|
491
493
|
l,
|
|
492
|
-
u
|
|
493
|
-
|
|
494
|
-
|
|
494
|
+
u,
|
|
495
|
+
d
|
|
496
|
+
].filter((e) => !!e))], p = Math.floor(i / this.pageSize) + 1, m = Math.floor(e / this.pageSize) + 1;
|
|
497
|
+
for (let e = p; e <= m; e++) {
|
|
495
498
|
if (this.fetchedPages.has(e)) continue;
|
|
496
499
|
let i = await $e({
|
|
497
500
|
consistency: this.consistency,
|
|
498
501
|
countPerPage: this.pageSize,
|
|
499
502
|
directParentFolderIdentifier: this.folderId,
|
|
500
|
-
extraFields: [...t, ...
|
|
503
|
+
extraFields: [...t, ...f],
|
|
501
504
|
getPermanentAssetsPaths: se(this.host.ownerDocument.defaultView),
|
|
502
505
|
isSiteBuilder: this.isSiteBuilder,
|
|
503
506
|
limitedDocTypes: [
|
|
@@ -510,9 +513,10 @@ var ut = class {
|
|
|
510
513
|
searchTerm: "",
|
|
511
514
|
securityByPassToken: this.securityByPassToken,
|
|
512
515
|
sortOrder: "",
|
|
516
|
+
throwOnError: a,
|
|
513
517
|
token: this.authToken
|
|
514
518
|
});
|
|
515
|
-
if (
|
|
519
|
+
if (s !== this.requestEpoch) return this.data;
|
|
516
520
|
if (this.fetchedPages.add(e), !this.totalCount && i.totalCount) {
|
|
517
521
|
let e = Math.min(this.maxEnd, i.totalCount);
|
|
518
522
|
this.totalCount = e, this.data = Array.from({ length: e }, () => ({
|
|
@@ -522,81 +526,84 @@ var ut = class {
|
|
|
522
526
|
src: ""
|
|
523
527
|
}));
|
|
524
528
|
}
|
|
525
|
-
let
|
|
529
|
+
let l = (e - 1) * this.pageSize;
|
|
526
530
|
for (let e = 0; e < i.items.length; e++) {
|
|
527
|
-
let
|
|
528
|
-
if (
|
|
529
|
-
let
|
|
531
|
+
let a = l + e;
|
|
532
|
+
if (a < this.data.length) {
|
|
533
|
+
let s = i.items[e], { maxHeight: l, maxWidth: u, src: d, srcset: f } = lt({
|
|
530
534
|
autoFormat: this.autoFormat,
|
|
531
535
|
buildSrcset: this.buildSrcset,
|
|
532
|
-
docType:
|
|
533
|
-
extension:
|
|
536
|
+
docType: s.docType,
|
|
537
|
+
extension: s.extension,
|
|
534
538
|
format: n,
|
|
535
|
-
item:
|
|
539
|
+
item: s,
|
|
536
540
|
manualFormat: r,
|
|
537
|
-
size:
|
|
538
|
-
useExpiringAssetUrls:
|
|
541
|
+
size: s.size,
|
|
542
|
+
useExpiringAssetUrls: c
|
|
539
543
|
}), p = d, m = f;
|
|
540
|
-
!
|
|
541
|
-
alt:
|
|
542
|
-
docType:
|
|
543
|
-
extension:
|
|
544
|
-
id:
|
|
544
|
+
!c && p && o && o.length > 0 && (p = ue(p, o), m = ""), this.data[a] = {
|
|
545
|
+
alt: s.name,
|
|
546
|
+
docType: s.docType,
|
|
547
|
+
extension: s.extension,
|
|
548
|
+
id: s.id,
|
|
545
549
|
maxHeight: l,
|
|
546
550
|
maxWidth: u,
|
|
547
|
-
name:
|
|
551
|
+
name: s.name,
|
|
548
552
|
src: p,
|
|
549
553
|
srcset: m,
|
|
550
|
-
...t.reduce((e, t) => (e[t] =
|
|
554
|
+
...t.reduce((e, t) => (e[t] = s[t] ?? "", e), {})
|
|
551
555
|
};
|
|
552
556
|
}
|
|
553
557
|
}
|
|
554
558
|
}
|
|
555
559
|
}
|
|
556
|
-
async fetchImagesInFolderBySlide({ activeSlide: e, extraFields: t = [], folderId: n, forceRefetch: r = !1, format: i, manualFormat: a = !0, minLimit: o = 5, noPlaceholders: s = !1,
|
|
560
|
+
async fetchImagesInFolderBySlide({ activeSlide: e, extraFields: t = [], folderId: n, forceRefetch: r = !1, format: i, manualFormat: a = !0, minLimit: o = 5, noPlaceholders: s = !1, throwOnError: c = !1, transformations: l }) {
|
|
557
561
|
(!this.folderId || this.folderId !== n) && (this.folderId = n, this.resetFolderState()), r && this.resetPageCache();
|
|
558
|
-
let
|
|
562
|
+
let u = Math.max(5, o), d = e, f = e + u, p = [...t];
|
|
559
563
|
await this.fetchImages({
|
|
560
|
-
end:
|
|
561
|
-
extraFields:
|
|
564
|
+
end: f,
|
|
565
|
+
extraFields: p.filter((e) => e !== ""),
|
|
562
566
|
format: i,
|
|
563
567
|
manualFormat: a,
|
|
564
|
-
start:
|
|
565
|
-
|
|
568
|
+
start: d,
|
|
569
|
+
throwOnError: c,
|
|
570
|
+
transformations: l
|
|
566
571
|
});
|
|
567
|
-
let
|
|
568
|
-
|
|
569
|
-
let
|
|
572
|
+
let m = e - u;
|
|
573
|
+
m < 0 && (m = this.totalCount === 0 ? 0 : Math.max(0, this.totalCount + m));
|
|
574
|
+
let h = m + u;
|
|
570
575
|
return await this.fetchImages({
|
|
571
|
-
end:
|
|
572
|
-
extraFields:
|
|
576
|
+
end: h,
|
|
577
|
+
extraFields: p.filter((e) => e !== ""),
|
|
573
578
|
format: i,
|
|
574
579
|
manualFormat: a,
|
|
575
|
-
start:
|
|
576
|
-
|
|
580
|
+
start: m,
|
|
581
|
+
throwOnError: c,
|
|
582
|
+
transformations: l
|
|
577
583
|
}), s ? this.data.filter((e) => e.id && !e.id.startsWith("temp-")) : this.data;
|
|
578
584
|
}
|
|
579
|
-
async fetchImagesByIDs({ extraFields: e = [], format: t, manualFormat: n = !0, recordIds: r,
|
|
585
|
+
async fetchImagesByIDs({ extraFields: e = [], format: t, manualFormat: n = !0, recordIds: r, throwOnError: i = !1, transformations: a }) {
|
|
580
586
|
if (r.length === 0) return [];
|
|
581
|
-
let
|
|
582
|
-
o,
|
|
587
|
+
let o = fe(this.host.ownerDocument.defaultView), s = t ? `path_${t}` : void 0, c = `path_${W}`, l = `path_${G}`, u = o ? [c, l] : [...new Set([
|
|
583
588
|
s,
|
|
584
|
-
c
|
|
585
|
-
|
|
589
|
+
c,
|
|
590
|
+
l
|
|
591
|
+
].filter((e) => !!e))], d = [L, ...o ? [] : [R]], f = [...e, F];
|
|
586
592
|
return (await Qe({
|
|
587
593
|
consistency: this.consistency,
|
|
588
594
|
extraFields: [
|
|
589
|
-
...
|
|
590
|
-
...
|
|
591
|
-
...
|
|
595
|
+
...f,
|
|
596
|
+
...u,
|
|
597
|
+
...d
|
|
592
598
|
].filter((e) => e !== ""),
|
|
593
599
|
getPermanentAssetsPaths: se(this.host.ownerDocument.defaultView),
|
|
594
600
|
isSiteBuilder: this.isSiteBuilder,
|
|
595
601
|
recordIds: r,
|
|
596
602
|
securityByPassToken: this.securityByPassToken,
|
|
603
|
+
throwOnError: i,
|
|
597
604
|
token: this.authToken
|
|
598
605
|
})).items.map((e) => {
|
|
599
|
-
let { maxHeight: r, maxWidth:
|
|
606
|
+
let { maxHeight: r, maxWidth: i, src: s, srcset: c } = lt({
|
|
600
607
|
autoFormat: this.autoFormat,
|
|
601
608
|
buildSrcset: this.buildSrcset,
|
|
602
609
|
docType: e[F],
|
|
@@ -605,19 +612,19 @@ var ut = class {
|
|
|
605
612
|
item: e,
|
|
606
613
|
manualFormat: n,
|
|
607
614
|
size: e[R],
|
|
608
|
-
useExpiringAssetUrls:
|
|
615
|
+
useExpiringAssetUrls: o
|
|
609
616
|
}), l = s, u = c;
|
|
610
|
-
return !
|
|
617
|
+
return !o && l && a && a.length > 0 && (l = ue(l, a), u = ""), {
|
|
611
618
|
alt: e.name,
|
|
612
619
|
docType: e[F],
|
|
613
620
|
extension: e["Document.FileExtension"] || "",
|
|
614
621
|
id: e.recordId,
|
|
615
622
|
maxHeight: r,
|
|
616
|
-
maxWidth:
|
|
623
|
+
maxWidth: i,
|
|
617
624
|
name: e.name,
|
|
618
625
|
src: l,
|
|
619
626
|
srcset: u,
|
|
620
|
-
...
|
|
627
|
+
...f.reduce((t, n) => (t[n] = e[n] ?? "", t), {})
|
|
621
628
|
};
|
|
622
629
|
});
|
|
623
630
|
}
|
|
@@ -633,8 +640,8 @@ var ut = class {
|
|
|
633
640
|
transformations: c
|
|
634
641
|
}), a ? this.data.filter((e) => e.id && !e.id.startsWith("temp-")) : this.data;
|
|
635
642
|
}
|
|
636
|
-
async *fetchImagesInFolderByChunk({ chunkSize: e = 10, end: t = 0, extraFields: n = [], folderId: r, forceRefetch: i = !1, format: a, manualFormat: o = !0, start: s = 0,
|
|
637
|
-
let
|
|
643
|
+
async *fetchImagesInFolderByChunk({ chunkSize: e = 10, end: t = 0, extraFields: n = [], folderId: r, forceRefetch: i = !1, format: a, manualFormat: o = !0, start: s = 0, throwOnError: c = !1, transformations: l }) {
|
|
644
|
+
let u = Math.max(1, e);
|
|
638
645
|
if ((!this.folderId || this.folderId !== r) && (this.folderId = r, this.resetFolderState()), i && this.resetPageCache(), t !== -1) {
|
|
639
646
|
await this.fetchImages({
|
|
640
647
|
end: t,
|
|
@@ -642,25 +649,28 @@ var ut = class {
|
|
|
642
649
|
format: a,
|
|
643
650
|
manualFormat: o,
|
|
644
651
|
start: s,
|
|
645
|
-
|
|
652
|
+
throwOnError: c,
|
|
653
|
+
transformations: l
|
|
646
654
|
}), yield this.data;
|
|
647
655
|
return;
|
|
648
656
|
}
|
|
649
|
-
let
|
|
657
|
+
let d = s, f = s + u;
|
|
650
658
|
if (await this.fetchImages({
|
|
651
|
-
end:
|
|
659
|
+
end: f,
|
|
652
660
|
extraFields: n,
|
|
653
661
|
format: a,
|
|
654
662
|
manualFormat: o,
|
|
655
|
-
start:
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
663
|
+
start: d,
|
|
664
|
+
throwOnError: c,
|
|
665
|
+
transformations: l
|
|
666
|
+
}), yield this.data, !(!this.totalCount || this.totalCount <= f)) for (; f < this.totalCount;) d = f, f = Math.min(f + u, this.totalCount), await this.fetchImages({
|
|
667
|
+
end: f,
|
|
659
668
|
extraFields: n,
|
|
660
669
|
format: a,
|
|
661
670
|
manualFormat: o,
|
|
662
|
-
start:
|
|
663
|
-
|
|
671
|
+
start: d,
|
|
672
|
+
throwOnError: c,
|
|
673
|
+
transformations: l
|
|
664
674
|
}), yield this.data;
|
|
665
675
|
}
|
|
666
676
|
hostConnected() {}
|
|
@@ -3,10 +3,10 @@ import { a as r, i, n as a, r as o } from "./cortex-element.DTrNUtdr.js";
|
|
|
3
3
|
import { t as s } from "./query.B1yi7t71.js";
|
|
4
4
|
import { t as c } from "./component.styles.0xM1ZmBs.js";
|
|
5
5
|
import { t as l } from "./custom-element.BEMYNDK1.js";
|
|
6
|
-
import { t as u } from "./i18n.
|
|
6
|
+
import { t as u } from "./i18n.D_iHIFdS.js";
|
|
7
7
|
import { t as d } from "./watch.Ub5r8btz.js";
|
|
8
8
|
import { t as f } from "./class-map.D8nsNOVJ.js";
|
|
9
|
-
import { t as p } from "./icon-button.
|
|
9
|
+
import { t as p } from "./icon-button.D6mTxvLN.js";
|
|
10
10
|
import { t as m } from "./when.BUskJLtZ.js";
|
|
11
11
|
import { n as h, t as g } from "./resizable-component.styles.v9pbLDG5.js";
|
|
12
12
|
import { a as _, i as v, n as y, u as b } from "./time.p1t0NCwj.js";
|
|
@@ -15,7 +15,7 @@ import { t as C } from "./typography.B0mkhqTB.js";
|
|
|
15
15
|
//#region ../../packages/atoms/src/components/audio/audio.styles.ts
|
|
16
16
|
var w = t`audio{display:none}:host{background-color:var(--background-color,var(--cx-color-neutral-0));border-radius:var(--border-radius,0px);border:var(--border,0px);box-sizing:border-box;color:var(--text-color,var(--cx-color-neutral));height:var(--height,auto);width:var(--width,100%);border-style:solid;display:block;position:relative}.audio{border-radius:inherit;gap:var(--cx-spacing-x-small,4px);height:100%;padding:var(--cx-spacing-small,8px);flex-direction:column;justify-content:center;display:flex;overflow:hidden}.audio--empty{height:var(--height,200px);min-height:var(--min-height,100%);padding:0}.audio--empty:before{background-color:var(--cx-color-neutral-1000);color:var(--cx-color-neutral-0);content:attr(data-empty-label);font-family:var(--cx-font-sans);font-size:clamp(var(--cx-font-size-x-small), 4cqw, var(--cx-font-size-large));font-weight:var(--cx-font-weight-semibold);text-align:center;height:100%;text-shadow:.05em .05em .1em var(--cx-color-neutral-1000);justify-content:center;align-items:center;width:100%;line-height:1;display:flex}.audio__play-button{--cx-input-border-width:2px;--cx-input-border-color:var(--text-color,var(--cx-color-neutral))}.audio__play-button::part(base){width:50px;height:50px;color:var(--text-color,var(--cx-color-neutral))!important}.audio__player{align-items:center;gap:var(--cx-spacing-small,8px);height:148px;display:flex}.audio__waveform{flex:1;min-width:0;overflow:hidden}.audio__waveform-svg{cursor:pointer;flex:1;width:100%;min-width:0;height:100%;display:block;overflow:hidden}.audio__waveform-wave{fill:var(--waves-color,var(--cx-color-primary))}.audio__waveform-played{fill:var(--played-color,color-mix(in srgb, var(--waves-color,var(--cx-color-primary)) 50%, black))}.audio__waveform-playhead{fill:var(--playhead-color,var(--cx-color-neutral-0));opacity:.9}.audio__footer{font-size:var(--cx-font-size-x-small,11px);color:var(--text-color,var(--cx-color-neutral));flex-direction:column;gap:0;padding-left:2px;display:flex}.audio__time{color:var(--text-color,var(--cx-color-neutral));font-variant-numeric:tabular-nums}.audio__filename{opacity:.75;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}`, T = class extends h {
|
|
17
17
|
constructor(...e) {
|
|
18
|
-
super(...e), this.localize = new u(this), this.srcLoadVersion = 0, this.allWaveformPeaks = [], this.extractWaveformPeaks = x, this.src = "", this.name = "", this.autoplay = !1, this.loop = !1, this.waveformSrc = "", this.inPoint = 0, this.outPoint = 0, this.isPlaying = !1, this.isLoaded = !1, this.isError = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.effectiveOutPoint = 0, this.windowDuration = 0, this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.audioSrc = "", this.pendingAutoplay = !1, this.resolvedName = "";
|
|
18
|
+
super(...e), this.localize = new u(this), this.srcLoadVersion = 0, this.allWaveformPeaks = [], this.extractWaveformPeaks = x, this.src = "", this.name = "", this.autoplay = !1, this.loop = !1, this.waveformSrc = "", this.inPoint = 0, this.outPoint = 0, this.startTime = 0, this.isStartTimeApplied = !1, this.isPlaying = !1, this.isLoaded = !1, this.isError = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.effectiveOutPoint = 0, this.windowDuration = 0, this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.audioSrc = "", this.pendingAutoplay = !1, this.resolvedName = "";
|
|
19
19
|
}
|
|
20
20
|
static #e = this.styles = [
|
|
21
21
|
c,
|
|
@@ -73,7 +73,7 @@ var w = t`audio{display:none}:host{background-color:var(--background-color,var(-
|
|
|
73
73
|
this.waveformViewBoxWidth = t, this.waveformPath = S(e, t, 200);
|
|
74
74
|
}
|
|
75
75
|
cleanUp() {
|
|
76
|
-
this.audioEl?.pause(), this.audioSrc = "", this.allWaveformPeaks = [], this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.style.setProperty("--played-fraction", "0"), this.isLoaded = !1, this.isPlaying = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.effectiveOutPoint = 0, this.windowDuration = 0, this.pendingAutoplay = !1;
|
|
76
|
+
this.audioEl?.pause(), this.audioSrc = "", this.allWaveformPeaks = [], this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.style.setProperty("--played-fraction", "0"), this.isLoaded = !1, this.isPlaying = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.effectiveOutPoint = 0, this.windowDuration = 0, this.pendingAutoplay = !1, this.isStartTimeApplied = !1;
|
|
77
77
|
}
|
|
78
78
|
async setupPngWaveform(e, t) {
|
|
79
79
|
this.cleanUp();
|
|
@@ -83,7 +83,7 @@ var w = t`audio{display:none}:host{background-color:var(--background-color,var(-
|
|
|
83
83
|
this.isError = !0, this.emit("cx-error");
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
this.allWaveformPeaks = n.peaks, this.recomputeWaveform(), e && (this.audioSrc = e), this.isLoaded = !0, this.emit("cx-load"), this.autoplay && e && (this.inPoint > 0 ? this.pendingAutoplay = !0 : (await this.updateComplete, this.audioEl?.play()));
|
|
86
|
+
this.allWaveformPeaks = n.peaks, this.recomputeWaveform(), e && (this.audioSrc = e), this.isLoaded = !0, this.emit("cx-load"), this.autoplay && e && (this.inPoint > 0 || this.startTime > 0 ? this.pendingAutoplay = !0 : (await this.updateComplete, this.audioEl?.play()));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
handleAudioPlay() {
|
|
@@ -105,7 +105,7 @@ var w = t`audio{display:none}:host{background-color:var(--background-color,var(-
|
|
|
105
105
|
handleAudioDurationChange() {
|
|
106
106
|
this.durationSeconds = this.audioEl?.duration || 0, this.recomputeWindow();
|
|
107
107
|
let e = this.clampedInPoint;
|
|
108
|
-
e > 0 && this.audioEl && this.audioEl.currentTime < e && this.seekToInPoint(), this.pendingAutoplay && (this.pendingAutoplay = !1, this.audioEl?.play());
|
|
108
|
+
e > 0 && this.audioEl && this.audioEl.currentTime < e && this.seekToInPoint(), this.durationSeconds && (this.isStartTimeApplied || (this.isStartTimeApplied = !0, this.startTime > e && this.startTime < this.effectiveOutPoint && this.seek(this.startTime)), this.pendingAutoplay && (this.pendingAutoplay = !1, this.audioEl?.play()));
|
|
109
109
|
}
|
|
110
110
|
handleAudioEnded() {
|
|
111
111
|
if (this.loop && this.clampedInPoint > 0) {
|
|
@@ -137,6 +137,9 @@ var w = t`audio{display:none}:host{background-color:var(--background-color,var(-
|
|
|
137
137
|
pause() {
|
|
138
138
|
this.audioEl?.pause();
|
|
139
139
|
}
|
|
140
|
+
seek(e) {
|
|
141
|
+
this.audioEl && this.durationSeconds && (this.audioEl.currentTime = Math.max(this.clampedInPoint, Math.min(e, this.effectiveOutPoint)));
|
|
142
|
+
}
|
|
140
143
|
togglePlay() {
|
|
141
144
|
this.isPlaying ? this.pause() : this.play();
|
|
142
145
|
}
|
|
@@ -185,7 +188,11 @@ a([s("audio"), o("design:type", Object)], T.prototype, "audioEl", void 0), a([r(
|
|
|
185
188
|
attribute: "out-point",
|
|
186
189
|
reflect: !0,
|
|
187
190
|
type: Number
|
|
188
|
-
}), o("design:type", Object)], T.prototype, "outPoint", void 0), a([
|
|
191
|
+
}), o("design:type", Object)], T.prototype, "outPoint", void 0), a([r({
|
|
192
|
+
attribute: "start-time",
|
|
193
|
+
reflect: !0,
|
|
194
|
+
type: Number
|
|
195
|
+
}), o("design:type", Object)], T.prototype, "startTime", void 0), a([i(), o("design:type", Object)], T.prototype, "isPlaying", void 0), a([i(), o("design:type", Object)], T.prototype, "isLoaded", void 0), a([i(), o("design:type", Object)], T.prototype, "isError", void 0), a([i(), o("design:type", Object)], T.prototype, "currentTimeSeconds", void 0), a([i(), o("design:type", Object)], T.prototype, "durationSeconds", void 0), a([i(), o("design:type", Object)], T.prototype, "effectiveOutPoint", void 0), a([i(), o("design:type", Object)], T.prototype, "windowDuration", void 0), a([i(), o("design:type", Object)], T.prototype, "waveformPath", void 0), a([i(), o("design:type", Object)], T.prototype, "waveformViewBoxWidth", void 0), a([i(), o("design:type", Object)], T.prototype, "playedFraction", void 0), a([i(), o("design:type", Object)], T.prototype, "audioSrc", void 0), a([i(), o("design:type", Object)], T.prototype, "pendingAutoplay", void 0), a([i(), o("design:type", Object)], T.prototype, "resolvedName", void 0), a([
|
|
189
196
|
d("waveformSrc", { waitUntilFirstUpdate: !0 }),
|
|
190
197
|
d("src"),
|
|
191
198
|
o("design:type", Function),
|
|
@@ -4,7 +4,7 @@ import { t as o } from "./component.styles.0xM1ZmBs.js";
|
|
|
4
4
|
import { t as s } from "./custom-element.BEMYNDK1.js";
|
|
5
5
|
import { t as c } from "./style-map.DPGQIxip.js";
|
|
6
6
|
import { t as l } from "./space.Dd8jezXK.js";
|
|
7
|
-
import { t as u } from "./color-picker.
|
|
7
|
+
import { t as u } from "./color-picker.BJqVkgCG.js";
|
|
8
8
|
//#region ../../packages/molecules/src/bicolor-picker/bicolor-picker.styles.ts
|
|
9
9
|
var d = t``, f = class extends a {
|
|
10
10
|
constructor(...e) {
|