@tylertech/forge 2.10.1 → 2.12.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/custom-elements.json +221 -5
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.I33ZJKOX.js → chunk.2SAHWDGJ.js} +2 -2
- package/dist/esm/chunks/{chunk.I33ZJKOX.js.map → chunk.2SAHWDGJ.js.map} +0 -0
- package/dist/esm/chunks/chunk.2VFX652S.js +12 -0
- package/dist/esm/chunks/{chunk.4DS3GUQ5.js.map → chunk.2VFX652S.js.map} +0 -0
- package/dist/esm/chunks/{chunk.IBQVV4HR.js → chunk.4HI4HGZ6.js} +2 -2
- package/dist/esm/chunks/{chunk.IBQVV4HR.js.map → chunk.4HI4HGZ6.js.map} +0 -0
- package/dist/esm/chunks/{chunk.DGQAYNAF.js → chunk.4KBQ5AJJ.js} +2 -2
- package/dist/esm/chunks/{chunk.DGQAYNAF.js.map → chunk.4KBQ5AJJ.js.map} +0 -0
- package/dist/esm/chunks/{chunk.XURVHDKR.js → chunk.4WFU5CVF.js} +2 -2
- package/dist/esm/chunks/{chunk.XURVHDKR.js.map → chunk.4WFU5CVF.js.map} +0 -0
- package/dist/esm/chunks/chunk.5K5SIZRX.js +7 -0
- package/dist/esm/chunks/chunk.5K5SIZRX.js.map +7 -0
- package/dist/esm/chunks/{chunk.2YGKMENJ.js → chunk.5PQTSZ7G.js} +2 -2
- package/dist/esm/chunks/{chunk.2YGKMENJ.js.map → chunk.5PQTSZ7G.js.map} +0 -0
- package/dist/esm/chunks/{chunk.EM3OQRZP.js → chunk.77FVTUTL.js} +2 -2
- package/dist/esm/chunks/{chunk.EM3OQRZP.js.map → chunk.77FVTUTL.js.map} +0 -0
- package/dist/esm/chunks/chunk.7GTCDP5H.js +7 -0
- package/dist/esm/chunks/{chunk.YWQZURLM.js.map → chunk.7GTCDP5H.js.map} +2 -2
- package/dist/esm/chunks/{chunk.KLHXGSZU.js → chunk.7O7V3N4A.js} +2 -2
- package/dist/esm/chunks/{chunk.KLHXGSZU.js.map → chunk.7O7V3N4A.js.map} +0 -0
- package/dist/esm/chunks/{chunk.ESW45SN4.js → chunk.7PHGAX6P.js} +2 -2
- package/dist/esm/chunks/{chunk.ESW45SN4.js.map → chunk.7PHGAX6P.js.map} +0 -0
- package/dist/esm/chunks/{chunk.VEVOKTUX.js → chunk.7TKJAZTM.js} +2 -2
- package/dist/esm/chunks/{chunk.VEVOKTUX.js.map → chunk.7TKJAZTM.js.map} +0 -0
- package/dist/esm/chunks/{chunk.WAEWHBHE.js → chunk.APGFXXJ7.js} +2 -2
- package/dist/esm/chunks/{chunk.WAEWHBHE.js.map → chunk.APGFXXJ7.js.map} +0 -0
- package/dist/esm/chunks/{chunk.A6I4EIPW.js → chunk.BFNAQQCU.js} +2 -2
- package/dist/esm/chunks/{chunk.A6I4EIPW.js.map → chunk.BFNAQQCU.js.map} +0 -0
- package/dist/esm/chunks/{chunk.G5BCWBD5.js → chunk.BOENNFXE.js} +2 -2
- package/dist/esm/chunks/{chunk.G5BCWBD5.js.map → chunk.BOENNFXE.js.map} +0 -0
- package/dist/esm/chunks/chunk.CVJTQY2T.js +7 -0
- package/dist/esm/chunks/chunk.CVJTQY2T.js.map +7 -0
- package/dist/esm/chunks/{chunk.WYVYTAFS.js → chunk.DML4YNQF.js} +2 -2
- package/dist/esm/chunks/{chunk.WYVYTAFS.js.map → chunk.DML4YNQF.js.map} +0 -0
- package/dist/esm/chunks/{chunk.RS5NH2NG.js → chunk.FPV4XEUK.js} +2 -2
- package/dist/esm/chunks/{chunk.RS5NH2NG.js.map → chunk.FPV4XEUK.js.map} +0 -0
- package/dist/esm/chunks/{chunk.WZRXUTYC.js → chunk.G77PXLAU.js} +2 -2
- package/dist/esm/chunks/{chunk.WZRXUTYC.js.map → chunk.G77PXLAU.js.map} +0 -0
- package/dist/esm/chunks/{chunk.2A3CKLXJ.js → chunk.I2YRKTG7.js} +2 -2
- package/dist/esm/chunks/{chunk.2A3CKLXJ.js.map → chunk.I2YRKTG7.js.map} +0 -0
- package/dist/esm/chunks/{chunk.AFZB3MG5.js → chunk.IFZXG3LI.js} +2 -2
- package/dist/esm/chunks/{chunk.AFZB3MG5.js.map → chunk.IFZXG3LI.js.map} +0 -0
- package/dist/esm/chunks/{chunk.OHCHNL3V.js → chunk.JNOCXQVB.js} +2 -2
- package/dist/esm/chunks/{chunk.OHCHNL3V.js.map → chunk.JNOCXQVB.js.map} +2 -2
- package/dist/esm/chunks/chunk.K6LZM6DS.js +7 -0
- package/dist/esm/chunks/{chunk.SFFYXKJW.js.map → chunk.K6LZM6DS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.5SRA2RH3.js → chunk.KKF2ZZMD.js} +2 -2
- package/dist/esm/chunks/{chunk.5SRA2RH3.js.map → chunk.KKF2ZZMD.js.map} +0 -0
- package/dist/esm/chunks/chunk.KYCC3C3M.js +7 -0
- package/dist/esm/chunks/{chunk.AABG6MSC.js.map → chunk.KYCC3C3M.js.map} +2 -2
- package/dist/esm/chunks/{chunk.NEGJYSPB.js → chunk.LLHA3SQR.js} +2 -2
- package/dist/esm/chunks/{chunk.NEGJYSPB.js.map → chunk.LLHA3SQR.js.map} +0 -0
- package/dist/esm/chunks/chunk.MNBJMPJ6.js +7 -0
- package/dist/esm/chunks/chunk.MNBJMPJ6.js.map +7 -0
- package/dist/esm/chunks/{chunk.JXQZMASB.js → chunk.OAKTW64X.js} +2 -2
- package/dist/esm/chunks/{chunk.JXQZMASB.js.map → chunk.OAKTW64X.js.map} +0 -0
- package/dist/esm/chunks/{chunk.CSOY4C7A.js → chunk.OG2BI3UW.js} +2 -2
- package/dist/esm/chunks/{chunk.CSOY4C7A.js.map → chunk.OG2BI3UW.js.map} +2 -2
- package/dist/esm/chunks/{chunk.NJHQA266.js → chunk.OPTMTRWL.js} +2 -2
- package/dist/esm/chunks/{chunk.NJHQA266.js.map → chunk.OPTMTRWL.js.map} +0 -0
- package/dist/esm/chunks/{chunk.AHOQXJRN.js → chunk.P6B3UWJ5.js} +2 -2
- package/dist/esm/chunks/{chunk.AHOQXJRN.js.map → chunk.P6B3UWJ5.js.map} +0 -0
- package/dist/esm/chunks/{chunk.W7UTHKBF.js → chunk.Q6L7T6OJ.js} +2 -2
- package/dist/esm/chunks/{chunk.W7UTHKBF.js.map → chunk.Q6L7T6OJ.js.map} +0 -0
- package/dist/esm/chunks/{chunk.WGE5R5JK.js → chunk.QBDE7M3E.js} +2 -2
- package/dist/esm/chunks/{chunk.WGE5R5JK.js.map → chunk.QBDE7M3E.js.map} +0 -0
- package/dist/esm/chunks/{chunk.J6ERQLHJ.js → chunk.RPPBBBYG.js} +2 -2
- package/dist/esm/chunks/{chunk.J6ERQLHJ.js.map → chunk.RPPBBBYG.js.map} +2 -2
- package/dist/esm/chunks/{chunk.DJSOBAWA.js → chunk.SJSLC6XF.js} +2 -2
- package/dist/esm/chunks/{chunk.DJSOBAWA.js.map → chunk.SJSLC6XF.js.map} +0 -0
- package/dist/esm/chunks/{chunk.YFIDBZ7V.js → chunk.SLZFPWOH.js} +2 -2
- package/dist/esm/chunks/{chunk.YFIDBZ7V.js.map → chunk.SLZFPWOH.js.map} +0 -0
- package/dist/esm/chunks/{chunk.WKKNDQYZ.js → chunk.SVHVGMKS.js} +2 -2
- package/dist/esm/chunks/{chunk.WKKNDQYZ.js.map → chunk.SVHVGMKS.js.map} +0 -0
- package/dist/esm/chunks/{chunk.WMO47F6Z.js → chunk.TLHI6K2R.js} +2 -2
- package/dist/esm/chunks/{chunk.WMO47F6Z.js.map → chunk.TLHI6K2R.js.map} +0 -0
- package/dist/esm/chunks/{chunk.6BKOGBE6.js → chunk.TR64DV3G.js} +2 -2
- package/dist/esm/chunks/{chunk.6BKOGBE6.js.map → chunk.TR64DV3G.js.map} +0 -0
- package/dist/esm/chunks/chunk.UHVCXKB4.js +7 -0
- package/dist/esm/chunks/chunk.UHVCXKB4.js.map +7 -0
- package/dist/esm/chunks/{chunk.MTMZFAWU.js → chunk.V7P3QPNM.js} +2 -2
- package/dist/esm/chunks/{chunk.MTMZFAWU.js.map → chunk.V7P3QPNM.js.map} +0 -0
- package/dist/esm/chunks/{chunk.ZHCQBWAG.js → chunk.WALEAV54.js} +2 -2
- package/dist/esm/chunks/{chunk.ZHCQBWAG.js.map → chunk.WALEAV54.js.map} +0 -0
- package/dist/esm/chunks/{chunk.SNGELGOD.js → chunk.WV45FGTW.js} +2 -2
- package/dist/esm/chunks/{chunk.SNGELGOD.js.map → chunk.WV45FGTW.js.map} +0 -0
- package/dist/esm/chunks/chunk.Y6FFG7XO.js +7 -0
- package/dist/esm/chunks/chunk.Y6FFG7XO.js.map +7 -0
- package/dist/esm/chunks/{chunk.RZL6S3K3.js → chunk.Y6MPWPZU.js} +2 -2
- package/dist/esm/chunks/{chunk.RZL6S3K3.js.map → chunk.Y6MPWPZU.js.map} +0 -0
- package/dist/esm/chunks/{chunk.7TQYFMM4.js → chunk.YAJT3P6V.js} +2 -2
- package/dist/esm/chunks/{chunk.7TQYFMM4.js.map → chunk.YAJT3P6V.js.map} +0 -0
- package/dist/esm/chunks/{chunk.57XBS3DF.js → chunk.YSE5EMB3.js} +2 -2
- package/dist/esm/chunks/{chunk.57XBS3DF.js.map → chunk.YSE5EMB3.js.map} +0 -0
- package/dist/esm/chunks/{chunk.KZHMDZVS.js → chunk.YWKKZLZ2.js} +2 -2
- package/dist/esm/chunks/{chunk.KZHMDZVS.js.map → chunk.YWKKZLZ2.js.map} +0 -0
- package/dist/esm/chunks/{chunk.UNTTQM6V.js → chunk.YX5SWK3O.js} +2 -2
- package/dist/esm/chunks/{chunk.UNTTQM6V.js.map → chunk.YX5SWK3O.js.map} +0 -0
- package/dist/esm/chunks/{chunk.7WWP6WI6.js → chunk.Z5P6EA5L.js} +2 -2
- package/dist/esm/chunks/{chunk.7WWP6WI6.js.map → chunk.Z5P6EA5L.js.map} +0 -0
- package/dist/esm/chunks/chunk.ZFUVXYDL.js +7 -0
- package/dist/esm/chunks/chunk.ZFUVXYDL.js.map +7 -0
- package/dist/esm/chunks/{chunk.5HUDHTAK.js → chunk.ZHXPL2MS.js} +2 -2
- package/dist/esm/chunks/{chunk.5HUDHTAK.js.map → chunk.ZHXPL2MS.js.map} +0 -0
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/toolbar/index.js +1 -1
- package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
- package/esm/autocomplete/autocomplete-adapter.js +10 -0
- package/esm/autocomplete/autocomplete-constants.js +2 -1
- package/esm/autocomplete/autocomplete-foundation.d.ts +1 -0
- package/esm/autocomplete/autocomplete-foundation.js +9 -0
- package/esm/badge/badge.js +2 -2
- package/esm/button-toggle/button-toggle-group/button-toggle-group-constants.d.ts +1 -1
- package/esm/button-toggle/button-toggle-group/button-toggle-group.d.ts +4 -1
- package/esm/core/utils/utils.d.ts +6 -0
- package/esm/core/utils/utils.js +10 -0
- package/esm/expansion-panel/expansion-panel-foundation.js +2 -2
- package/esm/field/field-constants.d.ts +3 -0
- package/esm/field/field-constants.js +4 -0
- package/esm/field/field.js +3 -3
- package/esm/menu/menu-foundation.d.ts +1 -0
- package/esm/menu/menu-foundation.js +6 -3
- package/esm/select/core/base-select-adapter.d.ts +2 -0
- package/esm/select/core/base-select-adapter.js +17 -7
- package/esm/select/core/base-select-foundation.d.ts +1 -0
- package/esm/select/core/base-select-foundation.js +7 -0
- package/esm/split-view/split-view/split-view-adapter.d.ts +4 -0
- package/esm/split-view/split-view/split-view-adapter.js +7 -1
- package/esm/split-view/split-view/split-view-foundation.d.ts +4 -0
- package/esm/split-view/split-view/split-view-foundation.js +12 -0
- package/esm/split-view/split-view/split-view.d.ts +5 -0
- package/esm/split-view/split-view/split-view.js +5 -0
- package/esm/split-view/split-view-panel/split-view-panel-foundation.js +2 -2
- package/esm/split-view/split-view-panel/split-view-panel.d.ts +5 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +6 -1
- package/esm/toolbar/toolbar.js +1 -1
- package/package.json +1 -1
- package/styles/badge/_mixins.scss +5 -1
- package/styles/toolbar/_mixins.scss +2 -2
- package/styles/toolbar/toolbar.scss +6 -0
- package/dist/esm/chunks/chunk.4DS3GUQ5.js +0 -12
- package/dist/esm/chunks/chunk.5QK7XR2W.js +0 -7
- package/dist/esm/chunks/chunk.5QK7XR2W.js.map +0 -7
- package/dist/esm/chunks/chunk.7GT5LOI3.js +0 -7
- package/dist/esm/chunks/chunk.7GT5LOI3.js.map +0 -7
- package/dist/esm/chunks/chunk.AABG6MSC.js +0 -7
- package/dist/esm/chunks/chunk.GP7WDYWQ.js +0 -7
- package/dist/esm/chunks/chunk.GP7WDYWQ.js.map +0 -7
- package/dist/esm/chunks/chunk.R46EDURP.js +0 -7
- package/dist/esm/chunks/chunk.R46EDURP.js.map +0 -7
- package/dist/esm/chunks/chunk.SFFYXKJW.js +0 -7
- package/dist/esm/chunks/chunk.SHSR5RZ4.js +0 -7
- package/dist/esm/chunks/chunk.SHSR5RZ4.js.map +0 -7
- package/dist/esm/chunks/chunk.WSGJIPQJ.js +0 -7
- package/dist/esm/chunks/chunk.WSGJIPQJ.js.map +0 -7
- package/dist/esm/chunks/chunk.YWQZURLM.js +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/field/field-constants.ts"],
|
|
4
|
-
"sourcesContent": ["const attributes = {\n DENSITY: 'density',\n FLOAT_LABEL_TYPE: 'float-label-type',\n SHAPE: 'shape',\n INVALID: 'invalid',\n REQUIRED: 'required',\n HOST_LABEL_FLOATING: `forge-label-floating`\n};\n\nconst observedInputAttributes = ['disabled', 'readonly', 'value', 'placeholder'];\n\nconst classes = {\n DISABLED: 'forge-field--disabled',\n READONLY: 'forge-field--readonly',\n INPUT_FOCUSED: 'forge-field__input--focused',\n LEADING: 'forge-field--leading',\n TRAILING: 'forge-field--trailing',\n ADDON_END: 'forge-field--addon-end',\n ADDON_END_CONTAINER: 'forge-field__addon-end-container',\n FOCUSED: 'forge-field--focused',\n LABEL_FOCUSED: 'forge-field__label--focused',\n SHAPE_ROUNDED: 'forge-field--shape-rounded',\n INVALID: 'forge-field--invalid',\n REQUIRED: 'forge-field--required',\n DENSE: 'forge-field--dense',\n ROOMY: 'forge-field--roomy',\n LABEL: 'forge-field--label'\n};\n\nexport const FIELD_CONSTANTS = {\n attributes,\n observedInputAttributes,\n classes\n};\n\nexport type FieldDensityType = 'roomy' | 'default' | 'dense';\nexport type FieldFloatLabelType = 'always' | 'auto';\nexport type FieldShapeType = 'default' | 'rounded';\n"],
|
|
5
|
-
"mappings": "AAAA,GAAM,GAAa,CACjB,QAAS,UACT,iBAAkB,mBAClB,MAAO,QACP,QAAS,UACT,SAAU,WACV,oBAAqB,sBACvB,EAEM,EAA0B,CAAC,WAAY,WAAY,QAAS,aAAa,EAEzE,EAAU,CACd,SAAU,wBACV,SAAU,wBACV,cAAe,8BACf,QAAS,uBACT,SAAU,wBACV,UAAW,yBACX,oBAAqB,mCACrB,QAAS,uBACT,cAAe,8BACf,cAAe,6BACf,QAAS,uBACT,SAAU,wBACV,MAAO,qBACP,MAAO,qBACP,MAAO,oBACT,EAEa,EAAkB,CAC7B,aACA,0BACA,SACF",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as k}from"./chunk.XURVHDKR.js";import{e as B,h as H,j as F}from"./chunk.WGE5R5JK.js";import{c as x}from"./chunk.D3DLVPPE.js";import{a as v,b as N}from"./chunk.7JTKKFL4.js";import{d as U}from"./chunk.K753A3KI.js";import{b as P}from"./chunk.XYBFFTXS.js";import{e as V}from"./chunk.DRFU6POI.js";import{d as w}from"./chunk.LZMYHIO2.js";import{d as A}from"./chunk.7TQYFMM4.js";import{a as T}from"./chunk.A23NSEWA.js";import{a as p}from"./chunk.B3IJU6XJ.js";import{a as D,b as m,d as y}from"./chunk.BSZ2LBJX.js";import{a as C,e as S}from"./chunk.HN4PXH3D.js";import{l as L}from"./chunk.R4NDFXVA.js";import{a as O,b as M,i as I,k as _}from"./chunk.G76HB2FK.js";import{a as u,b as g,f as a}from"./chunk.MCIQXNKY.js";var l=`${m}menu`,K={POPUP:"forge-menu__popup",MENU:"mdc-menu"},R={TOGGLE:`.${m}menu__toggle, [${l}-toggle], button, [type=button]`,MENU_LIST:"forge-list"},G={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},$={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},z={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:K,selectors:R,attributes:G,events:$,numbers:z};var c=class extends T{constructor(e){super(e);this._childMenus=new Map}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){!this._targetElement||(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new H(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){!this._targetElement||(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let s=this._getListItems()[e].parentElement;s&&s.tagName.toLowerCase()===i.elementName&&(t===void 0?s.open=!s.open:s.open=t)}createChildMenu(e,t,n,o,s){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,b=>{b.stopPropagation(),s(g(u({},b.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${v.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(v.elementName);return t?Array.from(t.querySelectorAll(N.elementName)):[]}};var h=class extends F{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._dense=!1;this._iconClass=y;this._persistSelection=!1;this._mode="click";this._identifier=O(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}_applyMode(){!this._adapter.hasTargetElement()||(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){!this._adapter.hasTargetElement()||(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("blur",this._blurListener))}_destroyInteractionListeners(){!this._adapter.hasTargetElement()||(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return B(this._options,1)?this._options.reduce((e,t)=>e.concat(t.options),[]):this._options}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){if(e.code==="Escape"){e.preventDefault(),this._adapter.closeOtherChildMenus(),this._closeDropdown();return}this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Tab":this._open&&this._selectActiveOption();break;case"Escape":this._open&&(e.preventDefault(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown();break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(!this._open)return;e.stopImmediatePropagation(),e.preventDefault(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown(),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),s=this._nonDividerOptions[o];if(s&&s.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu(){this._open=!0;let e=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;e=this._options}this._persistSelection||e.forEach(s=>s.selected=!1),this._flatOptions.filter(s=>s.icon).forEach(s=>s.leadingIcon=s.icon);let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,activeStartIndex:this._mode==="cascade"?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:s=>this._createCascadingElement(s)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,s=>{this._onActiveOptionChanged(s.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||e.forEach(t=>t.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown(){this._openMenu()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}get open(){return this._open}set open(e){e=Boolean(e),this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>u({},t)),this._open&&(this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>u({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var q="<template><slot></slot></template>",W=":host{display:inline-block}:host([hidden]){display:none}",r=class extends k{constructor(){super();A.define(w),this._foundation=new h(new c(this)),S(this,q,W)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.children.length?this._foundation.initialize():L(this).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=M(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}};a([p()],r.prototype,"open",2),a([p()],r.prototype,"options",2),a([p()],r.prototype,"selectedIndex",2),a([p()],r.prototype,"selectedValue",2),a([p()],r.prototype,"placement",2),a([p()],r.prototype,"dense",2),a([p()],r.prototype,"iconClass",2),a([p()],r.prototype,"persistSelection",2),a([p()],r.prototype,"mode",2),a([p()],r.prototype,"popupOffset",2),a([p()],r.prototype,"optionBuilder",2),a([p({set:!1})],r.prototype,"popupElement",2),r=a([D({name:i.elementName,dependencies:[V,x,U,P]})],r);function Ye(){C(r)}export{i as a,c as b,h as c,r as d,Ye as e};
|
|
7
|
-
//# sourceMappingURL=chunk.SFFYXKJW.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as E,u as i,w as A}from"./chunk.YWQZURLM.js";import{a as T}from"./chunk.A23NSEWA.js";import{a as c}from"./chunk.B3IJU6XJ.js";import{a as I}from"./chunk.BSZ2LBJX.js";import{a as k}from"./chunk.3E5QKMHL.js";import{a as w,e as C,g as y}from"./chunk.HN4PXH3D.js";import{k as b,l as _,p as S}from"./chunk.G76HB2FK.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(e,t,s){var a,n;r._targets.has(e)&&((a=r._observer)===null||a===void 0||a.unobserve(e)),r._targets.set(e,t),r._countTargets(),(n=r._observer)===null||n===void 0||n.observe(e,s)}static unobserve(e){var t;r._targets.delete(e),(t=r._observer)===null||t===void 0||t.unobserve(e),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(e=>{var t;(t=r._targets.get(e.target))===null||t===void 0||t(e)})};var h=class extends T{constructor(t){super(t);this._root=y(t,i.selectors.ROOT)}registerSlotListener(t){this._root.addEventListener("slotchange",t)}observeResize(t){r.observe(this._root,t)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let t=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(t)}refitSlottedPanels(t){let s=t==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),n=a.map(p=>{var u;let l=(u=p.shadowRoot)==null?void 0:u.querySelector(E.selectors.ROOT),m=t==="horizontal"?l==null?void 0:l.clientWidth:l==null?void 0:l.clientHeight;return m!=null?m:0}).reduce((p,l)=>p+l,0);if(n<=s)return;let g=n-s;a.reverse().forEach(p=>{if(g<=0)return;let l=p.getContentSize(),m=p.getCollapsibleSize(),u=Math.min(g,m),P=l-u;p.setContentSize(P),g-=u})}};var v=class{constructor(e){this._adapter=e;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=t=>this._onSlotChange(t),this._resizeObserverCallback=S(t=>this._onResize(t),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(e){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onResize(e){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let e=this._adapter.getSlottedPanels();e.length<2||e.some(t=>t.resizable!=="off")||e.slice(1).forEach(t=>t.resizable="start")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(e){this._allowClose!==e&&(this._allowClose=e,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose!==e&&(this._autoClose=e,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(e){this._autoCloseThreshold!==e&&(this._autoCloseThreshold=e,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(e){let t=this._adapter.getSlottedPanels(),s=e.resizable==="start"?1:-1,a=e.resizable==="start"?1:3;t.forEach(n=>{(n===e||a===2)&&(a+=s),n.style.setProperty(i.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(t=>{t.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(e){this._adapter.getSlottedPanels().forEach(s=>{s.update(e)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var z='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',O='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',o=class extends k{constructor(){super();C(this,z,O),this._foundation=new v(new h(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,s,a){switch(t){case i.attributes.ORIENTATION:this.orientation=a;break;case i.attributes.DISABLED:this.disabled=b(a);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(a);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(a);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=_(a);break}}layerSlottedPanels(t){this._foundation.layerSlottedPanels(t)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(t){this._foundation.update(t)}refit(){this._foundation.refitSlottedPanels()}};d([c()],o.prototype,"orientation",2),d([c()],o.prototype,"disabled",2),d([c()],o.prototype,"allowClose",2),d([c()],o.prototype,"autoClose",2),d([c()],o.prototype,"autoCloseThreshold",2),o=d([I({name:i.elementName,dependencies:[A]})],o);function de(){w(o)}export{h as a,v as b,o as c,de as d};
|
|
7
|
-
//# sourceMappingURL=chunk.SHSR5RZ4.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../node_modules/@tylertech/forge-core/esm/resize/resize-observer.js", "../../src/split-view/split-view/split-view-adapter.ts", "../../src/split-view/split-view/split-view-foundation.ts", "../../src/split-view/split-view/split-view.ts", "../../src/split-view/split-view/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Provides a set of methods for observing and responding to resizing of elements.\n */\nexport class ForgeResizeObserver {\n /**\n * Initiates the observing of a specified `Element`. Calling with an already observed `Element`\n * overwrites the exisiting observation. It is expected that the consumer will eventually\n * {@link unobserve} the `Element` to avoid memory leaks.\n *\n * @param target An `Element` reference.\n * @param callback A function that accepts a `ResizeObserverEntry` for the `Element`.\n * @param options An options object allowing you to set options for the observation.\n */\n static observe(target, callback, options) {\n var _a, _b;\n if (ForgeResizeObserver._targets.has(target)) {\n (_a = ForgeResizeObserver._observer) === null || _a === void 0 ? void 0 : _a.unobserve(target);\n }\n ForgeResizeObserver._targets.set(target, callback);\n ForgeResizeObserver._countTargets();\n (_b = ForgeResizeObserver._observer) === null || _b === void 0 ? void 0 : _b.observe(target, options);\n }\n /**\n * Ends the observing of a specified `Element`.\n *\n * @param target An `Element` reference.\n */\n static unobserve(target) {\n var _a;\n ForgeResizeObserver._targets.delete(target);\n (_a = ForgeResizeObserver._observer) === null || _a === void 0 ? void 0 : _a.unobserve(target);\n ForgeResizeObserver._countTargets();\n }\n /**\n * Creates or destroys the `ResizeObserver` based on whether targets exist.\n */\n static _countTargets() {\n if (ForgeResizeObserver._observer) {\n // If there are no targets destroy the observer\n if (ForgeResizeObserver._targets.size < 1) {\n ForgeResizeObserver._observer = undefined;\n }\n }\n else {\n // If there are targets create the observer\n if (ForgeResizeObserver._targets.size) {\n ForgeResizeObserver._observer = new ResizeObserver(ForgeResizeObserver._handleResize);\n }\n }\n }\n}\nForgeResizeObserver._targets = new Map();\n/**\n * Runs the callback function of targets when they are resized.\n *\n * @param entries An array of `ResizeObserverEntry`s.\n */\nForgeResizeObserver._handleResize = entries => {\n entries.forEach(entry => {\n var _a;\n (_a = ForgeResizeObserver._targets.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n });\n};\n", "import { ForgeResizeObserver, getShadowElement } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { ISplitViewPanelComponent, SPLIT_VIEW_PANEL_CONSTANTS } from '../split-view-panel';\nimport { ISplitViewComponent } from './split-view';\nimport { SplitViewOrientation, SPLIT_VIEW_CONSTANTS } from './split-view-constants';\n\nexport interface ISplitViewAdapter extends IBaseAdapter {\n registerSlotListener(listener: (evt: Event) => void): void;\n observeResize(callback: (entry: ResizeObserverEntry) => void): void;\n unobserveResize(): void;\n getSlottedPanels(): ISplitViewPanelComponent[];\n refitSlottedPanels(orientation: SplitViewOrientation): void;\n}\n\nexport class SplitViewAdapter extends BaseAdapter<ISplitViewComponent> implements ISplitViewAdapter {\n private _root: HTMLElement;\n\n constructor(component: ISplitViewComponent) {\n super(component);\n this._root = getShadowElement(component, SPLIT_VIEW_CONSTANTS.selectors.ROOT);\n }\n\n public registerSlotListener(listener: (evt: Event) => void): void {\n this._root.addEventListener('slotchange', listener);\n }\n\n public observeResize(callback: (entry: ResizeObserverEntry) => void): void {\n ForgeResizeObserver.observe(this._root, callback);\n }\n \n public unobserveResize(): void {\n ForgeResizeObserver.unobserve(this._root);\n }\n \n /**\n * Gets all child panels.\n * @returns All child panels.\n */\n public getSlottedPanels(): ISplitViewPanelComponent[] {\n const nodeList = this._component.querySelectorAll<ISplitViewPanelComponent>(SPLIT_VIEW_CONSTANTS.selectors.PANEL);\n return Array.from(nodeList);\n }\n\n public refitSlottedPanels(orientation: SplitViewOrientation): void {\n // Check if the combined panel size is greater than the split view size along the relevant axis\n const size = orientation === 'horizontal' ? this._root.clientWidth : this._root.clientHeight;\n const panels = this.getSlottedPanels();\n const combinedPanelSize = panels.map(panel => {\n const panelRoot = panel.shadowRoot?.querySelector(SPLIT_VIEW_PANEL_CONSTANTS.selectors.ROOT);\n const panelSize = orientation === 'horizontal' ? panelRoot?.clientWidth : panelRoot?.clientHeight;\n return panelSize ?? 0;\n }).reduce((cur, acc) => cur + acc, 0);\n\n // Do nothing if all the panels fit\n if (combinedPanelSize <= size) {\n return;\n }\n\n // Get the size adjustment needed to fit\n let diff = combinedPanelSize - size;\n\n // Size down the panels as needed in reverse order, adjusting diff accordingly\n panels.reverse().forEach(panel => {\n if (diff <= 0) {\n return;\n }\n\n const panelSize = panel.getContentSize();\n const collapsibleSize = panel.getCollapsibleSize();\n const reduceBy = Math.min(diff, collapsibleSize);\n const newSize = panelSize - reduceBy;\n\n panel.setContentSize(newSize);\n\n diff -= reduceBy;\n });\n\n // If there's still overflow nothing else can be done\n }\n}\n", "import { ForgeResizeObserverCallback, ICustomElementFoundation, throttle } from '@tylertech/forge-core';\n\nimport { ISplitViewBase } from '../core/split-view-base';\nimport { ISplitViewPanelComponent, SplitViewAnimatingLayer } from '../split-view-panel';\nimport { ISplitViewAdapter } from './split-view-adapter';\nimport { ISplitViewUpdateConfig, SplitViewOrientation, SPLIT_VIEW_CONSTANTS } from './split-view-constants';\n\nexport interface ISplitViewFoundation extends ISplitViewBase, ICustomElementFoundation {\n orientation: SplitViewOrientation;\n layerSlottedPanels(target: ISplitViewPanelComponent): void;\n unlayerSlottedPanels(): void;\n update(config: ISplitViewUpdateConfig): void;\n refitSlottedPanels(): void;\n}\n\nexport class SplitViewFoundation implements ISplitViewFoundation {\n private _orientation: SplitViewOrientation = 'horizontal';\n private _disabled = false;\n private _allowClose = false;\n private _autoClose = false;\n private _autoCloseThreshold = 0;\n private _slotListener: (evt: Event) => void;\n private _resizeObserverCallback: ForgeResizeObserverCallback;\n private _isInitialized = false;\n\n constructor(private _adapter: ISplitViewAdapter) {\n this._slotListener = evt => this._onSlotChange(evt);\n this._resizeObserverCallback = throttle((entry: ResizeObserverEntry) => this._onResize(entry), SPLIT_VIEW_CONSTANTS.numbers.RESIZE_THROTTLE_THRESHOLD);\n }\n\n public initialize(): void {\n this._adapter.registerSlotListener(this._slotListener);\n this._adapter.observeResize(this._resizeObserverCallback);\n \n this._applyOrientation();\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._adapter.unobserveResize();\n }\n\n private _onSlotChange(evt: Event): void {\n this._layoutSlottedPanels();\n this.update({ accessibility: true, cursor: true, orientation: this._orientation });\n }\n\n private _onResize(entry: ResizeObserverEntry): void {\n this.update({ accessibility: true, cursor: true, size: true });\n }\n\n /**\n * Sets the resizable value of slotted panels with no resizable value set.\n */\n private _layoutSlottedPanels(): void {\n const panels = this._adapter.getSlottedPanels();\n\n // A single panel should have resizable set to off. Just leave it alone.\n if (panels.length < 2) {\n return;\n }\n\n // Don't change any panels if resizable is already set.\n if (panels.some(panel => panel.resizable !== 'off')) {\n return;\n }\n\n // All panels after the first have resizable set to start.\n panels.slice(1).forEach(panel => panel.resizable = 'start');\n }\n\n /**\n * Get/set whether panels are arranged horizontally or vertically.\n */\n public get orientation(): SplitViewOrientation {\n return this._orientation;\n }\n public set orientation(value: SplitViewOrientation) {\n if (this._orientation !== value) {\n this._orientation = value;\n this._applyOrientation();\n }\n }\n\n private _applyOrientation(): void {\n this._adapter.setHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.ORIENTATION, this._orientation);\n this.update({ orientation: this._orientation });\n\n if (this._isInitialized) {\n this._adapter.refitSlottedPanels(this._orientation);\n }\n this.update({ accessibility: true, cursor: true });\n }\n\n /**\n * Get/set whether interactions are disabled.\n */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._applyDisabled();\n }\n }\n\n private _applyDisabled(): void {\n this._adapter.toggleHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.DISABLED, this._disabled);\n this.update({ properties: { disabled: this._disabled } });\n }\n\n /**\n * Get/set whether closing the panel is disabled.\n */\n public get allowClose(): boolean {\n return this._allowClose;\n }\n public set allowClose(value: boolean) {\n if (this._allowClose !== value) {\n this._allowClose = value;\n this._applyAllowClose();\n }\n }\n\n private _applyAllowClose(): void {\n this._adapter.toggleHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.ALLOW_CLOSE, this._allowClose);\n this.update({ properties: { allowClose: this._allowClose } });\n }\n\n /**\n * Get/set whether the panel closes when a threshold size is reached.\n */\n public get autoClose(): boolean {\n return this._autoClose;\n }\n public set autoClose(value: boolean) {\n if (this._autoClose !== value) {\n this._autoClose = value;\n this._applyAutoClose();\n }\n }\n\n private _applyAutoClose(): void {\n this._adapter.toggleHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE, this._autoClose);\n this.update({ properties: { autoClose: this._autoClose } });\n }\n\n /**\n * Get/set the size at which panels auto close.\n */\n public get autoCloseThreshold(): number {\n return this._autoCloseThreshold;\n }\n public set autoCloseThreshold(value: number) {\n if (this._autoCloseThreshold !== value) {\n this._autoCloseThreshold = value;\n this._applyAutoCloseThreshold();\n }\n }\n\n private _applyAutoCloseThreshold(): void {\n this._adapter.setHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE_THRESHOLD, this._autoCloseThreshold.toString());\n this.update({ properties: { autoCloseThreshold: this._autoCloseThreshold } });\n }\n\n /**\n * Layers panels in a set order during an animation. Panels that the target is animating toward\n * stack above it and other layers stack under it.\n * @param target The animating panel.\n */\n public layerSlottedPanels(target: ISplitViewPanelComponent): void {\n const panels = this._adapter.getSlottedPanels();\n const increment = target.resizable === 'start' ? 1 : -1;\n let layer = target.resizable === 'start' ? SplitViewAnimatingLayer.Under : SplitViewAnimatingLayer.Above;\n\n panels.forEach(panel => {\n // Increment the layer if moving into or out of the target panel\n if (panel === target || layer === SplitViewAnimatingLayer.Active) {\n layer += increment;\n }\n panel.style.setProperty(SPLIT_VIEW_CONSTANTS.customCssProperties.ANIMATING_LAYER, layer.toString());\n });\n }\n\n /**\n * Removes layering after an animation.\n */\n public unlayerSlottedPanels(): void {\n const panels = this._adapter.getSlottedPanels();\n panels.forEach(panel => {\n panel.style.removeProperty(SPLIT_VIEW_CONSTANTS.customCssProperties.ANIMATING_LAYER);\n });\n }\n\n /**\n * Updates the provided characteristics of each panel.\n * @param config An update configuration.\n */\n public update(config: ISplitViewUpdateConfig): void {\n const panels = this._adapter.getSlottedPanels();\n panels.forEach(panel => {\n panel.update(config);\n });\n }\n\n /**\n * Resizes panels within the split view to avoid overflow.\n */\n public refitSlottedPanels(): void {\n this._adapter.refitSlottedPanels(this._orientation);\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean, coerceNumber } from '@tylertech/forge-core';\n\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { SplitViewAdapter } from './split-view-adapter';\nimport { SplitViewFoundation } from './split-view-foundation';\nimport { ISplitViewUpdateConfig, SplitViewOrientation, SPLIT_VIEW_CONSTANTS } from './split-view-constants';\nimport { ISplitViewPanelComponent, SplitViewPanelComponent } from '../split-view-panel';\nimport { ISplitViewBase } from '../core/split-view-base';\n\nconst template = '<template><div class=\\\"forge-split-view\\\" id=\\\"root\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}';\n\nexport interface ISplitViewComponent extends ISplitViewBase, IBaseComponent {\n orientation: SplitViewOrientation;\n layerSlottedPanels(target: ISplitViewPanelComponent): void;\n unlayerSlottedPanels(): void;\n update(config: ISplitViewUpdateConfig): void;\n refit(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-split-view': ISplitViewComponent;\n }\n}\n\n@CustomElement({\n name: SPLIT_VIEW_CONSTANTS.elementName,\n dependencies: [SplitViewPanelComponent]\n})\nexport class SplitViewComponent extends BaseComponent implements ISplitViewComponent {\n public static get observedAttributes(): string[] {\n return [\n SPLIT_VIEW_CONSTANTS.attributes.ORIENTATION,\n SPLIT_VIEW_CONSTANTS.attributes.DISABLED,\n SPLIT_VIEW_CONSTANTS.attributes.ALLOW_CLOSE,\n SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE,\n SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE_THRESHOLD\n ];\n }\n\n private _foundation: SplitViewFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new SplitViewFoundation(new SplitViewAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case SPLIT_VIEW_CONSTANTS.attributes.ORIENTATION:\n this.orientation = newValue as SplitViewOrientation;\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.ALLOW_CLOSE:\n this.allowClose = coerceBoolean(newValue);\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE:\n this.autoClose = coerceBoolean(newValue);\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE_THRESHOLD:\n this.autoCloseThreshold = coerceNumber(newValue);\n break;\n }\n }\n\n /**\n * Whether child split view panels are laid out and resize horizontally or vertically.\n */\n @FoundationProperty()\n public orientation: SplitViewOrientation;\n\n /**\n * Whether child split view panels have resize interactions disabled or enabled.\n */\n @FoundationProperty()\n public disabled: boolean;\n\n /**\n * Whether child split view panels can be closed via keyboard interaction.\n */\n @FoundationProperty()\n public allowClose: boolean;\n\n /**\n * Whether child split view panels automatically close when they reach a size of 0.\n */\n @FoundationProperty()\n public autoClose: boolean;\n\n /**\n * The size at which panels auto close.\n */\n @FoundationProperty()\n public autoCloseThreshold: number;\n\n /**\n * Arranges split view panels to avoid overlapping during animations.\n * @param target The originating split view panel component.\n */\n public layerSlottedPanels(target: ISplitViewPanelComponent): void {\n this._foundation.layerSlottedPanels(target);\n }\n\n /**\n * Removes presentation data set during an animation.\n */\n public unlayerSlottedPanels(): void {\n this._foundation.unlayerSlottedPanels();\n }\n\n /**\n * Updates the provided characteristics of each slotted panel.\n * @param config An update configuration.\n */\n public update(config: ISplitViewUpdateConfig): void {\n this._foundation.update(config);\n }\n\n /**\n * Resizes panels within the split view to avoid overflow.\n */\n public refit(): void {\n this._foundation.refitSlottedPanels();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SplitViewComponent } from './split-view';\n\nexport * from './split-view-adapter';\nexport * from './split-view-constants';\nexport * from './split-view-foundation';\nexport * from './split-view';\n\nexport function defineSplitViewComponent(): void {\n defineCustomElement(SplitViewComponent);\n}\n"],
|
|
5
|
-
"mappings": "0WAGO,GAAM,GAAN,KAA0B,CAU7B,MAAO,SAAQ,EAAQ,EAAU,EAAS,CACtC,GAAI,GAAI,EACR,AAAI,EAAoB,SAAS,IAAI,CAAM,GACtC,IAAK,EAAoB,aAAe,MAAQ,IAAO,QAAkB,EAAG,UAAU,CAAM,GAEjG,EAAo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ACxC,CAAC,GACY,GCrBN,aAA0C,CAC/C,EAAoB,CAAkB,CACxC",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as f}from"./chunk.B5ABD4CZ.js";import{b as o}from"./chunk.IGMTMR3D.js";import{a as B}from"./chunk.XURVHDKR.js";import{h as V,i as k}from"./chunk.WGE5R5JK.js";import{a as G}from"./chunk.DRFU6POI.js";import{a as x}from"./chunk.A23NSEWA.js";import{a as d}from"./chunk.B3IJU6XJ.js";import{i as C}from"./chunk.R4NDFXVA.js";import{a as A,b as c,j as L,k as T,n as y}from"./chunk.G76HB2FK.js";import{a as O,f as a}from"./chunk.MCIQXNKY.js";var F={VALUE:"value",MULTIPLE:"multiple",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",SYNC_POPUP_WIDTH:"sync-popup-width"},M=O({},F),W={CHANGE:"change"},m={attributes:M,events:W};var N=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(N||{});function D(l,b){let e=l.some(i=>w(i)),t=l.some(i=>R(i));return e&&b===1||t&&b===0}function w(l){return c(l)&&L(l)&&l.hasOwnProperty("options")&&l.hasOwnProperty("text")}function R(l){return c(l)&&L(l)&&l.hasOwnProperty("label")&&l.hasOwnProperty("value")}var P=class extends k{constructor(e){super();this._adapter=e;this._options=[];this._value=[];this._multiple=!1;this._open=!1;this._selectedValues=[];this._selectedLabels=[];this._selectedIndexes=[];this._filterString="";this._focusListener=t=>this._onFocus(t),this._blurListener=t=>this._onBlur(t),this._clickListener=t=>this._onClick(t),this._keydownListener=t=>this._onKeydown(t),this._optionsChangedListener=t=>this._onOptionsChanged(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dismissListener=()=>this._onDismiss(),this._identifier=A()}_onFocus(e){}initialize(){this._optionListenerDestructor=this._adapter.setOptionsListener(this._optionsChangedListener),this._initializeValue()}initializeTarget(){this._adapter.initializeAccessibility(),this._adapter.setMultiple(this._multiple),this._adapter.addClickListener(this._clickListener),this._adapter.addTargetListener("blur",this._blurListener),this._adapter.addTargetListener("focus",this._focusListener),this._adapter.addTargetListener("keydown",this._keydownListener)}disconnect(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("focus",this._focusListener),this._adapter.removeTargetListener("keydown",this._keydownListener),this._open&&this._closeDropdown(),this._optionListenerDestructor&&this._optionListenerDestructor()}appendOptions(e){this._adapter.setOptions(e,!1),this._open&&this._adapter.appendDropdownOptions(e)}selectAll(){this._multiple&&(this.value=this._flatOptions.map(e=>e.value))}deselectAll(){this._multiple&&(this.value=[])}get _flatOptions(){return D(this._options,1)?[].concat.apply([],this._options.map(e=>e.options)):this._options}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}_initializeValue(){let e=this._options.length&&this._options||this._adapter.getOptions();c(this._value)&&e.length&&this._applyValue(this._value)}_onClick(e){e.button===0&&(this._open?this._closeDropdown():this._openDropdown())}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._open&&this._closeDropdown()}_openDropdown(){if(this._options=this._adapter.getOptions(),!this._flatOptions.length)return;this._open=!0;let e={options:this._options,multiple:this._multiple,selectedValues:[...this._selectedValues],id:this._identifier,optionBuilder:this._optionBuilder,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,popupClasses:this._popupClasses,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,closeCallback:()=>this._closeDropdown(),selectCallback:t=>{let i=this._flatOptions,s=i.find(r=>r.value===t);if(s){let r=i.indexOf(s);this._onSelect(s,r,!0)}}};this._adapter.open(e),this._adapter.setDismissListener(this._dismissListener)}_closeDropdown(){this._open=!1,this._adapter.close()}async _onSelect(e,t,i=!0){return new Promise(async s=>{if(this._valueChanging)return Promise.resolve(!1);let r=e?e.value:"",u=e?e.label:"",v=[...this._selectedValues],g=[...this._selectedLabels],I=[...this._selectedIndexes];if(this._multiple)if(this._selectedValues.includes(r)){let _=this._selectedValues.indexOf(r);this._selectedValues.splice(_,1),this._selectedLabels.splice(_,1),this._selectedIndexes.splice(_,1)}else this._selectedValues.push(r),this._selectedLabels.push(u),this._selectedIndexes.push(t);else c(r)?(this._selectedValues[0]=r,this._selectedLabels[0]=u,this._selectedIndexes[0]=t):(this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]);let S=()=>{this._selectedValues=[...v],this._selectedLabels=[...g],this._selectedIndexes=[...I]},n=()=>{if(this._value=[...this._selectedValues],this._multiple){let _=this._selectedIndexes.includes(t);this._adapter.toggleOptionMultiple(t,_)}this._applySelection()},h=this.multiple?[...this._selectedValues]:this._selectedValues[0];if(this._open&&i&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"){this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,h));let _=await this._valueChanging;if(this._valueChanging=void 0,!_)return S(),s(!1)}let E=!this._adapter.emitHostEvent(m.events.CHANGE,h,!0,!0);E?S():n(),s(!E)})}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._onSelect(this._nonDividerOptions[e],e)}_reset(){this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]}_applyValue(e){this._selectedValues=[],this._selectedLabels=[],this._options=this._adapter.getOptions(),Array.isArray(e)||(e=[e]),this._value=[];for(let t of e){this._value.includes(t)||this._value.push(t);let i=this._flatOptions.find(s=>y(s.value,t));i&&(this._selectedValues.push(i.value),this._selectedLabels.push(i.label))}this._selectedIndexes=this._selectedValues.map(t=>this._flatOptions.findIndex(i=>i.value===t)),this._adapter.patchSelectedValues(this._selectedValues)}_onDismiss(){this._closeDropdown()}_getSelectedText(){if(typeof this._selectedTextBuilder=="function"){let e=this._flatOptions.filter(t=>this._selectedValues.includes(t.value));return this._selectedTextBuilder(e)}return this._multiple?this._selectedLabels.length?`${this._selectedLabels.length} ${this._selectedLabels.length===1?"option":"options"} selected`:"":this._selectedLabels.filter(e=>e&&e.length).join(" ").trim()}_onKeydown(e){let t=e.key==="Escape"||e.keyCode===27,i=e.key==="Enter"||e.keyCode===13,s=e.key==="Space"||e.keyCode===32,r=e.key==="ArrowDown"||e.keyCode===40,u=e.key==="ArrowUp"||e.keyCode===38,v=e.keyCode>=48&&e.keyCode<=90,g=e.key==="Home"||e.keyCode===36,I=e.key==="End"||e.keyCode===35;if(e.key==="Tab"&&this._open&&!this._multiple){this._selectActiveOption();return}if(!v&&this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterString="",this._filterTimeout=void 0),t&&(e.preventDefault(),this._open)){this._closeDropdown();return}if(s)e.preventDefault(),this._open?this._closeDropdown():this._openDropdown();else if(i)this._open&&(e.stopPropagation(),e.preventDefault(),this._options=this._adapter.getOptions(),this._selectActiveOption());else if(u||r){if(e.preventDefault(),this._multiple&&!this._open){this._openDropdown(),this._adapter.activateFirstOption();return}if(this._flatOptions.length===0)return;let n=0;this._open?(n=this._adapter.getActiveOptionIndex(),n===-1&&(n=this._getFirstSelectedOptionIndex())):n=this._getFirstSelectedOptionIndex(),u?n=this._getPreviousHighlightableOptionIndex(n,this._nonDividerOptions):n=this._getNextHighlightableOptionIndex(n,this._nonDividerOptions),this._open?this._adapter.highlightActiveOption(n):this._onSelect(this._nonDividerOptions[n],n)}else if(g)this._open&&(e.preventDefault(),this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(n=>!n.disabled)));else if(I){if(this._open){e.preventDefault();let n=this._nonDividerOptions;for(let h=n.length-1;h>=0;h--)if(!n[h].disabled){this._adapter.highlightActiveOption(h);break}}}else v&&this._filter(e.key)}_getFirstSelectedOptionIndex(){return this._nonDividerOptions.findIndex(e=>this._selectedValues.includes(e.value))}_getPreviousHighlightableOptionIndex(e,t){let i=e;return i<=0?i=t.length-1:i--,t[i].disabled?this._getPreviousHighlightableOptionIndex(i,t):i}_getNextHighlightableOptionIndex(e,t){let i=e;return i===t.length-1?i=0:i++,t[i].disabled?this._getNextHighlightableOptionIndex(i,t):i}_filter(e){this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterTimeout=void 0),this._filterString+=e,this._filterTimeout=window.setTimeout(()=>{this._filterString="",this._filterTimeout=void 0},300),this._options=this._adapter.getOptions();let t=this._flatOptions.find(i=>!i.disabled&&i.label.toLowerCase().startsWith(this._filterString));if(t){let i=this._flatOptions.indexOf(t);this._open?this._adapter.highlightActiveOption(i):this._multiple||this._onSelect(t,i,!1)}}_onOptionsChanged(e){this._options=e,this._applyValue(this._value)}_onActiveOptionChanged(e){this._adapter.updateActiveDescendant(e)}get value(){return this._multiple?[...this._selectedValues]:this._selectedValues[0]}set value(e){let t;Array.isArray(e)?t=[...e]:t=e,this._applyValue(t)}get selectedIndex(){return this._multiple?[...this._selectedIndexes]:this._selectedIndexes[0]}set selectedIndex(e){this._options=this._adapter.getOptions();let t;if(Array.isArray(e)?t=[...e]:t=[e],t.sort(),this.multiple)this.value=t.map(i=>this._flatOptions[i]).filter(i=>i).map(i=>i.value);else{let i=this._flatOptions[t[t.length-1]];if(!i)return;this.value=i.value}}get options(){return this._adapter.getOptions()}set options(e){let t;D(e,1)?t=e.map(i=>O({},i)):t=e.map(i=>O({},i)),this._options=t,this._adapter.setOptions(t),this._initializeValue(),this._open&&this._adapter.setDropdownOptions(t)}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._reset(),this._open&&this._closeDropdown(),this._adapter.setMultiple(this._multiple))}get open(){return this._open}set open(e){this._open!==e&&(e?this._openDropdown():this._closeDropdown())}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupClasses(){return this._popupClasses}set popupClasses(e){this._popupClasses=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}get popupElement(){return this._adapter.popupElement}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){this._beforeValueChange=e}};var p=class extends B{constructor(){super()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case m.attributes.MULTIPLE:this.multiple=T(i);break;case m.attributes.VALUE:this.value=i;break}}appendOptions(e){this._foundation.appendOptions(e)}selectAll(){this._foundation.selectAll()}deselectAll(){this._foundation.deselectAll()}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}};a([d()],p.prototype,"value",2),a([d()],p.prototype,"selectedIndex",2),a([d()],p.prototype,"options",2),a([d()],p.prototype,"multiple",2),a([d()],p.prototype,"open",2),a([d()],p.prototype,"optionBuilder",2),a([d()],p.prototype,"selectedTextBuilder",2),a([d()],p.prototype,"beforeValueChange",2),a([d({set:!1})],p.prototype,"popupElement",2);var H=class extends x{constructor(e){super(e)}get popupElement(){var e;return(e=this._listDropdown)==null?void 0:e.dropdownElement}getOptions(){let e=Array.from(this._component.querySelectorAll(f.elementName));if(e.length)return e.map(t=>{let i=Array.from(t.querySelectorAll(o.elementName)),s=this._createOptionsFromElements(i);return{text:t.label,options:s}});{let t=Array.from(this._component.querySelectorAll(o.elementName));return this._createOptionsFromElements(t)}}_createOptionsFromElements(e){return e.map(t=>{let i=t.hasAttribute(o.attributes.OPTION_CLASS)?t.getAttribute(o.attributes.OPTION_CLASS):t.optionClass;return typeof i=="string"&&(i=i.split(" ")),{label:t.hasAttribute(o.attributes.LABEL)?t.getAttribute(o.attributes.LABEL):c(t.label)?t.label:t.innerText,value:t.hasAttribute(o.attributes.VALUE)?t.getAttribute(o.attributes.VALUE):t.value,disabled:t.hasAttribute(o.attributes.DISABLED),divider:t.hasAttribute(o.attributes.DIVIDER),optionClass:i,leadingIcon:t.hasAttribute(o.attributes.LEADING_ICON)?t.getAttribute(o.attributes.LEADING_ICON):t.leadingIcon,leadingIconClass:t.hasAttribute(o.attributes.LEADING_ICON_CLASS)?t.getAttribute(o.attributes.LEADING_ICON_CLASS):t.leadingIconClass,leadingIconType:t.hasAttribute(o.attributes.LEADING_ICON_TYPE)?t.getAttribute(o.attributes.LEADING_ICON_TYPE):t.leadingIconType,trailingIcon:t.hasAttribute(o.attributes.TRAILING_ICON)?t.getAttribute(o.attributes.TRAILING_ICON):t.trailingIcon,trailingIconClass:t.hasAttribute(o.attributes.TRAILING_ICON_CLASS)?t.getAttribute(o.attributes.TRAILING_ICON_CLASS):t.trailingIconClass,trailingIconType:t.hasAttribute(o.attributes.TRAILING_ICON_TYPE)?t.getAttribute(o.attributes.TRAILING_ICON_TYPE):t.trailingIconType,leadingBuilder:t.leadingBuilder,trailingBuilder:t.trailingBuilder}})}open(e){this._listDropdown=new V(this._targetElement,e),this._listDropdown.open()}close(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.targetElement&&t.targetElement.addEventListener(G.events.BLUR,e)}toggleOptionMultiple(e,t){var i;(i=this._listDropdown)==null||i.toggleOptionMultiple(e,t)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}highlightActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}patchSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}setOptionsListener(e){let t=new MutationObserver(()=>e(this.getOptions()));return t.observe(this._component,{childList:!0,subtree:!0}),()=>t.disconnect()}setOptions(e,t=!0){t&&this._clearOptions();for(let i of e)if(w(i)){let s=this._createOptionGroupElement(i);for(let r of i.options){let u=this._createOptionElement(r);s.appendChild(u)}this._component.appendChild(s)}else{let s=this._createOptionElement(i);this._component.appendChild(s)}}appendDropdownOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setDropdownOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}scrollSelectedOptionIntoView(){var e;(e=this._listDropdown)==null||e.scrollSelectedOptionIntoView()}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}_clearOptions(){Array.from(this._component.querySelectorAll(f.elementName)).forEach(i=>C(i)),Array.from(this._component.querySelectorAll(o.elementName)).forEach(i=>C(i))}_createOptionGroupElement(e){let t=document.createElement(f.elementName);return t.label=e.text||"",t}_createOptionElement(e){let t=document.createElement(o.elementName);return t.value=e.value,t.textContent=e.label,e.disabled&&(t.disabled=e.disabled),t}};export{m as a,N as b,D as c,w as d,R as e,P as f,p as g,H as h};
|
|
7
|
-
//# sourceMappingURL=chunk.WSGJIPQJ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/select/core/base-select-constants.ts", "../../src/select/core/select-utils.ts", "../../src/select/core/base-select-foundation.ts", "../../src/select/core/base-select.ts", "../../src/select/core/base-select-adapter.ts"],
|
|
4
|
-
"sourcesContent": ["import { IListDropdownOption, IListDropdownOptionGroup } from '../../list-dropdown/list-dropdown-constants';\n\nexport type SelectOptionBuilder = (option: ISelectOption, parentElement: HTMLElement) => HTMLElement;\nexport type SelectSelectedTextBuilder = (selectedOptions: IListDropdownOption[]) => string;\nexport type SelectOptionListenerDestructor = () => void;\nexport type SelectBeforeValueChangeCallback<T> = (value: T | T[]) => boolean | Promise<boolean>;\n\nexport interface ISelectOption extends IListDropdownOption {}\nexport interface ISelectOptionGroup extends IListDropdownOptionGroup {}\n\nconst observedAttributes = {\n VALUE: 'value',\n MULTIPLE: 'multiple',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold',\n POPUP_CLASSES: 'popup-classes',\n OPTION_LIMIT: 'option-limit',\n SYNC_POPUP_WIDTH: 'sync-popup-width'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst events = {\n CHANGE: 'change'\n};\n\nexport const BASE_SELECT_CONSTANTS = {\n attributes,\n events\n};\n", "import { isDefined, isObject } from '@tylertech/forge-core';\nimport { ISelectOption, ISelectOptionGroup } from './base-select-constants';\n\nexport enum SelectOptionType { Option, Group }\n\n/**\n * Determines if the provided options are of the specified type.\n * @param options The options either grouped or individual.\n * @param type The type of option to detect.\n */\nexport function isSelectOptionType(options: ISelectOption[] | ISelectOptionGroup[], type: SelectOptionType): boolean {\n const isOptionGroups = options.some((o: ISelectOption | ISelectOptionGroup) => isOptionGroupObject(o));\n const isOptionTypes = options.some((o: ISelectOption | ISelectOptionGroup) => isOptionObject(o));\n return (isOptionGroups && type === SelectOptionType.Group) || (isOptionTypes && type === SelectOptionType.Option);\n}\n\nexport function isOptionGroupObject(o: ISelectOption | ISelectOptionGroup): o is ISelectOptionGroup {\n return isDefined(o) && isObject(o) && o.hasOwnProperty('options') && o.hasOwnProperty('text');\n}\n\nexport function isOptionObject(o: ISelectOption | ISelectOptionGroup): o is ISelectOption {\n return isDefined(o) && isObject(o) && o.hasOwnProperty('label') && o.hasOwnProperty('value');\n}\n", "import { isDefined, isDeepEqual, randomChars } from '@tylertech/forge-core';\nimport { OptionListenerDestructor } from '../select/select-adapter';\nimport { ISelectOption, ISelectOptionGroup, SelectSelectedTextBuilder, SelectOptionBuilder, BASE_SELECT_CONSTANTS, SelectBeforeValueChangeCallback } from './base-select-constants';\nimport { isSelectOptionType, SelectOptionType } from './select-utils';\nimport { IListDropdownConfig, ListDropdownHeaderBuilder, ListDropdownFooterBuilder } from '../../list-dropdown/list-dropdown-constants';\nimport { IBaseSelectAdapter } from './base-select-adapter';\nimport { IListDropdownAwareFoundation, ListDropdownAwareFoundation } from '../../list-dropdown/list-dropdown-aware-foundation';\n\nexport interface IBaseSelectFoundation extends IListDropdownAwareFoundation {\n value: any;\n selectedIndex: number | number[];\n options: ISelectOption[] | ISelectOptionGroup[];\n multiple: boolean;\n open: boolean;\n popupElement: HTMLElement | undefined;\n optionBuilder: SelectOptionBuilder;\n selectedTextBuilder: SelectSelectedTextBuilder;\n observeScroll: boolean;\n observeScrollThreshold: number;\n syncPopupWidth: boolean;\n beforeValueChange: SelectBeforeValueChangeCallback<any>;\n appendOptions(options: ISelectOption[] | ISelectOptionGroup[]): void;\n selectAll(): void;\n deselectAll(): void;\n initialize(): void;\n initializeTarget(): void;\n disconnect(): void;\n}\n\nexport abstract class BaseSelectFoundation<T extends IBaseSelectAdapter> extends ListDropdownAwareFoundation implements IBaseSelectFoundation {\n protected _options: ISelectOption[] | ISelectOptionGroup[] = [];\n protected _value: any = [];\n protected _multiple = false;\n protected _open = false;\n protected _optionBuilder: SelectOptionBuilder;\n protected _selectedTextBuilder: SelectSelectedTextBuilder;\n protected _selectedValues: string[] = [];\n protected _selectedLabels: string[] = [];\n protected _selectedIndexes: number[] = [];\n protected _filterTimeout: number | undefined;\n protected _filterString = '';\n protected _identifier: string;\n protected _targetWidthCallback: () => number;\n protected _beforeValueChange: SelectBeforeValueChangeCallback<unknown>;\n private _focusListener: (evt: Event) => void;\n private _blurListener: (evt: FocusEvent) => void;\n private _clickListener: (evt: MouseEvent) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _optionsChangedListener: (options: ISelectOption[] | ISelectOptionGroup[]) => void;\n private _optionListenerDestructor: OptionListenerDestructor;\n private _activeChangeListener: (id: string) => void;\n private _dropdownScrollEndListener: () => void;\n private _valueChanging: Promise<boolean> | undefined;\n private _dismissListener: () => void;\n\n constructor(protected _adapter: T) {\n super();\n this._focusListener = evt => this._onFocus(evt);\n this._blurListener = evt => this._onBlur(evt);\n this._clickListener = evt => this._onClick(evt);\n this._keydownListener = evt => this._onKeydown(evt);\n this._optionsChangedListener = options => this._onOptionsChanged(options);\n this._activeChangeListener = id => this._onActiveOptionChanged(id);\n this._dropdownScrollEndListener = () => this._onDropdownScrollEnd();\n this._dismissListener = () => this._onDismiss();\n this._identifier = randomChars();\n }\n\n protected abstract _onDropdownScrollEnd(): void;\n protected _onFocus(evt: Event): void {}\n\n public initialize(): void {\n this._optionListenerDestructor = this._adapter.setOptionsListener(this._optionsChangedListener);\n this._initializeValue();\n }\n\n public initializeTarget(): void {\n this._adapter.initializeAccessibility();\n this._adapter.setMultiple(this._multiple);\n this._adapter.addClickListener(this._clickListener);\n this._adapter.addTargetListener('blur', this._blurListener);\n this._adapter.addTargetListener('focus', this._focusListener);\n this._adapter.addTargetListener('keydown', this._keydownListener);\n }\n\n public disconnect(): void {\n this._adapter.removeClickListener(this._clickListener);\n this._adapter.removeTargetListener('blur', this._blurListener);\n this._adapter.removeTargetListener('focus', this._focusListener);\n this._adapter.removeTargetListener('keydown', this._keydownListener);\n\n if (this._open) {\n this._closeDropdown();\n }\n\n if (this._optionListenerDestructor) {\n this._optionListenerDestructor();\n }\n }\n\n public appendOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._adapter.setOptions(options, false);\n if (this._open) {\n this._adapter.appendDropdownOptions(options);\n }\n }\n\n public selectAll(): void {\n if (this._multiple) {\n this.value = this._flatOptions.map(o => o.value);\n }\n }\n\n public deselectAll(): void {\n if (this._multiple) {\n this.value = [];\n }\n }\n\n protected get _flatOptions(): ISelectOption[] {\n if (isSelectOptionType(this._options, SelectOptionType.Group)) {\n return [].concat.apply([], (this._options as ISelectOptionGroup[]).map(g => g.options)) as ISelectOption[];\n }\n return this._options as ISelectOption[];\n }\n\n private get _nonDividerOptions(): ISelectOption[] {\n return this._flatOptions.filter(o => !o.divider);\n }\n\n protected _initializeValue(): void {\n const options = (this._options.length && this._options) || this._adapter.getOptions();\n if (isDefined(this._value) && options.length) {\n this._applyValue(this._value);\n }\n }\n\n protected _onClick(evt: MouseEvent): void {\n if (evt.button !== 0) {\n return;\n }\n if (!this._open) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n\n protected _onBlur(evt: FocusEvent): void {\n // If the blur event was triggered by an element within the popup then ignore it\n if (this._adapter.isFocusWithinPopup(evt.relatedTarget as HTMLElement)) {\n return;\n }\n\n if (this._open) {\n this._closeDropdown();\n }\n }\n\n\n protected _openDropdown(): void {\n this._options = this._adapter.getOptions();\n\n if (!this._flatOptions.length) {\n return;\n }\n\n this._open = true;\n const config: IListDropdownConfig = {\n options: this._options,\n multiple: this._multiple,\n selectedValues: [...this._selectedValues],\n id: this._identifier,\n optionBuilder: this._optionBuilder,\n syncWidth: this._syncPopupWidth,\n observeScroll: this._observeScroll,\n observeScrollThreshold: this._observeScrollThreshold,\n scrollEndListener: this._dropdownScrollEndListener,\n activeChangeCallback: this._activeChangeListener,\n targetWidthCallback: this._targetWidthCallback,\n popupClasses: this._popupClasses,\n optionLimit: this._optionLimit,\n headerBuilder: this._popupHeaderBuilder,\n footerBuilder: this._popupFooterBuilder,\n closeCallback: () => this._closeDropdown(),\n selectCallback: (value: any) => {\n const flatOptions = this._flatOptions;\n const option = flatOptions.find(o => o.value === value);\n if (option) {\n const index = flatOptions.indexOf(option);\n this._onSelect(option, index, true);\n }\n }\n };\n this._adapter.open(config);\n this._adapter.setDismissListener(this._dismissListener);\n }\n\n /**\n * Closes the dropdown.\n */\n protected _closeDropdown(): void {\n this._open = false;\n this._adapter.close();\n }\n\n /**\n * Handles selecting an item in the dropdown.\n * @param {ISelectOption} option The selected option.\n * @param {number} optionIndex The index of the selected option.\n */\n protected async _onSelect(option: ISelectOption, optionIndex: number, closeDropdown = true): Promise<boolean> {\n return new Promise(async resolve => {\n if (this._valueChanging) {\n return Promise.resolve(false);\n }\n\n const value = option ? option.value : '';\n const label = option ? option.label : '';\n\n // Store the current selections in case we need to rollback (if the event was cancelled)\n const prevSelectedValues = [...this._selectedValues];\n const prevSelectedLabels = [...this._selectedLabels];\n const prevSelectedIndexes = [...this._selectedIndexes];\n\n if (this._multiple) {\n if (this._selectedValues.includes(value)) {\n const index = this._selectedValues.indexOf(value);\n this._selectedValues.splice(index, 1);\n this._selectedLabels.splice(index, 1);\n this._selectedIndexes.splice(index, 1);\n } else {\n this._selectedValues.push(value);\n this._selectedLabels.push(label);\n this._selectedIndexes.push(optionIndex);\n }\n } else {\n if (isDefined(value)) {\n this._selectedValues[0] = value;\n this._selectedLabels[0] = label;\n this._selectedIndexes[0] = optionIndex;\n } else {\n this._selectedValues = [];\n this._selectedLabels = [];\n this._selectedIndexes = [];\n }\n }\n\n const rollbackValue = (): void => {\n this._selectedValues = [...prevSelectedValues];\n this._selectedLabels = [...prevSelectedLabels];\n this._selectedIndexes = [...prevSelectedIndexes];\n };\n\n const applyValue = (): void => {\n // Always keep the internal value in sync in case the component needs to reinitialize with the existing value later on\n this._value = [...this._selectedValues];\n\n // If we're in multiselect mode, we need to toggle the selected option\n if (this._multiple) {\n const isSelected = this._selectedIndexes.includes(optionIndex);\n this._adapter.toggleOptionMultiple(optionIndex, isSelected);\n }\n\n this._applySelection();\n };\n\n const data = this.multiple ? [...this._selectedValues] : this._selectedValues[0];\n\n // We close the dropdown immediately if in single selection mode\n if (this._open && closeDropdown && !this._multiple) {\n this._closeDropdown();\n }\n\n // First we check to see if there is an before change callback and execute that\n if (typeof this._beforeValueChange === 'function') {\n this._valueChanging = Promise.resolve(this._beforeValueChange.call(null, data));\n const shouldContinue = await this._valueChanging;\n this._valueChanging = undefined;\n if (!shouldContinue) {\n rollbackValue();\n return resolve(false);\n }\n }\n\n // Now we can emit the change event AFTER the before change callback has been executed and returned true\n const cancelled = !this._adapter.emitHostEvent(BASE_SELECT_CONSTANTS.events.CHANGE, data, true, true);\n if (!cancelled) {\n applyValue();\n } else {\n rollbackValue();\n }\n\n resolve(!cancelled);\n });\n }\n\n private _selectActiveOption(): void {\n const activeOptionIndex = this._adapter.getActiveOptionIndex();\n if (activeOptionIndex >= 0 && this._nonDividerOptions[activeOptionIndex]) {\n this._onSelect(this._nonDividerOptions[activeOptionIndex], activeOptionIndex);\n }\n }\n\n protected _reset(): void {\n this._selectedValues = [];\n this._selectedLabels = [];\n this._selectedIndexes = [];\n }\n\n protected _applyValue(value: string | string[]): void {\n this._selectedValues = [];\n this._selectedLabels = [];\n\n this._options = this._adapter.getOptions();\n\n if (!Array.isArray(value)) {\n value = [value];\n }\n\n this._value = [];\n\n // Ensure that the values passed are actually existing options\n for (const val of value) {\n if (!this._value.includes(val)) {\n this._value.push(val);\n }\n const option = this._flatOptions.find(o => isDeepEqual(o.value, val));\n if (option) {\n this._selectedValues.push(option.value);\n this._selectedLabels.push(option.label);\n }\n }\n\n // Update the selected indexes based on the values that are now selected\n this._selectedIndexes = this._selectedValues.map(val => this._flatOptions.findIndex(o => o.value === val));\n\n // Update the selected options in the dropdown\n this._adapter.patchSelectedValues(this._selectedValues);\n }\n \n /**\n * Handles the user dismissing the dropdown.\n */\n protected _onDismiss(): void {\n this._closeDropdown();\n }\n\n /** Creates the selected text value from the selected label values. */\n protected _getSelectedText(): string {\n if (typeof this._selectedTextBuilder === 'function') {\n const selectedOptions = this._flatOptions.filter(o => this._selectedValues.includes(o.value));\n return this._selectedTextBuilder(selectedOptions);\n }\n\n if (this._multiple) {\n if (this._selectedLabels.length) {\n return `${this._selectedLabels.length} ${this._selectedLabels.length === 1 ? 'option' : 'options'} selected`;\n } else {\n return '';\n }\n }\n \n return this._selectedLabels\n .filter(v => v && v.length)\n .join(' ')\n .trim();\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n const isEscapeKey = evt.key === 'Escape' || evt.keyCode === 27;\n const isEnter = evt.key === 'Enter' || evt.keyCode === 13;\n const isSpace = evt.key === 'Space' || evt.keyCode === 32;\n const isArrowDown = evt.key === 'ArrowDown' || evt.keyCode === 40;\n const isArrowUp = evt.key === 'ArrowUp' || evt.keyCode === 38;\n const isFilterableCharacter = evt.keyCode >= 48 && evt.keyCode <= 90;\n const isHomeKey = evt.key === 'Home' || evt.keyCode === 36;\n const isEndKey = evt.key === 'End' || evt.keyCode === 35;\n const isTabKey = evt.key === 'Tab';\n\n // We automatically select the active option if the dropdown is open and in single selection mode\n if (isTabKey && this._open && !this._multiple) {\n this._selectActiveOption();\n return;\n }\n\n // If an active filter was started, clear it now\n if (!isFilterableCharacter && this._filterTimeout) {\n window.clearTimeout(this._filterTimeout);\n this._filterString = '';\n this._filterTimeout = undefined;\n }\n\n if (isEscapeKey) {\n evt.preventDefault();\n if (this._open) {\n this._closeDropdown();\n return;\n }\n }\n\n if (isSpace) {\n evt.preventDefault();\n\n if (!this._open) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n } else if (isEnter) {\n if (this._open) {\n evt.stopPropagation();\n evt.preventDefault();\n this._options = this._adapter.getOptions();\n this._selectActiveOption();\n }\n } else if (isArrowUp || isArrowDown) {\n evt.preventDefault();\n\n if (this._multiple && !this._open) {\n this._openDropdown();\n this._adapter.activateFirstOption();\n return;\n }\n\n if (this._flatOptions.length === 0) {\n return;\n }\n\n let optionIndex = 0;\n if (this._open) {\n optionIndex = this._adapter.getActiveOptionIndex();\n if (optionIndex === -1) {\n optionIndex = this._getFirstSelectedOptionIndex();\n }\n } else {\n optionIndex = this._getFirstSelectedOptionIndex();\n }\n\n if (isArrowUp) {\n optionIndex = this._getPreviousHighlightableOptionIndex(optionIndex, this._nonDividerOptions);\n } else {\n optionIndex = this._getNextHighlightableOptionIndex(optionIndex, this._nonDividerOptions);\n }\n\n // If the dropdown is open then we just move the active index, otherwise we change the selection (to mimic the native <select>)\n if (this._open) {\n this._adapter.highlightActiveOption(optionIndex);\n } else {\n this._onSelect(this._nonDividerOptions[optionIndex], optionIndex);\n }\n } else if (isHomeKey) {\n if (this._open) {\n evt.preventDefault();\n this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(o => !o.disabled));\n }\n } else if (isEndKey) {\n if (this._open) {\n evt.preventDefault();\n const options = this._nonDividerOptions;\n for (let i = options.length - 1; i >= 0; i--) {\n if (!options[i].disabled) {\n this._adapter.highlightActiveOption(i);\n break;\n }\n }\n }\n } else if (isFilterableCharacter) {\n this._filter(evt.key);\n }\n }\n\n private _getFirstSelectedOptionIndex(): number {\n return this._nonDividerOptions.findIndex(option => this._selectedValues.includes(option.value));\n }\n\n private _getPreviousHighlightableOptionIndex(startIndex: number, options: ISelectOption[]): number {\n let index = startIndex;\n if (index <= 0) {\n index = options.length - 1;\n } else {\n index--;\n }\n if (options[index].disabled) {\n return this._getPreviousHighlightableOptionIndex(index, options);\n }\n return index;\n }\n\n private _getNextHighlightableOptionIndex(startIndex: number, options: ISelectOption[]): number {\n let index = startIndex;\n if (index === options.length - 1) {\n index = 0;\n } else {\n index++;\n }\n if (options[index].disabled) {\n return this._getNextHighlightableOptionIndex(index, options);\n }\n return index;\n }\n\n private _filter(key: string): void {\n // This allows for typing numbers and/or characters while the select is focused to auto-select the closest match\n if (this._filterTimeout) {\n window.clearTimeout(this._filterTimeout);\n this._filterTimeout = undefined;\n }\n this._filterString += key;\n this._filterTimeout = window.setTimeout(() => {\n this._filterString = '';\n this._filterTimeout = undefined;\n }, 300);\n this._options = this._adapter.getOptions();\n // TODO(kieran.nichols): Enhance this to cycle through closest matches (see the native select)\n const matchedOption = this._flatOptions.find(option => !option.disabled && option.label.toLowerCase().startsWith(this._filterString));\n if (matchedOption) {\n const optionIndex = this._flatOptions.indexOf(matchedOption);\n if (this._open) {\n this._adapter.highlightActiveOption(optionIndex);\n } else if (!this._multiple) {\n this._onSelect(matchedOption, optionIndex, false);\n }\n }\n }\n\n private _onOptionsChanged(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._options = options;\n this._applyValue(this._value);\n }\n\n private _onActiveOptionChanged(id: string): void {\n this._adapter.updateActiveDescendant(id);\n }\n\n /** Gets/sets the value of the component. */\n public get value(): any {\n return this._multiple ? [...this._selectedValues] : this._selectedValues[0];\n }\n public set value(value: any) {\n let _value: string | string[];\n \n if (Array.isArray(value)) {\n _value = [ ...value ];\n } else {\n _value = value;\n }\n\n this._applyValue(_value);\n }\n\n /** Gets/sets the selected index(s). */\n public get selectedIndex(): number | number[] {\n return this._multiple ? [ ...this._selectedIndexes ] : this._selectedIndexes[0];\n }\n public set selectedIndex(indexes: number | number[]) {\n this._options = this._adapter.getOptions();\n\n let indicies: number [];\n if (Array.isArray(indexes)) {\n indicies = [ ...indexes ];\n } else {\n indicies = [indexes];\n }\n\n indicies.sort();\n\n if (this.multiple) {\n this.value = indicies\n .map(index => this._flatOptions[index])\n .filter(o => o)\n .map(o => o.value);\n } else {\n const option = this._flatOptions[indicies[indicies.length - 1]];\n if (!option) {\n return;\n }\n this.value = option.value;\n }\n }\n\n /** Gets/sets the available options. */\n public get options(): ISelectOption[] | ISelectOptionGroup[] {\n return this._adapter.getOptions();\n }\n public set options(value: ISelectOption[] | ISelectOptionGroup[]) {\n let _value: ISelectOption[] | ISelectOptionGroup[];\n if (isSelectOptionType(value, SelectOptionType.Group)) {\n _value = (value as ISelectOptionGroup[]).map(v => ({ ...v }));\n } else {\n _value = (value as ISelectOption[]).map(v => ({ ...v }));\n }\n\n this._options = _value;\n this._adapter.setOptions(_value); // Must set options before intializing value\n this._initializeValue();\n\n if (this._open) {\n this._adapter.setDropdownOptions(_value);\n }\n }\n\n /** Gets/sets the multiple select state. */\n public get multiple(): boolean {\n return this._multiple;\n }\n public set multiple(value: boolean) {\n if (this._multiple !== value) {\n this._multiple = value;\n this._reset();\n if (this._open) {\n this._closeDropdown();\n }\n this._adapter.setMultiple(this._multiple);\n }\n }\n\n /** Gets/sets the open state of the dropdown. */\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n if (value) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n }\n\n /** Gets/sets the builder callback to use when building options. */\n public get optionBuilder(): SelectOptionBuilder {\n return this._optionBuilder;\n }\n public set optionBuilder(value: SelectOptionBuilder) {\n this._optionBuilder = value;\n }\n\n /** Sets the selected text builder callback that will be executed when getting the selected text to display in the field. */\n public get selectedTextBuilder(): SelectSelectedTextBuilder {\n return this._selectedTextBuilder;\n }\n public set selectedTextBuilder(fn: SelectSelectedTextBuilder) {\n this._selectedTextBuilder = fn;\n }\n\n public get observeScroll(): boolean {\n return this._observeScroll;\n }\n public set observeScroll(value: boolean) {\n this._observeScroll = value;\n }\n\n public get observeScrollThreshold(): number {\n return this._observeScrollThreshold;\n }\n public set observeScrollThreshold(value: number) {\n this._observeScrollThreshold = value;\n }\n\n public get syncPopupWidth(): boolean {\n return this._syncPopupWidth;\n }\n public set syncPopupWidth(value: boolean) {\n this._syncPopupWidth = value;\n }\n\n\n public get optionLimit(): number {\n return this._optionLimit;\n }\n public set optionLimit(value: number) {\n this._optionLimit = value;\n }\n \n public get popupClasses(): string | string[] {\n return this._popupClasses;\n }\n public set popupClasses(value: string | string[]) {\n this._popupClasses = value;\n }\n\n public get popupHeaderBuilder(): ListDropdownHeaderBuilder {\n return this._popupHeaderBuilder;\n }\n public set popupHeaderBuilder(value: ListDropdownHeaderBuilder) {\n this._popupHeaderBuilder = value;\n }\n\n public get popupFooterBuilder(): ListDropdownFooterBuilder {\n return this._popupFooterBuilder;\n }\n public set popupFooterBuilder(value: ListDropdownFooterBuilder) {\n this._popupFooterBuilder = value;\n }\n\n /** Gets the currently active popup element when the dropdown is open. */\n public get popupElement(): HTMLElement | undefined {\n return this._adapter.popupElement;\n }\n\n /** Sets the callback to be executed when the user selects a value. */\n public get beforeValueChange(): SelectBeforeValueChangeCallback<any> {\n return this._beforeValueChange;\n }\n public set beforeValueChange(value: SelectBeforeValueChangeCallback<any>) {\n this._beforeValueChange = value;\n }\n}\n", "import { coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport {\n SelectOptionBuilder,\n SelectSelectedTextBuilder,\n ISelectOption,\n ISelectOptionGroup,\n SelectBeforeValueChangeCallback,\n BASE_SELECT_CONSTANTS\n} from './base-select-constants';\nimport { IBaseSelectFoundation } from './base-select-foundation';\nimport { IListDropdownAware, ListDropdownAware } from '../../list-dropdown/list-dropdown-aware';\nimport { IPopupComponent } from '../../popup';\n\n\nexport interface IBaseSelectComponent extends IListDropdownAware {\n value: any;\n selectedIndex: number | number[];\n options: ISelectOption[] | ISelectOptionGroup[];\n multiple: boolean;\n open: boolean;\n optionBuilder: SelectOptionBuilder;\n selectedTextBuilder: SelectSelectedTextBuilder;\n popupElement: IPopupComponent | undefined;\n beforeValueChange: SelectBeforeValueChangeCallback<any>;\n appendOptions(options: ISelectOption[] | ISelectOption[]): void;\n selectAll(): void;\n deselectAll(): void;\n}\n\nexport abstract class BaseSelectComponent<T extends IBaseSelectFoundation> extends ListDropdownAware implements IBaseSelectComponent {\n protected _foundation: T;\n\n constructor() {\n super();\n }\n\n /** Gets/sets the value. */\n @FoundationProperty()\n public value: any;\n \n /** Gets/sets the selected index. */\n @FoundationProperty()\n public selectedIndex: number | number[];\n \n /** Gets/sets the available options. */\n @FoundationProperty()\n public options: ISelectOption[] | ISelectOptionGroup[];\n\n /** Gets/sets the multiple select state. */\n @FoundationProperty()\n public multiple: boolean;\n \n /** Gets the open state of the dropdown. */\n @FoundationProperty()\n public open: boolean;\n \n /** Sets the option builder callback that will be executed when building the option list in the dropdown. */\n @FoundationProperty()\n public optionBuilder: SelectOptionBuilder;\n \n /** Sets the selected text builder callback that will be executed when getting the selected text to display in the field. */\n @FoundationProperty()\n public selectedTextBuilder: SelectSelectedTextBuilder;\n\n /** Sets the callback to be executed when the user selects a value. */\n @FoundationProperty()\n public beforeValueChange: SelectBeforeValueChangeCallback<any>;\n\n /** Gets the popup element (when the dropdown is open). */\n @FoundationProperty({ set: false })\n public popupElement: IPopupComponent | undefined;\n \n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n switch (name) {\n case BASE_SELECT_CONSTANTS.attributes.MULTIPLE:\n this.multiple = coerceBoolean(newValue);\n break;\n case BASE_SELECT_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n }\n }\n\n public appendOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._foundation.appendOptions(options);\n }\n\n public selectAll(): void {\n this._foundation.selectAll();\n }\n \n public deselectAll(): void {\n this._foundation.deselectAll();\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n}\n", "import { isDefined, removeElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IBaseSelectComponent } from './base-select';\nimport { ListDropdown, IListDropdown } from '../../list-dropdown';\nimport { IListDropdownConfig, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';\nimport { IOptionComponent, OPTION_CONSTANTS } from '../option';\nimport { IOptionGroupComponent, OPTION_GROUP_CONSTANTS } from '../option-group';\nimport { ISelectOption, ISelectOptionGroup, SelectOptionListenerDestructor } from './base-select-constants';\nimport { isOptionGroupObject } from './select-utils';\nimport { IPopupComponent, POPUP_CONSTANTS } from '../../popup';\n\nexport interface IBaseSelectAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n addClickListener(listener: (evt: Event) => void): void;\n removeClickListener(listener: (evt: Event) => void): void;\n addTargetListener(type: string, listener: (evt: Event) => void): void;\n removeTargetListener(type: string, listener: (evt: Event) => void): void;\n getOptions(): ISelectOption[] | ISelectOptionGroup[];\n setOptions(options: ISelectOption[] | ISelectOptionGroup[], clear?: boolean): void;\n open(config: IListDropdownConfig): void;\n close(): void;\n setDismissListener(listener: () => void): void;\n scrollSelectedOptionIntoView(): void;\n activateSelectedOption(): void;\n activateFirstOption(): void;\n getActiveOptionIndex(): number;\n highlightActiveOption(index: number): void;\n toggleOptionMultiple(index: number, isSelected: boolean): void;\n patchSelectedValues(selectedValues: string[]): void;\n updateActiveDescendant(id: string): void;\n setOptionsListener(listener: (options: ISelectOption[] | ISelectOptionGroup[]) => void): SelectOptionListenerDestructor;\n setDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void;\n appendDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void;\n setMultiple(multiple: boolean): void;\n isFocusWithinPopup(target: HTMLElement): boolean;\n popupElement: HTMLElement | undefined;\n}\n\nexport abstract class BaseSelectAdapter extends BaseAdapter<IBaseSelectComponent> implements IBaseSelectAdapter {\n private _listDropdown?: IListDropdown;\n protected _targetElement: HTMLElement;\n\n constructor(component: IBaseSelectComponent) {\n super(component);\n }\n\n public abstract initializeAccessibility(): void;\n public abstract updateActiveDescendant(id: string): void;\n public abstract addClickListener(listener: (evt: Event) => void): void;\n public abstract removeClickListener(listener: (evt: Event) => void): void;\n public abstract addTargetListener(type: string, listener: (evt: Event) => void): void;\n public abstract removeTargetListener(type: string, listener: (evt: Event) => void): void;\n public abstract setMultiple(multiple: boolean): void;\n\n public get popupElement(): HTMLElement | undefined {\n return this._listDropdown?.dropdownElement;\n }\n\n public getOptions(): ISelectOption[] | ISelectOptionGroup[] {\n const optionGroupElements = Array.from(this._component.querySelectorAll(OPTION_GROUP_CONSTANTS.elementName)) as IOptionGroupComponent[];\n if (optionGroupElements.length) {\n return optionGroupElements.map(optionGroupElement => {\n const optionElements = Array.from(optionGroupElement.querySelectorAll(OPTION_CONSTANTS.elementName)) as IOptionComponent[];\n const options = this._createOptionsFromElements(optionElements);\n return { text: optionGroupElement.label, options } as ISelectOptionGroup;\n });\n } else {\n const optionElements = Array.from(this._component.querySelectorAll(OPTION_CONSTANTS.elementName)) as IOptionComponent[];\n return this._createOptionsFromElements(optionElements);\n }\n }\n\n private _createOptionsFromElements(optionElements: IOptionComponent[]): ISelectOption[] {\n return optionElements.map(o => {\n let optionClass = o.hasAttribute(OPTION_CONSTANTS.attributes.OPTION_CLASS) ? o.getAttribute(OPTION_CONSTANTS.attributes.OPTION_CLASS) as string : o.optionClass;\n if (typeof optionClass === 'string') {\n optionClass = optionClass.split(' ');\n }\n\n return {\n // eslint-disable-next-line @typescript-eslint/no-extra-parens\n label: o.hasAttribute(OPTION_CONSTANTS.attributes.LABEL) ? o.getAttribute(OPTION_CONSTANTS.attributes.LABEL) as string : (isDefined(o.label) ? o.label : o.innerText),\n value: o.hasAttribute(OPTION_CONSTANTS.attributes.VALUE) ? o.getAttribute(OPTION_CONSTANTS.attributes.VALUE) : o.value,\n disabled: o.hasAttribute(OPTION_CONSTANTS.attributes.DISABLED),\n divider: o.hasAttribute(OPTION_CONSTANTS.attributes.DIVIDER),\n optionClass,\n leadingIcon: o.hasAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON) ? o.getAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON) as string : o.leadingIcon,\n leadingIconClass: o.hasAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS) ? o.getAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS) as string : o.leadingIconClass,\n leadingIconType: o.hasAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE) ? o.getAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE) as ListDropdownIconType : o.leadingIconType,\n trailingIcon: o.hasAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON) ? o.getAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON) as string : o.trailingIcon,\n trailingIconClass: o.hasAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS) ? o.getAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS) as string : o.trailingIconClass,\n trailingIconType: o.hasAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE) ? o.getAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE) as ListDropdownIconType : o.trailingIconType,\n leadingBuilder: o.leadingBuilder,\n trailingBuilder: o.trailingBuilder\n };\n });\n }\n\n public open(config: IListDropdownConfig): void {\n this._listDropdown = new ListDropdown(this._targetElement, config);\n this._listDropdown.open();\n }\n\n public close(): void {\n if (this._listDropdown) {\n this._listDropdown.close();\n this._listDropdown.destroy();\n this._listDropdown = undefined;\n }\n }\n\n public setDismissListener(listener: () => void): void {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return;\n }\n const dropdownElement = this._listDropdown.dropdownElement as IPopupComponent;\n if (dropdownElement.targetElement) {\n dropdownElement.targetElement.addEventListener(POPUP_CONSTANTS.events.BLUR, listener);\n }\n }\n\n public toggleOptionMultiple(index: number, isSelected: boolean): void {\n this._listDropdown?.toggleOptionMultiple(index, isSelected);\n }\n\n public getActiveOptionIndex(): number {\n return this._listDropdown?.getActiveOptionIndex() ?? -1;\n }\n\n public activateSelectedOption(): void {\n this._listDropdown?.activateSelectedOption();\n }\n\n public activateFirstOption(): void {\n this._listDropdown?.activateFirstOption();\n }\n\n public highlightActiveOption(index: number): void {\n this._listDropdown?.activateOption(index);\n }\n\n public patchSelectedValues(selectedValues: string[]): void {\n this._listDropdown?.setSelectedValues(selectedValues);\n }\n\n public setOptionsListener(listener: (options: ISelectOption[] | ISelectOptionGroup[]) => void): SelectOptionListenerDestructor {\n const observer = new MutationObserver(() => listener(this.getOptions()));\n observer.observe(this._component, { childList: true, subtree: true });\n return () => observer.disconnect();\n }\n\n public setOptions(options: ISelectOption[] | ISelectOptionGroup[], clear = true): void {\n if (clear) {\n this._clearOptions();\n }\n\n for (const opt of options) {\n if (isOptionGroupObject(opt)) {\n const optionGroupElement = this._createOptionGroupElement(opt);\n for (const option of opt.options) {\n const optionElement = this._createOptionElement(option);\n optionGroupElement.appendChild(optionElement);\n }\n this._component.appendChild(optionGroupElement);\n } else {\n const optionElement = this._createOptionElement(opt);\n this._component.appendChild(optionElement);\n }\n }\n }\n\n public appendDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._listDropdown?.appendOptions(options);\n }\n\n public setDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._listDropdown?.setOptions(options);\n }\n\n public scrollSelectedOptionIntoView(): void {\n this._listDropdown?.scrollSelectedOptionIntoView();\n }\n\n public isFocusWithinPopup(target: HTMLElement): boolean {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return false;\n }\n return this._listDropdown.dropdownElement.contains(target);\n }\n\n private _clearOptions(): void {\n // First we remove all option group elements\n const existingOptionGroupElements = Array.from(this._component.querySelectorAll(OPTION_GROUP_CONSTANTS.elementName));\n existingOptionGroupElements.forEach((optGroup: IOptionGroupComponent) => removeElement(optGroup));\n\n // Then find all top-level option elements that aren't inside of a group, and ensure that those are removed as well\n const existingOptionElements = Array.from(this._component.querySelectorAll(OPTION_CONSTANTS.elementName));\n existingOptionElements.forEach((o: HTMLElement) => removeElement(o));\n }\n\n\n private _createOptionGroupElement(group: ISelectOptionGroup): HTMLElement {\n const optionGroupElement = document.createElement(OPTION_GROUP_CONSTANTS.elementName) as IOptionGroupComponent;\n optionGroupElement.label = group.text || '';\n return optionGroupElement;\n }\n\n private _createOptionElement(option: ISelectOption): HTMLElement {\n const optionElement = document.createElement(OPTION_CONSTANTS.elementName) as IOptionComponent;\n optionElement.value = option.value;\n optionElement.textContent = option.label;\n if (option.disabled) {\n optionElement.disabled = option.disabled;\n }\n return optionElement;\n }\n}\n"],
|
|
5
|
-
"mappings": "0bAUA,GAAM,GAAqB,CACzB,MAAO,QACP,SAAU,WACV,eAAgB,iBAChB,yBAA0B,2BAC1B,cAAe,gBACf,aAAc,eACd,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{m as B}from"./chunk.LZMYHIO2.js";import{d as W,l as X}from"./chunk.7TQYFMM4.js";import{s as U,u as C,v as m}from"./chunk.AABG6MSC.js";import{b as x}from"./chunk.GVQVA7P3.js";import{a as K}from"./chunk.A23NSEWA.js";import{a as d}from"./chunk.B3IJU6XJ.js";import{a as H,b as z}from"./chunk.BSZ2LBJX.js";import{a as M}from"./chunk.3E5QKMHL.js";import{a as N,e as D,g as _}from"./chunk.HN4PXH3D.js";import{h as k,u as g}from"./chunk.R4NDFXVA.js";import{b as p,k as w,l as R}from"./chunk.G76HB2FK.js";import{a as f,b as h,f as l}from"./chunk.MCIQXNKY.js";var c=`${z}split-view-panel`,ae={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},oe={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled"},v={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},se={ROOT:`#${v.ROOT}`,HANDLE:`#${v.HANDLE}`,ICON:`#${v.ICON}`,RIPPLE:`#${v.RIPPLE}`,CONTENT:`#${v.CONTENT}`},le={WILL_RESIZE:`${c}-will-resize`,RESIZE_START:`${c}-resize-start`,RESIZE_END:`${c}-resize-end`,RESIZE:`${c}-resize`,DID_OPEN:`${c}-did-open`,DID_CLOSE:`${c}-did-close`,WILL_OPEN:`${c}-will-open`,WILL_CLOSE:`${c}-will-close`},pe={RIPPLE_ACTIVATION_WAIT:200},de={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:ae,classes:oe,ids:v,selectors:se,events:le,numbers:pe,customCssProperties:de},ue=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(ue||{});function $(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function G(n,t){let e=n.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function F(n){return h(f({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function j(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,o=e.startPoint-a;e.resizable==="start"&&(o*=-1);let u=e.startSize-o;e.currentSize=y(u,e),n.setContentSize(e.currentSize),E(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(n,S,e),r!==e.currentSize}function q(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=y(a,e),n.setContentSize(e.currentSize),E(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(n,o,e),r!==e.currentSize}function J(n,t){return n.setContentSize(t.min),t.min}function Q(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=m(t.max,e);return n.setContentSize(r),r}function ee(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function y(n,t){return n=Math.max(n,t.min),n=m(n,t.max,t.availableSpace),n}function E(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=m(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function te(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=m(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return C(n,t.min,e)}function O(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ie(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function ce(n){var o,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=e!=null&&e[1]?+e[1]:-1,a=(u=(o=e==null?void 0:e[2])==null?void 0:o.toLowerCase())!=null?u:"";return{amount:r,unit:a}}function b(n,t){let e=ce(n);return e.unit==="%"?U(e.amount,t):e.amount}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=$();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):x(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){x(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){!this._appliedAllowClose||(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=J(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){q(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,E(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._adapter.deactivateRipple(),this._endResize()}_handlePointermove(t){j(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=G(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=F(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,r=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:r};!this._adapter.emitHostEvent(a,o,!0,!0)||(this._open=t,this._applyOpen(o))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let r=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,r),o=C(e,this._pixelMin,a);this._adapter.setValuenow(o),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=b(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=b(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=y(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=b(this._min,a),this._pixelMax=p(this._max)?b(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility){let a=P(e,h(f({},this._state),{availableSpace:r}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:r})),t.clearCursor&&this._adapter.setHandleCursor()}};var me=`${z}split-view`,be={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},fe={ROOT:"forge-split-view"},re={ROOT:"root"},he={ROOT:`#${re.ROOT}`,PANEL:i.elementName},_e={RESIZE_THROTTLE_THRESHOLD:200},ve={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ne={elementName:me,attributes:be,classes:fe,ids:re,selectors:he,numbers:_e,customCssProperties:ve};var A=class extends K{constructor(e){super(e);this._root=_(e,i.selectors.ROOT),this._handle=_(e,i.selectors.HANDLE),this._icon=_(e,i.selectors.ICON),this._ripple=_(e,i.selectors.RIPPLE),this._content=_(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===ne.elementName&&(this._parent=e)}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var r;return(r=this._parent)==null?void 0:r[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),g(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),g(this._handle,e!=="off","aria-valuemin","0"),g(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ie(e))}setOpen(e,r=!0,a){var u,S;let o=()=>{var V,T;e||this._root.classList.add(i.classes.CLOSED),a&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,a),(V=this._parent)==null||V.unlayerSlottedPanels(),(T=this._parent)==null||T.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!r){o();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),k(this._root,i.classes.OPENING,!0).then(()=>{o()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!r){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),k(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),(r=this._parent)==null||r.update({clearCursor:!0}),e||document.body.style.removeProperty("cursor")}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){document.body.style.setProperty("cursor",O(e,r))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,r){if(r==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.setContentSize(e)}activateRipple(e){e?(this._ripple.deactivate(),window.setTimeout(()=>{this._ripple.activate()},i.numbers.RIPPLE_ACTIVATION_WAIT)):(this._ripple.activate(),this._ripple.deactivate())}deactivateRipple(){this._ripple.deactivate()}getParentSize(e){var a,o;let r=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var we='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-ripple id="ripple" part="ripple"></forge-ripple></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',Se='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ucimscr;animation-name:ucimscr;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ucimscr{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ucimscr{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:ucimsd6;animation-name:ucimsd6;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ucimsd6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ucimsd6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ucimse3;animation-name:ucimse3;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ucimse3{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ucimse3{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:ucimser;animation-name:ucimser;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ucimser{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ucimser{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ucimsf8;animation-name:ucimsf8;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ucimsf8{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ucimsf8{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:ucimsfs;animation-name:ucimsfs;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ucimsfs{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ucimsfs{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ucimsgm;animation-name:ucimsgm;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ucimsgm{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ucimsgm{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:ucimshh;animation-name:ucimshh;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ucimshh{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ucimshh{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}',s=class extends M{constructor(){super();W.define([Y,B]),D(this,we,Se),this._foundation=new L(new A(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,a){switch(e){case i.attributes.RESIZABLE:this.resizable=a;break;case i.attributes.SIZE:this.size=a;break;case i.attributes.MIN:this.min=a;break;case i.attributes.MAX:a?this.max=a:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case i.attributes.OPEN:this.open=w(a);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=w(a):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=w(a):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=w(a):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=R(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[X,Z]})],s);function ft(){N(s)}export{i as a,ue as b,$ as c,G as d,F as e,j as f,q as g,J as h,Q as i,ee as j,y as k,E as l,te as m,P as n,O as o,ie as p,I as q,ce as r,b as s,L as t,ne as u,A as v,s as w,ft as x};
|
|
7
|
-
//# sourceMappingURL=chunk.YWQZURLM.js.map
|