@c2n/core 0.0.19 → 0.0.21
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/dist/.tsbuildinfo +1 -1
- package/dist/context-menu-helper.d.ts +31 -0
- package/dist/context-menu-helper.d.ts.map +1 -0
- package/dist/context-menu-helper.js +35 -0
- package/dist/context-menu-helper.js.map +1 -0
- package/dist/locale-helper.d.ts +10 -0
- package/dist/locale-helper.d.ts.map +1 -0
- package/dist/locale-helper.js +39 -0
- package/dist/locale-helper.js.map +1 -0
- package/package.json +10 -2
package/dist/.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/lit-html/development/directive.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/lit-html/development/lit-html.d.ts","../../../node_modules/lit-html/development/directives/class-map.d.ts","../src/css-helper.ts","../src/data-helper.ts","../../../node_modules/lit-html/development/is-server.d.ts","../../../node_modules/@lit/reactive-element/development/css-tag.d.ts","../../../node_modules/@lit/reactive-element/development/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/development/reactive-element.d.ts","../../../node_modules/lit-element/development/lit-element.d.ts","../../../node_modules/lit/development/index.d.ts","../src/dom-helper.ts","../../../node_modules/@lit/reactive-element/development/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts","../src/element-helper.ts","../src/event-helper.ts","../../../node_modules/@lit/reactive-element/development/decorators/property.d.ts","../src/lit-helper.ts","../src/shortcut-helper.ts","../../../node_modules/@lit/context/development/lib/create-context.d.ts","../../../node_modules/@lit/context/development/lib/context-request-event.d.ts","../../../node_modules/@lit/context/development/lib/controllers/context-consumer.d.ts","../../../node_modules/@lit/context/development/lib/value-notifier.d.ts","../../../node_modules/@lit/context/development/lib/controllers/context-provider.d.ts","../../../node_modules/@lit/context/development/lib/context-root.d.ts","../../../node_modules/@lit/context/development/lib/decorators/provide.d.ts","../../../node_modules/@lit/context/development/lib/decorators/consume.d.ts","../../../node_modules/@lit/context/development/index.d.ts","../src/contexts/pager.ts","../src/controllers/breakpoints-observer.ts","../src/controllers/context-consumer.ts","../src/controllers/virtual-scroll.ts"],"fileIdsList":[[68,69,70,72,73,74,75],[68],[57,68],[57,68,69,71],[69],[61],[57,61],[55,56],[50,57],[50],[48,50],[48,49],[50,54,57,58],[76],[57],[57,76],[59],[51],[54,59],[54,62],[57,59,65]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"e09db3291e6b440f7debed2227d8357e80c95987a0d0d67ac17521d8f7b11bdb","impliedFormat":99},{"version":"9e77270468dc77ee3f0182f377a6022b37cce590cab79205c497cfb964ee2d20","impliedFormat":99},{"version":"f320b8514d20e37f6b957334b715d79c9781baf54fda8f9192c1dc38e16d449b","signature":"bb7529605ce5ea3a70da2155f39510884954a39abd51cf787eb8a303f1e3ca5d"},{"version":"8404c6b0cd89fd85702086ab27d550099cc9ccb1b6670fc6484da5efe71c3c41","signature":"3e18169106207e83a0a2bc59e357d1473584a83a25641474f105ab56fd9490b3"},{"version":"1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","impliedFormat":99},{"version":"74012d464fbc5354ca3a7d5e71bee43b17da01a853c8ff10971bbe3680c76f40","impliedFormat":99},{"version":"5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","impliedFormat":99},{"version":"a0f82d2f9450bd147a8c137798d9501bd49b7c9e118f75b07b76709ff39b6b55","affectsGlobalScope":true,"impliedFormat":99},{"version":"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","impliedFormat":99},{"version":"dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","impliedFormat":99},{"version":"00355f69398fa5d25778aefb29561e3718687fb930308c7b25bf40d951592152","signature":"06c27bacf3b20a46a0702910aff8d9ad4817681d7b3e14f450f856ba78ea7f76"},{"version":"cdeae34aca6700620ebf3f27cf7d439c3af97595dd6e2729fa4780483add5680","impliedFormat":99},{"version":"3ff87ea3471b51beaf4aa8fd8f4422862b11d343fdbb55bf383e0f8cc195a445","impliedFormat":99},{"version":"5bac68e8ed6b3f45c75c2ada20ef7d292401611bbbcb945475529e02e0e90666","signature":"987fdd15284a3e71a0fcb58c8cdb8a82e51227f9ba90edccf57f10bc7c7722dc"},{"version":"3e42659da436c840334cf9e989ab14009e5d3f5f62f75633d1d906c57f8634ab","signature":"a1ffd1c477e4c44624597d5a4232a6f4dc42dcda9f9b74ab2ff85f1819a95f18"},{"version":"99bdf729529cdbf12e2bf76ea751b662011133dcf9e35abcb3def47bb02f7b0a","impliedFormat":99},{"version":"e3ae5966ff412fa4b84b44359d356282194623750eadd8e3e20c0763efc6c811","signature":"f0223b66a3c156c00a5815a5853cbaf830636dc53bd6c328ee8389be92eec8e6"},{"version":"d313896abf823dc5acd6691234f3c1ac40ec2c332443cb2ca79327aa333f7c94","signature":"ac455106204d69c0399018dc4a8fa48714e8e2c21ca294bfc793ad522ff67146"},{"version":"7455f2d44bbd248413e4ab8c3ff847413d9ce327967dba66f0b51880f60fb653","impliedFormat":99},{"version":"9dd82c87281e106bdcb227550251fcc6b55a6eb555152bec5c6ce408345ffc57","affectsGlobalScope":true,"impliedFormat":99},{"version":"38df32d74f5cb92d08a7ace088d631e65fd4ae41fd1098ef74ad8efab03763ac","impliedFormat":99},{"version":"ff169075cb4df455eaa1dc4972416ae6981adca96429ed698a306da3d5a2e241","impliedFormat":99},{"version":"5dd01302b91c8fb2aea381396623c5463c47a41c1b5d675672a075c5d8aa164c","affectsGlobalScope":true,"impliedFormat":99},{"version":"f3731eb0da8be50797a04467e9021082654c55d6cbabaf17a9d505c0ff3033cc","impliedFormat":99},{"version":"6146b370459b8f7e81f61b7dd9022fb06509cc20d34514dc782c9ce538fd8ec9","impliedFormat":99},{"version":"a585baba6d92b7f5052a11c3a5d0bcc73657180bb6066cf70e1b4664df4e8363","impliedFormat":99},{"version":"1aacab8ad3bd52a3a508b9c07bb341d680448fc9ee45591708ded8113c1be517","impliedFormat":99},{"version":"375ccf781ce7f845db6d13839e6085e520dac2a024679528229823d402ba1edc","signature":"4d4573b5fe4e0012638e5faaf0d8f77365359ce60cde1b0bafc62f48400a7e3d"},{"version":"361aaaeedfa37b1da60c8017b07a9968062968f71561c479bc83944063f5804d","signature":"cc8929ab4c4e9be68dd16405c46e97463b36038700f49d070e2d24ee4139c87c"},{"version":"d719146ac4cda335a8e970ba5918cf154be98b83c6f4b3acb4c02f6617cd92f6","signature":"75f5083114303492bddf59e3b81debed86d2a422666bb2d7c69513ad64a61a26"},{"version":"348c8e833a387ff25bdec06826c01c364738982079c2ba1cb390847141721ad1","signature":"a19c051036e9cb67b13b0b536c2ea9c8a8444e8797ece8db8963abd141f05017"}],"root":[52,53,60,63,64,66,67,[77,80]],"options":{"allowImportingTsExtensions":false,"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":false,"experimentalDecorators":true,"inlineSources":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo","useDefineForClassFields":false,"verbatimModuleSyntax":true},"referencedMap":[[76,1],[69,2],[70,3],[72,4],[75,3],[74,3],[71,5],[62,6],[65,7],[57,8],[58,9],[48,10],[51,11],[50,12],[59,13],[77,14],[78,15],[79,16],[80,17],[52,18],[60,19],[63,20],[66,21]],"latestChangedDtsFile":"./controllers/virtual-scroll.d.ts","version":"6.0.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/context-menu-helper.ts","../../../node_modules/lit-html/development/directive.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/lit-html/development/lit-html.d.ts","../../../node_modules/lit-html/development/directives/class-map.d.ts","../src/css-helper.ts","../src/data-helper.ts","../../../node_modules/lit-html/development/is-server.d.ts","../../../node_modules/@lit/reactive-element/development/css-tag.d.ts","../../../node_modules/@lit/reactive-element/development/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/development/reactive-element.d.ts","../../../node_modules/lit-element/development/lit-element.d.ts","../../../node_modules/lit/development/index.d.ts","../src/dom-helper.ts","../../../node_modules/@lit/reactive-element/development/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts","../src/element-helper.ts","../src/event-helper.ts","../../../node_modules/@lit/reactive-element/development/decorators/property.d.ts","../src/lit-helper.ts","../src/locale-helper.ts","../src/shortcut-helper.ts","../../../node_modules/@lit/context/development/lib/create-context.d.ts","../../../node_modules/@lit/context/development/lib/context-request-event.d.ts","../../../node_modules/@lit/context/development/lib/controllers/context-consumer.d.ts","../../../node_modules/@lit/context/development/lib/value-notifier.d.ts","../../../node_modules/@lit/context/development/lib/controllers/context-provider.d.ts","../../../node_modules/@lit/context/development/lib/context-root.d.ts","../../../node_modules/@lit/context/development/lib/decorators/provide.d.ts","../../../node_modules/@lit/context/development/lib/decorators/consume.d.ts","../../../node_modules/@lit/context/development/index.d.ts","../src/contexts/pager.ts","../src/controllers/breakpoints-observer.ts","../src/controllers/context-consumer.ts","../src/controllers/virtual-scroll.ts"],"fileIdsList":[[70,71,72,74,75,76,77],[70],[58,70],[58,70,71,73],[71],[62],[58,62],[56,57],[51,58],[51],[49,51],[49,50],[51,55,58,59],[78],[58],[58,78],[60],[52],[55,60],[55,63],[58,60,66]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"cba18c8ebb6b4bc9892d5d157f20ff294f31cbdbcf3bf9a3e52468789add79f5","signature":"13dc936e13a6a5fc717bc46ae2ea35872d753841e3454a0c5706f4ad5a11fa9a"},{"version":"00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"e09db3291e6b440f7debed2227d8357e80c95987a0d0d67ac17521d8f7b11bdb","impliedFormat":99},{"version":"9e77270468dc77ee3f0182f377a6022b37cce590cab79205c497cfb964ee2d20","impliedFormat":99},{"version":"f320b8514d20e37f6b957334b715d79c9781baf54fda8f9192c1dc38e16d449b","signature":"bb7529605ce5ea3a70da2155f39510884954a39abd51cf787eb8a303f1e3ca5d"},{"version":"8404c6b0cd89fd85702086ab27d550099cc9ccb1b6670fc6484da5efe71c3c41","signature":"3e18169106207e83a0a2bc59e357d1473584a83a25641474f105ab56fd9490b3"},{"version":"1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","impliedFormat":99},{"version":"74012d464fbc5354ca3a7d5e71bee43b17da01a853c8ff10971bbe3680c76f40","impliedFormat":99},{"version":"5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","impliedFormat":99},{"version":"a0f82d2f9450bd147a8c137798d9501bd49b7c9e118f75b07b76709ff39b6b55","affectsGlobalScope":true,"impliedFormat":99},{"version":"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","impliedFormat":99},{"version":"dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","impliedFormat":99},{"version":"00355f69398fa5d25778aefb29561e3718687fb930308c7b25bf40d951592152","signature":"06c27bacf3b20a46a0702910aff8d9ad4817681d7b3e14f450f856ba78ea7f76"},{"version":"cdeae34aca6700620ebf3f27cf7d439c3af97595dd6e2729fa4780483add5680","impliedFormat":99},{"version":"3ff87ea3471b51beaf4aa8fd8f4422862b11d343fdbb55bf383e0f8cc195a445","impliedFormat":99},{"version":"5bac68e8ed6b3f45c75c2ada20ef7d292401611bbbcb945475529e02e0e90666","signature":"987fdd15284a3e71a0fcb58c8cdb8a82e51227f9ba90edccf57f10bc7c7722dc"},{"version":"3e42659da436c840334cf9e989ab14009e5d3f5f62f75633d1d906c57f8634ab","signature":"a1ffd1c477e4c44624597d5a4232a6f4dc42dcda9f9b74ab2ff85f1819a95f18"},{"version":"99bdf729529cdbf12e2bf76ea751b662011133dcf9e35abcb3def47bb02f7b0a","impliedFormat":99},{"version":"e3ae5966ff412fa4b84b44359d356282194623750eadd8e3e20c0763efc6c811","signature":"f0223b66a3c156c00a5815a5853cbaf830636dc53bd6c328ee8389be92eec8e6"},{"version":"6221ced851e47d75063f9c6923c143cd17b53e3e6a2105678cfe2a8200d86420","signature":"61b88d03b239f01ec73f4dbfd0749b81078682abeda0b55a31930990a129eb3c"},{"version":"d313896abf823dc5acd6691234f3c1ac40ec2c332443cb2ca79327aa333f7c94","signature":"ac455106204d69c0399018dc4a8fa48714e8e2c21ca294bfc793ad522ff67146"},{"version":"7455f2d44bbd248413e4ab8c3ff847413d9ce327967dba66f0b51880f60fb653","impliedFormat":99},{"version":"9dd82c87281e106bdcb227550251fcc6b55a6eb555152bec5c6ce408345ffc57","affectsGlobalScope":true,"impliedFormat":99},{"version":"38df32d74f5cb92d08a7ace088d631e65fd4ae41fd1098ef74ad8efab03763ac","impliedFormat":99},{"version":"ff169075cb4df455eaa1dc4972416ae6981adca96429ed698a306da3d5a2e241","impliedFormat":99},{"version":"5dd01302b91c8fb2aea381396623c5463c47a41c1b5d675672a075c5d8aa164c","affectsGlobalScope":true,"impliedFormat":99},{"version":"f3731eb0da8be50797a04467e9021082654c55d6cbabaf17a9d505c0ff3033cc","impliedFormat":99},{"version":"6146b370459b8f7e81f61b7dd9022fb06509cc20d34514dc782c9ce538fd8ec9","impliedFormat":99},{"version":"a585baba6d92b7f5052a11c3a5d0bcc73657180bb6066cf70e1b4664df4e8363","impliedFormat":99},{"version":"1aacab8ad3bd52a3a508b9c07bb341d680448fc9ee45591708ded8113c1be517","impliedFormat":99},{"version":"375ccf781ce7f845db6d13839e6085e520dac2a024679528229823d402ba1edc","signature":"4d4573b5fe4e0012638e5faaf0d8f77365359ce60cde1b0bafc62f48400a7e3d"},{"version":"361aaaeedfa37b1da60c8017b07a9968062968f71561c479bc83944063f5804d","signature":"cc8929ab4c4e9be68dd16405c46e97463b36038700f49d070e2d24ee4139c87c"},{"version":"d719146ac4cda335a8e970ba5918cf154be98b83c6f4b3acb4c02f6617cd92f6","signature":"75f5083114303492bddf59e3b81debed86d2a422666bb2d7c69513ad64a61a26"},{"version":"348c8e833a387ff25bdec06826c01c364738982079c2ba1cb390847141721ad1","signature":"a19c051036e9cb67b13b0b536c2ea9c8a8444e8797ece8db8963abd141f05017"}],"root":[48,53,54,61,64,65,[67,69],[79,82]],"options":{"allowImportingTsExtensions":false,"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":false,"experimentalDecorators":true,"inlineSources":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo","useDefineForClassFields":false,"verbatimModuleSyntax":true},"referencedMap":[[78,1],[71,2],[72,3],[74,4],[77,3],[76,3],[73,5],[63,6],[66,7],[58,8],[59,9],[49,10],[52,11],[51,12],[60,13],[79,14],[80,15],[81,16],[82,17],[53,18],[61,19],[64,20],[67,21]],"latestChangedDtsFile":"./controllers/virtual-scroll.d.ts","version":"6.0.3"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The protocol a component uses to tell an enclosing `c2-context-menu` what was right-clicked.
|
|
3
|
+
*
|
|
4
|
+
* When `c2-context-menu` is about to open, it dispatches {@link CONTEXT_MENU_REQUEST_EVENT} on the innermost node
|
|
5
|
+
* under the pointer (the first entry of the triggering event's `composedPath()`), so it crosses shadow roots and
|
|
6
|
+
* reaches every component in between. A component that knows what that node stands for — `c2-table` for a cell,
|
|
7
|
+
* a chart for a data point — answers with {@link provideContextMenuData}, and the menu hands the value to its
|
|
8
|
+
* `renderContextMenu` function and its events as `context.data`, with the answering element as `context.source`.
|
|
9
|
+
*
|
|
10
|
+
* The request is pulled rather than pushed so every way of opening the menu (right click, long press, the keyboard
|
|
11
|
+
* context-menu key, `show()`) carries the same data, and a component needs no dependency on `@c2n/context-menu`:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* html`<div class="cell" @c2-context-menu-request=${(event: Event) => provideContextMenuData(event, this, { row, value })}>`
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* The innermost answer wins: a component nested in a table cell that answers first is not overwritten by the table.
|
|
18
|
+
*/
|
|
19
|
+
/** Name of the request event. It bubbles and is composed; its detail is a {@link ContextMenuRequestDetail}. */
|
|
20
|
+
export declare const CONTEXT_MENU_REQUEST_EVENT = "c2-context-menu-request";
|
|
21
|
+
export interface ContextMenuRequestDetail {
|
|
22
|
+
/** What the node under the pointer stands for; `undefined` until a component answers. */
|
|
23
|
+
data: unknown;
|
|
24
|
+
/** The component that answered, or `null`. */
|
|
25
|
+
source: Element | null;
|
|
26
|
+
}
|
|
27
|
+
/** Dispatches the request on `node` and returns the answer (`{ data: undefined, source: null }` when none came). */
|
|
28
|
+
export declare function requestContextMenuData(node: EventTarget): ContextMenuRequestDetail;
|
|
29
|
+
/** Answers a request with `data` on behalf of `source`, unless a component nearer the node answered first. */
|
|
30
|
+
export declare function provideContextMenuData(event: Event, source: Element, data: unknown): void;
|
|
31
|
+
//# sourceMappingURL=context-menu-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu-helper.d.ts","sourceRoot":"","sources":["../src/context-menu-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,+GAA+G;AAC/G,eAAO,MAAM,0BAA0B,4BAA4B,CAAA;AAEnE,MAAM,WAAW,wBAAwB;IACvC,yFAAyF;IACzF,IAAI,EAAE,OAAO,CAAA;IACb,8CAA8C;IAC9C,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;CACvB;AAED,oHAAoH;AACpH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,GAAG,wBAAwB,CAIlF;AAED,8GAA8G;AAC9G,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAKzF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The protocol a component uses to tell an enclosing `c2-context-menu` what was right-clicked.
|
|
3
|
+
*
|
|
4
|
+
* When `c2-context-menu` is about to open, it dispatches {@link CONTEXT_MENU_REQUEST_EVENT} on the innermost node
|
|
5
|
+
* under the pointer (the first entry of the triggering event's `composedPath()`), so it crosses shadow roots and
|
|
6
|
+
* reaches every component in between. A component that knows what that node stands for — `c2-table` for a cell,
|
|
7
|
+
* a chart for a data point — answers with {@link provideContextMenuData}, and the menu hands the value to its
|
|
8
|
+
* `renderContextMenu` function and its events as `context.data`, with the answering element as `context.source`.
|
|
9
|
+
*
|
|
10
|
+
* The request is pulled rather than pushed so every way of opening the menu (right click, long press, the keyboard
|
|
11
|
+
* context-menu key, `show()`) carries the same data, and a component needs no dependency on `@c2n/context-menu`:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* html`<div class="cell" @c2-context-menu-request=${(event: Event) => provideContextMenuData(event, this, { row, value })}>`
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* The innermost answer wins: a component nested in a table cell that answers first is not overwritten by the table.
|
|
18
|
+
*/
|
|
19
|
+
/** Name of the request event. It bubbles and is composed; its detail is a {@link ContextMenuRequestDetail}. */
|
|
20
|
+
export const CONTEXT_MENU_REQUEST_EVENT = 'c2-context-menu-request';
|
|
21
|
+
/** Dispatches the request on `node` and returns the answer (`{ data: undefined, source: null }` when none came). */
|
|
22
|
+
export function requestContextMenuData(node) {
|
|
23
|
+
const detail = { data: undefined, source: null };
|
|
24
|
+
node.dispatchEvent(new CustomEvent(CONTEXT_MENU_REQUEST_EVENT, { bubbles: true, composed: true, detail }));
|
|
25
|
+
return detail;
|
|
26
|
+
}
|
|
27
|
+
/** Answers a request with `data` on behalf of `source`, unless a component nearer the node answered first. */
|
|
28
|
+
export function provideContextMenuData(event, source, data) {
|
|
29
|
+
const detail = event.detail;
|
|
30
|
+
if (!detail || detail.source)
|
|
31
|
+
return;
|
|
32
|
+
detail.source = source;
|
|
33
|
+
detail.data = data;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=context-menu-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu-helper.js","sourceRoot":"","sources":["../src/context-menu-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAA;AASnE,oHAAoH;AACpH,MAAM,UAAU,sBAAsB,CAAC,IAAiB;IACtD,MAAM,MAAM,GAA6B,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IAC1E,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAA2B,0BAA0B,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACpI,OAAO,MAAM,CAAA;AACf,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,sBAAsB,CAAC,KAAY,EAAE,MAAe,EAAE,IAAa;IACjF,MAAM,MAAM,GAAI,KAA+C,CAAC,MAAM,CAAA;IACtE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM;QAAE,OAAM;IACpC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAA;AACpB,CAAC","sourcesContent":["/**\n * The protocol a component uses to tell an enclosing `c2-context-menu` what was right-clicked.\n *\n * When `c2-context-menu` is about to open, it dispatches {@link CONTEXT_MENU_REQUEST_EVENT} on the innermost node\n * under the pointer (the first entry of the triggering event's `composedPath()`), so it crosses shadow roots and\n * reaches every component in between. A component that knows what that node stands for — `c2-table` for a cell,\n * a chart for a data point — answers with {@link provideContextMenuData}, and the menu hands the value to its\n * `renderContextMenu` function and its events as `context.data`, with the answering element as `context.source`.\n *\n * The request is pulled rather than pushed so every way of opening the menu (right click, long press, the keyboard\n * context-menu key, `show()`) carries the same data, and a component needs no dependency on `@c2n/context-menu`:\n *\n * ```ts\n * html`<div class=\"cell\" @c2-context-menu-request=${(event: Event) => provideContextMenuData(event, this, { row, value })}>`\n * ```\n *\n * The innermost answer wins: a component nested in a table cell that answers first is not overwritten by the table.\n */\n\n/** Name of the request event. It bubbles and is composed; its detail is a {@link ContextMenuRequestDetail}. */\nexport const CONTEXT_MENU_REQUEST_EVENT = 'c2-context-menu-request'\n\nexport interface ContextMenuRequestDetail {\n /** What the node under the pointer stands for; `undefined` until a component answers. */\n data: unknown\n /** The component that answered, or `null`. */\n source: Element | null\n}\n\n/** Dispatches the request on `node` and returns the answer (`{ data: undefined, source: null }` when none came). */\nexport function requestContextMenuData(node: EventTarget): ContextMenuRequestDetail {\n const detail: ContextMenuRequestDetail = { data: undefined, source: null }\n node.dispatchEvent(new CustomEvent<ContextMenuRequestDetail>(CONTEXT_MENU_REQUEST_EVENT, { bubbles: true, composed: true, detail }))\n return detail\n}\n\n/** Answers a request with `data` on behalf of `source`, unless a component nearer the node answered first. */\nexport function provideContextMenuData(event: Event, source: Element, data: unknown): void {\n const detail = (event as CustomEvent<ContextMenuRequestDetail>).detail\n if (!detail || detail.source) return\n detail.source = source\n detail.data = data\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Day of the week as `Date#getDay` numbers it: 0 is Sunday, 1 Monday, … 6 Saturday. */
|
|
2
|
+
export type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
/** The locale a component should use: its own `locale` setting, else the browser's language, else `en-US`. */
|
|
4
|
+
export declare function resolveLocale(locale?: string | null): string;
|
|
5
|
+
/**
|
|
6
|
+
* First day of the week in `locale`'s convention: Sunday in `en-US`, Monday in `fr` or `en-GB`, Saturday in `ar-EG`.
|
|
7
|
+
* A language without a region (`en`) takes its most likely region (`en-US`).
|
|
8
|
+
*/
|
|
9
|
+
export declare function firstDayOfWeek(locale: string): Weekday;
|
|
10
|
+
//# sourceMappingURL=locale-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-helper.d.ts","sourceRoot":"","sources":["../src/locale-helper.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAE/C,8GAA8G;AAC9G,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAG5D;AAcD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAkBtD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The locale a component should use: its own `locale` setting, else the browser's language, else `en-US`. */
|
|
2
|
+
export function resolveLocale(locale) {
|
|
3
|
+
if (locale)
|
|
4
|
+
return locale;
|
|
5
|
+
return (typeof navigator !== 'undefined' && navigator.language) || 'en-US';
|
|
6
|
+
}
|
|
7
|
+
// CLDR regions whose week starts on Sunday or Saturday; every other region starts on Monday. Only used by browsers
|
|
8
|
+
// without `Intl.Locale` week info (Firefox before 130).
|
|
9
|
+
const SUNDAY_REGIONS = new Set('AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW'.split(' '));
|
|
10
|
+
const SATURDAY_REGIONS = new Set('AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY'.split(' '));
|
|
11
|
+
/**
|
|
12
|
+
* First day of the week in `locale`'s convention: Sunday in `en-US`, Monday in `fr` or `en-GB`, Saturday in `ar-EG`.
|
|
13
|
+
* A language without a region (`en`) takes its most likely region (`en-US`).
|
|
14
|
+
*/
|
|
15
|
+
export function firstDayOfWeek(locale) {
|
|
16
|
+
let intlLocale;
|
|
17
|
+
try {
|
|
18
|
+
intlLocale = new Intl.Locale(locale);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return 1;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
// `getWeekInfo()` in current browsers, the older `weekInfo` getter in Safari; ISO numbering, Sunday is 7.
|
|
25
|
+
const info = intlLocale.getWeekInfo?.() ?? intlLocale.weekInfo;
|
|
26
|
+
if (info && info.firstDay >= 1 && info.firstDay <= 7)
|
|
27
|
+
return (info.firstDay % 7);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Fall through to the region table.
|
|
31
|
+
}
|
|
32
|
+
const region = intlLocale.maximize().region ?? '';
|
|
33
|
+
if (SUNDAY_REGIONS.has(region))
|
|
34
|
+
return 0;
|
|
35
|
+
if (SATURDAY_REGIONS.has(region))
|
|
36
|
+
return 6;
|
|
37
|
+
return 1;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=locale-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-helper.js","sourceRoot":"","sources":["../src/locale-helper.ts"],"names":[],"mappings":"AAGA,8GAA8G;AAC9G,MAAM,UAAU,aAAa,CAAC,MAAsB;IAClD,IAAI,MAAM;QAAE,OAAO,MAAM,CAAA;IACzB,OAAO,CAAC,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAA;AAC5E,CAAC;AAED,mHAAmH;AACnH,wDAAwD;AACxD,MAAM,cAAc,GAAG,IAAI,GAAG,CAC5B,sKAAsK,CAAC,KAAK,CAC1K,GAAG,CACJ,CACF,CAAA;AACD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,8CAA8C,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;AAK3F;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,IAAI,UAA8B,CAAA;IAClC,IAAI,CAAC;QACH,UAAU,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAuB,CAAA;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAA;IACV,CAAC;IACD,IAAI,CAAC;QACH,0GAA0G;QAC1G,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,EAAE,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAA;QAC9D,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAY,CAAA;IAC7F,CAAC;IAAC,MAAM,CAAC;QACP,oCAAoC;IACtC,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,MAAM,IAAI,EAAE,CAAA;IACjD,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAA;IACxC,IAAI,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAA;IAC1C,OAAO,CAAC,CAAA;AACV,CAAC","sourcesContent":["/** Day of the week as `Date#getDay` numbers it: 0 is Sunday, 1 Monday, … 6 Saturday. */\nexport type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\n/** The locale a component should use: its own `locale` setting, else the browser's language, else `en-US`. */\nexport function resolveLocale(locale?: string | null): string {\n if (locale) return locale\n return (typeof navigator !== 'undefined' && navigator.language) || 'en-US'\n}\n\n// CLDR regions whose week starts on Sunday or Saturday; every other region starts on Monday. Only used by browsers\n// without `Intl.Locale` week info (Firefox before 130).\nconst SUNDAY_REGIONS = new Set(\n 'AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW'.split(\n ' ',\n ),\n)\nconst SATURDAY_REGIONS = new Set('AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY'.split(' '))\n\ntype WeekInfo = { firstDay: number }\ntype LocaleWithWeekInfo = Intl.Locale & { getWeekInfo?: () => WeekInfo; weekInfo?: WeekInfo }\n\n/**\n * First day of the week in `locale`'s convention: Sunday in `en-US`, Monday in `fr` or `en-GB`, Saturday in `ar-EG`.\n * A language without a region (`en`) takes its most likely region (`en-US`).\n */\nexport function firstDayOfWeek(locale: string): Weekday {\n let intlLocale: LocaleWithWeekInfo\n try {\n intlLocale = new Intl.Locale(locale) as LocaleWithWeekInfo\n } catch {\n return 1\n }\n try {\n // `getWeekInfo()` in current browsers, the older `weekInfo` getter in Safari; ISO numbering, Sunday is 7.\n const info = intlLocale.getWeekInfo?.() ?? intlLocale.weekInfo\n if (info && info.firstDay >= 1 && info.firstDay <= 7) return (info.firstDay % 7) as Weekday\n } catch {\n // Fall through to the region table.\n }\n const region = intlLocale.maximize().region ?? ''\n if (SUNDAY_REGIONS.has(region)) return 0\n if (SATURDAY_REGIONS.has(region)) return 6\n return 1\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "tsc -p tsconfig.json -w",
|
|
6
6
|
"build": "tsc -p tsconfig.json"
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"types": "./dist/event-helper.d.ts",
|
|
25
25
|
"default": "./dist/event-helper.js"
|
|
26
26
|
},
|
|
27
|
+
"./context-menu-helper.js": {
|
|
28
|
+
"types": "./dist/context-menu-helper.d.ts",
|
|
29
|
+
"default": "./dist/context-menu-helper.js"
|
|
30
|
+
},
|
|
27
31
|
"./data-helper.js": {
|
|
28
32
|
"types": "./dist/data-helper.d.ts",
|
|
29
33
|
"default": "./dist/data-helper.js"
|
|
@@ -51,6 +55,10 @@
|
|
|
51
55
|
"./controllers/virtual-scroll.js": {
|
|
52
56
|
"types": "./dist/controllers/virtual-scroll.d.ts",
|
|
53
57
|
"default": "./dist/controllers/virtual-scroll.js"
|
|
58
|
+
},
|
|
59
|
+
"./locale-helper.js": {
|
|
60
|
+
"types": "./dist/locale-helper.d.ts",
|
|
61
|
+
"default": "./dist/locale-helper.js"
|
|
54
62
|
}
|
|
55
63
|
},
|
|
56
64
|
"files": [
|
|
@@ -72,5 +80,5 @@
|
|
|
72
80
|
"devDependencies": {
|
|
73
81
|
"@c2n/config": "*"
|
|
74
82
|
},
|
|
75
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "794a69ba1e429fb7e2e5acfe827c98da473c852f"
|
|
76
84
|
}
|