@orangelogic/design-system 3.36.0 → 3.38.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-DnJlaA8S.js +1 -0
- package/library/chunks/{bicolor-picker.B4ZD7ay_.js → bicolor-picker.BFLMj79r.js} +1 -1
- package/library/chunks/{border-input-group.CMO_vZr7.js → border-input-group.DvjGBsxF.js} +1 -1
- package/library/chunks/{color-picker.DcOFcqNc.js → color-picker.CJL_5JjX.js} +2 -2
- package/library/chunks/{color-swatch-group.WK1lxWBb.js → color-swatch-group.NBdhiXFI.js} +15 -16
- package/library/chunks/{config-manager.TFxmyX9O.js → config-manager.DSN_CtAN.js} +10 -10
- package/library/chunks/{config-manager.utils.D89hYpCw.js → config-manager.utils.08u3_NXs.js} +12 -12
- package/library/chunks/{configs-controller.TDcTRz6j.js → configs-controller.qLdjsXb7.js} +98 -122
- package/library/chunks/{confirm-popover.Bhuho1eH.js → confirm-popover.Difhn86O.js} +1 -1
- package/library/chunks/{document-viewer.Stz7LwUo.js → document-viewer.c03KTUv2.js} +3 -3
- package/library/chunks/{dropdown.DAkv7EHP.js → dropdown.jv7u3Wm8.js} +1 -1
- package/library/chunks/{file-on-demand.DPD5c2WX.js → file-on-demand.7OPAGIG4.js} +2 -2
- package/library/chunks/{menu-item.d6CiFKnX.js → menu-item.BpILLN4i.js} +31 -31
- package/library/chunks/{menu.uZIhl1-k.js → menu.BPTg0Ebu.js} +1 -1
- package/library/chunks/{shadow-input-group.CNLTwiHw.js → shadow-input-group.ByN6pEvN.js} +1 -1
- package/library/chunks/{src.D7fZFJgH.js → src.BPWnRgJw.js} +6 -6
- package/library/chunks/{tab-group.LErcQpn1.js → tab-group.n9Wud7bJ.js} +3 -3
- package/library/components/atoms.js +7 -7
- package/library/components/bicolor-picker.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/color-picker.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/confirm-popover.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/dropdown.js +1 -1
- package/library/components/file-on-demand.js +1 -1
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/types.js +31 -20
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -2
- package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +3 -5
- package/library/packages/organisms/src/content-builder/blocks/search-box/search-box.d.ts +1 -1
- package/library/packages/organisms/src/downloader/data/core/WorkerProxy.d.ts +1 -0
- package/library/packages/organisms/src/downloader/data/core/worker/app/DownloadManager.d.ts +6 -0
- package/library/packages/organisms/src/downloader/downloader.d.ts +2 -0
- package/library/packages/types/src/menu-item.d.ts +10 -3
- package/library/react-web-component.d.ts +3 -3
- package/package.json +1 -1
- package/library/assets/validation.worker-BSuTSsWh.js +0 -1
|
@@ -61,12 +61,10 @@ export default class CxViewAndSort extends CortexElement {
|
|
|
61
61
|
private handleItemTooltipMouseEnter;
|
|
62
62
|
private handleItemTooltipMouseLeave;
|
|
63
63
|
private handleActionClick;
|
|
64
|
-
/**
|
|
65
|
-
* Whether an item is one option out of a set the user picks from, such as items per page, and
|
|
66
|
-
* so needs `aria-checked`. Options share a `group`; switches, buttons, submenu openers and
|
|
67
|
-
* settings actions are excluded.
|
|
68
|
-
*/
|
|
64
|
+
/** Whether an item is one choice in a picker (e.g. items-per-page), rendered as `type="selectable"`. */
|
|
69
65
|
private isSelectableOption;
|
|
66
|
+
/** Maps a data item to the `cx-menu-item` type that should render it. */
|
|
67
|
+
private resolveMenuItemType;
|
|
70
68
|
render(): TemplateResult<1>;
|
|
71
69
|
renderMenuSection(section: MenuSection): TemplateResult;
|
|
72
70
|
renderMenuItem(item: MenuItem, isHorizontal?: boolean, tooltip?: string): TemplateResult;
|
|
@@ -27,7 +27,7 @@ import { CSSResultGroup } from 'lit';
|
|
|
27
27
|
* @event cx-change - Emitted when an alteration to the control's value is committed by the user.
|
|
28
28
|
* @event {{ value: string }} cx-search - Emitted when user hits Enter key or clicks search button (if enabled).
|
|
29
29
|
*
|
|
30
|
-
* @cssproperty [--border-radius=
|
|
30
|
+
* @cssproperty [--border-radius=8px] - The field's corner radius.
|
|
31
31
|
* @cssproperty [--box-shadow=0px 0px 0px 0px light-dark(transparent, transparent)] - The field's shadow. Custom appearance only.
|
|
32
32
|
* @cssproperty [--icon-color=var(--cx-color-primary)] - The leading icon's color. Custom appearance only, and hidden in the content builder when a custom image icon is used.
|
|
33
33
|
* @cssproperty [--icon-size=var(--cx-font-size-3x-large)] - The leading icon's width; its height scales proportionally. Custom appearance only.
|
|
@@ -29,6 +29,7 @@ export declare class WorkerProxy implements IDownloadManager {
|
|
|
29
29
|
start(enableRocketMode: boolean, keepDownloading: boolean): Promise<void>;
|
|
30
30
|
restart(): Promise<void>;
|
|
31
31
|
handleCookiesRejected(): void;
|
|
32
|
+
handleCookiesAccepted(): Promise<void>;
|
|
32
33
|
registerDownload(transactionID: string): Promise<string | null>;
|
|
33
34
|
startDownload(transactionID: string, location: string): Promise<void>;
|
|
34
35
|
pauseFile(fileID: string): Promise<void>;
|
|
@@ -35,6 +35,11 @@ export type IDownloadManager = {
|
|
|
35
35
|
getChunkSize: () => Promise<number>;
|
|
36
36
|
getDefaultRootName: () => Promise<string | null>;
|
|
37
37
|
getFile: (id: string) => Promise<GetFileQuery.QueryResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Do necessary handling when the user has accepted cookies for downloader again
|
|
40
|
+
* after previously rejecting them
|
|
41
|
+
*/
|
|
42
|
+
handleCookiesAccepted: () => Promise<void>;
|
|
38
43
|
/**
|
|
39
44
|
* Do necessary handling when the user has rejected cookies for downloader
|
|
40
45
|
*/
|
|
@@ -81,6 +86,7 @@ export declare class DownloadManager implements IDownloadManager {
|
|
|
81
86
|
private databaseDiscarded;
|
|
82
87
|
constructor(context: DownloadContext, downloadDatabase: DownloadDatabase, downloadTransactionsRepo: IDownloadTransactionsRepository, downloadFilesRepo: IDownloadFilesRepository, downloadChunksRepo: IDownloadChunksRepository, downloadApiClient: IDownloadApiClient, storage: IStorage, eventHub: IEventHub, logger: ILogger, retrier: IRetrier, locker: ILocker);
|
|
83
88
|
handleCookiesRejected(): void;
|
|
89
|
+
handleCookiesAccepted(): Promise<void>;
|
|
84
90
|
private setupBackgroundJobs;
|
|
85
91
|
isRocketModeEnabled(): Promise<boolean>;
|
|
86
92
|
private internalToggleRocketMode;
|
|
@@ -145,6 +145,8 @@ export default class CxDownloader extends CortexElement {
|
|
|
145
145
|
setCheckDefaultRootNameInterval(): void;
|
|
146
146
|
checkCookiesRejectedInterval: NodeJS.Timer | undefined;
|
|
147
147
|
setCheckCookiesRejectedInterval(): void;
|
|
148
|
+
checkCookiesAcceptedInterval: NodeJS.Timer | undefined;
|
|
149
|
+
setCheckCookiesAcceptedInterval(): void;
|
|
148
150
|
cancelSingle: (id: string) => void;
|
|
149
151
|
onCancelAll: () => Promise<void>;
|
|
150
152
|
onClear: (id: string) => void;
|
|
@@ -17,17 +17,24 @@ export declare enum AriaCurrentValue {
|
|
|
17
17
|
Step = "step",
|
|
18
18
|
Time = "time"
|
|
19
19
|
}
|
|
20
|
-
/** The kind of menu item to render. `Checkbox` is required before `checked` has any effect. */
|
|
20
|
+
/** The kind of menu item to render. `Checkbox` or `Selectable` is required before `checked` has any effect. */
|
|
21
21
|
export declare enum MenuItemType {
|
|
22
22
|
Checkbox = "checkbox",
|
|
23
|
-
Normal = "normal"
|
|
23
|
+
Normal = "normal",
|
|
24
|
+
/** Same behavior and role as `Normal`; may also show the checkmark. Purely visual — the host owns `checked`. */
|
|
25
|
+
Selectable = "selectable"
|
|
24
26
|
}
|
|
27
|
+
/** `MenuItemType` values allowed to set `checked`. Only `Checkbox` also exposes `aria-checked`. */
|
|
28
|
+
export declare const CHECKED_ALLOWED_MENU_ITEM_TYPES: Set<MenuItemType>;
|
|
25
29
|
/**
|
|
26
30
|
* Interface for menu item data that can be shared between events and components
|
|
27
31
|
* This breaks the circular dependency between events and atoms packages
|
|
28
32
|
*/
|
|
29
33
|
export interface MenuItemData {
|
|
30
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Whether the menu item is checked. Only the `checkbox` and `selectable` types honor it;
|
|
36
|
+
* only `checkbox` also exposes `aria-checked`.
|
|
37
|
+
*/
|
|
31
38
|
checked?: boolean;
|
|
32
39
|
/** Whether the menu item is disabled */
|
|
33
40
|
disabled?: boolean;
|
|
@@ -549,11 +549,11 @@
|
|
|
549
549
|
interface CxMenuItemAttributes extends HTMLAttributes<CxMenuItem> {
|
|
550
550
|
|
|
551
551
|
/**
|
|
552
|
-
* The type of menu item to render. To use `checked`, this value must be set to `checkbox`.
|
|
552
|
+
* The type of menu item to render. To use `checked`, this value must be set to `checkbox` or `selectable`.
|
|
553
553
|
*/
|
|
554
|
-
type?: "checkbox" | "normal";
|
|
554
|
+
type?: "checkbox" | "normal" | "selectable";
|
|
555
555
|
/**
|
|
556
|
-
* Overrides the ARIA role derived from `type`.
|
|
556
|
+
* Overrides the ARIA role derived from `type`.
|
|
557
557
|
*/
|
|
558
558
|
itemRole?: "menuitemcheckbox" | "menuitem" | "menuitemradio";
|
|
559
559
|
/**
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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=[{groupName:`year`,token:`YYYY`},{groupName:`month`,token:`MM`},{groupName:`day`,token:`DD`},{groupName:`hour`,token:`HH`},{groupName:`minute`,token:`mm`},{groupName:`second`,token:`ss`}];function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function o(e){let t=``,n=0;for(;n<e.length;){let r=i.find(({token:t})=>e.startsWith(t,n));if(r){let e=r.token.length;t+=`(?<${r.groupName}>\\d{${e}})`,n+=e}else t+=a(e[n]),n+=1}return RegExp(`^${t}$`)}function s(e,t){let n=o(t).exec(e);if(!n?.groups)return!1;let r=Number(n.groups.year??`1970`),i=Number(n.groups.month??`1`),a=Number(n.groups.day??`1`),s=Number(n.groups.hour??`0`),c=Number(n.groups.minute??`0`),l=Number(n.groups.second??`0`);if(i<1||i>12||s>23||c>59||l>59)return!1;let u=new Date(r,i-1,a,s,c,l);return u.getFullYear()===r&&u.getMonth()===i-1&&u.getDate()===a}let c={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;if(n&&typeof n==`object`&&n.format!==void 0&&!s(String(t),n.format))return!1;let i=r(t);if(Number.isNaN(i))return!1;if(!n||typeof n!=`object`)return!0;if(n.starts!==void 0){let e=r(n.starts);if(Number.isNaN(e)||i<e)return!1}if(n.ends!==void 0){let e=r(n.ends);if(Number.isNaN(e)||i>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)}},l=1e3;function u(e){return e===``||e==null}function d(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{u(e)||t.set(e,(t.get(e)??0)+1)}),t}function f(e,t,n){let r=[];return t.forEach(t=>{let i;if(t.type===`unique`)i=u(e)||(n.get(e)??0)<=1;else{let n=c[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`)?d(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+=l){let a=Math.min(e+l,i),o=[];for(let n=e;n<a;n++)t.forEach((e,t)=>{let i=f(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}})})();
|