@ionic/angular 9.0.3-dev.11790016799.1e269b7a → 9.0.3-dev.11790116791.11c9cd1e
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/css/ionic/bundle.ionic.css +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/css/ionic/global.bundle.ionic.css +1 -1
- package/css/ionic/global.bundle.ionic.css.map +1 -1
- package/css/ionic/ionic-swiper.ionic.css +1 -1
- package/css/ionic/ionic-swiper.ionic.css.map +1 -1
- package/css/ionic/link.ionic.css +1 -1
- package/css/ionic/link.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/dist/common/directives/navigation/back-button.d.ts +1 -0
- package/dist/common/directives/navigation/back-button.js +15 -4
- package/dist/common/directives/navigation/back-button.js.map +1 -1
- package/dist/common/directives/navigation/nav.d.ts +2 -0
- package/dist/common/directives/navigation/nav.js +12 -4
- package/dist/common/directives/navigation/nav.js.map +1 -1
- package/dist/common/directives/navigation/router-outlet.d.ts +2 -0
- package/dist/common/directives/navigation/router-outlet.js +8 -2
- package/dist/common/directives/navigation/router-outlet.js.map +1 -1
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.js +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/overlays/modal.d.ts +9 -0
- package/dist/common/overlays/modal.js +14 -12
- package/dist/common/overlays/modal.js.map +1 -1
- package/dist/common/overlays/popover.d.ts +12 -1
- package/dist/common/overlays/popover.js +16 -13
- package/dist/common/overlays/popover.js.map +1 -1
- package/dist/common/utils/boolean-attribute.d.ts +19 -0
- package/dist/common/utils/boolean-attribute.js +31 -0
- package/dist/common/utils/boolean-attribute.js.map +1 -0
- package/dist/common/utils/proxy.d.ts +7 -0
- package/dist/common/utils/proxy.js +5 -0
- package/dist/common/utils/proxy.js.map +1 -1
- package/dist/lazy/directives/angular-component-lib/boolean-attribute.d.ts +35 -0
- package/dist/lazy/directives/angular-component-lib/boolean-attribute.js +43 -0
- package/dist/lazy/directives/angular-component-lib/boolean-attribute.js.map +1 -0
- package/dist/lazy/directives/proxies.d.ts +150 -0
- package/dist/lazy/directives/proxies.js +119 -118
- package/dist/lazy/directives/proxies.js.map +1 -1
- package/dist/standalone/directives/angular-component-lib/boolean-attribute.d.ts +35 -0
- package/dist/standalone/directives/angular-component-lib/boolean-attribute.js +43 -0
- package/dist/standalone/directives/angular-component-lib/boolean-attribute.js.map +1 -0
- package/dist/standalone/directives/checkbox.d.ts +5 -1
- package/dist/standalone/directives/checkbox.js +9 -6
- package/dist/standalone/directives/checkbox.js.map +1 -1
- package/dist/standalone/directives/datetime.d.ts +9 -0
- package/dist/standalone/directives/datetime.js +14 -12
- package/dist/standalone/directives/datetime.js.map +1 -1
- package/dist/standalone/directives/icon.d.ts +3 -0
- package/dist/standalone/directives/icon.js +19 -3
- package/dist/standalone/directives/icon.js.map +1 -1
- package/dist/standalone/directives/input-otp.d.ts +2 -0
- package/dist/standalone/directives/input-otp.js +7 -5
- package/dist/standalone/directives/input-otp.js.map +1 -1
- package/dist/standalone/directives/input.d.ts +10 -0
- package/dist/standalone/directives/input.js +15 -13
- package/dist/standalone/directives/input.js.map +1 -1
- package/dist/standalone/directives/ion-accordion-group.d.ts +4 -0
- package/dist/standalone/directives/ion-accordion-group.js +3 -2
- package/dist/standalone/directives/ion-accordion-group.js.map +1 -1
- package/dist/standalone/directives/ion-accordion.d.ts +2 -0
- package/dist/standalone/directives/ion-accordion.js +3 -2
- package/dist/standalone/directives/ion-accordion.js.map +1 -1
- package/dist/standalone/directives/ion-action-sheet.d.ts +5 -0
- package/dist/standalone/directives/ion-action-sheet.js +3 -2
- package/dist/standalone/directives/ion-action-sheet.js.map +1 -1
- package/dist/standalone/directives/ion-alert.d.ts +5 -0
- package/dist/standalone/directives/ion-alert.js +3 -2
- package/dist/standalone/directives/ion-alert.js.map +1 -1
- package/dist/standalone/directives/ion-avatar.d.ts +1 -0
- package/dist/standalone/directives/ion-avatar.js +3 -2
- package/dist/standalone/directives/ion-avatar.js.map +1 -1
- package/dist/standalone/directives/ion-backdrop.d.ts +3 -0
- package/dist/standalone/directives/ion-backdrop.js +3 -2
- package/dist/standalone/directives/ion-backdrop.js.map +1 -1
- package/dist/standalone/directives/ion-breadcrumb.d.ts +3 -0
- package/dist/standalone/directives/ion-breadcrumb.js +3 -2
- package/dist/standalone/directives/ion-breadcrumb.js.map +1 -1
- package/dist/standalone/directives/ion-button.d.ts +2 -0
- package/dist/standalone/directives/ion-button.js +3 -2
- package/dist/standalone/directives/ion-button.js.map +1 -1
- package/dist/standalone/directives/ion-buttons.d.ts +1 -0
- package/dist/standalone/directives/ion-buttons.js +3 -2
- package/dist/standalone/directives/ion-buttons.js.map +1 -1
- package/dist/standalone/directives/ion-card-header.d.ts +1 -0
- package/dist/standalone/directives/ion-card-header.js +3 -2
- package/dist/standalone/directives/ion-card-header.js.map +1 -1
- package/dist/standalone/directives/ion-card.d.ts +2 -0
- package/dist/standalone/directives/ion-card.js +3 -2
- package/dist/standalone/directives/ion-card.js.map +1 -1
- package/dist/standalone/directives/ion-chip.d.ts +2 -0
- package/dist/standalone/directives/ion-chip.js +3 -2
- package/dist/standalone/directives/ion-chip.js.map +1 -1
- package/dist/standalone/directives/ion-content.d.ts +5 -0
- package/dist/standalone/directives/ion-content.js +3 -2
- package/dist/standalone/directives/ion-content.js.map +1 -1
- package/dist/standalone/directives/ion-datetime-button.d.ts +1 -0
- package/dist/standalone/directives/ion-datetime-button.js +3 -2
- package/dist/standalone/directives/ion-datetime-button.js.map +1 -1
- package/dist/standalone/directives/ion-divider.d.ts +1 -0
- package/dist/standalone/directives/ion-divider.js +3 -2
- package/dist/standalone/directives/ion-divider.js.map +1 -1
- package/dist/standalone/directives/ion-fab-button.d.ts +4 -0
- package/dist/standalone/directives/ion-fab-button.js +3 -2
- package/dist/standalone/directives/ion-fab-button.js.map +1 -1
- package/dist/standalone/directives/ion-fab-list.d.ts +1 -0
- package/dist/standalone/directives/ion-fab-list.js +3 -2
- package/dist/standalone/directives/ion-fab-list.js.map +1 -1
- package/dist/standalone/directives/ion-fab.d.ts +2 -0
- package/dist/standalone/directives/ion-fab.js +3 -2
- package/dist/standalone/directives/ion-fab.js.map +1 -1
- package/dist/standalone/directives/ion-footer.d.ts +1 -0
- package/dist/standalone/directives/ion-footer.js +3 -2
- package/dist/standalone/directives/ion-footer.js.map +1 -1
- package/dist/standalone/directives/ion-grid.d.ts +1 -0
- package/dist/standalone/directives/ion-grid.js +3 -2
- package/dist/standalone/directives/ion-grid.js.map +1 -1
- package/dist/standalone/directives/ion-header.d.ts +2 -0
- package/dist/standalone/directives/ion-header.js +3 -2
- package/dist/standalone/directives/ion-header.js.map +1 -1
- package/dist/standalone/directives/ion-infinite-scroll.d.ts +2 -0
- package/dist/standalone/directives/ion-infinite-scroll.js +3 -2
- package/dist/standalone/directives/ion-infinite-scroll.js.map +1 -1
- package/dist/standalone/directives/ion-item-divider.d.ts +1 -0
- package/dist/standalone/directives/ion-item-divider.js +3 -2
- package/dist/standalone/directives/ion-item-divider.js.map +1 -1
- package/dist/standalone/directives/ion-item-option.d.ts +2 -0
- package/dist/standalone/directives/ion-item-option.js +3 -2
- package/dist/standalone/directives/ion-item-option.js.map +1 -1
- package/dist/standalone/directives/ion-item-sliding.d.ts +1 -0
- package/dist/standalone/directives/ion-item-sliding.js +3 -2
- package/dist/standalone/directives/ion-item-sliding.js.map +1 -1
- package/dist/standalone/directives/ion-item.d.ts +3 -0
- package/dist/standalone/directives/ion-item.js +3 -2
- package/dist/standalone/directives/ion-item.js.map +1 -1
- package/dist/standalone/directives/ion-list.d.ts +1 -0
- package/dist/standalone/directives/ion-list.js +3 -2
- package/dist/standalone/directives/ion-list.js.map +1 -1
- package/dist/standalone/directives/ion-loading.d.ts +6 -0
- package/dist/standalone/directives/ion-loading.js +3 -2
- package/dist/standalone/directives/ion-loading.js.map +1 -1
- package/dist/standalone/directives/ion-menu-button.d.ts +2 -0
- package/dist/standalone/directives/ion-menu-button.js +3 -2
- package/dist/standalone/directives/ion-menu-button.js.map +1 -1
- package/dist/standalone/directives/ion-menu-toggle.d.ts +1 -0
- package/dist/standalone/directives/ion-menu-toggle.js +3 -2
- package/dist/standalone/directives/ion-menu-toggle.js.map +1 -1
- package/dist/standalone/directives/ion-menu.d.ts +2 -0
- package/dist/standalone/directives/ion-menu.js +3 -2
- package/dist/standalone/directives/ion-menu.js.map +1 -1
- package/dist/standalone/directives/ion-picker-column-option.d.ts +1 -0
- package/dist/standalone/directives/ion-picker-column-option.js +3 -2
- package/dist/standalone/directives/ion-picker-column-option.js.map +1 -1
- package/dist/standalone/directives/ion-picker-column.d.ts +1 -0
- package/dist/standalone/directives/ion-picker-column.js +3 -2
- package/dist/standalone/directives/ion-picker-column.js.map +1 -1
- package/dist/standalone/directives/ion-progress-bar.d.ts +1 -0
- package/dist/standalone/directives/ion-progress-bar.js +3 -2
- package/dist/standalone/directives/ion-progress-bar.js.map +1 -1
- package/dist/standalone/directives/ion-radio.d.ts +1 -0
- package/dist/standalone/directives/ion-radio.js +3 -2
- package/dist/standalone/directives/ion-radio.js.map +1 -1
- package/dist/standalone/directives/ion-refresher.d.ts +1 -0
- package/dist/standalone/directives/ion-refresher.js +3 -2
- package/dist/standalone/directives/ion-refresher.js.map +1 -1
- package/dist/standalone/directives/ion-reorder-group.d.ts +1 -0
- package/dist/standalone/directives/ion-reorder-group.js +3 -2
- package/dist/standalone/directives/ion-reorder-group.js.map +1 -1
- package/dist/standalone/directives/ion-segment-button.d.ts +1 -0
- package/dist/standalone/directives/ion-segment-button.js +3 -2
- package/dist/standalone/directives/ion-segment-button.js.map +1 -1
- package/dist/standalone/directives/ion-segment-view.d.ts +2 -0
- package/dist/standalone/directives/ion-segment-view.js +3 -2
- package/dist/standalone/directives/ion-segment-view.js.map +1 -1
- package/dist/standalone/directives/ion-select-modal.d.ts +2 -0
- package/dist/standalone/directives/ion-select-modal.js +3 -2
- package/dist/standalone/directives/ion-select-modal.js.map +1 -1
- package/dist/standalone/directives/ion-select-option.d.ts +1 -0
- package/dist/standalone/directives/ion-select-option.js +3 -2
- package/dist/standalone/directives/ion-select-option.js.map +1 -1
- package/dist/standalone/directives/ion-skeleton-text.d.ts +1 -0
- package/dist/standalone/directives/ion-skeleton-text.js +3 -2
- package/dist/standalone/directives/ion-skeleton-text.js.map +1 -1
- package/dist/standalone/directives/ion-spinner.d.ts +1 -0
- package/dist/standalone/directives/ion-spinner.js +3 -2
- package/dist/standalone/directives/ion-spinner.js.map +1 -1
- package/dist/standalone/directives/ion-split-pane.d.ts +1 -0
- package/dist/standalone/directives/ion-split-pane.js +3 -2
- package/dist/standalone/directives/ion-split-pane.js.map +1 -1
- package/dist/standalone/directives/ion-tab-bar.d.ts +1 -0
- package/dist/standalone/directives/ion-tab-bar.js +3 -2
- package/dist/standalone/directives/ion-tab-bar.js.map +1 -1
- package/dist/standalone/directives/ion-tab-button.d.ts +2 -0
- package/dist/standalone/directives/ion-tab-button.js +3 -2
- package/dist/standalone/directives/ion-tab-button.js.map +1 -1
- package/dist/standalone/directives/ion-toast.d.ts +4 -0
- package/dist/standalone/directives/ion-toast.js +3 -2
- package/dist/standalone/directives/ion-toast.js.map +1 -1
- package/dist/standalone/directives/radio-group.d.ts +1 -0
- package/dist/standalone/directives/radio-group.js +13 -4
- package/dist/standalone/directives/radio-group.js.map +1 -1
- package/dist/standalone/directives/range.d.ts +5 -0
- package/dist/standalone/directives/range.js +10 -8
- package/dist/standalone/directives/range.js.map +1 -1
- package/dist/standalone/directives/searchbar.d.ts +4 -0
- package/dist/standalone/directives/searchbar.js +9 -7
- package/dist/standalone/directives/searchbar.js.map +1 -1
- package/dist/standalone/directives/segment.d.ts +4 -0
- package/dist/standalone/directives/segment.js +14 -4
- package/dist/standalone/directives/segment.js.map +1 -1
- package/dist/standalone/directives/select.d.ts +5 -1
- package/dist/standalone/directives/select.js +9 -5
- package/dist/standalone/directives/select.js.map +1 -1
- package/dist/standalone/directives/textarea.d.ts +8 -0
- package/dist/standalone/directives/textarea.js +13 -11
- package/dist/standalone/directives/textarea.js.map +1 -1
- package/dist/standalone/directives/toggle.d.ts +5 -1
- package/dist/standalone/directives/toggle.js +9 -6
- package/dist/standalone/directives/toggle.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../src/common/utils/proxy.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,MAAgB,EAAE,EAAE;IACxD,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACtB,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE;YACrC,GAAG;gBACD,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC;YACD,GAAG,CAAC,GAAQ;gBACV,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACxD,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAE,OAAiB,EAAE,EAAE;IAC1D,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAChC,OAAO,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QAC7B,SAAS,CAAC,UAAU,CAAC,GAAG;YACtB,MAAM,IAAI,GAAG,SAAS,CAAC;YACvB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAa,EAAE,EAAO,EAAE,MAAgB,EAAE,EAAE;IACvE,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAEF,iDAAiD;AACjD,MAAM,UAAU,QAAQ,CAAC,IAAyE;IAChG,MAAM,SAAS,GAAG,UAAU,GAAQ;QAClC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAExD,IAAI,qBAAqB,KAAK,SAAS,EAAE,CAAC;YACxC,qBAAqB,EAAE,CAAC;QAC1B,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC3B,CAAC;QACD,IAAI,OAAO,EAAE,CAAC;YACZ,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// TODO: Is there a way we can grab this from angular-component-lib instead?\n\n/* eslint-disable */\n/* tslint:disable */\nimport { fromEvent } from 'rxjs';\n\nexport const proxyInputs = (Cmp: any, inputs: string[]) => {\n const Prototype = Cmp.prototype;\n inputs.forEach((item) => {\n Object.defineProperty(Prototype, item, {\n get() {\n return this.el[item];\n },\n set(val: any) {\n this.z.runOutsideAngular(() => (this.el[item] = val));\n },\n });\n });\n};\n\nexport const proxyMethods = (Cmp: any, methods: string[]) => {\n const Prototype = Cmp.prototype;\n methods.forEach((methodName) => {\n Prototype[methodName] = function () {\n const args = arguments;\n return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));\n };\n });\n};\n\nexport const proxyOutputs = (instance: any, el: any, events: string[]) => {\n events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));\n};\n\n// tslint:disable-next-line: only-arrow-functions\nexport function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any }) {\n const decorator = function (cls: any) {\n const { defineCustomElementFn, inputs, methods } = opts;\n\n if (defineCustomElementFn !== undefined) {\n defineCustomElementFn();\n }\n\n if (inputs) {\n proxyInputs(cls, inputs);\n }\n if (methods) {\n proxyMethods(cls, methods);\n }\n return cls;\n };\n return decorator;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../src/common/utils/proxy.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,MAAgB,EAAE,EAAE;IACxD,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACtB,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE;YACrC,GAAG;gBACD,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC;YACD,GAAG,CAAC,GAAQ;gBACV,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACxD,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAE,OAAiB,EAAE,EAAE;IAC1D,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAChC,OAAO,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QAC7B,SAAS,CAAC,UAAU,CAAC,GAAG;YACtB,MAAM,IAAI,GAAG,SAAS,CAAC;YACvB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAqC,EAAY,EAAE,CAC5E,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAa,EAAE,EAAO,EAAE,MAAgB,EAAE,EAAE;IACvE,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAEF,iDAAiD;AACjD,MAAM,UAAU,QAAQ,CAAC,IAAyE;IAChG,MAAM,SAAS,GAAG,UAAU,GAAQ;QAClC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAExD,IAAI,qBAAqB,KAAK,SAAS,EAAE,CAAC;YACxC,qBAAqB,EAAE,CAAC;QAC1B,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC3B,CAAC;QACD,IAAI,OAAO,EAAE,CAAC;YACZ,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// TODO: Is there a way we can grab this from angular-component-lib instead?\n\n/* eslint-disable */\n/* tslint:disable */\nimport { fromEvent } from 'rxjs';\n\nexport const proxyInputs = (Cmp: any, inputs: string[]) => {\n const Prototype = Cmp.prototype;\n inputs.forEach((item) => {\n Object.defineProperty(Prototype, item, {\n get() {\n return this.el[item];\n },\n set(val: any) {\n this.z.runOutsideAngular(() => (this.el[item] = val));\n },\n });\n });\n};\n\nexport const proxyMethods = (Cmp: any, methods: string[]) => {\n const Prototype = Cmp.prototype;\n methods.forEach((methodName) => {\n Prototype[methodName] = function () {\n const args = arguments;\n return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));\n };\n });\n};\n\n/**\n * Extracts the plain names from an inputs array that may contain transform entries.\n * `ProxyCmp` only needs the names, and runs at runtime rather than through the Angular compiler.\n */\nexport const inputNames = (inputs: (string | { name: string })[]): string[] =>\n inputs.map((input) => (typeof input === 'string' ? input : input.name));\n\nexport const proxyOutputs = (instance: any, el: any, events: string[]) => {\n events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));\n};\n\n// tslint:disable-next-line: only-arrow-functions\nexport function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any }) {\n const decorator = function (cls: any) {\n const { defineCustomElementFn, inputs, methods } = opts;\n\n if (defineCustomElementFn !== undefined) {\n defineCustomElementFn();\n }\n\n if (inputs) {\n proxyInputs(cls, inputs);\n }\n if (methods) {\n proxyMethods(cls, methods);\n }\n return cls;\n };\n return decorator;\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a value to a boolean so that boolean properties can be set by attribute presence,
|
|
3
|
+
* e.g. `<my-component disabled>` instead of `<my-component [disabled]="true">`.
|
|
4
|
+
*
|
|
5
|
+
* Strings are coerced the same way Angular's `booleanAttribute` coerces them, so `''` (a bare
|
|
6
|
+
* attribute) becomes `true` and `'false'` becomes `false`.
|
|
7
|
+
*
|
|
8
|
+
* Unlike Angular's `booleanAttribute`, `null` and `undefined` are passed through rather than
|
|
9
|
+
* coerced to `false`. Components frequently treat them as a state distinct from `false`:
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* // `undefined` means "decide based on the mode", which is not the same as `false`
|
|
13
|
+
* const showDetail = detail !== undefined ? detail : mode === 'ios';
|
|
14
|
+
*
|
|
15
|
+
* // a strict comparison also behaves differently for `null` than it does for `false`
|
|
16
|
+
* const showHandle = handle !== false;
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Both values reach inputs routinely in Angular templates, from the `async` pipe before its
|
|
20
|
+
* first emission and from form control values, so coercing them would change the behavior of
|
|
21
|
+
* bindings that work today.
|
|
22
|
+
*
|
|
23
|
+
* This is implemented here rather than imported from `@angular/core` so that consumers on
|
|
24
|
+
* Angular versions without `booleanAttribute` are unaffected by this file being generated.
|
|
25
|
+
*
|
|
26
|
+
* The parameter type is what Angular derives `ngAcceptInputType_*` from, so it decides which
|
|
27
|
+
* template bindings compile. Widening it to `unknown` would let any expression through.
|
|
28
|
+
*
|
|
29
|
+
* Declared as a function rather than an arrow constant because Angular has to resolve input
|
|
30
|
+
* transforms statically when compiling a library in partial compilation mode.
|
|
31
|
+
*
|
|
32
|
+
* This lives in its own file, separate from `utils.ts`, so that it carries no runtime imports.
|
|
33
|
+
* That keeps it independently type-checkable without pulling `rxjs` in for `proxyOutputs`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function nullableBooleanAttribute(value: boolean | string | null | undefined): boolean | null | undefined;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* Transforms a value to a boolean so that boolean properties can be set by attribute presence,
|
|
5
|
+
* e.g. `<my-component disabled>` instead of `<my-component [disabled]="true">`.
|
|
6
|
+
*
|
|
7
|
+
* Strings are coerced the same way Angular's `booleanAttribute` coerces them, so `''` (a bare
|
|
8
|
+
* attribute) becomes `true` and `'false'` becomes `false`.
|
|
9
|
+
*
|
|
10
|
+
* Unlike Angular's `booleanAttribute`, `null` and `undefined` are passed through rather than
|
|
11
|
+
* coerced to `false`. Components frequently treat them as a state distinct from `false`:
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // `undefined` means "decide based on the mode", which is not the same as `false`
|
|
15
|
+
* const showDetail = detail !== undefined ? detail : mode === 'ios';
|
|
16
|
+
*
|
|
17
|
+
* // a strict comparison also behaves differently for `null` than it does for `false`
|
|
18
|
+
* const showHandle = handle !== false;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Both values reach inputs routinely in Angular templates, from the `async` pipe before its
|
|
22
|
+
* first emission and from form control values, so coercing them would change the behavior of
|
|
23
|
+
* bindings that work today.
|
|
24
|
+
*
|
|
25
|
+
* This is implemented here rather than imported from `@angular/core` so that consumers on
|
|
26
|
+
* Angular versions without `booleanAttribute` are unaffected by this file being generated.
|
|
27
|
+
*
|
|
28
|
+
* The parameter type is what Angular derives `ngAcceptInputType_*` from, so it decides which
|
|
29
|
+
* template bindings compile. Widening it to `unknown` would let any expression through.
|
|
30
|
+
*
|
|
31
|
+
* Declared as a function rather than an arrow constant because Angular has to resolve input
|
|
32
|
+
* transforms statically when compiling a library in partial compilation mode.
|
|
33
|
+
*
|
|
34
|
+
* This lives in its own file, separate from `utils.ts`, so that it carries no runtime imports.
|
|
35
|
+
* That keeps it independently type-checkable without pulling `rxjs` in for `proxyOutputs`.
|
|
36
|
+
*/
|
|
37
|
+
export function nullableBooleanAttribute(value) {
|
|
38
|
+
if (value === null || value === undefined) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return typeof value === 'boolean' ? value : value !== 'false';
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=boolean-attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-attribute.js","sourceRoot":"","sources":["../../../../src/lazy/directives/angular-component-lib/boolean-attribute.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAA0C;IACjF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC;AAChE,CAAC","sourcesContent":["/* eslint-disable */\n/* tslint:disable */\n\n/**\n * Transforms a value to a boolean so that boolean properties can be set by attribute presence,\n * e.g. `<my-component disabled>` instead of `<my-component [disabled]=\"true\">`.\n *\n * Strings are coerced the same way Angular's `booleanAttribute` coerces them, so `''` (a bare\n * attribute) becomes `true` and `'false'` becomes `false`.\n *\n * Unlike Angular's `booleanAttribute`, `null` and `undefined` are passed through rather than\n * coerced to `false`. Components frequently treat them as a state distinct from `false`:\n *\n * ```tsx\n * // `undefined` means \"decide based on the mode\", which is not the same as `false`\n * const showDetail = detail !== undefined ? detail : mode === 'ios';\n *\n * // a strict comparison also behaves differently for `null` than it does for `false`\n * const showHandle = handle !== false;\n * ```\n *\n * Both values reach inputs routinely in Angular templates, from the `async` pipe before its\n * first emission and from form control values, so coercing them would change the behavior of\n * bindings that work today.\n *\n * This is implemented here rather than imported from `@angular/core` so that consumers on\n * Angular versions without `booleanAttribute` are unaffected by this file being generated.\n *\n * The parameter type is what Angular derives `ngAcceptInputType_*` from, so it decides which\n * template bindings compile. Widening it to `unknown` would let any expression through.\n *\n * Declared as a function rather than an arrow constant because Angular has to resolve input\n * transforms statically when compiling a library in partial compilation mode.\n *\n * This lives in its own file, separate from `utils.ts`, so that it carries no runtime imports.\n * That keeps it independently type-checkable without pulling `rxjs` in for `proxyOutputs`.\n */\nexport function nullableBooleanAttribute(value: boolean | string | null | undefined): boolean | null | undefined {\n if (value === null || value === undefined) {\n return value;\n }\n return typeof value === 'boolean' ? value : value !== 'false';\n}\n"]}
|